From report at bugs.python.org  Fri Oct  1 03:08:55 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 01 Oct 2021 07:08:55 +0000
Subject: [issue40173] test.support.import_fresh_module fails to correctly
 block submodules when fresh is specified
In-Reply-To: <1585927123.84.0.0735169096885.issue40173@roundup.psfhosted.org>
Message-ID: <1633072135.74.0.234206127206.issue40173@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40173>
_______________________________________

From report at bugs.python.org  Fri Oct  1 03:09:47 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 01 Oct 2021 07:09:47 +0000
Subject: [issue40058] Running test_datetime twice fails with: module
 'datetime' has no attribute '_divide_and_round'
In-Reply-To: <1585101280.02.0.657415835319.issue40058@roundup.psfhosted.org>
Message-ID: <1633072187.79.0.30418405572.issue40058@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Fixed in issue40173.

----------
nosy: +serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40058>
_______________________________________

From report at bugs.python.org  Fri Oct  1 03:11:23 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 01 Oct 2021 07:11:23 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1633072283.07.0.538547924536.issue45229@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27031
pull_request: https://github.com/python/cpython/pull/28666

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Fri Oct  1 03:11:52 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 01 Oct 2021 07:11:52 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1633072312.97.0.0137443542749.issue45229@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27032
pull_request: https://github.com/python/cpython/pull/28667

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Fri Oct  1 03:14:02 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 01 Oct 2021 07:14:02 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1633072442.52.0.0709980003861.issue45229@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27033
pull_request: https://github.com/python/cpython/pull/28668

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Fri Oct  1 03:26:32 2021
From: report at bugs.python.org (Mike Crowe)
Date: Fri, 01 Oct 2021 07:26:32 +0000
Subject: [issue41710] acquire(timeout) of threading.Lock and
 threading.Condition is affected by jumps in system time: Python should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1633073192.0.0.522650930472.issue41710@roundup.psfhosted.org>


Mike Crowe <pythonbugs at mac.mcrowe.com> added the comment:

vstinner wrote:
> The glibc 2.30 adds pthread_cond_clockwait() which could be used to use
> CLOCK_MONOTONIC. But if pthread_cond_clockwait() is available (glibc 
> 2.30 or newer), it expects that pthread_condattr_setclock() is also 
> available. So I'm not sure that it's worth it to change 
> PyCOND_TIMEDWAIT().

That's correct. The only time that pthread_cond_clockwait is essential is if you don't know which clock you're going to need to use for the wait at the time of condition variable creation. (This is true for a generic condition variable wrapper that can be passed absolute timeouts using different clocks like the C++ std::condition_variable.)

However, sem_clockwait is the only way to wait on a semaphore using CLOCK_MONOTONIC, so it is worth using that rather than sem_timedwait if it's available. Similarly for pthread_mutex_clocklock.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Fri Oct  1 03:36:33 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 01 Oct 2021 07:36:33 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1633073793.05.0.335550129559.issue45229@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset ef7c7294e8404d844c1add892a8f6684e6cf4f31 by Miss Islington (bot) in branch '3.10':
bpo-45229: Make datetime tests discoverable (GH-28615)
https://github.com/python/cpython/commit/ef7c7294e8404d844c1add892a8f6684e6cf4f31


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Fri Oct  1 03:55:36 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 07:55:36 +0000
Subject: [issue41710] acquire(timeout) of threading.Lock and
 threading.Condition is affected by jumps in system time: Python should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1633074936.59.0.920142794548.issue41710@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 1ee0f94d16f150356a4b9b0a39d44ba1d2d5b9fc by Victor Stinner in branch 'main':
bpo-41710: PyThread_acquire_lock_timed() uses sem_clockwait() (GH-28662)
https://github.com/python/cpython/commit/1ee0f94d16f150356a4b9b0a39d44ba1d2d5b9fc


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Fri Oct  1 03:56:40 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 01 Oct 2021 07:56:40 +0000
Subject: [issue45310] test_multiprocessing_forkserver:
 test_shared_memory_basics() failed with FileExistsError: [Errno 17] File
 exists: '/test01_tsmb'
In-Reply-To: <1632831738.98.0.525271172358.issue45310@roundup.psfhosted.org>
Message-ID: <1633075000.73.0.314787306408.issue45310@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +27034
pull_request: https://github.com/python/cpython/pull/28669

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45310>
_______________________________________

From report at bugs.python.org  Fri Oct  1 03:56:36 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 01 Oct 2021 07:56:36 +0000
Subject: [issue45310] test_multiprocessing_forkserver:
 test_shared_memory_basics() failed with FileExistsError: [Errno 17] File
 exists: '/test01_tsmb'
In-Reply-To: <1632831738.98.0.525271172358.issue45310@roundup.psfhosted.org>
Message-ID: <1633074996.61.0.406889246517.issue45310@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset eb4495e8e275c83d691add116c4f2b74e73e3cc8 by Serhiy Storchaka in branch 'main':
bpo-45310: Fix parrallel shared memory tests (GH-28661)
https://github.com/python/cpython/commit/eb4495e8e275c83d691add116c4f2b74e73e3cc8


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45310>
_______________________________________

From report at bugs.python.org  Fri Oct  1 03:58:03 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 01 Oct 2021 07:58:03 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1633075083.14.0.58198723692.issue45229@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 2f205920127bd93eebed044cb1b61834764478ba by Serhiy Storchaka in branch 'main':
Revert "Revert "bpo-45229: Make datetime tests discoverable (GH-28615)" (GH-28650)" (GH-28667)
https://github.com/python/cpython/commit/2f205920127bd93eebed044cb1b61834764478ba


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Fri Oct  1 03:59:03 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 01 Oct 2021 07:59:03 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1633075143.15.0.851643870101.issue45229@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset e9d5cdda1ffa369550a634a3ec220db93433e0f4 by Serhiy Storchaka in branch '3.9':
Revert "Revert "bpo-45229: Make datetime tests discoverable (GH-28615). (GH-28645)" (GH-28660)" (GH-28666)
https://github.com/python/cpython/commit/e9d5cdda1ffa369550a634a3ec220db93433e0f4


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Fri Oct  1 04:00:08 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 08:00:08 +0000
Subject: [issue41710] threading.Lock.acquire(timeout) should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1633075208.12.0.518585070473.issue41710@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

With sem_clockwait(CLOCK_MONOTONIC) on Fedora 34 (glibc-2.33-20.fc34.x86_64, Linux kernel 5.13.19-200.fc34.x86_64), time_test.py now works as expected:

$ sudo ./python time_test.py
Took 2.000 s
Took 2.000 s
Took 2.000 s
Took 2.000 s
Took 2.000 s
Took 2.000 s
(...)

----------
title: acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC) -> threading.Lock.acquire(timeout) should use sem_clockwait(CLOCK_MONOTONIC)
versions: +Python 3.11 -Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Fri Oct  1 04:03:30 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 01 Oct 2021 08:03:30 +0000
Subject: [issue45310] test_multiprocessing_forkserver:
 test_shared_memory_basics() failed with FileExistsError: [Errno 17] File
 exists: '/test01_tsmb'
In-Reply-To: <1632831738.98.0.525271172358.issue45310@roundup.psfhosted.org>
Message-ID: <1633075410.58.0.202581855232.issue45310@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27035
pull_request: https://github.com/python/cpython/pull/28670

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45310>
_______________________________________

From report at bugs.python.org  Fri Oct  1 04:19:49 2021
From: report at bugs.python.org (kubat aytekin)
Date: Fri, 01 Oct 2021 08:19:49 +0000
Subject: [issue45338] Add key argument to collections.Counter
Message-ID: <1633076389.73.0.735065140955.issue45338@roundup.psfhosted.org>


New submission from kubat aytekin <kubataytekin at yahoo.com.tr>:

Counter has become the default tool for counting occurences of objects in an iterable. However by construction it only works on hashable objects as it is a subclass of dict. Would it be possible to implement a "key=" keyword argument as in sort etc.? 

Here's a stackoverflow question wherein either map or implementing a hash method was proposed:
https://stackoverflow.com/questions/69401713/elegant-way-of-counting-items-in-a-list-by-enum-value-in-python

----------
components: Library (Lib)
messages: 403002
nosy: kubataytekin
priority: normal
severity: normal
status: open
title: Add key argument to collections.Counter
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45338>
_______________________________________

From report at bugs.python.org  Fri Oct  1 04:20:43 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 08:20:43 +0000
Subject: [issue41710] threading.Lock.acquire(timeout) should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1633076443.49.0.458425386798.issue41710@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27036
pull_request: https://github.com/python/cpython/pull/28671

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Fri Oct  1 04:32:51 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 08:32:51 +0000
Subject: [issue41710] threading.Lock.acquire(timeout) should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1633077171.4.0.123349679861.issue41710@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27037
pull_request: https://github.com/python/cpython/pull/28672

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Fri Oct  1 04:48:32 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 08:48:32 +0000
Subject: [issue23428] Use the monotonic clock for thread conditions on POSIX
 platforms
In-Reply-To: <1423517667.9.0.82075564578.issue23428@psf.upfronthosting.co.za>
Message-ID: <1633078112.79.0.354763933569.issue23428@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
resolution: fixed -> duplicate
superseder:  -> NewGIL should use CLOCK_MONOTONIC if possible.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23428>
_______________________________________

From report at bugs.python.org  Fri Oct  1 04:49:02 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 08:49:02 +0000
Subject: [issue31267] threading.Timer object is affected by changes to system
 time: Python locks should use a monotonic clock if available
In-Reply-To: <1503521255.96.0.0977006158294.issue31267@psf.upfronthosting.co.za>
Message-ID: <1633078142.74.0.626189207937.issue31267@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
superseder: Use the monotonic clock for thread conditions on POSIX platforms -> NewGIL should use CLOCK_MONOTONIC if possible.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31267>
_______________________________________

From report at bugs.python.org  Fri Oct  1 04:52:42 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 08:52:42 +0000
Subject: [issue12822] threading.Condition.wait(timeout) should use a monotonic
 clock: use pthread_condattr_setclock(CLOCK_MONOTONIC)
In-Reply-To: <1314085416.99.0.752578807259.issue12822@psf.upfronthosting.co.za>
Message-ID: <1633078362.54.0.751654342805.issue12822@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
title: NewGIL should use CLOCK_MONOTONIC if possible. -> threading.Condition.wait(timeout) should use a monotonic clock: use pthread_condattr_setclock(CLOCK_MONOTONIC)

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue12822>
_______________________________________

From report at bugs.python.org  Fri Oct  1 04:53:13 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 08:53:13 +0000
Subject: [issue41710] threading.Lock.acquire(timeout) should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1633078393.06.0.370049077135.issue41710@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> There are already a number of closed bugs for this and related issues: bpo 23428, bpo 31267, bpo 35747.

Fixed bpo-12822 modified threading.Condition.wait(timeout) to use a monotonic clock: use pthread_condattr_setclock(CLOCK_MONOTONIC). bpo-23428, bpo-31267 and bpo-35747 are duplicates of bpo-12822.

This issue is about threading.Lock.acquire(timeout) which has a different implementation.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Fri Oct  1 04:49:34 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 08:49:34 +0000
Subject: [issue35747] Python threading event wait influenced by date change
In-Reply-To: <1547574873.05.0.783688735174.issue35747@roundup.psfhosted.org>
Message-ID: <1633078174.59.0.486329551426.issue35747@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
superseder: Use the monotonic clock for thread conditions on POSIX platforms -> NewGIL should use CLOCK_MONOTONIC if possible.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35747>
_______________________________________

From report at bugs.python.org  Fri Oct  1 05:13:41 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 01 Oct 2021 09:13:41 +0000
Subject: [issue41111] [C API] Convert a few stdlib extensions to the limited C
 API (PEP 384)
In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org>
Message-ID: <1633079621.15.0.716324846472.issue41111@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
nosy: +christian.heimes

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41111>
_______________________________________

From report at bugs.python.org  Fri Oct  1 05:25:58 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 09:25:58 +0000
Subject: [issue41710] threading.Lock.acquire(timeout) should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1633080358.13.0.732202533523.issue41710@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27038
pull_request: https://github.com/python/cpython/pull/28673

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Fri Oct  1 05:38:31 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 01 Oct 2021 09:38:31 +0000
Subject: [issue45310] test_multiprocessing_forkserver:
 test_shared_memory_basics() failed with FileExistsError: [Errno 17] File
 exists: '/test01_tsmb'
In-Reply-To: <1632831738.98.0.525271172358.issue45310@roundup.psfhosted.org>
Message-ID: <1633081111.43.0.491957429514.issue45310@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 4d5d161d2aae41738d28e22bac5e1e08c01394bb by Serhiy Storchaka in branch '3.9':
[3.9] bpo-45310: Fix parrallel shared memory tests (GH-28661) (GH-28670)
https://github.com/python/cpython/commit/4d5d161d2aae41738d28e22bac5e1e08c01394bb


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45310>
_______________________________________

From report at bugs.python.org  Fri Oct  1 05:41:24 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 01 Oct 2021 09:41:24 +0000
Subject: [issue45310] test_multiprocessing_forkserver:
 test_shared_memory_basics() failed with FileExistsError: [Errno 17] File
 exists: '/test01_tsmb'
In-Reply-To: <1632831738.98.0.525271172358.issue45310@roundup.psfhosted.org>
Message-ID: <1633081284.54.0.321032373854.issue45310@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 4e6681d0cf9e7ce5621c34ff87055fa1f9786108 by Miss Islington (bot) in branch '3.10':
bpo-45310: Fix parrallel shared memory tests (GH-28661)
https://github.com/python/cpython/commit/4e6681d0cf9e7ce5621c34ff87055fa1f9786108


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45310>
_______________________________________

From report at bugs.python.org  Fri Oct  1 06:04:57 2021
From: report at bugs.python.org (Ken Jin)
Date: Fri, 01 Oct 2021 10:04:57 +0000
Subject: [issue45330] dulwich_log performance regression in 3.10
In-Reply-To: <1633007368.54.0.0773120735117.issue45330@roundup.psfhosted.org>
Message-ID: <1633082697.01.0.959025103403.issue45330@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

Ooh thanks Irit, I hadn't considered that. I thought that versions were fixed, but it seems that we *do* change the 3rd party package versions once in a while.

In that time period, we bumped dulwich from 0.20.20 to 0.20.21 https://github.com/python/pyperformance/commit/6484a40909312f373c8cfa8c05faec592288abb3.

That dulwich release had the following commits: https://github.com/dulwich/dulwich/compare/dulwich-0.20.21...master.

This may also explain why I couldn't see any perf regression in dulwich between 3.10a4 and 3.10rc2 on Windows.

Once I verify this, I'll close this issue and open one on pyperformance repo.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45330>
_______________________________________

From report at bugs.python.org  Fri Oct  1 06:09:29 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 01 Oct 2021 10:09:29 +0000
Subject: [issue45310] test_multiprocessing_forkserver:
 test_shared_memory_basics() failed with FileExistsError: [Errno 17] File
 exists: '/test01_tsmb'
In-Reply-To: <1632831738.98.0.525271172358.issue45310@roundup.psfhosted.org>
Message-ID: <1633082969.39.0.816083487323.issue45310@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45310>
_______________________________________

From report at bugs.python.org  Fri Oct  1 06:26:40 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 10:26:40 +0000
Subject: [issue41710] threading.Lock.acquire(timeout) should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1633084000.11.0.217738474716.issue41710@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27039
pull_request: https://github.com/python/cpython/pull/28674

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Fri Oct  1 06:37:53 2021
From: report at bugs.python.org (Erick)
Date: Fri, 01 Oct 2021 10:37:53 +0000
Subject: [issue45339] concurrent.future.ThreadPoolExecutor should parameterize
 class used for threads
Message-ID: <1633084673.43.0.269469120691.issue45339@roundup.psfhosted.org>


New submission from Erick <erick.peirson at gmail.com>:

Currently the only way to use a class other than `threading.Thread` with `concurrent.futures.ThreadPoolExecutor` is to extend `ThreadPoolExecutor` and override the private method `_adjust_thread_count()`. 

For example, suppose I have a class that applies some custom logic when running code in a new thread:

```
class MyThread(threading.Thread):
    def run(self):
        with some_important_context():
            super().run()
```

Using this class with `ThreadPoolExecutor` requires me to write the following code:

```
class MyThreadPoolExecutor(ThreadPoolExecutor):
    def _adjust_thread_count(self):
        # if idle threads are available, don't spin new threads
        if self._idle_semaphore.acquire(timeout=0):
            return

        # When the executor gets lost, the weakref callback will wake up
        # the worker threads.
        def weakref_cb(_, q=self._work_queue):
            q.put(None)

        num_threads = len(self._threads)
        if num_threads < self._max_workers:
            thread_name = '%s_%d' % (self._thread_name_prefix or self,
                                     num_threads)
            t = MyThread(name=thread_name, target=_worker,
                         args=(weakref.ref(self, weakref_cb),
                               self._work_queue,
                               self._initializer,
                               self._initargs))
            t.start()
            self._threads.add(t)
            _threads_queues[t] = self._work_queue


with MyThreadPoolExecutor(max_workers=1) as executor:
    future = executor.submit(pow, 323, 1235)
    print(future.result())
```

That's a bummer, because now I have to maintain this method if there are upstream fixes/changes. I also can't count on it existing in the future, since it's a private method. 

In other words, `ThreadPoolExecutor` is not composable, and extending it to use a custom `Thread` class is neither safe nor maintainable.

Here's what I'd like to be able to do instead:

```
with ThreadPoolExecutor(max_workers=1, thread_class=MyThread) as executor:
    future = executor.submit(pow, 323, 1235)
    print(future.result())
```

----------
components: Library (Lib)
messages: 403007
nosy: erickpeirson
priority: normal
pull_requests: 27040
severity: normal
status: open
title: concurrent.future.ThreadPoolExecutor should parameterize class used for threads
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45339>
_______________________________________

From report at bugs.python.org  Fri Oct  1 06:46:06 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 01 Oct 2021 10:46:06 +0000
Subject: [issue45125] Improve tests and docs of how `pickle` works with
 `SharedMemory` obejcts
In-Reply-To: <1631009872.94.0.369430162871.issue45125@roundup.psfhosted.org>
Message-ID: <1633085166.74.0.726675252886.issue45125@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 746d648d47d12d16c2afedaeff626fc6aaaf6a46 by Nikita Sobolev in branch 'main':
bpo-45125: Improves pickling docs and tests for `shared_memory` (GH-28294)
https://github.com/python/cpython/commit/746d648d47d12d16c2afedaeff626fc6aaaf6a46


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45125>
_______________________________________

From report at bugs.python.org  Fri Oct  1 06:47:10 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 01 Oct 2021 10:47:10 +0000
Subject: [issue45125] Improve tests and docs of how `pickle` works with
 `SharedMemory` obejcts
In-Reply-To: <1631009872.94.0.369430162871.issue45125@roundup.psfhosted.org>
Message-ID: <1633085230.04.0.795144453122.issue45125@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27041
pull_request: https://github.com/python/cpython/pull/28675

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45125>
_______________________________________

From report at bugs.python.org  Fri Oct  1 06:59:31 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 10:59:31 +0000
Subject: [issue41710] threading.Lock.acquire(timeout) should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1633085971.7.0.0902162208517.issue41710@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27042
pull_request: https://github.com/python/cpython/pull/28676

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Fri Oct  1 07:03:06 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 11:03:06 +0000
Subject: [issue41710] threading.Lock.acquire(timeout) should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1633086186.76.0.57302225454.issue41710@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 98d282700221234157159df4af76423d89490ad9 by Victor Stinner in branch 'main':
bpo-41710: Fix PY_TIMEOUT_MAX on Windows (GH-28673)
https://github.com/python/cpython/commit/98d282700221234157159df4af76423d89490ad9


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Fri Oct  1 07:21:17 2021
From: report at bugs.python.org (Mark Shannon)
Date: Fri, 01 Oct 2021 11:21:17 +0000
Subject: [issue45340] Lazily create dictionaries for plain Python objects
Message-ID: <1633087277.57.0.188806648124.issue45340@roundup.psfhosted.org>


New submission from Mark Shannon <mark at hotpy.org>:

A "Normal" Python objects is conceptually just a pair of pointers, one to the class, and one to the dictionary.

With shared keys, the dictionary is redundant as it is no more than a pair of pointers, one to the keys and one to the values.

By adding a pointer to the values to the object, or embedding the values in the object, and fetching the keys via the class, we can avoid creating a dictionary for many objects.

See https://github.com/faster-cpython/ideas/issues/72 for more details.

----------
assignee: Mark.Shannon
components: Interpreter Core
messages: 403010
nosy: Mark.Shannon, methane
priority: normal
severity: normal
status: open
title: Lazily create dictionaries for plain Python objects
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45340>
_______________________________________

From report at bugs.python.org  Fri Oct  1 07:29:13 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 11:29:13 +0000
Subject: [issue41710] threading.Lock.acquire(timeout) should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1633087753.79.0.629405089288.issue41710@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 54957f16a63ecb6b15f77b01fa7c55ada892604a by Victor Stinner in branch 'main':
bpo-41710: gc_collect_main() uses _PyTime_GetPerfCounter() (GH-28676)
https://github.com/python/cpython/commit/54957f16a63ecb6b15f77b01fa7c55ada892604a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Fri Oct  1 07:29:29 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 11:29:29 +0000
Subject: [issue41710] threading.Lock.acquire(timeout) should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1633087769.5.0.74835063908.issue41710@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 833fdf126c8fe77fd17e8a8ffbc5c571b3bf64bd by Victor Stinner in branch 'main':
bpo-41710: Add private _PyDeadline_Get() function (GH-28674)
https://github.com/python/cpython/commit/833fdf126c8fe77fd17e8a8ffbc5c571b3bf64bd


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Fri Oct  1 08:16:16 2021
From: report at bugs.python.org (4-launchpad-kalvdans-no-ip-org)
Date: Fri, 01 Oct 2021 12:16:16 +0000
Subject: [issue32307] Bad assumption on thread stack size makes python crash
 with musl libc
In-Reply-To: <1513187194.31.0.213398074469.issue32307@psf.upfronthosting.co.za>
Message-ID: <1633090576.13.0.635252771831.issue32307@roundup.psfhosted.org>


Change by 4-launchpad-kalvdans-no-ip-org <launchpad at kalvdans.no-ip.org>:


----------
nosy: +4-launchpad-kalvdans-no-ip-org

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32307>
_______________________________________

From report at bugs.python.org  Fri Oct  1 08:55:11 2021
From: report at bugs.python.org (John Belmonte)
Date: Fri, 01 Oct 2021 12:55:11 +0000
Subject: [issue44594] AsyncExitStack.enter_async_context() is mishandling
 exception __context__
In-Reply-To: <1625875193.61.0.628325060677.issue44594@roundup.psfhosted.org>
Message-ID: <1633092911.48.0.301716721095.issue44594@roundup.psfhosted.org>


Change by John Belmonte <john at neggie.net>:


----------
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44594>
_______________________________________

From report at bugs.python.org  Fri Oct  1 09:09:23 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 01 Oct 2021 13:09:23 +0000
Subject: [issue45125] Improve tests and docs of how `pickle` works with
 `SharedMemory` obejcts
In-Reply-To: <1631009872.94.0.369430162871.issue45125@roundup.psfhosted.org>
Message-ID: <1633093763.53.0.758372596653.issue45125@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset fc3511f18e92ea345092aa59a4225218bd19e153 by Miss Islington (bot) in branch '3.10':
bpo-45125: Improves pickling docs and tests for `shared_memory` (GH-28294)
https://github.com/python/cpython/commit/fc3511f18e92ea345092aa59a4225218bd19e153


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45125>
_______________________________________

From report at bugs.python.org  Fri Oct  1 09:26:09 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Fri, 01 Oct 2021 13:26:09 +0000
Subject: [issue45332] Decimal test and benchmark are broken
In-Reply-To: <1633015572.09.0.109680774964.issue45332@roundup.psfhosted.org>
Message-ID: <1633094769.31.0.0300364796159.issue45332@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
keywords: +patch
nosy: +corona10
nosy_count: 3.0 -> 4.0
pull_requests: +27043
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28680

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45332>
_______________________________________

From report at bugs.python.org  Fri Oct  1 09:43:03 2021
From: report at bugs.python.org (Steven Hsu)
Date: Fri, 01 Oct 2021 13:43:03 +0000
Subject: [issue45341] Update "Python Package Index" in Docs
Message-ID: <1633095783.18.0.61571389025.issue45341@roundup.psfhosted.org>


New submission from Steven Hsu <hsuhaochun at gmail.com>:

The full name of PyPI is "Python Package Index" at https://pypi.org/ , but it is still "Python Packaging Index" in Docs (https://github.com/python/cpython/blob/main/Doc/distributing/index.rst).

Therefore, an update of the term in the Docs is suggested.

The objective of the update was related to the translation work. ("Package "and "Packaging" have different translations in zh-tw language).

Thanks for review.

----------
assignee: docs at python
components: Documentation
messages: 403014
nosy: StevenHsuYL, docs at python
priority: normal
severity: normal
status: open
title: Update "Python Package Index" in Docs
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45341>
_______________________________________

From report at bugs.python.org  Fri Oct  1 09:49:54 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Fri, 01 Oct 2021 13:49:54 +0000
Subject: [issue45332] Decimal test and benchmark are broken
In-Reply-To: <1633015572.09.0.109680774964.issue45332@roundup.psfhosted.org>
Message-ID: <1633096194.77.0.0213087057871.issue45332@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset 9eed75fde226cec5a02301cfac1dc8039b5a183e by Dong-hee Na in branch 'main':
bpo-45332: Fix broken Decimal test and benchmark (GH-28680)
https://github.com/python/cpython/commit/9eed75fde226cec5a02301cfac1dc8039b5a183e


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45332>
_______________________________________

From report at bugs.python.org  Fri Oct  1 09:49:55 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 01 Oct 2021 13:49:55 +0000
Subject: [issue45332] Decimal test and benchmark are broken
In-Reply-To: <1633015572.09.0.109680774964.issue45332@roundup.psfhosted.org>
Message-ID: <1633096195.32.0.857675769635.issue45332@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +27044
pull_request: https://github.com/python/cpython/pull/28681

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45332>
_______________________________________

From report at bugs.python.org  Fri Oct  1 10:03:30 2021
From: report at bugs.python.org (ramikg)
Date: Fri, 01 Oct 2021 14:03:30 +0000
Subject: [issue44811] Change default signature algorithms for context in the
 ssl library
In-Reply-To: <1627907120.03.0.784092959739.issue44811@roundup.psfhosted.org>
Message-ID: <1633097010.85.0.457361423077.issue44811@roundup.psfhosted.org>


ramikg <ramikgold at gmail.com> added the comment:

As a side note, while the ideal solution would be for Python to expose the appropriate API, there exists a hacky solution using ctypes:
https://github.com/ramikg/ssl-context-configurator

----------
nosy: +ramikg

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44811>
_______________________________________

From report at bugs.python.org  Fri Oct  1 10:16:45 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 01 Oct 2021 14:16:45 +0000
Subject: [issue45332] Decimal test and benchmark are broken
In-Reply-To: <1633015572.09.0.109680774964.issue45332@roundup.psfhosted.org>
Message-ID: <1633097805.03.0.167882481915.issue45332@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 282992b36f9fe27183037051f3b37210884600af by Miss Islington (bot) in branch '3.10':
bpo-45332: Fix broken Decimal test and benchmark (GH-28680)
https://github.com/python/cpython/commit/282992b36f9fe27183037051f3b37210884600af


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45332>
_______________________________________

From report at bugs.python.org  Fri Oct  1 10:18:19 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Fri, 01 Oct 2021 14:18:19 +0000
Subject: [issue45332] Decimal test and benchmark are broken
In-Reply-To: <1633015572.09.0.109680774964.issue45332@roundup.psfhosted.org>
Message-ID: <1633097899.11.0.407461819583.issue45332@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

Now the code is fixed.
Thanks Serhiy for the report and review :)

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45332>
_______________________________________

From report at bugs.python.org  Fri Oct  1 10:22:31 2021
From: report at bugs.python.org (Steven Hsu)
Date: Fri, 01 Oct 2021 14:22:31 +0000
Subject: [issue45341] Update "Python Package Index" in Docs
In-Reply-To: <1633095783.18.0.61571389025.issue45341@roundup.psfhosted.org>
Message-ID: <1633098151.63.0.701594743706.issue45341@roundup.psfhosted.org>


Change by Steven Hsu <hsuhaochun at gmail.com>:


----------
type:  -> enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45341>
_______________________________________

From report at bugs.python.org  Fri Oct  1 11:07:33 2021
From: report at bugs.python.org (Eric Snow)
Date: Fri, 01 Oct 2021 15:07:33 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org>
Message-ID: <1633100853.6.0.144259316912.issue45020@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
pull_requests: +27045
pull_request: https://github.com/python/cpython/pull/28655

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Fri Oct  1 11:51:56 2021
From: report at bugs.python.org (shreya)
Date: Fri, 01 Oct 2021 15:51:56 +0000
Subject: [issue45342] wrap_socket fails when load_cert_chain is called without
 setting the ciphers
Message-ID: <1633103516.08.0.850805825875.issue45342@roundup.psfhosted.org>


New submission from shreya <shreya.dhareshwar at gmail.com>:

Example:

self.socket = ssl.wrap_socket(socket.socket(self.address_family, self.socket_type),
                                              keyfile=keys, certfile=certs, server_side=True, ciphers="DEFAULT at SECLEVEL=1")

Gives the following exception -

 File "ssl.py", line 1402, in wrap_socket
    context.load_cert_chain(certfile, keyfile)
ssl.SSLError: [SSL: EE_KEY_TOO_SMALL] ee key too small (_ssl.c:4023)

----------
assignee: christian.heimes
components: SSL
messages: 403019
nosy: christian.heimes, shreya1312
priority: normal
pull_requests: 27046
severity: normal
status: open
title: wrap_socket fails when load_cert_chain is called without setting the ciphers
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45342>
_______________________________________

From report at bugs.python.org  Fri Oct  1 12:01:56 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 01 Oct 2021 16:01:56 +0000
Subject: [issue45342] wrap_socket fails when load_cert_chain is called without
 setting the ciphers
In-Reply-To: <1633103516.08.0.850805825875.issue45342@roundup.psfhosted.org>
Message-ID: <1633104116.27.0.092035777777.issue45342@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

The module level function ssl.wrap_socket() is deprecated, dangerous, and should not be used. I strongly recommend that you use SSLContext.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45342>
_______________________________________

From report at bugs.python.org  Fri Oct  1 12:23:06 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 01 Oct 2021 16:23:06 +0000
Subject: [issue41710] threading.Lock.acquire(timeout) should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1633105386.0.0.998246712043.issue41710@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +27047
pull_request: https://github.com/python/cpython/pull/28683

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Fri Oct  1 12:22:57 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 16:22:57 +0000
Subject: [issue41710] threading.Lock.acquire(timeout) should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1633105377.39.0.944060178936.issue41710@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 6df8c327532627d6a99991993c52e8e4a9b34968 by Victor Stinner in branch '3.10':
bpo-41710: PyThread_acquire_lock_timed() uses sem_clockwait() (GH-28671)
https://github.com/python/cpython/commit/6df8c327532627d6a99991993c52e8e4a9b34968


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Fri Oct  1 12:51:27 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 16:51:27 +0000
Subject: [issue41710] threading.Lock.acquire(timeout) should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1633107087.43.0.160534231021.issue41710@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 0e1aeab5d7de3f328876aea8ccabbc6db146a883 by Miss Islington (bot) in branch '3.9':
bpo-41710: PyThread_acquire_lock_timed() uses sem_clockwait() (GH-28671) (GH-28683)
https://github.com/python/cpython/commit/0e1aeab5d7de3f328876aea8ccabbc6db146a883


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Fri Oct  1 12:52:29 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 16:52:29 +0000
Subject: [issue41710] threading.Lock.acquire(timeout) should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1633107149.59.0.087061549165.issue41710@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Jonas Norling: Thanks for the bug report! It's now fixed in 3.9, 3.10 and main branches.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Fri Oct  1 13:58:17 2021
From: report at bugs.python.org (santhosh)
Date: Fri, 01 Oct 2021 17:58:17 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org>
Message-ID: <1633111097.29.0.869424537855.issue45020@roundup.psfhosted.org>


Change by santhosh <santhoshreddy.anugu at gmail.com>:


----------
components: +Parser -Build
nosy: +lys.nikolaou, pablogsal, santhu_reddy12
versions: +Python 3.9 -Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Fri Oct  1 14:12:01 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Fri, 01 Oct 2021 18:12:01 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org>
Message-ID: <1633111921.65.0.645736165079.issue45020@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

@santhu_reddy12, why did you assign this to the Parser category? IMO this issue is clearly in the Build category. (We haven't met, I assume you have triage permissions?)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Fri Oct  1 14:13:04 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Fri, 01 Oct 2021 18:13:04 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org>
Message-ID: <1633111984.5.0.092337083421.issue45020@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

And it's most definitely 3.11, not 3.9. (Did you mean to change a different issue?)

----------
versions: +Python 3.11 -Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Fri Oct  1 14:59:39 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Fri, 01 Oct 2021 18:59:39 +0000
Subject: [issue38435] Start the deprecation cycle for subprocess preexec_fn
In-Reply-To: <1570731497.4.0.313201495913.issue38435@roundup.psfhosted.org>
Message-ID: <1633114779.44.0.861869844356.issue38435@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

Another use case someone had for preexec_fn popped up today:

 prctl(PR_SET_PDEATHSIG, SIGTERM)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38435>
_______________________________________

From report at bugs.python.org  Fri Oct  1 15:24:18 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Fri, 01 Oct 2021 19:24:18 +0000
Subject: [issue45338] Add key argument to collections.Counter
In-Reply-To: <1633076389.73.0.735065140955.issue45338@roundup.psfhosted.org>
Message-ID: <1633116258.71.0.808326775891.issue45338@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

How is Counter(numbers, key=abs) any better than Counter(map(abs, numbers))?

It seems to me that "apply a function to each thing" (map) and "count the numbers of each thing" (Counter) are two orthogonal concepts, and there's no reason to entangle them. Their composition as "count the number of things with each function value" is probably better as a composition of two simple things rather than lumped together. I believe this is related to why PEP 455 was rejected.

----------
nosy: +Dennis Sweeney

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45338>
_______________________________________

From report at bugs.python.org  Fri Oct  1 15:33:40 2021
From: report at bugs.python.org (Karthikeyan Singaravelan)
Date: Fri, 01 Oct 2021 19:33:40 +0000
Subject: [issue45338] Add key argument to collections.Counter
In-Reply-To: <1633076389.73.0.735065140955.issue45338@roundup.psfhosted.org>
Message-ID: <1633116820.39.0.79226304301.issue45338@roundup.psfhosted.org>


Change by Karthikeyan Singaravelan <tir.karthi at gmail.com>:


----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45338>
_______________________________________

From report at bugs.python.org  Fri Oct  1 16:04:55 2021
From: report at bugs.python.org (Illia Volochii)
Date: Fri, 01 Oct 2021 20:04:55 +0000
Subject: [issue45343] Update bundled pip to 21.2.4 and setuptools to 58.1.0
Message-ID: <1633118695.71.0.173391630315.issue45343@roundup.psfhosted.org>


Change by Illia Volochii <illia.volochii at gmail.com>:


----------
components: Distutils
nosy: dstufft, eric.araujo, illia-v
priority: normal
severity: normal
status: open
title: Update bundled pip to 21.2.4 and setuptools to 58.1.0
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45343>
_______________________________________

From report at bugs.python.org  Fri Oct  1 16:08:55 2021
From: report at bugs.python.org (Illia Volochii)
Date: Fri, 01 Oct 2021 20:08:55 +0000
Subject: [issue45343] Update bundled pip to 21.2.4 and setuptools to 58.1.0
Message-ID: <1633118935.6.0.767925075723.issue45343@roundup.psfhosted.org>


Change by Illia Volochii <illia.volochii at gmail.com>:


----------
keywords: +patch
pull_requests: +27048
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28684

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45343>
_______________________________________

From report at bugs.python.org  Fri Oct  1 16:11:11 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 01 Oct 2021 20:11:11 +0000
Subject: [issue44687] io.BufferedReader:peek() closes underlying file,
 breaking peek/read expectations
In-Reply-To: <1626813754.71.0.447249212898.issue44687@roundup.psfhosted.org>
Message-ID: <1633119071.99.0.869382728022.issue44687@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:


New changeset a450398933d265011e1e8eae7f771b70f97945fb by AngstyDuck in branch 'main':
bpo-44687: Ensure BufferedReader objects with unread buffers can peek even when the underlying file is closed (GH-28457)
https://github.com/python/cpython/commit/a450398933d265011e1e8eae7f771b70f97945fb


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44687>
_______________________________________

From report at bugs.python.org  Fri Oct  1 16:11:17 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 01 Oct 2021 20:11:17 +0000
Subject: [issue44687] io.BufferedReader:peek() closes underlying file,
 breaking peek/read expectations
In-Reply-To: <1626813754.71.0.447249212898.issue44687@roundup.psfhosted.org>
Message-ID: <1633119077.78.0.840875920286.issue44687@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27049
pull_request: https://github.com/python/cpython/pull/28685

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44687>
_______________________________________

From report at bugs.python.org  Fri Oct  1 16:11:21 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 01 Oct 2021 20:11:21 +0000
Subject: [issue44687] io.BufferedReader:peek() closes underlying file,
 breaking peek/read expectations
In-Reply-To: <1626813754.71.0.447249212898.issue44687@roundup.psfhosted.org>
Message-ID: <1633119081.63.0.253673491601.issue44687@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27050
pull_request: https://github.com/python/cpython/pull/28686

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44687>
_______________________________________

From report at bugs.python.org  Fri Oct  1 16:12:04 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 01 Oct 2021 20:12:04 +0000
Subject: [issue44687] io.BufferedReader:peek() closes underlying file,
 breaking peek/read expectations
In-Reply-To: <1626813754.71.0.447249212898.issue44687@roundup.psfhosted.org>
Message-ID: <1633119124.57.0.232915828077.issue44687@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

Thanks for sticking through it! Sorry about the delays, but I think we ended up with a good fix.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44687>
_______________________________________

From report at bugs.python.org  Fri Oct  1 16:18:49 2021
From: report at bugs.python.org (kubat aytekin)
Date: Fri, 01 Oct 2021 20:18:49 +0000
Subject: [issue45338] Add key argument to collections.Counter
In-Reply-To: <1633076389.73.0.735065140955.issue45338@roundup.psfhosted.org>
Message-ID: <1633119529.74.0.349323291134.issue45338@roundup.psfhosted.org>


kubat aytekin <kubataytekin at yahoo.com.tr> added the comment:

I was thinking about use cases where one might want to preserve the original key. I was not however aware of PEP 455 and the reasons for it's rejection. My bad.

Yet It is still unclear to me what the best practice would be to reverse lookup unhashable objects. Say you have a list of objects from which you need the most common. If there is no good way of reversing the transform, your only option is iterating trough your list? Which defeats the purpose of using a Counter and you'd be better off counting explicitly. Maybe I'm imagining unrealistic/far-fetched use cases.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45338>
_______________________________________

From report at bugs.python.org  Fri Oct  1 16:26:02 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Fri, 01 Oct 2021 20:26:02 +0000
Subject: [issue45338] Add key argument to collections.Counter
In-Reply-To: <1633076389.73.0.735065140955.issue45338@roundup.psfhosted.org>
Message-ID: <1633119962.78.0.804677864935.issue45338@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

The values of a Counter are generally integers, not lists. Maybe you want:

    items_by_keyfunc = defaultdict(list)
    for x in all_the_items:
        items_by_keyfunc[keyfunc(x)].append(x)

Then items_by_keyfunc[42] is a list of the things with key 42.

Although I believe there have been proposals about adding some method to dict() to do basically the for-loop above.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45338>
_______________________________________

From report at bugs.python.org  Fri Oct  1 16:30:23 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 01 Oct 2021 20:30:23 +0000
Subject: [issue44687] io.BufferedReader:peek() closes underlying file,
 breaking peek/read expectations
In-Reply-To: <1626813754.71.0.447249212898.issue44687@roundup.psfhosted.org>
Message-ID: <1633120223.34.0.151082931189.issue44687@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 2221207f44c2abd34406ee590e6b13afaca53ee8 by Miss Islington (bot) in branch '3.10':
bpo-44687: Ensure BufferedReader objects with unread buffers can peek even when the underlying file is closed (GH-28457)
https://github.com/python/cpython/commit/2221207f44c2abd34406ee590e6b13afaca53ee8


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44687>
_______________________________________

From report at bugs.python.org  Fri Oct  1 16:41:50 2021
From: report at bugs.python.org (kubat aytekin)
Date: Fri, 01 Oct 2021 20:41:50 +0000
Subject: [issue45338] Add key argument to collections.Counter
In-Reply-To: <1633076389.73.0.735065140955.issue45338@roundup.psfhosted.org>
Message-ID: <1633120910.96.0.146634393172.issue45338@roundup.psfhosted.org>


kubat aytekin <kubataytekin at yahoo.com.tr> added the comment:

Or keep the reverse mapping in another dict:
    
    count = Counter()
    reverse_mapping = dict()
    for x in all_the_items:
        count.update(keyfunc(x))
        reverse_mapping[keyfunc(x)] = x

Anyways I'm closing it as it is a partial duplicate of key-transforming dictionaries.

----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45338>
_______________________________________

From report at bugs.python.org  Fri Oct  1 16:46:58 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 01 Oct 2021 20:46:58 +0000
Subject: [issue44687] io.BufferedReader:peek() closes underlying file,
 breaking peek/read expectations
In-Reply-To: <1626813754.71.0.447249212898.issue44687@roundup.psfhosted.org>
Message-ID: <1633121218.23.0.643354016951.issue44687@roundup.psfhosted.org>


Change by Steve Dower <steve.dower at python.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44687>
_______________________________________

From report at bugs.python.org  Fri Oct  1 16:46:31 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 01 Oct 2021 20:46:31 +0000
Subject: [issue44687] io.BufferedReader:peek() closes underlying file,
 breaking peek/read expectations
In-Reply-To: <1626813754.71.0.447249212898.issue44687@roundup.psfhosted.org>
Message-ID: <1633121191.78.0.105707611281.issue44687@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:


New changeset 6035d650a322cec9619b306af2a877f3cead1580 by Miss Islington (bot) in branch '3.9':
bpo-44687: Ensure BufferedReader objects with unread buffers can peek even when the underlying file is closed (GH-28457)
https://github.com/python/cpython/commit/6035d650a322cec9619b306af2a877f3cead1580


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44687>
_______________________________________

From report at bugs.python.org  Fri Oct  1 17:54:27 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 01 Oct 2021 21:54:27 +0000
Subject: [issue41021] ctypes callback with structure crashes in Python 3.8 on
 Windows x86
In-Reply-To: <1592472376.78.0.985098642017.issue41021@roundup.psfhosted.org>
Message-ID: <1633125267.68.0.343130023631.issue41021@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

Judging from https://github.com/libffi/libffi, they could do with more contributors/support over there.

I see a bunch of reports along these lines from a few years back, apparently someone has a test suite that covers it, but hasn't merged it into the libffi test suite which is where it really belongs.

If it turns out to be a straightforward fix, we're able to patch our own build rather than waiting for a libffi release (and since we're unlikely to get new 3.3 releases for 3.10 and earlier, that's what we'll need to release it in updates). But we don't run their test suite on our build, so we'd want it to be upstream as well.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41021>
_______________________________________

From report at bugs.python.org  Fri Oct  1 17:59:45 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 01 Oct 2021 21:59:45 +0000
Subject: [issue45288] Inspect - Added sort_result parameter on getmembers
 function.
In-Reply-To: <1632580104.8.0.617180207375.issue45288@roundup.psfhosted.org>
Message-ID: <1633125585.32.0.562694756777.issue45288@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed
type:  -> enhancement
versions: +Python 3.11 -Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45288>
_______________________________________

From report at bugs.python.org  Fri Oct  1 18:29:20 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 01 Oct 2021 22:29:20 +0000
Subject: [issue45330] speed.python.org: dulwich_log performance regression
In-Reply-To: <1633007368.54.0.0773120735117.issue45330@roundup.psfhosted.org>
Message-ID: <1633127360.52.0.409634011583.issue45330@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

The pyperformance version in pinned on speed.python.org. Moreover, the timeline tracks the main branch, not the 3.10 branch.

----------
nosy: +vstinner
title: dulwich_log performance regression in 3.10 -> speed.python.org: dulwich_log performance regression
versions:  -Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45330>
_______________________________________

From report at bugs.python.org  Fri Oct  1 18:29:41 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Fri, 01 Oct 2021 22:29:41 +0000
Subject: [issue45330] dulwich_log performance regression in 3.10
In-Reply-To: <1633007368.54.0.0773120735117.issue45330@roundup.psfhosted.org>
Message-ID: <1633127381.22.0.521310458414.issue45330@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

We use a pinned version of pyperformance so the code has not changed. I need to manually bump the version and when they happens I wipe all previous benchmarks

----------
nosy: +pablogsal -vstinner
title: speed.python.org: dulwich_log performance regression -> dulwich_log performance regression in 3.10
versions: +Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45330>
_______________________________________

From report at bugs.python.org  Fri Oct  1 18:42:56 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 01 Oct 2021 22:42:56 +0000
Subject: [issue45302] 10 built-in functions need non-None .__text_signature__
In-Reply-To: <1632757585.5.0.650553887806.issue45302@roundup.psfhosted.org>
Message-ID: <1633128176.57.0.584796039122.issue45302@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I agree that finishing this would be nice.  In branch main (3.11.0a0), open and print now have non-None versions of this attribute.  However,

for ob in builtins.__dict__.values():
    if (str(ob).startswith('<built-in function') and
        ob.__text_signature__ is None):
        print(ob)
# prints   
<built-in function __build_class__>
<built-in function __import__>
<built-in function breakpoint>
<built-in function dir>
<built-in function getattr>
<built-in function iter>
<built-in function max>
<built-in function min>
<built-in function next>
<built-in function vars>

So there are still some to do.

for ob in builtins.__dict__.values():
    if (str(ob).startswith('<class') and
        ob.__init__.__text_signature__ is None):
        print(ob)
# prints nothing.

----------
nosy: +terry.reedy
stage:  -> test needed
title: basic builtin functions missing __text_signature__ attributes -> 10 built-in functions need non-None .__text_signature__
versions: +Python 3.11 -Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45302>
_______________________________________

From report at bugs.python.org  Fri Oct  1 18:47:48 2021
From: report at bugs.python.org (Nihir Patel)
Date: Fri, 01 Oct 2021 22:47:48 +0000
Subject: [issue25066] Better repr for multiprocessing.synchronize objects
In-Reply-To: <1441945512.28.0.268911334925.issue25066@psf.upfronthosting.co.za>
Message-ID: <1633128468.43.0.908053739784.issue25066@roundup.psfhosted.org>


Nihir Patel <nihir at live.co.uk> added the comment:

Given https://github.com/python/cpython/pull/20534 is merged and the multiprocessing.synchronize objects inherit from the corresponding threading module objects, is this still needed?

----------
nosy: +nihir27

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25066>
_______________________________________

From report at bugs.python.org  Fri Oct  1 18:48:54 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 01 Oct 2021 22:48:54 +0000
Subject: [issue45303] ast module classes missing __text_signature__ attribute
In-Reply-To: <1632757723.33.0.590596255222.issue45303@roundup.psfhosted.org>
Message-ID: <1633128534.57.0.555805322471.issue45303@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I believe that multiple modules have not yet been converted to use argument clinic.  (I marked 'test needed' but am not sure if this attribute is tested.)  I don't think that I would put ast as highest priority, although it might be easiest.

----------
nosy: +terry.reedy
stage:  -> test needed
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45303>
_______________________________________

From report at bugs.python.org  Fri Oct  1 20:10:31 2021
From: report at bugs.python.org (Nate Woods)
Date: Sat, 02 Oct 2021 00:10:31 +0000
Subject: [issue45344] Have zipapp respect SOURCE_DATE_EPOCH
Message-ID: <1633133431.67.0.788780206005.issue45344@roundup.psfhosted.org>


New submission from Nate Woods <big.nate.w at gmail.com>:

I have a small patch that would make zipapp respect SOURCE_DATE_EPOCH.  This will ensure the zip bundles created by zipapp have consistent hashes regardless of when the source files were last touched.  This idea came to my attention recently when I came across: https://reproducible-builds.org/

I can convert my changes to a PR if it's deemed interesting or useful, but I would like to respect the core maintainers time.  Please let me know if these changes are not desired or not worth while and I'll seek to find somewhere else to put them.

Also, I'm completely new here, so I apologize if there is anything I'm doing against protocol. I didn't find any issues in the tracker pertaining to this, and it seemed small and contained enough to be something I could try out.

Hopefully this issue finds the maintainers well.

----------
components: Library (Lib)
files: zipapp-respect-source-date-epoch.patch
keywords: patch
messages: 403041
nosy: bign8
priority: normal
severity: normal
status: open
title: Have zipapp respect SOURCE_DATE_EPOCH
type: enhancement
versions: Python 3.11
Added file: https://bugs.python.org/file50320/zipapp-respect-source-date-epoch.patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45344>
_______________________________________

From report at bugs.python.org  Fri Oct  1 22:02:37 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 02 Oct 2021 02:02:37 +0000
Subject: [issue45341] Update "Python Package Index" in Docs
In-Reply-To: <1633095783.18.0.61571389025.issue45341@roundup.psfhosted.org>
Message-ID: <1633140157.44.0.136910482258.issue45341@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
keywords: +patch
pull_requests: +27051
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/28687

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45341>
_______________________________________

From report at bugs.python.org  Fri Oct  1 22:00:00 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 02 Oct 2021 02:00:00 +0000
Subject: [issue45341] Update "Python Package Index" in Docs
In-Reply-To: <1633095783.18.0.61571389025.issue45341@roundup.psfhosted.org>
Message-ID: <1633140000.84.0.334525832873.issue45341@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

The Python Packaging User Guide, Python Packaging Authority, and packaging.python.org are correct and stay as is.  I verified the name at pypi.org.  I found 7 occurrences of "Python Packaging Index" in /Doc.

F:\dev\3x\Doc\distributing\index.rst: 34: * the `Python Packaging Index <https://pypi.org>`__ is a public
F:\dev\3x\Doc\distributing\index.rst: 130: * `Uploading the project to the Python Packaging Index`_
F:\dev\3x\Doc\distributing\index.rst: 137: .. _Uploading the project to the Python Packaging Index: \
F:\dev\3x\Doc\distributing\index.rst: 153: * check the Python Packaging Index to see if the name is already in use
F:\dev\3x\Doc\installing\index.rst: 47: * The `Python Packaging Index <https://pypi.org>`__ is a public
F:\dev\3x\Doc\installing\index.rst: 81: dependencies from the Python Packaging Index::
F:\dev\3x\Doc\installing\index.rst: 229: Python Packaging Index, this problem is expected to diminish over time,

Working on PR.

----------
nosy: +terry.reedy
stage:  -> needs patch
type: enhancement -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45341>
_______________________________________

From report at bugs.python.org  Fri Oct  1 22:04:03 2021
From: report at bugs.python.org (David Melgar)
Date: Sat, 02 Oct 2021 02:04:03 +0000
Subject: [issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6
In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org>
Message-ID: <1633140243.15.0.514140789605.issue44828@roundup.psfhosted.org>


David Melgar <enki1711 at gmail.com> added the comment:

Same issue. Running Monterey beta. Experiencing crash.

Is there any plan for a fix or is the plan to wait for Monterey to release?

----------
nosy: +enki1711

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Fri Oct  1 23:18:05 2021
From: report at bugs.python.org (SP Praveen)
Date: Sat, 02 Oct 2021 03:18:05 +0000
Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception
 target
In-Reply-To: <1366329322.51.0.489771554551.issue17792@psf.upfronthosting.co.za>
Message-ID: <1633144685.36.0.839958095968.issue17792@roundup.psfhosted.org>


Change by SP Praveen <sppraveenkumarinfo at gmail.com>:


----------
components: +Tkinter -Interpreter Core
type: enhancement -> crash
versions: +Python 3.11 -Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17792>
_______________________________________

From report at bugs.python.org  Sat Oct  2 02:05:00 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 02 Oct 2021 06:05:00 +0000
Subject: [issue45341] Update "Python Package Index" in Docs
In-Reply-To: <1633095783.18.0.61571389025.issue45341@roundup.psfhosted.org>
Message-ID: <1633154700.52.0.933483560064.issue45341@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:


New changeset 0be338199fd663f020d833a4db185d0c5a0e0078 by Terry Jan Reedy in branch 'main':
bpo-45341: Replace 'Packaging' with 'Package' in "Python P... Index" (#28687)
https://github.com/python/cpython/commit/0be338199fd663f020d833a4db185d0c5a0e0078


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45341>
_______________________________________

From report at bugs.python.org  Sat Oct  2 02:05:22 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 02 Oct 2021 06:05:22 +0000
Subject: [issue45341] Update "Python Package Index" in Docs
In-Reply-To: <1633095783.18.0.61571389025.issue45341@roundup.psfhosted.org>
Message-ID: <1633154722.87.0.26052421413.issue45341@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27053
pull_request: https://github.com/python/cpython/pull/28689

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45341>
_______________________________________

From report at bugs.python.org  Sat Oct  2 02:05:19 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 02 Oct 2021 06:05:19 +0000
Subject: [issue45341] Update "Python Package Index" in Docs
In-Reply-To: <1633095783.18.0.61571389025.issue45341@roundup.psfhosted.org>
Message-ID: <1633154719.17.0.150625445751.issue45341@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27052
pull_request: https://github.com/python/cpython/pull/28688

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45341>
_______________________________________

From report at bugs.python.org  Sat Oct  2 02:27:31 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 02 Oct 2021 06:27:31 +0000
Subject: [issue45341] Update "Python Package Index" in Docs
In-Reply-To: <1633095783.18.0.61571389025.issue45341@roundup.psfhosted.org>
Message-ID: <1633156051.21.0.115712164983.issue45341@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset e040adc806aba32c53f4c3d35899d0e5691cab95 by Miss Islington (bot) in branch '3.10':
bpo-45341: Replace 'Packaging' with 'Package' in "Python P... Index" (GH-28687)
https://github.com/python/cpython/commit/e040adc806aba32c53f4c3d35899d0e5691cab95


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45341>
_______________________________________

From report at bugs.python.org  Sat Oct  2 03:54:20 2021
From: report at bugs.python.org (Inada Naoki)
Date: Sat, 02 Oct 2021 07:54:20 +0000
Subject: [issue36521] Consider removing docstrings from co_consts in code
 objects
In-Reply-To: <1554339855.64.0.463077014069.issue36521@roundup.psfhosted.org>
Message-ID: <1633161260.87.0.763440196897.issue36521@roundup.psfhosted.org>


Inada Naoki <songofacandy at gmail.com> added the comment:

> For the sqlalchemy example: the saving in co_consts is about 1.6k (200 pointers), but an increase in bytecode size of 2.4k.

Please see number of co_constatns tuples. (d) saved 1307 tuples compared to (b).
`sys.getsizeof(())` is 40 on 64bit machine. So 1307 tuples is 50k bytes. This not saves only memory usage, but also import time too.

Although bytecode size is increased, they are released soon right after importing module because `LOAD_CONST` is in module or class code.

So there is a significant gain overall.

> It?s not clear that LOAD_NONE/LOAD_COMMON_CONST are worth doing. Any way the docstring question is not necessarily related to that.

I combined with LOAD_NONE because this issue and LOAD_NONE/LOAD_COMMON_CONST has synergy.

But I don't combine it in next time.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36521>
_______________________________________

From report at bugs.python.org  Sat Oct  2 04:22:54 2021
From: report at bugs.python.org (Irit Katriel)
Date: Sat, 02 Oct 2021 08:22:54 +0000
Subject: [issue36521] Consider removing docstrings from co_consts in code
 objects
In-Reply-To: <1554339855.64.0.463077014069.issue36521@roundup.psfhosted.org>
Message-ID: <1633162974.71.0.244385020063.issue36521@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

> This not saves only memory usage, but also import time too.

Do you see a measurable impact on import time?

With LOAD_NONE I saw speedup of 8% on micro benchmarks but it didn?t make any difference overall.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36521>
_______________________________________

From report at bugs.python.org  Sat Oct  2 05:22:35 2021
From: report at bugs.python.org (Steven Hsu)
Date: Sat, 02 Oct 2021 09:22:35 +0000
Subject: [issue45341] Update "Python Package Index" in Docs
In-Reply-To: <1633095783.18.0.61571389025.issue45341@roundup.psfhosted.org>
Message-ID: <1633166555.65.0.627571999226.issue45341@roundup.psfhosted.org>


Steven Hsu <hsuhaochun at gmail.com> added the comment:

Thanks for the efficient help!

----------
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45341>
_______________________________________

From report at bugs.python.org  Sat Oct  2 05:54:53 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 02 Oct 2021 09:54:53 +0000
Subject: [issue36521] Consider removing docstrings from co_consts in code
 objects
In-Reply-To: <1554339855.64.0.463077014069.issue36521@roundup.psfhosted.org>
Message-ID: <1633168493.0.0.11633444699.issue36521@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I propose an opposite change -- take data known at compile time (name, qualname and annotations). It will make the code for creating new function smaller and faster. It is what we want to achieve -- reducing import time, but additionally it will reduce time of creating local functions.

Arguments for saving few bytes do not look convincing to me. It is why we use caches -- memory is cheaper than the CPU time. And in most cases there is no any saving.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36521>
_______________________________________

From report at bugs.python.org  Sat Oct  2 05:57:20 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 02 Oct 2021 09:57:20 +0000
Subject: [issue45329] pyexpat: segmentation fault when `--with-system-expat`
 is specified
In-Reply-To: <1633000871.63.0.316839646856.issue45329@roundup.psfhosted.org>
Message-ID: <1633168640.77.0.399905768909.issue45329@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27054
pull_request: https://github.com/python/cpython/pull/28692

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45329>
_______________________________________

From report at bugs.python.org  Sat Oct  2 05:57:16 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 02 Oct 2021 09:57:16 +0000
Subject: [issue45329] pyexpat: segmentation fault when `--with-system-expat`
 is specified
In-Reply-To: <1633000871.63.0.316839646856.issue45329@roundup.psfhosted.org>
Message-ID: <1633168636.89.0.786716208298.issue45329@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 0742abdc48886b74ed3b66985a54bb1c32802670 by TAGAMI Yukihiro in branch 'main':
bpo-45329: Fix freed memory access in pyexpat.c (GH-28649)
https://github.com/python/cpython/commit/0742abdc48886b74ed3b66985a54bb1c32802670


----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45329>
_______________________________________

From report at bugs.python.org  Sat Oct  2 05:57:25 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 02 Oct 2021 09:57:25 +0000
Subject: [issue45329] pyexpat: segmentation fault when `--with-system-expat`
 is specified
In-Reply-To: <1633000871.63.0.316839646856.issue45329@roundup.psfhosted.org>
Message-ID: <1633168645.09.0.829859407713.issue45329@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27055
pull_request: https://github.com/python/cpython/pull/28693

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45329>
_______________________________________

From report at bugs.python.org  Sat Oct  2 09:21:58 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 02 Oct 2021 13:21:58 +0000
Subject: [issue45329] pyexpat: segmentation fault when `--with-system-expat`
 is specified
In-Reply-To: <1633000871.63.0.316839646856.issue45329@roundup.psfhosted.org>
Message-ID: <1633180918.98.0.556161242809.issue45329@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 22cf6a2f2347b7d4f11e45e557beace55acc79b5 by Miss Islington (bot) in branch '3.10':
bpo-45329: Fix freed memory access in pyexpat.c (GH-28649)
https://github.com/python/cpython/commit/22cf6a2f2347b7d4f11e45e557beace55acc79b5


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45329>
_______________________________________

From report at bugs.python.org  Sat Oct  2 09:22:32 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 02 Oct 2021 13:22:32 +0000
Subject: [issue45329] pyexpat: segmentation fault when `--with-system-expat`
 is specified
In-Reply-To: <1633000871.63.0.316839646856.issue45329@roundup.psfhosted.org>
Message-ID: <1633180952.63.0.174288892142.issue45329@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45329>
_______________________________________

From report at bugs.python.org  Sat Oct  2 09:23:37 2021
From: report at bugs.python.org (Code7737)
Date: Sat, 02 Oct 2021 13:23:37 +0000
Subject: [issue45345] Equalized lists depend to each other after equalizing
Message-ID: <1633181017.0.0.77331595707.issue45345@roundup.psfhosted.org>


New submission from Code7737 <Code7737 at yandex.ru>:

When you make two lists same by using "=" and then change one of them, other changes too

----------
files: Test.py
messages: 403052
nosy: Code7737
priority: normal
severity: normal
status: open
title: Equalized lists depend to each other after equalizing
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file50321/Test.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45345>
_______________________________________

From report at bugs.python.org  Sat Oct  2 09:25:27 2021
From: report at bugs.python.org (Code7737)
Date: Sat, 02 Oct 2021 13:25:27 +0000
Subject: [issue45345] Equalized lists depend to each other after equalizing
In-Reply-To: <1633181017.0.0.77331595707.issue45345@roundup.psfhosted.org>
Message-ID: <1633181127.16.0.279415729254.issue45345@roundup.psfhosted.org>


Change by Code7737 <Code7737 at yandex.ru>:


Added file: https://bugs.python.org/file50322/Test.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45345>
_______________________________________

From report at bugs.python.org  Sat Oct  2 09:26:27 2021
From: report at bugs.python.org (Code7737)
Date: Sat, 02 Oct 2021 13:26:27 +0000
Subject: [issue45345] Equalized lists depend to each other after equalizing
In-Reply-To: <1633181017.0.0.77331595707.issue45345@roundup.psfhosted.org>
Message-ID: <1633181187.68.0.816430423641.issue45345@roundup.psfhosted.org>


Change by Code7737 <Code7737 at yandex.ru>:


Added file: https://bugs.python.org/file50323/Test.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45345>
_______________________________________

From report at bugs.python.org  Sat Oct  2 09:38:29 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Sat, 02 Oct 2021 13:38:29 +0000
Subject: [issue45345] Equalized lists depend to each other after equalizing
In-Reply-To: <1633181017.0.0.77331595707.issue45345@roundup.psfhosted.org>
Message-ID: <1633181909.03.0.445520214962.issue45345@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

This isn't a bug. In python, the assignment doesn't make a copy, it makes ts and s refer to the same object. So there's really only one list to change, and you can refer to it by either name, ts or s.

----------
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45345>
_______________________________________

From report at bugs.python.org  Sat Oct  2 09:50:53 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 02 Oct 2021 13:50:53 +0000
Subject: [issue45339] concurrent.future.ThreadPoolExecutor should parameterize
 class used for threads
In-Reply-To: <1633084673.43.0.269469120691.issue45339@roundup.psfhosted.org>
Message-ID: <1633182653.71.0.754765248017.issue45339@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Can you apply some custom logic by specifying the initializer?

----------
components: +asyncio
nosy: +asvetlov, serhiy.storchaka, yselivanov
type:  -> enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45339>
_______________________________________

From report at bugs.python.org  Sat Oct  2 09:54:08 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 02 Oct 2021 13:54:08 +0000
Subject: [issue45339] concurrent.future.ThreadPoolExecutor should parameterize
 class used for threads
In-Reply-To: <1633084673.43.0.269469120691.issue45339@roundup.psfhosted.org>
Message-ID: <1633182848.24.0.778015763866.issue45339@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
components:  -asyncio
nosy: +bquinlan, pitrou

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45339>
_______________________________________

From report at bugs.python.org  Sat Oct  2 10:15:53 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 02 Oct 2021 14:15:53 +0000
Subject: [issue45341] Update "Python Package Index" in Docs
In-Reply-To: <1633095783.18.0.61571389025.issue45341@roundup.psfhosted.org>
Message-ID: <1633184153.22.0.453529300401.issue45341@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:


New changeset d211e87307bb2a0b80e0a489501e892e61d879fc by Miss Islington (bot) in branch '3.9':
bpo-45341: Replace 'Packaging' with 'Package' in "Python P... Index" (GH-28687) (GH-28689)
https://github.com/python/cpython/commit/d211e87307bb2a0b80e0a489501e892e61d879fc


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45341>
_______________________________________

From report at bugs.python.org  Sat Oct  2 10:16:51 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 02 Oct 2021 14:16:51 +0000
Subject: [issue45341] Update "Python Package Index" in Docs
In-Reply-To: <1633095783.18.0.61571389025.issue45341@roundup.psfhosted.org>
Message-ID: <1633184211.86.0.60473435258.issue45341@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
resolution:  -> fixed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45341>
_______________________________________

From report at bugs.python.org  Sat Oct  2 10:17:26 2021
From: report at bugs.python.org (Stefan Pochmann)
Date: Sat, 02 Oct 2021 14:17:26 +0000
Subject: [issue45346] Some "truthy" crept in
Message-ID: <1633184246.2.0.0169690019034.issue45346@roundup.psfhosted.org>


New submission from Stefan Pochmann <stefan.pochmann at gmail.com>:

Python consistently says true/false, not truthy/falsy. But a few "truthy" have crept in now:

https://github.com/python/cpython/search?q=truthy
- Two in Doc/reference/compound_stmts.rst
- One in Doc/library/ast.rst
- One in Lib/test/test_builtin.py

Evidence for consistent true/false usage, if needed:
https://docs.python.org/3/library/stdtypes.html#truth-value-testing
https://docs.python.org/3/library/stdtypes.html#boolean-operations-and-or-not
https://docs.python.org/3/reference/compound_stmts.html#the-if-statement
https://docs.python.org/3/reference/compound_stmts.html#the-while-statement
https://docs.python.org/3/reference/expressions.html#boolean-operations

----------
assignee: docs at python
components: Documentation
messages: 403056
nosy: Stefan Pochmann, docs at python
priority: normal
severity: normal
status: open
title: Some "truthy" crept in
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45346>
_______________________________________

From report at bugs.python.org  Sat Oct  2 10:39:54 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 02 Oct 2021 14:39:54 +0000
Subject: [issue45340] Lazily create dictionaries for plain Python objects
In-Reply-To: <1633087277.57.0.188806648124.issue45340@roundup.psfhosted.org>
Message-ID: <1633185594.69.0.337352871982.issue45340@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45340>
_______________________________________

From report at bugs.python.org  Sat Oct  2 10:45:30 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Sat, 02 Oct 2021 14:45:30 +0000
Subject: [issue36521] Consider removing docstrings from co_consts in code
 objects
In-Reply-To: <1554339855.64.0.463077014069.issue36521@roundup.psfhosted.org>
Message-ID: <1633185930.97.0.0936480983268.issue36521@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

Serhiy:
> I propose an opposite change -- take data known at compile time (name, qualname and annotations).

I'm confused by your phrase "take data" -- do you mean remove these? Or wht do you propose we do with them?

> It will make the code for creating new function smaller and faster.

Smaller, maybe. Measurably faster? Can you demonstrate that with a patch?

> It is what we want to achieve -- reducing import time, but additionally it will reduce time of creating local functions.

I don't think the creation time of local functions is burdensome. (Creating a class is much more so.)

Oh, what do you mean exactly by "local functions" -- is that any function, or only a function nested inside another function?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36521>
_______________________________________

From report at bugs.python.org  Sat Oct  2 10:45:29 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 02 Oct 2021 14:45:29 +0000
Subject: [issue45321] Module xml.parsers.expat.errors misses error code
 constants of libexpat >=2.0
In-Reply-To: <1632919785.51.0.148853477081.issue45321@roundup.psfhosted.org>
Message-ID: <1633185929.07.0.310272408675.issue45321@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45321>
_______________________________________

From report at bugs.python.org  Sat Oct  2 11:30:09 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 02 Oct 2021 15:30:09 +0000
Subject: [issue36521] Consider removing docstrings from co_consts in code
 objects
In-Reply-To: <1554339855.64.0.463077014069.issue36521@roundup.psfhosted.org>
Message-ID: <1633188609.05.0.481765018602.issue36521@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

> I'm confused by your phrase "take data" -- do you mean remove these? Or wht do you propose we do with them?

I thought that function's name and qualname are set in the code that creates a function instead of copying from the code object. Similarly as what Inada-san propose for docstring. Perhaps it was in the past. Also, the documentation tells that annotations is a tuple of strings, so it should be known at the compile time. I propose to make it an attribute of the code object and copy to the function object when create a function. It saves a LOAD_CONST.

> Smaller, maybe. Measurably faster? Can you demonstrate that with a patch?

$ ./python -m pyperf timeit --duplicate=100  "def f(x: 'int', y: 'str') -> 'float': pass"
Mean +- std dev: 64.6 ns +- 4.2 ns
$ ./python -m pyperf timeit --duplicate=100  "def f(x, y): pass"
Mean +- std dev: 59.5 ns +- 2.4 ns

The difference 5.1 ns is the cost of additional LOAD_CONST. It is around 8% (but can be 12% or 2%). The cost of setting docstring externally will be the same.

> Oh, what do you mean exactly by "local functions" -- is that any function, or only a function nested inside another function?

Global functions and methods of global classes created at import time and only once. But functions nested inside another function are created every time when the external function is created, and they can even be created in a loop. It is a tiny cost, by why make it larger?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36521>
_______________________________________

From report at bugs.python.org  Sat Oct  2 11:33:51 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 02 Oct 2021 15:33:51 +0000
Subject: [issue18712] Pure Python operator.index doesn't match the C version.
In-Reply-To: <1376316578.03.0.462256957334.issue18712@psf.upfronthosting.co.za>
Message-ID: <1633188831.7.0.769896379995.issue18712@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18712>
_______________________________________

From report at bugs.python.org  Sat Oct  2 13:01:42 2021
From: report at bugs.python.org (Daniele Varrazzo)
Date: Sat, 02 Oct 2021 17:01:42 +0000
Subject: [issue45347] datetime subject to rounding?
Message-ID: <1633194102.6.0.241729336774.issue45347@roundup.psfhosted.org>


New submission from Daniele Varrazzo <daniele.varrazzo at gmail.com>:

I found two datetimes at difference timezone whose difference is 0 but which don't compare equal.

Python 3.9.5 (default, May 12 2021, 15:26:36) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime as dt
>>> from zoneinfo import ZoneInfo
>>> for i in range(3):
...     ref = dt.datetime(5327 + i, 10, 31, tzinfo=dt.timezone.utc)
...     print(ref.astimezone(ZoneInfo(key='Europe/Rome')) == ref.astimezone(dt.timezone(dt.timedelta(seconds=3600))))
... 
True
False
True
>>> for i in range(3):
...     ref = dt.datetime(5327 + i, 10, 31, tzinfo=dt.timezone.utc)
...     print(ref.astimezone(ZoneInfo(key='Europe/Rome')) - ref.astimezone(dt.timezone(dt.timedelta(seconds=3600))))
... 
0:00:00
0:00:00
0:00:00

Is this a float rounding problem? If so I think it should be documented that datetimes bewhave like floats instead of like Decimal, although they have finite precision.

----------
components: Library (Lib)
messages: 403059
nosy: piro
priority: normal
severity: normal
status: open
title: datetime subject to rounding?
versions: Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45347>
_______________________________________

From report at bugs.python.org  Sat Oct  2 13:31:37 2021
From: report at bugs.python.org (Stefan Pochmann)
Date: Sat, 02 Oct 2021 17:31:37 +0000
Subject: [issue45346] Some "truthy" crept in
In-Reply-To: <1633184246.2.0.0169690019034.issue45346@roundup.psfhosted.org>
Message-ID: <1633195897.13.0.401605185692.issue45346@roundup.psfhosted.org>


Change by Stefan Pochmann <stefan.pochmann at gmail.com>:


----------
type:  -> enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45346>
_______________________________________

From report at bugs.python.org  Sat Oct  2 13:46:28 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sat, 02 Oct 2021 17:46:28 +0000
Subject: [issue45346] Some "truthy" crept in
In-Reply-To: <1633184246.2.0.0169690019034.issue45346@roundup.psfhosted.org>
Message-ID: <1633196788.51.0.88830131555.issue45346@roundup.psfhosted.org>


Change by Raymond Hettinger <raymond.hettinger at gmail.com>:


----------
assignee: docs at python -> rhettinger
nosy: +rhettinger
type: enhancement -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45346>
_______________________________________

From report at bugs.python.org  Sat Oct  2 13:49:48 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sat, 02 Oct 2021 17:49:48 +0000
Subject: [issue45346] Some "truthy" crept in
In-Reply-To: <1633184246.2.0.0169690019034.issue45346@roundup.psfhosted.org>
Message-ID: <1633196988.75.0.599866803158.issue45346@roundup.psfhosted.org>


Change by Raymond Hettinger <raymond.hettinger at gmail.com>:


----------
keywords: +patch
pull_requests: +27056
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28697

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45346>
_______________________________________

From report at bugs.python.org  Sat Oct  2 14:48:17 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 02 Oct 2021 18:48:17 +0000
Subject: [issue45346] Some "truthy" crept in
In-Reply-To: <1633184246.2.0.0169690019034.issue45346@roundup.psfhosted.org>
Message-ID: <1633200497.92.0.599788931935.issue45346@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27057
pull_request: https://github.com/python/cpython/pull/28698

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45346>
_______________________________________

From report at bugs.python.org  Sat Oct  2 14:48:19 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sat, 02 Oct 2021 18:48:19 +0000
Subject: [issue45346] Some "truthy" crept in
In-Reply-To: <1633184246.2.0.0169690019034.issue45346@roundup.psfhosted.org>
Message-ID: <1633200499.25.0.240798814254.issue45346@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:


New changeset db91b058d5d4fbff4185982095d90fe6a2741aed by Raymond Hettinger in branch 'main':
bpo-45346: Keep docs consistent regarding true and false values (GH-28697)
https://github.com/python/cpython/commit/db91b058d5d4fbff4185982095d90fe6a2741aed


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45346>
_______________________________________

From report at bugs.python.org  Sat Oct  2 15:33:02 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sat, 02 Oct 2021 19:33:02 +0000
Subject: [issue45346] Some "truthy" crept in
In-Reply-To: <1633184246.2.0.0169690019034.issue45346@roundup.psfhosted.org>
Message-ID: <1633203182.34.0.206943255849.issue45346@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:


New changeset 72089f33c0aed391f047b1cbaf19d8da1e51c167 by Miss Islington (bot) in branch '3.10':
bpo-45346: Keep docs consistent regarding true and false values (GH-28697) (GH-28698)
https://github.com/python/cpython/commit/72089f33c0aed391f047b1cbaf19d8da1e51c167


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45346>
_______________________________________

From report at bugs.python.org  Sat Oct  2 15:33:20 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sat, 02 Oct 2021 19:33:20 +0000
Subject: [issue45346] Some "truthy" crept in
In-Reply-To: <1633184246.2.0.0169690019034.issue45346@roundup.psfhosted.org>
Message-ID: <1633203200.66.0.651089432552.issue45346@roundup.psfhosted.org>


Change by Raymond Hettinger <raymond.hettinger at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45346>
_______________________________________

From report at bugs.python.org  Sat Oct  2 15:39:36 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sat, 02 Oct 2021 19:39:36 +0000
Subject: [issue45347] datetime subject to rounding?
In-Reply-To: <1633194102.6.0.241729336774.issue45347@roundup.psfhosted.org>
Message-ID: <1633203576.69.0.0890394896064.issue45347@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Related:  https://bugs.python.org/issue44831

----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45347>
_______________________________________

From report at bugs.python.org  Sat Oct  2 15:40:11 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sat, 02 Oct 2021 19:40:11 +0000
Subject: [issue44831] Inconsistency between datetime.now() and
 datetime.fromtimestamp(time.time(), None)
In-Reply-To: <1628099391.12.0.0928824788179.issue44831@roundup.psfhosted.org>
Message-ID: <1633203611.27.0.646210146078.issue44831@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Related:  https://bugs.python.org/issue45347

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44831>
_______________________________________

From report at bugs.python.org  Sat Oct  2 17:36:17 2021
From: report at bugs.python.org (Ian Fisher)
Date: Sat, 02 Oct 2021 21:36:17 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores time zone
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1633210577.11.0.874066432671.issue45335@roundup.psfhosted.org>


Ian Fisher <ian at iafisher.com> added the comment:

Substitute "UTC offset" for "time zone" in my comment above.

I have attached a minimal Python program demonstrating data loss from this bug.

----------
Added file: https://bugs.python.org/file50324/timestamp.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Sat Oct  2 18:59:27 2021
From: report at bugs.python.org (Eddie Caraballo)
Date: Sat, 02 Oct 2021 22:59:27 +0000
Subject: [issue45348] math.log(243, 3) value issue
Message-ID: <1633215567.13.0.276827161808.issue45348@roundup.psfhosted.org>


New submission from Eddie Caraballo <eddiemichaelc at gmail.com>:

math.log(243, 3) should result in 5.0, but instead results in 4.9999...

Can be worked around via base conversion (math.log10(243) / math.log10(3))

----------
components: Library (Lib)
messages: 403065
nosy: eddiemichaelc
priority: normal
severity: normal
status: open
title: math.log(243, 3) value issue
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45348>
_______________________________________

From report at bugs.python.org  Sat Oct  2 19:16:30 2021
From: report at bugs.python.org (Eddie Caraballo)
Date: Sat, 02 Oct 2021 23:16:30 +0000
Subject: [issue45348] math.log(243, 3) value issue
In-Reply-To: <1633215567.13.0.276827161808.issue45348@roundup.psfhosted.org>
Message-ID: <1633216590.85.0.482507152699.issue45348@roundup.psfhosted.org>


Eddie Caraballo <eddiemichaelc at gmail.com> added the comment:

Issue seems to be with all power of 3 divisible by 5 (3**5, 3**10, etc).

Powers of 7 also seem to have the issue, where math.log(7**5, 7) = 5.0000000001

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45348>
_______________________________________

From report at bugs.python.org  Sat Oct  2 20:43:23 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Sun, 03 Oct 2021 00:43:23 +0000
Subject: [issue45348] math.log(243, 3) value issue
In-Reply-To: <1633215567.13.0.276827161808.issue45348@roundup.psfhosted.org>
Message-ID: <1633221803.87.0.378571595978.issue45348@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

According to https://docs.python.org/3/library/math.html#math.log :

"""With two arguments, return the logarithm of x to the given base, calculated as log(x)/log(base)."""

Indeed, this is consistent with that:

>>> from math import log
>>> log(243)
5.493061443340548
>>> log(3)
1.0986122886681098
>>> 5.493061443340548/1.0986122886681098
4.999999999999999

math.log is a floating-point operation, not an integer operation, and this is the nature of floating point operations: there can be rounding errors whenever there are intermediate steps of the computation. Strictly speaking, I would say this is not a bug, and results of floating point operations should generally be compared with math.isclose(), not with ==. Just like you can't expect (1/49)*49 == 1.0.

On the other hand, it may be theoretically possible to do some clever floating point tricks to get more accurate results out of math.log(a, b), like maybe some kind of correction factor involving the platform libm pow() function. I don't know if those are typically any more reliable than the status quo quotient-of-logs.

----------
nosy: +Dennis Sweeney

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45348>
_______________________________________

From report at bugs.python.org  Sat Oct  2 20:43:35 2021
From: report at bugs.python.org (Michael L. Boom)
Date: Sun, 03 Oct 2021 00:43:35 +0000
Subject: [issue43329] Multiprocessing Manager Client Not Reconnecting
In-Reply-To: <1614349902.25.0.128405443976.issue43329@roundup.psfhosted.org>
Message-ID: <1633221815.73.0.290321311445.issue43329@roundup.psfhosted.org>


Michael L. Boom <mikeboom at mikeboom.com> added the comment:

Is there anything that I can do, or the company I work for can do, to get a developer assigned to fix this bug?  It is hard to use multiprocessing remote method calls without this bug being fixed.  The software wouldn't be robust enough for production.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43329>
_______________________________________

From report at bugs.python.org  Sat Oct  2 21:02:54 2021
From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=)
Date: Sun, 03 Oct 2021 01:02:54 +0000
Subject: [issue45349] configparser.ConfigParser: 2 newlines at end of file
 (EOF)
Message-ID: <1633222974.18.0.394436455251.issue45349@roundup.psfhosted.org>


New submission from Bo?tjan Mejak <bostjan.xperia at gmail.com>:

In every Python version that I've tested, writing a config.ini file (utilizing configparser.ConfigParser), the result is such that the config.ini file has 2 newlines at the end of the file.

The problem is that source code editors like Sublime Text, or IDEs like PyCharm, already insert a newline at the end of a file, but then configparser.ConfigParser 
(or maybe the Python's write() function?)  insert its own as well.

Is it possible to fix this behavior?

----------
components: Library (Lib)
messages: 403069
nosy: PythonEnthusiast
priority: normal
severity: normal
status: open
title: configparser.ConfigParser: 2 newlines at end of file (EOF)
type: behavior
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45349>
_______________________________________

From report at bugs.python.org  Sat Oct  2 21:26:50 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Sun, 03 Oct 2021 01:26:50 +0000
Subject: [issue45348] math.log(243, 3) value issue
In-Reply-To: <1633215567.13.0.276827161808.issue45348@roundup.psfhosted.org>
Message-ID: <1633224410.47.0.853512306855.issue45348@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

It turns out that the current implementation is already very good, within 1ulp in 99.85% of cases and perfect (as good as floats can get) in 65% of cases. So my thinking would be to leave the implementation as is.

#################################################

from decimal import Decimal as D, getcontext
from math import log, nextafter
from random import uniform

getcontext().prec = 200

N = 10_000
perfect = 0
good = 0

for i in range(N):
    x, base = uniform(1, 10**6), uniform(2, 100)
    d_result = float(D(x).ln() / D(base).ln())
    f_result = log(x, base)

    if d_result == f_result:
        perfect += 1
        good += 1
    elif nextafter(d_result, f_result) == f_result:
        good += 1

print(f"{perfect/N = }")
print(f"{good/N = }")

# results:
# perfect/N = 0.6503
# good/N = 0.9985

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45348>
_______________________________________

From report at bugs.python.org  Sat Oct  2 21:33:58 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Sun, 03 Oct 2021 01:33:58 +0000
Subject: [issue45349] configparser.ConfigParser: 2 newlines at end of file
 (EOF)
In-Reply-To: <1633222974.18.0.394436455251.issue45349@roundup.psfhosted.org>
Message-ID: <1633224838.17.0.891091293457.issue45349@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

Please provide code that we can run that shows the problem.

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45349>
_______________________________________

From report at bugs.python.org  Sat Oct  2 21:42:49 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Sun, 03 Oct 2021 01:42:49 +0000
Subject: [issue45348] math.log(243, 3) value issue
In-Reply-To: <1633215567.13.0.276827161808.issue45348@roundup.psfhosted.org>
Message-ID: <1633225369.12.0.375165525941.issue45348@roundup.psfhosted.org>


Change by Dennis Sweeney <sweeney.dennis650 at gmail.com>:


----------
nosy: +mark.dickinson, rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45348>
_______________________________________

From report at bugs.python.org  Sat Oct  2 21:50:44 2021
From: report at bugs.python.org (Martin Panter)
Date: Sun, 03 Oct 2021 01:50:44 +0000
Subject: [issue45349] configparser.ConfigParser: 2 newlines at end of file
 (EOF)
In-Reply-To: <1633222974.18.0.394436455251.issue45349@roundup.psfhosted.org>
Message-ID: <1633225844.96.0.480146369113.issue45349@roundup.psfhosted.org>


Martin Panter <vadmium+py at gmail.com> added the comment:

Looks like the same as Issue 32917. I presume there are two newlines at the end of the file because there are two newlines following every config section.

IMO this is a minor cosmetic annoyance, just like writing a key with an empty value gets you a trailing space after the equals sign at the end of the line. Not worth changing as a bug fix, and not worth a special option, but maybe okay to change if the code is simple and it doesn't harm compatibility.

----------
nosy: +martin.panter
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> ConfigParser writes a superfluous final blank line

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45349>
_______________________________________

From report at bugs.python.org  Sat Oct  2 22:10:24 2021
From: report at bugs.python.org (Inada Naoki)
Date: Sun, 03 Oct 2021 02:10:24 +0000
Subject: [issue36521] Consider removing docstrings from co_consts in code
 objects
In-Reply-To: <1554339855.64.0.463077014069.issue36521@roundup.psfhosted.org>
Message-ID: <1633227024.26.0.853167085386.issue36521@roundup.psfhosted.org>


Inada Naoki <songofacandy at gmail.com> added the comment:

> The difference 5.1 ns is the cost of additional LOAD_CONST. It is around 8% (but can be 12% or 2%). The cost of setting docstring externally will be the same.


I don't have bare metal machine for now so I don't know why annotation is so slow. But cost of setting docstring is lighter.

```
# main branch
$ cpython/release/bin/pyperf timeit --duplicate=100 "def f():
>   'docstring'"
.....................
Mean +- std dev: 61.5 ns +- 1.3 ns

# https://github.com/methane/cpython/pull/37
$ load-none-remove-docstring/release/bin/pyperf timeit --duplicate=100 "def f():
>   'docstring'"
.....................
Mean +- std dev: 62.9 ns +- 1.5 ns

$ load-none-remove-docstring/release/bin/pyperf timeit --duplicate=100 "def f(x: 'int', y: 'str') -> 'float': pass"
.....................
Mean +- std dev: 65.1 ns +- 4.3 ns

$ load-none-remove-docstring/release/bin/pyperf timeit --duplicate=100 "def f(x: 'int', y: 'str') -> 'float': 'docstring'"
.....................
Mean +- std dev: 66.3 ns +- 2.6 ns

$ load-none-remove-docstring/release/bin/pyperf timeit --duplicate=100 "def f(x: 'int', y: 'str') -> 'float': 'docstring'
> f(None,None)"
.....................
Mean +- std dev: 131 ns +- 6 ns
```

So overhead is around 2%. And this 2% is problem only for "creating function with annotation, without docstring, never called, in loop" situation.
In regular situation, this overhead will be negligible.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36521>
_______________________________________

From report at bugs.python.org  Sat Oct  2 22:14:56 2021
From: report at bugs.python.org (Inada Naoki)
Date: Sun, 03 Oct 2021 02:14:56 +0000
Subject: [issue36521] Consider removing docstrings from co_consts in code
 objects
In-Reply-To: <1554339855.64.0.463077014069.issue36521@roundup.psfhosted.org>
Message-ID: <1633227296.16.0.755095039667.issue36521@roundup.psfhosted.org>


Inada Naoki <songofacandy at gmail.com> added the comment:

And as a bonus, creating function without docstring is little faster.

```
$ cpython/release/bin/pyperf timeit --duplicate=100 "def f(): pass"
.....................
Mean +- std dev: 62.5 ns +- 1.2 ns

$ load-none-remove-docstring/release/bin/pyperf timeit --duplicate=100 "def f(): pass"
.....................
Mean +- std dev: 60.5 ns +- 1.3 ns
```

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36521>
_______________________________________

From report at bugs.python.org  Sat Oct  2 22:19:56 2021
From: report at bugs.python.org (Inada Naoki)
Date: Sun, 03 Oct 2021 02:19:56 +0000
Subject: [issue36521] Consider removing docstrings from co_consts in code
 objects
In-Reply-To: <1554339855.64.0.463077014069.issue36521@roundup.psfhosted.org>
Message-ID: <1633227596.55.0.893816140634.issue36521@roundup.psfhosted.org>


Inada Naoki <songofacandy at gmail.com> added the comment:

> So overhead is around 2%. And this 2% is problem only for "creating function with annotation, without docstring, never called, in loop" situation.

My bad, "creating function with docstring, without annotation, nevercalled in loop" situation.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36521>
_______________________________________

From report at bugs.python.org  Sat Oct  2 23:49:05 2021
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Sun, 03 Oct 2021 03:49:05 +0000
Subject: [issue45302] 10 built-in functions need non-None .__text_signature__
In-Reply-To: <1632757585.5.0.650553887806.issue45302@roundup.psfhosted.org>
Message-ID: <1633232945.08.0.446550154693.issue45302@roundup.psfhosted.org>


Change by ?ric Araujo <merwok at netwok.org>:


----------
nosy: +eric.araujo

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45302>
_______________________________________

From report at bugs.python.org  Sun Oct  3 00:13:54 2021
From: report at bugs.python.org (Ned Deily)
Date: Sun, 03 Oct 2021 04:13:54 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
Message-ID: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>


New submission from Ned Deily <nad at python.org>:

./configure supports using the system or third-party-supplied pkg-config utility to find or override the default location of header and library files when building a few C extensions in the standard library, namely from OpenSSL for the _ssl module, libffi for ctypes, and, new in 3.10, Tcl/Tk for _tkinter (bpo-42603). However, currently for 3.10.0, pkg-config usage is broken for libffi and Tcl/Tk (but not OpenSSL). When running ./configure, there is an unexpected warning that is easily overlooked:

[...]
checking for --with-libs... no
./configure: line 10545: PKG_PROG_PKG_CONFIG: command not found
checking for --with-system-expat... no
[...]

PKG_PROG_PKG_CONFIG is a macro provided by GNU Autotools that is supposed to be in aclocal.m4. Unfortunately, it appears to have been inadvertently deleted in 2fc857a5721a5b42bcb696c9cae1bbcc82a91b17 (PR 25860) probably due to an autoconf version mismatch. The net effect is that the configure variable PKG_CONFIG, the location of the pkg-config utility, is undefined so tests in configure for the location of libffi and of Tcl and Tk do not take into account any pkg-config info and use any default locations (i.e. /usr/include). For most builds, that likely still produces the desired results. But it won't if a builder is trying to override these locations or is building on a platform with different default or is using a third-party package manager and pkg-config to supply libraries.  Note, the _ssl module builds are not affected by this problem as the AX_CHECK_OPENSSL macro in aclocal.m4 does not depend on PKG_PROG_PKG_CONFIG to find pkg-config.

It appears that the problem can be worked around by explicitly setting the PKG_CONFIG build variable when invoking configure, something like:

  ./configure [...] PKG_CONFIG=$(which pkg-config)

But the PR 25860 changes to aclocal.a4 should be carefully reviewed and the pkg-config related deletes restored; there might be other problems, too. This is not the first time we've been caught up by unexpected autoconf changes and, as is clear here, it is too easy for them to go unnoticied. Perhaps we should try to figure out how to reduce those risks.

----------
assignee: pablogsal
components: Build
messages: 403076
nosy: ned.deily, pablogsal
priority: high
severity: normal
stage: needs patch
status: open
title: configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 00:37:33 2021
From: report at bugs.python.org (Tim Peters)
Date: Sun, 03 Oct 2021 04:37:33 +0000
Subject: [issue45348] math.log(243, 3) value issue
In-Reply-To: <1633215567.13.0.276827161808.issue45348@roundup.psfhosted.org>
Message-ID: <1633235853.21.0.912879125963.issue45348@roundup.psfhosted.org>


Tim Peters <tim at python.org> added the comment:

CPython's log() builds on the platform C's libm facilities, and C simply doesn't define primitives capable of producing a worst-case < 1 ulp error 2-argument log in reasonable time. Instead we have to build it out of two separate log operations, and a division. Each of those 3 operations can suffer its own rounding errors, which may, overall, cancel out, or build on each other. There's no error bound we can guarantee, although "< 2 ulp worst-case error" seems likely under modern libms.

Which is actually quite good. Doing better than that is out of scope for CPython's implementation. The easy way to get < 1 ulp is to use decimal to compute the intermediate results with excess precision. But that's also "too slow" for general use.

What Dennis did in his little test driver was fine for that, but we don't actually need to increase decimal's default precision at all to get < 1 ulp error in a converted-back-to-float-via-round-nearest result here.

Just an example (doesn't "prove" anything - but points at how to go about proving things):

>>> decimal.Decimal(3**8).ln() / decimal.Decimal(3).ln()
Decimal('7.999999999999999999999999999')
>>> float(_)
8.0

----------
nosy: +tim.peters
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45348>
_______________________________________

From report at bugs.python.org  Sun Oct  3 03:16:24 2021
From: report at bugs.python.org (Joachim Jablon)
Date: Sun, 03 Oct 2021 07:16:24 +0000
Subject: [issue45347] datetime subject to rounding?
In-Reply-To: <1633194102.6.0.241729336774.issue45347@roundup.psfhosted.org>
Message-ID: <1633245384.34.0.926495155117.issue45347@roundup.psfhosted.org>


Joachim Jablon <ewjoachim at gmail.com> added the comment:

It may or it may not be obvious to some, but in year 5328, October 31st is the last Sunday of October, which in Rome, as in the rest of EU, according to the 202X rules, means it?s the day we shift from summer time (in Rome UTC+2) to standard time (in Rome UTC+1). The shift supposedly happens at 3AM where it?s 2AM, so not at midnight, but the proximity to a daylight shift moment raises some eyebrows. This could explain why it doesn?t happen on the year before or after. (I?m curious if it happens on year 5334 which has the same setup, but I cannot check at the moment)

----------
nosy: +ewjoachim

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45347>
_______________________________________

From report at bugs.python.org  Sun Oct  3 04:33:23 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 03 Oct 2021 08:33:23 +0000
Subject: [issue45302] 10 built-in functions need non-None .__text_signature__
In-Reply-To: <1632757585.5.0.650553887806.issue45302@roundup.psfhosted.org>
Message-ID: <1633250003.0.0.515667051157.issue45302@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

There are reasons for this. There is no supported by inspect.signature() syntax to adequately define the signature of say getattr(). It has one required parameter and one optional parameter, but the default value of the optional parameter cannot be expressed.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45302>
_______________________________________

From report at bugs.python.org  Sun Oct  3 04:44:57 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 03 Oct 2021 08:44:57 +0000
Subject: [issue36521] Consider removing docstrings from co_consts in code
 objects
In-Reply-To: <1554339855.64.0.463077014069.issue36521@roundup.psfhosted.org>
Message-ID: <1633250697.37.0.547858962937.issue36521@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Hint: you can specify several arguments for multiline code. E.g. timeit -s "setup1" -s "setup2" "test1" "test2".

> And as a bonus, creating function without docstring is little faster.

Do you have any explanation of this?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36521>
_______________________________________

From report at bugs.python.org  Sun Oct  3 06:19:35 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sun, 03 Oct 2021 10:19:35 +0000
Subject: [issue45077] multiprocessing.Pool(64) crashes on Windows
In-Reply-To: <1630502444.21.0.00996444749357.issue45077@roundup.psfhosted.org>
Message-ID: <1633256375.64.0.436683600922.issue45077@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45077>
_______________________________________

From report at bugs.python.org  Sun Oct  3 06:53:22 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sun, 03 Oct 2021 10:53:22 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633258402.53.0.114424753033.issue45350@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

>  it appears to have been inadvertently deleted in 2fc857a5721a5b42bcb696c9cae1bbcc82a91b17 (PR 25860) probably due to an autoconf version mismatch. 

Since then, I have updated the autotools version to the old one in https://github.com/python/cpython/pull/28151
so this should have been fixed by that.
 What I am missing?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 06:55:55 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sun, 03 Oct 2021 10:55:55 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633258555.37.0.625531853572.issue45350@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Regarding preventing this, I have added a check so the autotools version doesn't get updated incorrectly:

https://github.com/python/cpython/pull/28152

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 07:02:16 2021
From: report at bugs.python.org (Daniel Fortunov)
Date: Sun, 03 Oct 2021 11:02:16 +0000
Subject: [issue45347] datetime subject to rounding?
In-Reply-To: <1633194102.6.0.241729336774.issue45347@roundup.psfhosted.org>
Message-ID: <1633258936.66.0.659412934983.issue45347@roundup.psfhosted.org>


Change by Daniel Fortunov <pythonbugs at danielfortunov.com>:


----------
nosy: +dfortunov

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45347>
_______________________________________

From report at bugs.python.org  Sun Oct  3 07:12:23 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sun, 03 Oct 2021 11:12:23 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores time zone
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1633259543.47.0.835195301933.issue45335@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +corona10, erlendaasland

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Sun Oct  3 07:22:46 2021
From: report at bugs.python.org (Inada Naoki)
Date: Sun, 03 Oct 2021 11:22:46 +0000
Subject: [issue36521] Consider removing docstrings from co_consts in code
 objects
In-Reply-To: <1554339855.64.0.463077014069.issue36521@roundup.psfhosted.org>
Message-ID: <1633260166.76.0.627249186176.issue36521@roundup.psfhosted.org>


Inada Naoki <songofacandy at gmail.com> added the comment:

> Do you have any explanation of this?

I think its because current PyFunction_New tries to get docstring always.
See this pull request (lazy-func-doc). https://github.com/python/cpython/pull/28704

lazy-func-doc is faster than co-docstring and remove-docstring in both of with/without docstring.

```
# co-docstring vs lazy-func-doc.
$ load-none-co-docstring/release/bin/pyperf timeit --compare-to ./cpython/release/bin/python3 --python-names lazy-func-doc:co-docstring --duplicate=100 "def f(): pass"
lazy-func-doc: ..................... 58.6 ns +- 1.6 ns
co-docstring: ..................... 60.3 ns +- 2.0 ns

Mean +- std dev: [lazy-func-doc] 58.6 ns +- 1.6 ns -> [co-docstring] 60.3 ns +- 2.0 ns: 1.03x slower

$ load-none-co-docstring/release/bin/pyperf timeit --compare-to ./cpython/release/bin/python3 --python-names lazy-func-doc:co-docstring --duplicate=100 "def f(): 'doc'"
lazy-func-doc: ..................... 59.6 ns +- 1.1 ns
co-docstring: ..................... 62.3 ns +- 1.7 ns

Mean +- std dev: [lazy-func-doc] 59.6 ns +- 1.1 ns -> [co-docstring] 62.3 ns +- 1.7 ns: 1.05x slower

# remove docstring vs lazy-func-doc

$ load-none-remove-docstring/release/bin/pyperf timeit --compare-to ./cpython/release/bin/python3 --python-names lazy-func-doc:remove-docstring --duplicate=100 "def f(): pass"
lazy-func-doc: ..................... 58.0 ns +- 1.1 ns
remove-docstring: ..................... 60.5 ns +- 1.5 ns

Mean +- std dev: [lazy-func-doc] 58.0 ns +- 1.1 ns -> [remove-docstring] 60.5 ns +- 1.5 ns: 1.04x slower

$ load-none-remove-docstring/release/bin/pyperf timeit --compare-to ./cpython/release/bin/python3 --python-names lazy-func-doc:remove-docstring --duplicate=100 "def f(): 'doc'"
lazy-func-doc: ..................... 59.9 ns +- 2.3 ns
remove-docstring: ..................... 63.5 ns +- 1.5 ns

Mean +- std dev: [lazy-func-doc] 59.9 ns +- 2.3 ns -> [remove-docstring] 63.5 ns +- 1.5 ns: 1.06x slower
```

Note that this benchmark runs on my MacBook. Results may be bit unstable, although I don't touch anything (especially, browser) during the run.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36521>
_______________________________________

From report at bugs.python.org  Sun Oct  3 07:23:58 2021
From: report at bugs.python.org (Kagami Sascha Rosylight)
Date: Sun, 03 Oct 2021 11:23:58 +0000
Subject: [issue45077] multiprocessing.Pool(64) throws on Windows
In-Reply-To: <1630502444.21.0.00996444749357.issue45077@roundup.psfhosted.org>
Message-ID: <1633260238.5.0.076241556366.issue45077@roundup.psfhosted.org>


Change by Kagami Sascha Rosylight <saschanaz at outlook.com>:


----------
title: multiprocessing.Pool(64) crashes on Windows -> multiprocessing.Pool(64) throws on Windows

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45077>
_______________________________________

From report at bugs.python.org  Sun Oct  3 07:49:38 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sun, 03 Oct 2021 11:49:38 +0000
Subject: [issue20028] csv: Confusing error message when giving invalid
 quotechar in initializing dialect
In-Reply-To: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
Message-ID: <1633261778.44.0.315129639615.issue20028@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20028>
_______________________________________

From report at bugs.python.org  Sun Oct  3 07:58:21 2021
From: report at bugs.python.org (Olaf van der Spek)
Date: Sun, 03 Oct 2021 11:58:21 +0000
Subject: [issue45351] List all sockets in TCP echo server using streams
Message-ID: <1633262301.08.0.953751090869.issue45351@roundup.psfhosted.org>


New submission from Olaf van der Spek <olafvdspek at gmail.com>:

Replace:
addr = server.sockets[0].getsockname()
print(f'Serving on {addr}')

By:
for socket in server.sockets: 
  addr = socket.getsockname()
  print(f'Serving on {addr}')

https://docs.python.org/3/library/asyncio-stream.html

----------
assignee: docs at python
components: Documentation
messages: 403084
nosy: docs at python, olafvdspek
priority: normal
severity: normal
status: open
title: List all sockets in TCP echo server using streams

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45351>
_______________________________________

From report at bugs.python.org  Sun Oct  3 08:15:56 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sun, 03 Oct 2021 12:15:56 +0000
Subject: [issue20028] csv: Confusing error message when giving invalid
 quotechar in initializing dialect
In-Reply-To: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
Message-ID: <1633263356.23.0.386456527104.issue20028@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
keywords: +patch
pull_requests: +27058
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28705

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20028>
_______________________________________

From report at bugs.python.org  Sun Oct  3 09:12:33 2021
From: report at bugs.python.org (Patrick Reader)
Date: Sun, 03 Oct 2021 13:12:33 +0000
Subject: [issue45352] Move documentation for typed generic forms of standard
 collections to collections.abc
Message-ID: <1633266753.15.0.403359406575.issue45352@roundup.psfhosted.org>


New submission from Patrick Reader <pxeger at protonmail.com>:

Currently the documentation for the generic forms (e.g. what the parameters in square brackets mean) of standard collections (e.g. collections.abc.Generator), is still on the typing page (https://docs.python.org/3.10/library/typing.html#typing.Generator).

This is from before PEP 585 was implemented, which deprecated the ones in typing in favour of the aliases in collections.abc. The documentation for these should be moved, or at least linked to, in the collections.abc page. The same applies to builtin types like list which can now also be directly parameterised.

In the case of Generator, for example, the text at https://docs.python.org/3.10/library/typing.html#typing.Generator, "A generator can be annotated...", should be moved to 
https://docs.python.org/3.10/library/collections.abc.html#collections.abc.Generator.

I chose Generator as an example, because it has three parameters YieldType, SendType, ReturnType whose order I can't remember and need to look up. For some types, such as Iterable, the meaning of the parameter is quite straightforward, so little documentation is needed (so https://docs.python.org/3.10/library/typing.html#typing.Iterable just says "A generic form of https://docs.python.org/3.10/library/collections.abc.html#collections.abc.Iterable"), but there should still be a note on the collections.abc page that it can be parameterised.

Perhaps there should also be a message saying "new in version 3.9: this can now be parameterised" on each ABC collection.

I can see that it might not be desirable to have this information scattered across other pages, because it is fundamentally about typing and pretty unrelated to builtin documentation, so it may be preferable to just link to the typing page rather than move the text. But since the old generics are deprecated, if they are removed, the documentation must be preserved.

----------
assignee: docs at python
components: Documentation
messages: 403085
nosy: docs at python, pxeger
priority: normal
severity: normal
status: open
title: Move documentation for typed generic forms of standard collections to collections.abc
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45352>
_______________________________________

From report at bugs.python.org  Sun Oct  3 09:19:34 2021
From: report at bugs.python.org (Ken Jin)
Date: Sun, 03 Oct 2021 13:19:34 +0000
Subject: [issue45352] Move documentation for typed generic forms of standard
 collections to collections.abc
In-Reply-To: <1633266753.15.0.403359406575.issue45352@roundup.psfhosted.org>
Message-ID: <1633267174.66.0.172555573639.issue45352@roundup.psfhosted.org>


Change by Ken Jin <kenjin4096 at gmail.com>:


----------
nosy: +gvanrossum, kj, rhettinger, stutzbach

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45352>
_______________________________________

From report at bugs.python.org  Sun Oct  3 09:34:19 2021
From: report at bugs.python.org (Laurent Gautier)
Date: Sun, 03 Oct 2021 13:34:19 +0000
Subject: [issue34778] Memoryview for column-major (f_contiguous) arrays from
 bytes impossible to achieve
In-Reply-To: <1537725098.47.0.956365154283.issue34778@psf.upfronthosting.co.za>
Message-ID: <1633268059.88.0.479896224339.issue34778@roundup.psfhosted.org>


Laurent Gautier <lgautier at gmail.com> added the comment:

Bump.

I am still stumbling on that issue. I have a workaround by importing numpy but that's a rather large dependency for that one little thing.

I see that the related issue https://bugs.python.org/issue35845 opened later has later discussion entries.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34778>
_______________________________________

From report at bugs.python.org  Sun Oct  3 10:10:19 2021
From: report at bugs.python.org (Ned Deily)
Date: Sun, 03 Oct 2021 14:10:19 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633270219.21.0.263186714676.issue45350@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

The updates to aclocal.a4 are generated by the aclocal tool of the GNU build system. That, and other things including autoconf, gets run by autoreconf.  Running autoconf by itself is not sufficient.

https://devguide.python.org/setup/#regenerate-configure

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 10:11:51 2021
From: report at bugs.python.org (Ned Deily)
Date: Sun, 03 Oct 2021 14:11:51 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633270311.41.0.676540133698.issue45350@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

The updates to aclocal.m4 are generated by the aclocal tool of the GNU build system. That, and other things including autoconf, gets run by autoreconf.  Running autoconf by itself is not sufficient.

https://devguide.python.org/setup/#regenerate-configure

https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/autoreconf-Invocation.html

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 10:12:08 2021
From: report at bugs.python.org (Ned Deily)
Date: Sun, 03 Oct 2021 14:12:08 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633270328.4.0.487598026185.issue45350@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
Removed message: https://bugs.python.org/msg403087

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 10:36:51 2021
From: report at bugs.python.org (Idan Cohen)
Date: Sun, 03 Oct 2021 14:36:51 +0000
Subject: [issue45353] sys.modules: dictionary changed size during iteration
Message-ID: <1633271811.32.0.73963856747.issue45353@roundup.psfhosted.org>


New submission from Idan Cohen <idan57 at gmail.com>:

Hi,

When iterating over sys.modules it might be that because of lazy loading or that other module reload is being reloaded (even if sys.modules.copy() is being used) you will get:

"RuntimeError: dictionary changed size during iteration"

The usage of sys.modules and iteration over it is used in many places

I know that this is a known issue but didn't find any solution or fix for that. Also, if there is some work around that might solve this, I would appreciate it.

Thanks,
Idan

----------
components: Library (Lib)
messages: 403089
nosy: idan57
priority: normal
severity: normal
status: open
title: sys.modules: dictionary changed size during iteration
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45353>
_______________________________________

From report at bugs.python.org  Sun Oct  3 10:42:28 2021
From: report at bugs.python.org (Jeremy Kloth)
Date: Sun, 03 Oct 2021 14:42:28 +0000
Subject: [issue45354] test_winconsoleio fails on Windows 11
Message-ID: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org>


New submission from Jeremy Kloth <jeremy.kloth+python-tracker at gmail.com>:

It appears there have been some console related changes in Windows 11

======================================================================
ERROR: test_open_name (test.test_winconsoleio.WindowsConsoleIOTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\Jeremy\source\repos\cpython\lib\test\test_winconsoleio.py", line 95, in test_open_name
    f = open('C:/con', 'rb', buffering=0)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:/con'

======================================================================
FAIL: test_conout_path (test.test_winconsoleio.WindowsConsoleIOTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\Jeremy\source\repos\cpython\lib\test\test_winconsoleio.py", line 118, in test_conout_path
    self.assertIsInstance(f, ConIO)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: <_io.FileIO name='C:\\Users\\Jeremy\\AppData\\Local\\Temp\\tmpoqx235b0\\CONOUT$' mode='wb' closefd=True> is not an instance of <class '_io._WindowsConsoleIO'>

----------------------------------------------------------------------

----------
components: Tests, Windows
messages: 403090
nosy: jkloth, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: test_winconsoleio fails on Windows 11
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45354>
_______________________________________

From report at bugs.python.org  Sun Oct  3 10:45:01 2021
From: report at bugs.python.org (Jeremy Kloth)
Date: Sun, 03 Oct 2021 14:45:01 +0000
Subject: [issue45354] test_winconsoleio fails on Windows 11
In-Reply-To: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org>
Message-ID: <1633272301.74.0.15898939746.issue45354@roundup.psfhosted.org>


Jeremy Kloth <jeremy.kloth+python-tracker at gmail.com> added the comment:

Note that I have a pending PR for adding a Windows 11 build worker that will, once merged, help in testing a solution.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45354>
_______________________________________

From report at bugs.python.org  Sun Oct  3 10:56:54 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Sun, 03 Oct 2021 14:56:54 +0000
Subject: [issue45352] Move documentation for typed generic forms of standard
 collections to collections.abc
In-Reply-To: <1633266753.15.0.403359406575.issue45352@roundup.psfhosted.org>
Message-ID: <1633273014.74.0.635664802693.issue45352@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

I think we should go ahead and duplicate the documentation in collections.abc (and in a few other places -- PEP 585 lists some builtins, some in contextlib, some in re). Then we won't have to worry about what happens when the typing module is slimmed down (presumably it will have to remain for things like Any, TypeVar, Generic).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45352>
_______________________________________

From report at bugs.python.org  Sun Oct  3 12:07:55 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sun, 03 Oct 2021 16:07:55 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633277275.24.0.386744667634.issue45350@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

For regeneration I was using:

https://github.com/tiran/cpython_autoconf

as instructed by Christian.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 12:08:23 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sun, 03 Oct 2021 16:08:23 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633277303.64.0.674695013489.issue45350@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

This runs:

"autoreconf -ivf"

with the correct version of autotools required by the openssl changes

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 12:09:37 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sun, 03 Oct 2021 16:09:37 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633277377.71.0.31949707349.issue45350@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

I can confirm that running autoreconf with Christian's version doesn't change the git tree:


? docker run -v`pwd`:/src tiran/cpython_autoconf
Rebuilding configure script
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: configure.ac: not using Automake
autoreconf: Leaving directory `.'
Done

3.10 on ? 3.10 [$] ? pyenv 3.9.1 took 6s
? git status
On branch 3.10
Your branch is up to date with 'upstream/3.10'.

nothing to commit, working tree clean

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 12:14:11 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sun, 03 Oct 2021 16:14:11 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633277651.77.0.596759567309.issue45350@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Ah, the problem is that pkgconfig is *not* installed in that DOckerfile. I can confirm that installing pkg-config and rerunning works.

----------
nosy: +christian.heimes

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 12:15:17 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Sun, 03 Oct 2021 16:15:17 +0000
Subject: [issue45353] sys.modules: dictionary changed size during iteration
In-Reply-To: <1633271811.32.0.73963856747.issue45353@roundup.psfhosted.org>
Message-ID: <1633277717.07.0.850951364074.issue45353@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

One standard way of preventing this is copying the dictionary whenever there's risk of it changing out from under you, as in:

modules = sys.modules.copy()
for key, value in modules.items():
    ...

----------
nosy: +Dennis Sweeney

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45353>
_______________________________________

From report at bugs.python.org  Sun Oct  3 12:15:58 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sun, 03 Oct 2021 16:15:58 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633277758.6.0.48839601977.issue45350@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Created a PR for this:

https://github.com/pablogsal/cpython_autoconf/pull/1

I think we should move this dockerfile to the CPython repo and update the devguide.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 12:18:32 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sun, 03 Oct 2021 16:18:32 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633277912.18.0.737773556326.issue45350@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
keywords: +patch
pull_requests: +27059
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/28707

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 12:19:55 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sun, 03 Oct 2021 16:19:55 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633277995.93.0.886935108218.issue45350@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
pull_requests: +27060
pull_request: https://github.com/python/cpython/pull/28708

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 12:23:18 2021
From: report at bugs.python.org (Ned Deily)
Date: Sun, 03 Oct 2021 16:23:18 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633278198.87.0.826834267339.issue45350@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

+1, I wasn't aware of the existence of that.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 12:33:34 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sun, 03 Oct 2021 16:33:34 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633278814.58.0.555109566249.issue45350@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Something seems wrong with the openssl detection when the PKG_PROG_PKG_CONFIG is active :(

Christian, could you please take a look? I would like to get this ready for the release

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 13:00:44 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 03 Oct 2021 17:00:44 +0000
Subject: [issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the
 size of the code unit
Message-ID: <1633280444.05.0.146974944058.issue45355@roundup.psfhosted.org>


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

Some C code in 3.10+ uses literal 2 for the size of the code unit. It should use sizeof(_Py_CODEUNIT) instead.

1. It is self-documented and allows to distinguish this 2 from other 2 constants.
2. It will help if we change from 16-bit code units to 24-, 32- or 64-bit code units.

----------
components: Interpreter Core
messages: 403101
nosy: Mark.Shannon, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45355>
_______________________________________

From report at bugs.python.org  Sun Oct  3 13:02:44 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 03 Oct 2021 17:02:44 +0000
Subject: [issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the
 size of the code unit
In-Reply-To: <1633280444.05.0.146974944058.issue45355@roundup.psfhosted.org>
Message-ID: <1633280564.74.0.017438488551.issue45355@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
keywords: +patch
pull_requests: +27061
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28711

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45355>
_______________________________________

From report at bugs.python.org  Sun Oct  3 13:36:29 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sun, 03 Oct 2021 17:36:29 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633282589.55.0.0334900787049.issue45350@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

I have updated the container at https://quay.io/repository/tiran/cpython_autoconf to include pkg-config.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 13:46:38 2021
From: report at bugs.python.org (Jeremy Kloth)
Date: Sun, 03 Oct 2021 17:46:38 +0000
Subject: [issue45354] test_winconsoleio fails on Windows 11
In-Reply-To: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org>
Message-ID: <1633283198.26.0.316940038057.issue45354@roundup.psfhosted.org>


Change by Jeremy Kloth <jeremy.kloth+python-tracker at gmail.com>:


----------
keywords: +patch
pull_requests: +27062
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28712

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45354>
_______________________________________

From report at bugs.python.org  Sun Oct  3 13:50:13 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 03 Oct 2021 17:50:13 +0000
Subject: [issue44674] dataclasses should allow frozendict default value
In-Reply-To: <1626703592.29.0.0154308260517.issue44674@roundup.psfhosted.org>
Message-ID: <1633283413.69.0.688225883375.issue44674@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

[Eric]
> I agree that there's no good way of telling if an
> arbitrary class is immutable, so I'm not sure we can 
> do anything here.

Consider using non-hashability as a proxy indicator for immutability.

    -  isinstance(f.default, (list, dict, set))
    +  f.default.__hash__ is None

While this is imperfect, it would be more reliable than what we have now.

----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44674>
_______________________________________

From report at bugs.python.org  Sun Oct  3 14:03:38 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 03 Oct 2021 18:03:38 +0000
Subject: [issue45352] Move documentation for typed generic forms of standard
 collections to collections.abc
In-Reply-To: <1633266753.15.0.403359406575.issue45352@roundup.psfhosted.org>
Message-ID: <1633284218.15.0.697373158143.issue45352@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Where are capabilities like "list[str]" and "dict[str, list[int]]" going to be documented?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45352>
_______________________________________

From report at bugs.python.org  Sun Oct  3 14:07:50 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 03 Oct 2021 18:07:50 +0000
Subject: [issue45302] 10 built-in functions need non-None .__text_signature__
In-Reply-To: <1632757585.5.0.650553887806.issue45302@roundup.psfhosted.org>
Message-ID: <1633284470.94.0.528014718155.issue45302@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

As Serhiy says, this is a known issue that we can't do anything about until signature objects become more expressive.  The C code already has comments such as:

     /* AC: cannot convert yet, waiting for *args support */
     /* AC: cannot convert yet, as needs PEP 457 group support in inspect */

----------
nosy: +rhettinger
resolution:  -> wont fix
stage: test needed -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45302>
_______________________________________

From report at bugs.python.org  Sun Oct  3 14:22:53 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 03 Oct 2021 18:22:53 +0000
Subject: [issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the
 size of the code unit
In-Reply-To: <1633280444.05.0.146974944058.issue45355@roundup.psfhosted.org>
Message-ID: <1633285373.49.0.998530387066.issue45355@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 60b9e040c9cf40e69f42c0008e564458aa0379e8 by Serhiy Storchaka in branch 'main':
bpo-45355: Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit (GH-28711)
https://github.com/python/cpython/commit/60b9e040c9cf40e69f42c0008e564458aa0379e8


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45355>
_______________________________________

From report at bugs.python.org  Sun Oct  3 14:27:58 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Sun, 03 Oct 2021 18:27:58 +0000
Subject: [issue45352] Move documentation for typed generic forms of standard
 collections to collections.abc
In-Reply-To: <1633266753.15.0.403359406575.issue45352@roundup.psfhosted.org>
Message-ID: <1633285678.63.0.50685248158.issue45352@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

> Where are capabilities like "list[str]" and "dict[str, list[int]]" going to be documented?

I think those should go with the individual types as well. AFter all, it's specific to the type how many parameters it has and what they mean. There should probably also be a general section explaining these generics, and the individual types can link to those so they don't have to repeat the same background information.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45352>
_______________________________________

From report at bugs.python.org  Sun Oct  3 15:16:57 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Sun, 03 Oct 2021 19:16:57 +0000
Subject: [issue44674] dataclasses should allow frozendict default value
In-Reply-To: <1626703592.29.0.0154308260517.issue44674@roundup.psfhosted.org>
Message-ID: <1633288617.33.0.706256082958.issue44674@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

That's a good idea, Raymond.

>>> [x.__hash__ is None for x in (list, dict, set, frozenset)]
[True, True, True, False]

I don't think this change would cause any backward compatibility issues, except it would now allow a default of something bad like:

>>> class BadList(list):
...   def __hash__(self): return 0
...
>>> isinstance(BadList(), list), BadList.__hash__ is None
(True, False)

I can't say I care too much about now allowing things that didn't used to be allowed, especially if they're poorly designed like BadList.

I'll put together a PR.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44674>
_______________________________________

From report at bugs.python.org  Sun Oct  3 15:17:08 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Sun, 03 Oct 2021 19:17:08 +0000
Subject: [issue44674] dataclasses should allow frozendict default value
In-Reply-To: <1626703592.29.0.0154308260517.issue44674@roundup.psfhosted.org>
Message-ID: <1633288628.93.0.600486669644.issue44674@roundup.psfhosted.org>


Change by Eric V. Smith <eric at trueblade.com>:


----------
type: compile error -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44674>
_______________________________________

From report at bugs.python.org  Sun Oct  3 15:45:56 2021
From: report at bugs.python.org (Randolf Scholz)
Date: Sun, 03 Oct 2021 19:45:56 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
Message-ID: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>


New submission from Randolf Scholz <randolf.scholz at gmail.com>:

I noticed some strange behaviour when calling `help` on a class inheriting from a class or having itself @classmethod @property decorated methods.

```python
from time import sleep
from abc import ABC, ABCMeta, abstractmethod

class MyMetaClass(ABCMeta):
    @classmethod
    @property
    def expensive_metaclass_property(cls):
        """This may take a while to compute!"""
        print("computing metaclass property"); sleep(3)
        return "Phew, that was a lot of work!"

    
class MyBaseClass(ABC, metaclass=MyMetaClass):
    @classmethod
    @property
    def expensive_class_property(cls):
        """This may take a while to compute!"""
        print("computing class property .."); sleep(3)
        return "Phew, that was a lot of work!"
    
    @property
    def expensive_instance_property(self):
        """This may take a while to compute!"""
        print("computing instance property ..."); sleep(3)
        return "Phew, that was a lot of work!"

class MyClass(MyBaseClass):
    """Some subclass of MyBaseClass"""
    
help(MyClass)
```

Calling `help(MyClass)` will cause `expensive_class_property` to be executed 4 times (!)

The other two properties, `expensive_instance_property` and `expensive_metaclass_property` are not executed.

Secondly, only `expensive_instance_property` is listed as a read-only property; `expensive_class_property` is listed as a classmethod and `expensive_metaclass_property` is unlisted.

The problem is also present in '3.10.0rc2 (default, Sep 28 2021, 17:57:14) [GCC 10.2.1 20210110]'

Stack Overflow thread: https://stackoverflow.com/questions/69426309

----------
files: classmethod_property.py
messages: 403109
nosy: randolf.scholz
priority: normal
severity: normal
status: open
title: Calling `help` executes @classmethod @property decorated methods
type: behavior
versions: Python 3.10, Python 3.9
Added file: https://bugs.python.org/file50325/classmethod_property.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Sun Oct  3 16:21:20 2021
From: report at bugs.python.org (Randolf Scholz)
Date: Sun, 03 Oct 2021 20:21:20 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1633292480.44.0.493461402404.issue45356@roundup.psfhosted.org>


Randolf Scholz <randolf.scholz at gmail.com> added the comment:

I updated the script with dome more info. The class-property gets actually executed 5 times when calling `help(MyClass)`

```
Computing class property of <class '__main__.MyClass'> ...DONE!
Computing class property of <class '__main__.MyClass'> ...DONE!
Computing class property of <class '__main__.MyClass'> ...DONE!
Computing class property of <class '__main__.MyBaseClass'> ...DONE!
Computing class property of <class '__main__.MyClass'> ...DONE!
```

----------
Added file: https://bugs.python.org/file50326/classmethod_property.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Sun Oct  3 17:03:34 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sun, 03 Oct 2021 21:03:34 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1633295014.38.0.106643616163.issue45356@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

See also: https://bugs.python.org/issue44904

----------
nosy: +AlexWaygood

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Sun Oct  3 17:42:22 2021
From: report at bugs.python.org (CoolCat467)
Date: Sun, 03 Oct 2021 21:42:22 +0000
Subject: [issue45357] Idle does not check user config for extention
 configuration
Message-ID: <1633297342.93.0.20149347886.issue45357@roundup.psfhosted.org>


New submission from CoolCat467 <davenport.samuel09 at gmail.com>:

I was trying to write an extension for Idle, and was noticing extension keys defined in ~/.idlerc weren't being used, so I looked into it and found that in idlelib.config.idleConf, `GetExtensionKeys`, `__GetRawExtensionKeys`, and `GetKeyBinding` would never check for user keys, always assuming default keys have everything. This is not always true. In a system with multiple users, you would not want to modify the default config file for a custom extension, as that is used for everyone.

----------
assignee: terry.reedy
components: IDLE
messages: 403112
nosy: CoolCat467, terry.reedy
priority: normal
severity: normal
status: open
title: Idle does not check user config for extention configuration
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45357>
_______________________________________

From report at bugs.python.org  Sun Oct  3 17:42:53 2021
From: report at bugs.python.org (CoolCat467)
Date: Sun, 03 Oct 2021 21:42:53 +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: <1633297373.07.0.815590653765.issue45357@roundup.psfhosted.org>


Change by CoolCat467 <davenport.samuel09 at gmail.com>:


----------
nosy:  -terry.reedy
versions: +Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45357>
_______________________________________

From report at bugs.python.org  Sun Oct  3 17:44:27 2021
From: report at bugs.python.org (CoolCat467)
Date: Sun, 03 Oct 2021 21:44:27 +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: <1633297467.84.0.425640391024.issue45357@roundup.psfhosted.org>


Change by CoolCat467 <davenport.samuel09 at gmail.com>:


----------
keywords: +patch
pull_requests: +27063
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28713

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45357>
_______________________________________

From report at bugs.python.org  Sun Oct  3 17:44:42 2021
From: report at bugs.python.org (Isuru Fernando)
Date: Sun, 03 Oct 2021 21:44:42 +0000
Subject: [issue44182] python-config.sh vs python-config.py inconsistency
In-Reply-To: <1621465930.28.0.548981352834.issue44182@roundup.psfhosted.org>
Message-ID: <1633297482.47.0.0289882090654.issue44182@roundup.psfhosted.org>


Isuru Fernando <isuruf at gmail.com> added the comment:

Agree that this should be fixed. If you want, I can send a PR.

----------
nosy: +isuruf

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44182>
_______________________________________

From report at bugs.python.org  Sun Oct  3 18:03:46 2021
From: report at bugs.python.org (greob)
Date: Sun, 03 Oct 2021 22:03:46 +0000
Subject: [issue45358] Bogus cookie generated after invalid cookie attribute is
 input
Message-ID: <1633298626.44.0.0775080772803.issue45358@roundup.psfhosted.org>


New submission from greob <greob at yahoo.com.sg>:

Youtube sends cookies with some non-standard attributes. For example:
```
Secure-1PSID=XXXXXX; Domain=.youtube.com; Path=/; Expires=Tue, 03-Oct-2023 16:26:27 GMT; Secure; HttpOnly; Priority=HIGH; SameParty
```
Notice the Priority and SameParty attributes. 


In the case above, the cookie is entirely discarded because of the unexpected SameParty attribute. I have not read the specifications, but I would prefer to keep the cookie instead of discarding it. 
These unusual attributes are clearly used by Chromium. Firefox ignore these attributes and does not discard the cookies.

In another case, the "Priority" key/value attribute is present, which may or may not be followed by any other (valid) attributes. 
An extra cookie is then generated by http.cookies.BaseCookie.__parse_string() (cpython/Lib/http/cookies.py:539):

```
Set-Cookie: priority=high; Domain=www.youtube.com; Path=/; SameSite=none
```
There may even be duplicate cookies generated if the case changes (ie. "Priority=HIGH" would be yet another bogus cookie).

The reason for this is as follows:
The "priority=high" is seen as a key/value pair, and added to the parsed_items list with type TYPE_KEYVALUE, which is now the _second_ TYPE_KEYVALUE in the list. To my understanding, there should be only _one_ TYPE_KEYVALUE in this list, that is the actual cookie key/value pair. Any other item added to that list should be a TYPE_ATTRIBUTE.

In the for loop below (cpython/Lib/http/cookies.py:590), a new Morsel is created with key=Priority and value=HIGH, which is not what we want at all.

I have been working on a patch, but I keep pulling my hair over the fact that multiple key=value pairs can be found in the same string, which is expected by the test suite to result in multiple separate cookies.

An easy workaround would be to justadd "priority" to _reserved keys, and "sameparty" to known flags. Basically catching up with Google's "extensions".

Thoughts?

----------
components: Library (Lib)
messages: 403114
nosy: greob
priority: normal
severity: normal
status: open
title: Bogus cookie generated after invalid cookie attribute is input
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45358>
_______________________________________

From report at bugs.python.org  Sun Oct  3 18:18:50 2021
From: report at bugs.python.org (Jacob Hayes)
Date: Sun, 03 Oct 2021 22:18:50 +0000
Subject: [issue45359] TopologicalSorter is not Generic at runtime (but is in
 typeshed)
Message-ID: <1633299530.43.0.181161136207.issue45359@roundup.psfhosted.org>


New submission from Jacob Hayes <jacob.r.hayes at gmail.com>:

Reproduction:

```
from graphlib import TopologicalSorter

TopologicalSorter[str]({"a": {}, "b": {"a"}})
```
```
$ mypy /tmp/toposort.py
Success: no issues found in 1 source file
$ python3 /tmp/toposort.py
Traceback (most recent call last):
  File "/tmp/toposort.py", line 3, in <module>
    TopologicalSorter[str]({"a": {}, "b": {"a"}})
TypeError: 'type' object is not subscriptable
```

I opened the issue here (rather than typeshed) because we'd presumably like to support this at runtime too.

Typeshed link: https://github.com/python/mypy/blob/0a830481980bfc554ded61a3eaaaecde384a21e4/mypy/typeshed/stdlib/graphlib.pyi#L6

----------
components: Library (Lib)
messages: 403115
nosy: JacobHayes
priority: normal
severity: normal
status: open
title: TopologicalSorter is not Generic at runtime (but is in typeshed)
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45359>
_______________________________________

From report at bugs.python.org  Sun Oct  3 18:22:31 2021
From: report at bugs.python.org (Jacob Hayes)
Date: Sun, 03 Oct 2021 22:22:31 +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: <1633299751.68.0.904786306897.issue45359@roundup.psfhosted.org>


Change by Jacob Hayes <jacob.r.hayes at gmail.com>:


----------
keywords: +patch
pull_requests: +27064
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28714

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45359>
_______________________________________

From report at bugs.python.org  Sun Oct  3 19:40:01 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sun, 03 Oct 2021 23:40:01 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633304401.8.0.284370553267.issue45350@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset f146ca36f81075f222aa3a1595042597d96dfad3 by Pablo Galindo Salgado in branch '3.10':
bpo-45350: Rerun autoreconf with the pkg-config macros (GH-28707)
https://github.com/python/cpython/commit/f146ca36f81075f222aa3a1595042597d96dfad3


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 19:46:59 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sun, 03 Oct 2021 23:46:59 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633304819.51.0.611060609136.issue45350@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset a25dcaefb7c4eb0767a112cd31fe0b055f168844 by Pablo Galindo Salgado in branch 'main':
bpo-45350: Rerun autoreconf with the pkg-config macros (GH-28708)
https://github.com/python/cpython/commit/a25dcaefb7c4eb0767a112cd31fe0b055f168844


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 19:47:33 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sun, 03 Oct 2021 23:47:33 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633304853.36.0.662035994284.issue45350@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Sun Oct  3 20:21:24 2021
From: report at bugs.python.org (Ned Deily)
Date: Mon, 04 Oct 2021 00:21:24 +0000
Subject: [issue44182] python-config.sh vs python-config.py inconsistency
In-Reply-To: <1621465930.28.0.548981352834.issue44182@roundup.psfhosted.org>
Message-ID: <1633306884.93.0.607277026923.issue44182@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

> If you want, I can send a PR.

Thanks, that would be good. Embedding is something we currently don't really test, unfortunately. Off the top of my head, I'm not sure how feasible it would be to add some tests for embedding, especially given the range of configurations we support but something would be better than nothing.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44182>
_______________________________________

From report at bugs.python.org  Sun Oct  3 21:17:14 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Mon, 04 Oct 2021 01:17:14 +0000
Subject: [issue19290] Clarify compile and eval interaction.
In-Reply-To: <1382135132.91.0.187309157375.issue19290@psf.upfronthosting.co.za>
Message-ID: <1633310234.51.0.173174656151.issue19290@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
versions: +Python 3.11 -Python 2.7, Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19290>
_______________________________________

From report at bugs.python.org  Sun Oct  3 21:41:51 2021
From: report at bugs.python.org (Inada Naoki)
Date: Mon, 04 Oct 2021 01:41:51 +0000
Subject: [issue36521] Consider removing docstrings from co_consts in code
 objects
In-Reply-To: <1554339855.64.0.463077014069.issue36521@roundup.psfhosted.org>
Message-ID: <1633311711.92.0.0218586251796.issue36521@roundup.psfhosted.org>


Change by Inada Naoki <songofacandy at gmail.com>:


----------
pull_requests: +27065
pull_request: https://github.com/python/cpython/pull/28704

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36521>
_______________________________________

From report at bugs.python.org  Sun Oct  3 22:03:18 2021
From: report at bugs.python.org (Inada Naoki)
Date: Mon, 04 Oct 2021 02:03:18 +0000
Subject: [issue36521] Consider removing docstrings from co_consts in code
 objects
In-Reply-To: <1554339855.64.0.463077014069.issue36521@roundup.psfhosted.org>
Message-ID: <1633312998.92.0.43011363294.issue36521@roundup.psfhosted.org>


Inada Naoki <songofacandy at gmail.com> added the comment:

Lazy filling func.__doc__ has only 3~5% performance gain. And it has small backward incompatibility.

```
>>> def foo(): "foo"
...
>>> def bar(): "bar"
...
>>> bar.__code__ = foo.__code__
>>> bar.__doc__
'foo'  # was 'bar'
```


Note that non-constant docstring (and PEP 649 will) have larger overhead. Some people don't write docstring for private/local functions, but write annotation for code completion and/or type checking.

```
$ load-none-remove-docstring/release/bin/pyperf timeit --duplicate=100 "def f(x: int, y: str) -> float: pass"
.....................
Mean +- std dev: 111 ns +- 2 ns

$ load-none-remove-docstring/release/bin/pyperf timeit --duplicate=100 "def f(x, y): 'doc'"
.....................
Mean +- std dev: 63.9 ns +- 2.1 ns
```

So I think 2~3ns is a "tiny fraction" here.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36521>
_______________________________________

From report at bugs.python.org  Mon Oct  4 02:07:10 2021
From: report at bugs.python.org (Terunobu Inaba)
Date: Mon, 04 Oct 2021 06:07:10 +0000
Subject: [issue45360] xml.etree.ElementTree: add feature in write to create
 directories also like mkdir -p
Message-ID: <1633327630.81.0.219409303004.issue45360@roundup.psfhosted.org>


New submission from Terunobu Inaba <incredibleteru at gmail.com>:

In the xml.etree.ElementTree module, the function "write(args)" (https://docs.python.org/ja/3/library/xml.etree.elementtree.html) does not seem to have a function like "-p" in "mkdir -p" in UNIX system, i.e., it will raise an error when some directories in the path argument do not exist in your PC.

I find this a bit uncomfortable. So, I would like to extend this function to be able to create directories only if they does not already exist.

----------
components: Library (Lib)
messages: 403120
nosy: i11u
priority: normal
severity: normal
status: open
title: xml.etree.ElementTree: add feature in write to create directories also like mkdir -p
type: enhancement
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45360>
_______________________________________

From report at bugs.python.org  Mon Oct  4 02:42:56 2021
From: report at bugs.python.org (Nathaniel Smith)
Date: Mon, 04 Oct 2021 06:42:56 +0000
Subject: [issue45361] Provide a more convenient way to set an exception as
 "active", from Python code
Message-ID: <1633329776.11.0.630918001556.issue45361@roundup.psfhosted.org>


New submission from Nathaniel Smith <njs at pobox.com>:

Inside 'except' and 'finally' blocks, the interpreter keeps track of the 'active exception in the thread-state. It can be introspected via `sys.exc_info()`, it enables bare `raise`, and it triggers implicit context propagation.

In an odd bit of synchronicity, I recently bumped into two completely separate cases where Python code would benefit from being able to control this state directly:

- in the flat exception groups discussion [1], I noted that it would be useful if concurrency libraries could propagate this state into child tasks

- in bpo-27089, regarding some gnarly code in contextlib.ExitStack that simulates a set of nested try/finally blocks by running callback with the wrong exception context, and then introspecting the result and trying to fix it up after the fact. It turns out this code is difficult to understand and subtly buggy -- the PR at gh-27089 fixes one of the bugs here, but there are others [2]. It would be much simpler if it could just set the correct `exc_info` before calling each cleanup function, and then no fixups would be needed things would be set up correctly in the first place.

[1] https://discuss.python.org/t/flat-exception-groups-alternative-to-pep-654/10433

[2] https://github.com/python/cpython/pull/27089#issuecomment-932892687

But, currently, the *only* way to make an exception 'active' like this is to raise it and then catch it again. And this has some significant limitations:

- It unconditionally mutates the exception -- in particular both __context__ and __traceback__ are modified

- The "active exception" has type Optional[BaseException], since try/raise/except is block syntax, and you can't `raise None`. So if you want to propagate an arbitrary `sys.exc_info()` into a child task or into a simulated `finally` block, then you need two separate code paths depending on whether `sys.exc_info()[1]` is None or not.

- technically I think you can work around both of these issues with enough effort... but since try/raise/except is block syntax, the workarounds can't be hidden inside a function; you have to inline them into each usage site.

So... I'm thinking maybe we should have some stupid-simple, sharp-edged API to set `sys.exc_info()` from Python. Like, idk, `sys.set_exc_info(...)`, as a trivial wrapper around `PyErr_Restore`.

My main uncertainty is that I know the code for handling the exception state is quite complex, between the "exception stack", the tricky optimizations around partially-initialized exc_info tuples, pushing/popping the exc state in ceval.c, the tricks generators/coroutines use to save/restore exc_info across yields, etc. There might be some hidden dragons in here that require careful handling, and maybe it'll turn out we need to push/pop an exception instead of just setting it, or something like that.

But does the core idea make sense? Anyone aware of any dragons off the top of your head?

----------
messages: 403121
nosy: Mark.Shannon, gvanrossum, iritkatriel, ncoghlan, njs, yselivanov
priority: normal
severity: normal
status: open
title: Provide a more convenient way to set an exception as "active", from Python code
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45361>
_______________________________________

From report at bugs.python.org  Mon Oct  4 02:43:54 2021
From: report at bugs.python.org (Nathaniel Smith)
Date: Mon, 04 Oct 2021 06:43:54 +0000
Subject: [issue45361] Provide a more convenient way to set an exception as
 "active", from Python code
In-Reply-To: <1633329776.11.0.630918001556.issue45361@roundup.psfhosted.org>
Message-ID: <1633329834.96.0.641863235949.issue45361@roundup.psfhosted.org>


Nathaniel Smith <njs at pobox.com> added the comment:

Ugh, the gnarly ExitStack bug is bpo-44594, not whatever I wrote above

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45361>
_______________________________________

From report at bugs.python.org  Mon Oct  4 02:50:03 2021
From: report at bugs.python.org (Nathaniel Smith)
Date: Mon, 04 Oct 2021 06:50:03 +0000
Subject: [issue44594] AsyncExitStack.enter_async_context() is mishandling
 exception __context__
In-Reply-To: <1625875193.61.0.628325060677.issue44594@roundup.psfhosted.org>
Message-ID: <1633330202.99.0.569350956848.issue44594@roundup.psfhosted.org>


Nathaniel Smith <njs at pobox.com> added the comment:


New changeset e6d1aa1ac65b6908fdea2c70ec3aa8c4f1dffcb5 by John Belmonte in branch 'main':
bpo-44594: fix (Async)ExitStack handling of __context__ (gh-27089)
https://github.com/python/cpython/commit/e6d1aa1ac65b6908fdea2c70ec3aa8c4f1dffcb5


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44594>
_______________________________________

From report at bugs.python.org  Mon Oct  4 03:00:52 2021
From: report at bugs.python.org (Nathaniel Smith)
Date: Mon, 04 Oct 2021 07:00:52 +0000
Subject: [issue41197] Async magic methods in contextlib.closing
In-Reply-To: <1593714173.91.0.0149218020987.issue41197@roundup.psfhosted.org>
Message-ID: <1633330852.26.0.914352749441.issue41197@roundup.psfhosted.org>


Change by Nathaniel Smith <njs at pobox.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41197>
_______________________________________

From report at bugs.python.org  Mon Oct  4 03:26:14 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Mon, 04 Oct 2021 07:26:14 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1633332374.46.0.421454507053.issue45356@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Mon Oct  4 04:14:39 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 04 Oct 2021 08:14:39 +0000
Subject: [issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the
 size of the code unit
In-Reply-To: <1633280444.05.0.146974944058.issue45355@roundup.psfhosted.org>
Message-ID: <1633335279.16.0.927839181047.issue45355@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27066
pull_request: https://github.com/python/cpython/pull/28718

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45355>
_______________________________________

From report at bugs.python.org  Mon Oct  4 04:56:27 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 04 Oct 2021 08:56:27 +0000
Subject: [issue44831] Inconsistency between datetime.now() and
 datetime.fromtimestamp(time.time(), None)
In-Reply-To: <1628099391.12.0.0928824788179.issue44831@roundup.psfhosted.org>
Message-ID: <1633337787.64.0.983714730546.issue44831@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> Presumably if we change these two to be consistent, this issue will go away. I am not entirely sure if anyone is relying on a particular rounding behavior for one or both of these, and I'm not sure which one is the right one to harmonize on.

We already changed datetime rounding once in Python 3.4.4, see bpo-23517.

commit 511491ade0bb77febb176bc75f049797f0c71ed0
Author: Victor Stinner <victor.stinner at gmail.com>
Date:   Fri Sep 18 14:42:05 2015 +0200

    Issue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods
    of datetime.datetime: microseconds are now rounded to nearest with ties going
    to nearest even integer (ROUND_HALF_EVEN), instead of being rounding towards
    zero (ROUND_DOWN). It's important that these methods use the same rounding
    mode than datetime.timedelta to keep the property:
    
       (datetime(1970,1,1) + timedelta(seconds=t)) == datetime.utcfromtimestamp(t)
    
    It also the rounding mode used by round(float) for example.
    
    Add more unit tests on the rounding mode in test_datetime.

Since that time, I wrote a lot of time in Python/pytime.c to handle various rounding methods, and handle various time formats. See Include/cpython/pytime.h, I added documentation at the top recently ;-)

https://github.com/python/cpython/blob/main/Include/cpython/pytime.h

The _datetime module doesn't use _PyTime_t type but time_t to support the time_t full range (larger than _PyTime_t with 64-bit time_t).

I wrote an article about rounding timestamps:
https://vstinner.github.io/pytime.html

It seems like not all issues have been fixed yet :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44831>
_______________________________________

From report at bugs.python.org  Mon Oct  4 04:57:15 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 04 Oct 2021 08:57:15 +0000
Subject: [issue44831] Inconsistency between datetime.now() and
 datetime.fromtimestamp(time.time(), None)
In-Reply-To: <1628099391.12.0.0928824788179.issue44831@roundup.psfhosted.org>
Message-ID: <1633337835.36.0.822185340889.issue44831@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> Since that time, I wrote a lot of time

I wrote a lot of *code* :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44831>
_______________________________________

From report at bugs.python.org  Mon Oct  4 05:48:31 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 04 Oct 2021 09:48:31 +0000
Subject: [issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the
 size of the code unit
In-Reply-To: <1633280444.05.0.146974944058.issue45355@roundup.psfhosted.org>
Message-ID: <1633340911.03.0.5214549002.issue45355@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27067
pull_request: https://github.com/python/cpython/pull/28720

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45355>
_______________________________________

From report at bugs.python.org  Mon Oct  4 05:52:14 2021
From: report at bugs.python.org (Florian Obersteiner)
Date: Mon, 04 Oct 2021 09:52:14 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores time zone
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1633341134.52.0.626143241058.issue45335@roundup.psfhosted.org>


Change by Florian Obersteiner <f.obersteiner at posteo.de>:


----------
nosy: +MrFuppes

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Mon Oct  4 05:56:52 2021
From: report at bugs.python.org (Martmists)
Date: Mon, 04 Oct 2021 09:56:52 +0000
Subject: [issue45362] dis does not work with the new optimized ops
Message-ID: <1633341412.48.0.798356810047.issue45362@roundup.psfhosted.org>


New submission from Martmists <martmists at gmail.com>:

Python 3.11.0a0 (heads/main:e6d1aa1, Oct  4 2021, 10:33:36) [GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dis
>>> c = bytes([127, 1, 0, 2])  # LOAD_FAST__LOAD_FAST (1, 2)
>>> dis.dis(c)
          0 <127>                    1
          2 <0>
>>> c = bytes([48, 0, 161, 0])  # LOAD_GLOBAL_BUILTIN (0) CALL_FUNCTION (0)
>>> dis.dis(c)
          0 <48>
          2 CALL_METHOD              0

---

The reason for this seems to be the lack of definition in `opcode.py` aside from being mentioned in _specialized_instructions. Additionally, it seems dis._unpack_opargs is not yet prepared to support opcodes like LOAD_FAST__LOAD_FAST which take two arguments.

While I don't expect this to be a first priority in this big change, it's important to not forget it.

----------
components: Library (Lib)
messages: 403126
nosy: martmists
priority: normal
severity: normal
status: open
title: dis does not work with the new optimized ops
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45362>
_______________________________________

From report at bugs.python.org  Mon Oct  4 06:03:20 2021
From: report at bugs.python.org (Martmists)
Date: Mon, 04 Oct 2021 10:03:20 +0000
Subject: [issue45362] dis does not work with the new optimized ops
In-Reply-To: <1633341412.48.0.798356810047.issue45362@roundup.psfhosted.org>
Message-ID: <1633341800.19.0.503824250999.issue45362@roundup.psfhosted.org>


Martmists <martmists at gmail.com> added the comment:

Another thing I found to be quite odd is JUMP_ABSOLUTE_QUICK, which is set as 40, but as it's derived from JUMP_ABSOLUTE it still requires an argument. This makes HAVE_ARGUMENT useless as there's an op that doesn't follow the convention.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45362>
_______________________________________

From report at bugs.python.org  Mon Oct  4 06:50:17 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 04 Oct 2021 10:50:17 +0000
Subject: [issue45360] xml.etree.ElementTree: add feature in write to create
 directories also like mkdir -p
In-Reply-To: <1633327630.81.0.219409303004.issue45360@roundup.psfhosted.org>
Message-ID: <1633344617.73.0.165957822506.issue45360@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

open() does not create parent directories either. And no any function in the stdlib which creates a file does it. It would be rather error-prone if they do, because you can create a file at wrong place.

So just create a directory if you need to, and let the code to raise an exception to report your errors.

----------
nosy: +serhiy.storchaka
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45360>
_______________________________________

From report at bugs.python.org  Mon Oct  4 07:09:56 2021
From: report at bugs.python.org (Julien Palard)
Date: Mon, 04 Oct 2021 11:09:56 +0000
Subject: [issue28206] signal.Signals not documented
In-Reply-To: <1474297204.47.0.613989661481.issue28206@psf.upfronthosting.co.za>
Message-ID: <1633345796.49.0.140458876128.issue28206@roundup.psfhosted.org>


Julien Palard <julien+python at palard.fr> added the comment:


New changeset 9be930f9b169fb3d92693670ae069df902709b83 by Bibo-Joshi in branch 'main':
bpo-28206: Document signals Handlers, Sigmasks and Signals enums (GH-28628)
https://github.com/python/cpython/commit/9be930f9b169fb3d92693670ae069df902709b83


----------
nosy: +mdk

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28206>
_______________________________________

From report at bugs.python.org  Mon Oct  4 07:11:07 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 04 Oct 2021 11:11:07 +0000
Subject: [issue45363] Use instruction offsets in co_lnotab
Message-ID: <1633345867.06.0.564667934457.issue45363@roundup.psfhosted.org>


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

It was a part of the original patch for issue27129.

As well as in jumping instructions we can use instruction offsets instead of bytes offset in co_lnotab. It increases the range of offsets which can be encoded with a single byte, and therefore reduce the size of co_lnotab and its decoding time. It will allow to simplify the code if we use instruction offsets everywhere.

----------
components: Interpreter Core
messages: 403130
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use instruction offsets in co_lnotab
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45363>
_______________________________________

From report at bugs.python.org  Mon Oct  4 07:11:30 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 04 Oct 2021 11:11:30 +0000
Subject: [issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the
 size of the code unit
In-Reply-To: <1633280444.05.0.146974944058.issue45355@roundup.psfhosted.org>
Message-ID: <1633345890.6.0.323702124137.issue45355@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 252b7bcb236dc261f3af1275bc90f9a303d9648f by Serhiy Storchaka in branch 'main':
bpo-45355: More use of sizeof(_Py_CODEUNIT) (GH-28720)
https://github.com/python/cpython/commit/252b7bcb236dc261f3af1275bc90f9a303d9648f


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45355>
_______________________________________

From report at bugs.python.org  Mon Oct  4 07:57:19 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Mon, 04 Oct 2021 11:57:19 +0000
Subject: [issue45362] dis does not work with the new optimized ops
In-Reply-To: <1633341412.48.0.798356810047.issue45362@roundup.psfhosted.org>
Message-ID: <1633348639.46.0.145604329879.issue45362@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45362>
_______________________________________

From report at bugs.python.org  Mon Oct  4 07:59:44 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 04 Oct 2021 11:59:44 +0000
Subject: [issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the
 size of the code unit
In-Reply-To: <1633280444.05.0.146974944058.issue45355@roundup.psfhosted.org>
Message-ID: <1633348784.14.0.651282687348.issue45355@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27068
pull_request: https://github.com/python/cpython/pull/28721

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45355>
_______________________________________

From report at bugs.python.org  Mon Oct  4 08:01:15 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 04 Oct 2021 12:01:15 +0000
Subject: [issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the
 size of the code unit
In-Reply-To: <1633280444.05.0.146974944058.issue45355@roundup.psfhosted.org>
Message-ID: <1633348875.49.0.234285033027.issue45355@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset b5499784ec0aa24c8f0d91f2317cc53b7743ada9 by Serhiy Storchaka in branch '3.10':
[3.10] bpo-45355: Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit (GH-28711). (GH-28718)
https://github.com/python/cpython/commit/b5499784ec0aa24c8f0d91f2317cc53b7743ada9


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45355>
_______________________________________

From report at bugs.python.org  Mon Oct  4 08:35:50 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Mon, 04 Oct 2021 12:35:50 +0000
Subject: [issue45362] dis does not work with the new optimized ops
In-Reply-To: <1633341412.48.0.798356810047.issue45362@roundup.psfhosted.org>
Message-ID: <1633350950.9.0.966598647916.issue45362@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +Mark.Shannon, kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45362>
_______________________________________

From report at bugs.python.org  Mon Oct  4 08:51:18 2021
From: report at bugs.python.org (xloem)
Date: Mon, 04 Oct 2021 12:51:18 +0000
Subject: [issue45302] 10 built-in functions need non-None .__text_signature__
In-Reply-To: <1632757585.5.0.650553887806.issue45302@roundup.psfhosted.org>
Message-ID: <1633351878.05.0.790211640958.issue45302@roundup.psfhosted.org>


xloem <0xloem at gmail.com> added the comment:

Thanks for your time.

Just a note that this is likely a docs issue if nothing else.  I may never have opened this issue if the missing functions were listed in the inspect module documentation.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45302>
_______________________________________

From report at bugs.python.org  Mon Oct  4 08:54:44 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 04 Oct 2021 12:54:44 +0000
Subject: [issue44182] python-config.sh vs python-config.py inconsistency
In-Reply-To: <1621465930.28.0.548981352834.issue44182@roundup.psfhosted.org>
Message-ID: <1633352084.36.0.549771357043.issue44182@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Maybe unit tests can be written on python-config.sh and python-config.py commands.

----------
nosy: +vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44182>
_______________________________________

From report at bugs.python.org  Mon Oct  4 08:55:44 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 04 Oct 2021 12:55:44 +0000
Subject: [issue45363] Use instruction offsets in co_lnotab
In-Reply-To: <1633345867.06.0.564667934457.issue45363@roundup.psfhosted.org>
Message-ID: <1633352144.95.0.193239449497.issue45363@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
keywords: +patch
pull_requests: +27069
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28722

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45363>
_______________________________________

From report at bugs.python.org  Mon Oct  4 09:27:19 2021
From: report at bugs.python.org (Ken Jin)
Date: Mon, 04 Oct 2021 13:27:19 +0000
Subject: [issue45352] Move documentation for typed generic forms of standard
 collections to collections.abc
In-Reply-To: <1633266753.15.0.403359406575.issue45352@roundup.psfhosted.org>
Message-ID: <1633354039.85.0.799669896431.issue45352@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

> I think those should go with the individual types as well

The list[] and dict[] stdtypes are in a different document from collections.abc.*. While this helps logical separation, I feel like it'd be tougher searching for type information compared to our current aggregate-everything-in-typing approach.

Where type hints for types should belong has been a hot subject for some time. This was discussed at the typing summit, and also by the docs WG.

- Docs WG: https://github.com/python/docs-community/issues/8
- Downstream typing possible tutorial: https://github.com/python/typing/issues/891
- Downstream typing's docs: https://github.com/python/typing/tree/master/docs

The general consensus it seems is to separate complex information from the CPython docs. I like this approach because type hints have zero meaning to CPython, so placing them in docs meant for runtime behavior feels strange.

OTOH, external docs won't be able to keep up with the subtleties of multiple different versions of typing in CPython. So *some* information should be kept in CPython docs.

I think for now, a link in collections.abc pointing to typing would suffice. In the future when Python 3.9 becomes an "old" version and PEP 585 notation is commonplace, we should copy them over like Guido suggested (and if Raymond is OK with collections.abc docs including that sort of information). Guido or Raymond may have other plans though ;-).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45352>
_______________________________________

From report at bugs.python.org  Mon Oct  4 09:42:46 2021
From: report at bugs.python.org (Ken Jin)
Date: Mon, 04 Oct 2021 13:42:46 +0000
Subject: [issue45362] dis does not work with the new optimized ops
In-Reply-To: <1633341412.48.0.798356810047.issue45362@roundup.psfhosted.org>
Message-ID: <1633354966.93.0.0904077265583.issue45362@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

Thanks Martmists for the bug report, I'll try to address some of your concerns:

> The reason for this seems to be the lack of definition in `opcode.py` aside from being mentioned in _specialized_instructions.

If I understood Mark's intentions in PEP 659 correctly, when you call dis.dis on any normally generated code object, specialized instructions will never show up. Specialized instructions are a hidden implementation detail, and instead the normal generic instruction will appear. So there isn't really a need to support it (any Python hand-crafted specialized instruction will likely segfault anyways).

> Additionally, it seems dis._unpack_opargs is not yet prepared to support opcodes like LOAD_FAST__LOAD_FAST which take two arguments

Sorry, I don't quite understand what you mean here. The superinstructions do not use different bytecode format: ie they take only one oparg. LOAD_FAST__LOAD_FAST works by reading the *next* instruction's oparg. So:

LOAD_FAST   0
LOAD_FAST   1
LOAD_CONST  0

Becomes:

LOAD_FAST__LOAD_FAST 0
LOAD_FAST            1
LOAD_CONST           0

LOAD_FAST__LOAD_FAST will increment program counter inline [1] to read the oparg of the instruction after it without going through eval loop, then on dispatch it will effectively "skip" the next instruction and go straight to LOAD_CONST. The speedup comes from skipping eval-loop and dispatch overhead of one instruction. The bytecode format is unchanged.

[1] https://github.com/python/cpython/blob/07cf10bafc8f6e1fcc82c10d97d3452325fc7c04/Python/ceval.c#L1755

I hope this helps you.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45362>
_______________________________________

From report at bugs.python.org  Mon Oct  4 09:55:25 2021
From: report at bugs.python.org (Martmists)
Date: Mon, 04 Oct 2021 13:55:25 +0000
Subject: [issue45362] dis does not work with the new optimized ops
In-Reply-To: <1633341412.48.0.798356810047.issue45362@roundup.psfhosted.org>
Message-ID: <1633355725.17.0.239376128536.issue45362@roundup.psfhosted.org>


Martmists <martmists at gmail.com> added the comment:

> Specialized instructions are a hidden implementation detail, and instead the normal generic instruction will appear.

Will this change be reflected in co_code? If yes, then I'm aware of cases where this may be used by bytecode modification libraries. If not, how would it deal with co_code being modified?

> Sorry, I don't quite understand what you mean here. The superinstructions do not use different bytecode format: ie they take only one oparg.
I see, so it'll just replace the first of the two ops to streamline the process rather than replacing the second one with a dummy instruction

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45362>
_______________________________________

From report at bugs.python.org  Mon Oct  4 10:07:29 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 04 Oct 2021 14:07:29 +0000
Subject: [issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the
 size of the code unit
In-Reply-To: <1633280444.05.0.146974944058.issue45355@roundup.psfhosted.org>
Message-ID: <1633356449.07.0.539906519153.issue45355@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 1670d590fa6b817e0d3f091ea12aee9ae744875a by Serhiy Storchaka in branch '3.10':
[3.10] bpo-45355: More use of sizeof(_Py_CODEUNIT) (GH-28720). (GH-28721)
https://github.com/python/cpython/commit/1670d590fa6b817e0d3f091ea12aee9ae744875a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45355>
_______________________________________

From report at bugs.python.org  Mon Oct  4 10:36:21 2021
From: report at bugs.python.org (Ken Jin)
Date: Mon, 04 Oct 2021 14:36:21 +0000
Subject: [issue45362] dis does not work with the new optimized ops
In-Reply-To: <1633341412.48.0.798356810047.issue45362@roundup.psfhosted.org>
Message-ID: <1633358181.62.0.108750697802.issue45362@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

> Will this change be reflected in co_code?
No. As per PEP 659: 

"Once any instruction in a code object has executed a few times, that code object will be "quickened" by allocating a new array for the bytecode that can be modified at runtime, and is not constrained as the code.co_code object is."

Example:

x = lambda a: len(a)
print(x.__code__.co_code)

#quickened
for _ in range(10):
 x('')

print(x.__code__.co_code)

There should be no change.

> If not, how would it deal with co_code being modified?
Disclaimer: I am not a contributor to such libraries, so my knowledge in this area is limited.

co_code is readonly and the bytes object it points is also immutable. So I'd imagine that they'd have to create a brand new code object, in which case it shouldn't matter. But if there is some way to modify co_code in-place using ctypes: I don't know. Sorry! The best way to find out is to test those libraries with 3.11 and see if such functionality breaks, then file a bug report here please. Thank you.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45362>
_______________________________________

From report at bugs.python.org  Mon Oct  4 10:46:12 2021
From: report at bugs.python.org (Mark Shannon)
Date: Mon, 04 Oct 2021 14:46:12 +0000
Subject: [issue45362] dis does not work with the new optimized ops
In-Reply-To: <1633341412.48.0.798356810047.issue45362@roundup.psfhosted.org>
Message-ID: <1633358772.08.0.986332230306.issue45362@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:

127 and 48 aren't instructions.
>>> opcode.stack_effect(48)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid opcode or oparg

So the output from dis seems correct.


>If not, how would it deal with co_code being modified?

The co_code attribute is immutable and read only. It cannot be modified.

Specialized instructions and super instructions are private to the interpreter.
If they are visible to Python code (not counting ctypes hacks), then that is a bug.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45362>
_______________________________________

From report at bugs.python.org  Mon Oct  4 10:48:05 2021
From: report at bugs.python.org (Mark Shannon)
Date: Mon, 04 Oct 2021 14:48:05 +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: <1633358885.95.0.820792133135.issue43760@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
pull_requests: +27070
pull_request: https://github.com/python/cpython/pull/28723

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43760>
_______________________________________

From report at bugs.python.org  Mon Oct  4 10:51:53 2021
From: report at bugs.python.org (Eric Snow)
Date: Mon, 04 Oct 2021 14:51:53 +0000
Subject: [issue45364] Add more documentation for ModuleSpec.loader_state.
Message-ID: <1633359113.08.0.945752109224.issue45364@roundup.psfhosted.org>


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

Currently ModuleSpec.loader_state is documented briefly once in the importlib docs. [1]  It should have more explanation, e.g. about when/why it should be used.  It should also be mentioned meaningfully in the MetapathFinder [2] and Loader [3] docs, as well as in the language reference [4].

Also see https://github.com/python/cpython/pull/28633#discussion_r720865971.

Note that ModuleSpec (and loader_state) were added in 3.4, so this documentation-only change would be helpful all the way back.  At the least we should update the docs back to 3.9, the current bug-fix release.


[1] https://docs.python.org/3/library/importlib.html#importlib.machinery.ModuleSpec.loader_state
[2] https://docs.python.org/3/library/importlib.html#importlib.abc.MetaPathFinder
[3] https://docs.python.org/3/library/importlib.html#importlib.abc.Loader
[4] https://docs.python.org/3/reference/import.html#loaders or https://docs.python.org/3/reference/import.html#module-spec

----------
assignee: docs at python
components: Documentation
messages: 403141
nosy: barry, brett.cannon, docs at python, eric.snow, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Add more documentation for ModuleSpec.loader_state.
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45364>
_______________________________________

From report at bugs.python.org  Mon Oct  4 10:53:10 2021
From: report at bugs.python.org (Erick)
Date: Mon, 04 Oct 2021 14:53:10 +0000
Subject: [issue45339] concurrent.future.ThreadPoolExecutor should parameterize
 class used for threads
In-Reply-To: <1633084673.43.0.269469120691.issue45339@roundup.psfhosted.org>
Message-ID: <1633359190.92.0.738802170938.issue45339@roundup.psfhosted.org>


Erick <erick.peirson at gmail.com> added the comment:

> Can you apply some custom logic by specifying the initializer?

Not sure that I follow; how would I use a context manager with the initializer?

Of course this is just one example. In the `threading` docs, the second sentence in the description of the `Thread.run` method (https://docs.python.org/3/library/threading.html#threading.Thread.run) is:

> You may override this method in a subclass. 

But one cannot use a subclass of `Thread` with `ThreadPoolExecutor` without the gymnastics indicated earlier. That's the real issue here, I think.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45339>
_______________________________________

From report at bugs.python.org  Mon Oct  4 11:16:10 2021
From: report at bugs.python.org (Steve Dower)
Date: Mon, 04 Oct 2021 15:16:10 +0000
Subject: [issue45354] test_winconsoleio fails on Windows 11
In-Reply-To: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org>
Message-ID: <1633360570.84.0.559076620574.issue45354@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

This will be the change to make "special" filenames only be special when used on their own, and not as part of a path (e.g. you shouldn't have any trouble with "aux" or "com" filenames either). I had expected it to roll out sooner, but I guess Windows 11 is when it arrives.

We'll have to go through our regression tests that rely on this behaviour. Happily, I don't think we merged any major "fixes" for the old behaviour (I've been discouraging them, but haven't been able to say that the fix was coming :( ).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45354>
_______________________________________

From report at bugs.python.org  Mon Oct  4 12:01:16 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Mon, 04 Oct 2021 16:01:16 +0000
Subject: [issue45352] Move documentation for typed generic forms of standard
 collections to collections.abc
In-Reply-To: <1633266753.15.0.403359406575.issue45352@roundup.psfhosted.org>
Message-ID: <1633363276.27.0.347663975137.issue45352@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

I'm not against additional tutorial for typing. But the standard library manual is supposed to be a complete reference. There is enough variation between different generic types (e.g. are the parameters covariant?) that ought to be documented. I don't want to create a "typing ghetto" where all typing information is collected as if it wasn't really part of the language.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45352>
_______________________________________

From report at bugs.python.org  Mon Oct  4 12:06:28 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 04 Oct 2021 16:06:28 +0000
Subject: [issue45339] concurrent.future.ThreadPoolExecutor should parameterize
 class used for threads
In-Reply-To: <1633084673.43.0.269469120691.issue45339@roundup.psfhosted.org>
Message-ID: <1633363588.53.0.0448052267584.issue45339@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

You can call __enter__ in the initializer. Seems there is no easy way to call __exit__ at shutting down the thread, perhaps something like per-thread atexit could help. As an example, you can save the context manager in thread locals and manually repeatedly submit a function that calls __exit__ and blocks the thread on some Barrier before calling ThreadPoolExecutor.shutdown(). It is complicated, so we may add some helpers to support context managers.

What are examples of your some_important_context()? Is it important to call some code before destroying the thread?

The problem with allowing the user to specify the Thread subclass is that in general using Thread is an implementation detail. ThreadPoolExecutor could be implemented using the low-level _thread module instead. Or in future it can need to create a special Thread subclass, and user-specified Thread subclass can be not compatible with it. It is safer to limit ways in which the user can affect execution. The initializer parameter was added to address cases similar to your.

Note also that ThreadPoolExecutor and ProcessPoolExecutor have almost identical interface. If we add some feature in ThreadPoolExecutor we will have a pressure to add the same feature in ProcessPoolExecutor to solve similar problems.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45339>
_______________________________________

From report at bugs.python.org  Mon Oct  4 14:52:20 2021
From: report at bugs.python.org (Eryk Sun)
Date: Mon, 04 Oct 2021 18:52:20 +0000
Subject: [issue45354] test_winconsoleio fails on Windows 11
In-Reply-To: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org>
Message-ID: <1633373540.67.0.892416568265.issue45354@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

> This will be the change to make "special" filenames only be 
> special when used on their own, and not as part of a path

For some reason, Windows 11 still reserves case-insensitive "nul" in qualified paths, but none of the other DOS device names. Thankfully it's just "nul", and not "nul.txt", since they changed it to never reserve a name with an extension. So "./nul" -> "\\.\nul", but "./nul.txt" resolve to the filename in the current directory.

For cases such as "./con" vs "con", this is another example in favor of changing ntpath.normpath() and pathlib.Path to preserve an initial leading dot component. Other cases include alternate data streams on single-letter filenames (e.g. accessing "C:stream" as "./C:stream") and executable paths that should explicitly refer to the current directory (e.g. "./spam.exe").

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45354>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:41 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:41 +0000
Subject: [issue45193] IDLE Show completions pop-up not working on Ubuntu Linux
In-Reply-To: <1631600960.46.0.341409360398.issue45193@roundup.psfhosted.org>
Message-ID: <1633375121.43.0.0138089594479.issue45193@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 7f2d049cce6dc749a589424d4fb62ffca0b85b32 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45193: Restore IDLE completion boxes on Ubuntu (GH-28343)
https://github.com/python/cpython/commit/7f2d049cce6dc749a589424d4fb62ffca0b85b32

New changeset d08e4a8c55ae3bd06c2e871265911ee88429b6bb by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45193: News for IDLE PR_28343 (GH-28348)
https://github.com/python/cpython/commit/d08e4a8c55ae3bd06c2e871265911ee88429b6bb


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45193>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:42 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:42 +0000
Subject: [issue9811] strftime strips '%' from unknown format codes on OS X
In-Reply-To: <1284026345.38.0.190320909092.issue9811@psf.upfronthosting.co.za>
Message-ID: <1633375122.04.0.323690372534.issue9811@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset b1873d1e24ed5ef39f37ca3090c2f0c2b34ce23f by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-9811: [doc] strftime handling of unsupported format specifiers is platform dependent (GH-28264) (GH-28277)
https://github.com/python/cpython/commit/b1873d1e24ed5ef39f37ca3090c2f0c2b34ce23f


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue9811>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:41 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:41 +0000
Subject: [issue30637] Syntax error reported on compile(...),
 but not on compile(..., ast.PyCF_ONLY_AST)
In-Reply-To: <1497271056.08.0.482498543523.issue30637@psf.upfronthosting.co.za>
Message-ID: <1633375121.94.0.564778889591.issue30637@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset f025ea23210173b42303360aca05132e4ffdfed3 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-30637: Improve the docs of ast.parse regarding differences with compile() (GH-28459)
https://github.com/python/cpython/commit/f025ea23210173b42303360aca05132e4ffdfed3


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30637>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:42 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:42 +0000
Subject: [issue42038] Tracemalloc's format() doc contradictory
In-Reply-To: <1602695346.39.0.326290965149.issue42038@roundup.psfhosted.org>
Message-ID: <1633375122.5.0.326542605515.issue42038@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 84d56ec4bc0cb44629ba898a30eece48546828d2 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-42038: fix description of returned list of lines (GH-27529) (GH-28428)
https://github.com/python/cpython/commit/84d56ec4bc0cb44629ba898a30eece48546828d2


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42038>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:42 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:42 +0000
Subject: [issue45341] Update "Python Package Index" in Docs
In-Reply-To: <1633095783.18.0.61571389025.issue45341@roundup.psfhosted.org>
Message-ID: <1633375122.33.0.830160044183.issue45341@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 18bf0c10ec7b98e6e1514dc08e5bb7228840316e by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45341: Replace 'Packaging' with 'Package' in "Python P... Index" (GH-28687)
https://github.com/python/cpython/commit/18bf0c10ec7b98e6e1514dc08e5bb7228840316e


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45341>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:42 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:42 +0000
Subject: [issue44640] Fix punctuation in isinstance() error message
In-Reply-To: <1626284420.22.0.865096690123.issue44640@roundup.psfhosted.org>
Message-ID: <1633375122.71.0.556619956754.issue44640@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 39c4fe5e2b2ae5ac45c380b0a83e86bac3d7129c by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-44640: Improve punctuation consistency in isinstance/issubclass error messages (GH-27144) (GH-28436)
https://github.com/python/cpython/commit/39c4fe5e2b2ae5ac45c380b0a83e86bac3d7129c


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44640>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:42 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:42 +0000
Subject: [issue45024] Cannot extend collections ABCs with protocol
In-Reply-To: <1630027789.49.0.847415585989.issue45024@roundup.psfhosted.org>
Message-ID: <1633375122.88.0.0795757819748.issue45024@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 9d8a64a7ccebb288094d4e9da66f30d2ada9a973 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45024 and bpo-23864: Document how interface testing works with the collections ABCs (GH-28218) (GH-28266)
https://github.com/python/cpython/commit/9d8a64a7ccebb288094d4e9da66f30d2ada9a973


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45024>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:43 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:43 +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: <1633375123.21.0.286078523522.issue43760@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 78184fa6b0e6129203673e425718e08f5edb6e2e by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-43760: Document PyThreadState.use_tracing removal (GH-28527) (GH-28529)
https://github.com/python/cpython/commit/78184fa6b0e6129203673e425718e08f5edb6e2e


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43760>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:43 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:43 +0000
Subject: [issue45128] test_multiprocessing_fork fails if run sequentially
 after test_genericalias and test_logging
In-Reply-To: <1631025233.12.0.173850188755.issue45128@roundup.psfhosted.org>
Message-ID: <1633375123.13.0.0223009479222.issue45128@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 76611038bc3d2aa643dce45448f5c7044dd4fd06 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45128: fixes `test_multiprocessing_fork` mysterious crash (GH-28387)
https://github.com/python/cpython/commit/76611038bc3d2aa643dce45448f5c7044dd4fd06


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45128>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:42 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:42 +0000
Subject: [issue45291] Some instructions in the "Using Python on Unix
 platforms" document do no work on CentOS 7
In-Reply-To: <1632653925.67.0.37350677863.issue45291@roundup.psfhosted.org>
Message-ID: <1633375122.15.0.281076671975.issue45291@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 63c4d42e6ea68104561c853b065c004b200eba68 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45291: Explicitly set --libdir=lib when configure OpenSSL (GH-28566) (GH-28616)
https://github.com/python/cpython/commit/63c4d42e6ea68104561c853b065c004b200eba68


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45291>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:43 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:43 +0000
Subject: [issue45307] Removal of _PyImport_FindExtensionObject() in 3.10
 limits custom extension module loaders
In-Reply-To: <1632790875.67.0.121557732673.issue45307@roundup.psfhosted.org>
Message-ID: <1633375123.42.0.484535213212.issue45307@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 2ca4ab8031107f9e474e2ce26561ab9ad51faf9c by Pablo Galindo (Serhiy Storchaka) in branch '3.10':
[3.10] bpo-45307: Restore private C API function _PyImport_FindExtensionObject() (GH-28594)
https://github.com/python/cpython/commit/2ca4ab8031107f9e474e2ce26561ab9ad51faf9c


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45307>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:42 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:42 +0000
Subject: [issue30951] Documentation error in inspect module
In-Reply-To: <1500312575.69.0.52467451771.issue30951@psf.upfronthosting.co.za>
Message-ID: <1633375122.59.0.925131891776.issue30951@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 7d652c1b7a56524fec42f65d9be28c17888075ab by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-30951: Correct co_names docstring in inspect module (GH-2743) (GH-28543)
https://github.com/python/cpython/commit/7d652c1b7a56524fec42f65d9be28c17888075ab


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30951>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:43 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:43 +0000
Subject: [issue44860] sysconfig's posix_user scheme has different platlib
 value to distutils's unix_user
In-Reply-To: <1628346558.35.0.0800108572532.issue44860@roundup.psfhosted.org>
Message-ID: <1633375123.71.0.453233865329.issue44860@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 01be51833db23414b5dc766f9c92953d838d82c3 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-44860: Update test_sysconfig for posix_user platlib (GH-28235) (GH-28251)
https://github.com/python/cpython/commit/01be51833db23414b5dc766f9c92953d838d82c3


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44860>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:42 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:42 +0000
Subject: [issue45249] Update doctect SyntaxErrors for location range
In-Reply-To: <1632155458.61.0.570546761746.issue45249@roundup.psfhosted.org>
Message-ID: <1633375122.41.0.570282253766.issue45249@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 1e2058214fffcb3919e0e127145106ade40a0420 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45249: Ensure the traceback module prints correctly syntax errors with ranges (GH-28575)
https://github.com/python/cpython/commit/1e2058214fffcb3919e0e127145106ade40a0420


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45249>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:41 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:41 +0000
Subject: [issue45234] copy_file raises FileNotFoundError when src is a
 directory
In-Reply-To: <1631887457.05.0.0932118278478.issue45234@roundup.psfhosted.org>
Message-ID: <1633375121.62.0.131081031148.issue45234@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset e0b61b28641bdd20cfeff6d9878f1318b711ca19 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421) (GH-28508)
https://github.com/python/cpython/commit/e0b61b28641bdd20cfeff6d9878f1318b711ca19


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45234>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:44 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:44 +0000
Subject: [issue45118] regrtest no longer lists "re-run tests" in the second
 summary
In-Reply-To: <1630945732.21.0.656532683711.issue45118@roundup.psfhosted.org>
Message-ID: <1633375124.22.0.592348930617.issue45118@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 6ae97bbf4e6540a8287c47d098cfe703260b5fa2 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45118: Fix regrtest second summary for re-run tests (GH-28183) (GH-28214)
https://github.com/python/cpython/commit/6ae97bbf4e6540a8287c47d098cfe703260b5fa2


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45118>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:43 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:43 +0000
Subject: [issue45310] test_multiprocessing_forkserver:
 test_shared_memory_basics() failed with FileExistsError: [Errno 17] File
 exists: '/test01_tsmb'
In-Reply-To: <1632831738.98.0.525271172358.issue45310@roundup.psfhosted.org>
Message-ID: <1633375123.65.0.0259976806521.issue45310@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset bc4c705869d4a24fc137a81df913869aa51d60d2 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45310: Fix parrallel shared memory tests (GH-28661)
https://github.com/python/cpython/commit/bc4c705869d4a24fc137a81df913869aa51d60d2


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45310>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:44 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:44 +0000
Subject: [issue41203] Replace references to OS X in documentation with macOS
In-Reply-To: <1593800586.51.0.799645858165.issue41203@roundup.psfhosted.org>
Message-ID: <1633375124.49.0.56263416523.issue41203@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset db3ac4899993271c1c21432dea97de8ae5df5b9d by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-41203: Replace Mac OS X and OS X with macOS (GH-28515) (GH-28523)
https://github.com/python/cpython/commit/db3ac4899993271c1c21432dea97de8ae5df5b9d


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41203>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:41 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:41 +0000
Subject: [issue45217] ConfigParser does not accept "No value" reversely to the
 doc
In-Reply-To: <1631782278.7.0.0138696609954.issue45217@roundup.psfhosted.org>
Message-ID: <1633375121.75.0.925689779861.issue45217@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset c4e9ef1f1d3bb7aca09f3ac6691a78d1341d7fcb by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45217: adds note that `allow_no_value` in `configparser` is optional (GH-28396) (GH-28418)
https://github.com/python/cpython/commit/c4e9ef1f1d3bb7aca09f3ac6691a78d1341d7fcb


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45217>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:42 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:42 +0000
Subject: [issue43914] Highlight invalid ranges in SyntaxErrors
In-Reply-To: <1619114890.78.0.876060892584.issue43914@roundup.psfhosted.org>
Message-ID: <1633375122.97.0.559013882754.issue43914@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 0eb57c3be47e45b10124428ab45827467cd2d58e by Pablo Galindo (?ukasz Langa) in branch '3.10':
[3.10] bpo-43914: What's New 3.10: add new SyntaxError attributes (GH-28558) (GH-28562)
https://github.com/python/cpython/commit/0eb57c3be47e45b10124428ab45827467cd2d58e

New changeset 3397e3192ccc95ff7076f735930d2f4c60fbc278 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-43914: Correctly highlight SyntaxError exceptions for invalid generator expression in function calls (GH-28576)
https://github.com/python/cpython/commit/3397e3192ccc95ff7076f735930d2f4c60fbc278


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43914>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:44 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:44 +0000
Subject: [issue45089] [sqlite3] the trace callback does not raise exceptions
 on error
In-Reply-To: <1630615346.0.0.296018695296.issue45089@roundup.psfhosted.org>
Message-ID: <1633375124.42.0.11357198534.issue45089@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 6fc66d6b9d39fa7a5a8692062d54b5a6a1aa0283 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45089: Improve sqlite3 trace callback docs (GH-28238) (GH-28371)
https://github.com/python/cpython/commit/6fc66d6b9d39fa7a5a8692062d54b5a6a1aa0283


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45089>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:41 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:41 +0000
Subject: [issue45198] __set_name__ documentation not clear about its usage
 with non-descriptor classes
In-Reply-To: <1631637625.07.0.44020466506.issue45198@roundup.psfhosted.org>
Message-ID: <1633375121.54.0.315666879372.issue45198@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset aac54ef2b30eb27f6756bbf0cdb8be2e64f2cce0 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45198: __set_name__ documentation not clear about its usage with non-descriptor classes (GH-28439)
https://github.com/python/cpython/commit/aac54ef2b30eb27f6756bbf0cdb8be2e64f2cce0


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45198>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:44 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:44 +0000
Subject: [issue45277] typo in codecs documentation
In-Reply-To: <1632473575.85.0.482002410759.issue45277@roundup.psfhosted.org>
Message-ID: <1633375124.35.0.473575135429.issue45277@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 0b568530ecb6ccc696771acf8018ec6fff1a0a5f by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45277: Fix typo in codecs doc (GH-28555)
https://github.com/python/cpython/commit/0b568530ecb6ccc696771acf8018ec6fff1a0a5f


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45277>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:44 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:44 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1633375124.28.0.0345071731403.issue45350@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 2c47b8080b030ad9cdae96a02fa1e533806eb22a by Pablo Galindo (Pablo Galindo Salgado) in branch '3.10':
bpo-45350: Rerun autoreconf with the pkg-config macros (GH-28707)
https://github.com/python/cpython/commit/2c47b8080b030ad9cdae96a02fa1e533806eb22a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:44 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:44 +0000
Subject: [issue44964] Semantics of PyCode_Addr2Line() changed
In-Reply-To: <1629482860.18.0.0801179280266.issue44964@roundup.psfhosted.org>
Message-ID: <1633375124.15.0.221504071059.issue44964@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 490a7427dce1cba55a9fbdbccd092e4c8ffae05f by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-44964: Correct the note about the f_lasti field (GH-28208) (GH-28276)
https://github.com/python/cpython/commit/490a7427dce1cba55a9fbdbccd092e4c8ffae05f


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44964>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:41 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:41 +0000
Subject: [issue45216] Remove redundant information from difflib docstrings
In-Reply-To: <1631777610.22.0.0340838668525.issue45216@roundup.psfhosted.org>
Message-ID: <1633375121.83.0.205263945109.issue45216@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset e1eb03d15fa543ea7e3275b213fdb2c649b5968e by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45216: Remove extraneous method docs from `difflib` (GH-28445) (GH-28505)
https://github.com/python/cpython/commit/e1eb03d15fa543ea7e3275b213fdb2c649b5968e


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45216>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:42 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:42 +0000
Subject: [issue43219] shutil.copy raises IsADirectoryError when the directory
 does not actually exist
In-Reply-To: <1613279788.4.0.734801709372.issue43219@roundup.psfhosted.org>
Message-ID: <1633375122.23.0.573904058432.issue43219@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset e0b61b28641bdd20cfeff6d9878f1318b711ca19 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421) (GH-28508)
https://github.com/python/cpython/commit/e0b61b28641bdd20cfeff6d9878f1318b711ca19


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43219>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:43 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:43 +0000
Subject: [issue4356] Add "key" argument to "bisect" module functions
In-Reply-To: <1227115048.67.0.318831592843.issue4356@psf.upfronthosting.co.za>
Message-ID: <1633375123.82.0.446803310257.issue4356@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 7128864885340e0d75ddfe32887257e245d9c1f7 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-4356: Mention the new key arguments for the bisect module APIs in the 3.10 What's new (GH-28339) (GH-28340)
https://github.com/python/cpython/commit/7128864885340e0d75ddfe32887257e245d9c1f7


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue4356>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:42 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:42 +0000
Subject: [issue45121] Calling super().__init__ in subclasses of
 typing.Protocol raises RecursionError
In-Reply-To: <1630965920.35.0.627159261173.issue45121@roundup.psfhosted.org>
Message-ID: <1633375122.79.0.117584912298.issue45121@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset db762a9b21a8af6f2ee94a6e49144dd1a1a62333 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45121: Fix RecursionError when calling Protocol.__init__ from a subclass' __init__ (GH-28206) (GH-28232)
https://github.com/python/cpython/commit/db762a9b21a8af6f2ee94a6e49144dd1a1a62333


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45121>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:43 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:43 +0000
Subject: [issue45346] Some "truthy" crept in
In-Reply-To: <1633184246.2.0.0169690019034.issue45346@roundup.psfhosted.org>
Message-ID: <1633375123.07.0.486971212339.issue45346@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 49fac92173d2c6cc3bd42a2355824e13272a3a7d by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45346: Keep docs consistent regarding true and false values (GH-28697) (GH-28698)
https://github.com/python/cpython/commit/49fac92173d2c6cc3bd42a2355824e13272a3a7d


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45346>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:43 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:43 +0000
Subject: [issue38623] Python documentation should mention how to find
 site-packages
In-Reply-To: <1572302365.38.0.0160311403424.issue38623@roundup.psfhosted.org>
Message-ID: <1633375123.57.0.822519962194.issue38623@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset cdfbe581bae1b33d4eb135597cd27b0f3782e97e by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-38623: Add note about site module (site-packages) (GH-16974) (GH-28536)
https://github.com/python/cpython/commit/cdfbe581bae1b33d4eb135597cd27b0f3782e97e


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38623>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:43 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:43 +0000
Subject: [issue45067] Failed to build _curses on CentOS 7
In-Reply-To: <1630453143.24.0.854803512429.issue45067@roundup.psfhosted.org>
Message-ID: <1633375123.5.0.0572977879134.issue45067@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset dfccba47339722ff082a05a190593be9e443cb0e by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45067 - Verify the version of ncurses for extended color support feature usage. (GH-28260)
https://github.com/python/cpython/commit/dfccba47339722ff082a05a190593be9e443cb0e


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45067>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:44 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:44 +0000
Subject: [issue23864] doc: issubclass without registration only works for
 "one-trick pony" collections ABCs.
In-Reply-To: <1428145067.47.0.0726533343331.issue23864@psf.upfronthosting.co.za>
Message-ID: <1633375124.02.0.690799985777.issue23864@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 9d8a64a7ccebb288094d4e9da66f30d2ada9a973 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
bpo-45024 and bpo-23864: Document how interface testing works with the collections ABCs (GH-28218) (GH-28266)
https://github.com/python/cpython/commit/9d8a64a7ccebb288094d4e9da66f30d2ada9a973


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23864>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:18:43 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 04 Oct 2021 19:18:43 +0000
Subject: [issue45246] the sorted() documentation should refer to operator <
In-Reply-To: <1632125212.88.0.211688526442.issue45246@roundup.psfhosted.org>
Message-ID: <1633375123.34.0.599529790514.issue45246@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 2e4d66d2e71d36de394e0e7a4e60ed7b6a539933 by Pablo Galindo (?ukasz Langa) in branch '3.10':
[3.10] bpo-45246: Document that sorted() only uses "<" comparisons (GH-28494) (GH-28502)
https://github.com/python/cpython/commit/2e4d66d2e71d36de394e0e7a4e60ed7b6a539933


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45246>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:31:22 2021
From: report at bugs.python.org (Xavier Morel)
Date: Mon, 04 Oct 2021 19:31:22 +0000
Subject: [issue45365] concurrent.futures.Future should be suitable for use
 outside of executors
Message-ID: <1633375882.11.0.38644719586.issue45365@roundup.psfhosted.org>


New submission from Xavier Morel <xavier.morel at masklinn.net>:

concurrent.futures.Future currently has the note:

> Future instances are created by Executor.submit() and should not be created directly except for testing.

That seems like a shame as futures are useful concurrency construct and having to rebuild them "by hand" seems like a waste.

What are the issues which prevent safely using futures outside of executors, and is there a way they could be fixed / lifted?

----------
components: Library (Lib)
messages: 403181
nosy: xmorel
priority: normal
severity: normal
status: open
title: concurrent.futures.Future should be suitable for use outside of executors
type: enhancement
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45365>
_______________________________________

From report at bugs.python.org  Mon Oct  4 15:43:26 2021
From: report at bugs.python.org (Isuru Fernando)
Date: Mon, 04 Oct 2021 19:43:26 +0000
Subject: [issue44182] python-config.sh vs python-config.py inconsistency
In-Reply-To: <1621465930.28.0.548981352834.issue44182@roundup.psfhosted.org>
Message-ID: <1633376606.7.0.277581511517.issue44182@roundup.psfhosted.org>


Change by Isuru Fernando <isuruf at gmail.com>:


----------
keywords: +patch
pull_requests: +27071
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28725

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44182>
_______________________________________

From report at bugs.python.org  Mon Oct  4 16:14:40 2021
From: report at bugs.python.org (wim glenn)
Date: Mon, 04 Oct 2021 20:14:40 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1633378480.38.0.429358397428.issue45356@roundup.psfhosted.org>


Change by wim glenn <wim.glenn at gmail.com>:


----------
nosy: +wim.glenn

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Mon Oct  4 16:17:33 2021
From: report at bugs.python.org (simple_coder878)
Date: Mon, 04 Oct 2021 20:17:33 +0000
Subject: [issue45366] dataclass init=False field with default works but
 default_factory does not
Message-ID: <1633378653.41.0.620481624294.issue45366@roundup.psfhosted.org>


New submission from simple_coder878 <junk757 at gmail.com>:

Simple example
from dataclasses import dataclass, field

@dataclass(init=False)
class TestObject(object):
    m: str = field(default='hi')
    k: list = field(default_factory=list)

    def test(self):
        print(f'm is {self.m} ')
        print(f'k is {self.k}')

if __name__ == '__main__':
    myobject = TestObject()
    myobject.test()


Produces:

Traceback (most recent call last):
  File "H:\unit_test\tests_dataclass.py", line 81, in <module>
    myobject.test()
  File "H:\unit_test\tests_dataclass.py", line 76, in test
    print(f'k is {self.k}')
AttributeError: 'TestObject' object has no attribute 'k'
m is hi 

So m is initialized to hi but k just disappears

But wait there's more!

If i do 

from dataclasses import dataclass, field

@dataclass(init=False)
class TestObject(object):
    m: str = field(default='hi')
    k: list = field(default_factory=list)

    def test(self):
        print(f'm is {self.m} ')
        print(f'k is {self.k}')


@dataclass
class InheritedTestObject(TestObject):

    def __post_init__(self):
        super().__init__()
        print(f'Inherited m is {self.m} ')
        print(f'Inherited k is {self.k}')
        print(f'Inherited g is {self.k}')


if __name__ == '__main__':
    myobject = InheritedTestObject()
    myobject.test()

It produces:

Inherited m is hi 
Inherited k is []
Inherited g is []
m is hi 
k is []

Process finished with exit code 0

NO ERRORS!

It seems like a bug to me, but what is the expected behavior in this case? I would expect the first case to not error out and should have an empty list.

I've only tested this on Python 3.9 so far.

----------
components: ctypes
messages: 403182
nosy: simple_coder878
priority: normal
severity: normal
status: open
title: dataclass init=False field with default works but default_factory does not
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45366>
_______________________________________

From report at bugs.python.org  Mon Oct  4 16:31:56 2021
From: report at bugs.python.org (simple_coder878)
Date: Mon, 04 Oct 2021 20:31:56 +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: <1633379516.48.0.713507268765.issue45366@roundup.psfhosted.org>


simple_coder878 <junk757 at gmail.com> added the comment:

Also wanted to add that I did try another variation of the first example where I set the default_factory field's init value to False and I got the same error.

from dataclasses import dataclass, field

@dataclass(init=False)
class TestObject(object):
    m: str = field(default='hi')
    k: list = field(init=False, default_factory=list)

    def test(self):
        print(f'm is {self.m} ')
        print(f'k is {self.k}')

if __name__ == '__main__':
    myobject = TestObject()
    myobject.test()

Also produces 

Traceback (most recent call last):
  File "H:\unit_test\tests_dataclass.py", line 81, in <module>
    myobject.test()
  File "H:\unit_test\tests_dataclass.py", line 76, in test
    print(f'k is {self.k}')
AttributeError: 'TestObject' object has no attribute 'k'
m is hi

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45366>
_______________________________________

From report at bugs.python.org  Mon Oct  4 16:48:21 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Mon, 04 Oct 2021 20:48:21 +0000
Subject: [issue45089] [sqlite3] the trace callback does not raise exceptions
 on error
In-Reply-To: <1630615346.0.0.296018695296.issue45089@roundup.psfhosted.org>
Message-ID: <1633380501.29.0.602299036093.issue45089@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
resolution: wont fix -> fixed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45089>
_______________________________________

From report at bugs.python.org  Mon Oct  4 17:32:32 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Mon, 04 Oct 2021 21:32:32 +0000
Subject: [issue32307] Bad assumption on thread stack size makes python crash
 with musl libc
In-Reply-To: <1513187194.31.0.213398074469.issue32307@psf.upfronthosting.co.za>
Message-ID: <1633383152.42.0.958270097574.issue32307@roundup.psfhosted.org>


Change by Gregory P. Smith <greg at krypto.org>:


----------
nosy: +gregory.p.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32307>
_______________________________________

From report at bugs.python.org  Mon Oct  4 18:00:28 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Mon, 04 Oct 2021 22:00:28 +0000
Subject: [issue32307] Bad assumption on thread stack size makes python crash
 with musl libc
In-Reply-To: <1513187194.31.0.213398074469.issue32307@psf.upfronthosting.co.za>
Message-ID: <1633384828.97.0.0746857277666.issue32307@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

I left some comments on the PR.  We can at least make it detect musl libc and improve its default behavior there.

FWIW CPython's recursionlimit and the C stack have long been a thorn in the side of many things.

Even when Python's thread_pthread.h is changed to set a better default when running under musl libc, there are still plenty of ways to run into problems.  ex: Extension modules can create threads on their own that then call back into CPython.  So can C/C++ code that embeds a Python interpreter.  Those choose their own stack sizes.  When they choose low values, surprising crashes ensue for people working on the Python side...

As a feature (beyond just this issue): It'd be ideal to actually be able to introspect the C stack space remaining and issue a RecursionError whenever it falls below a threshold.  Rather than just blindly using a runtime adjustable number that any Python code can tweak to allow crashes via `sys.setrecursionlimit()`.  Other languages like Golang use a dynamic stack and allocate more on SIGSEGV.

[meta/off-topic: Why does anyone use small thread stack sizes? This is often done to save virtual address space in applications that expect to have thousands of threads. It matters a lot less on 64-bit address space. But there are reasons...]

----------
assignee:  -> gregory.p.smith
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32307>
_______________________________________

From report at bugs.python.org  Mon Oct  4 18:04:49 2021
From: report at bugs.python.org (greob)
Date: Mon, 04 Oct 2021 22:04:49 +0000
Subject: [issue45358] Bogus cookie generated after invalid cookie attribute is
 input
In-Reply-To: <1633298626.44.0.0775080772803.issue45358@roundup.psfhosted.org>
Message-ID: <1633385089.61.0.0429812885706.issue45358@roundup.psfhosted.org>


Change by greob <greob at yahoo.com.sg>:


----------
keywords: +patch
pull_requests: +27072
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28726

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45358>
_______________________________________

From report at bugs.python.org  Mon Oct  4 18:35:06 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Mon, 04 Oct 2021 22:35:06 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores time zone
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1633386906.81.0.448755262733.issue45335@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

Replacing the timestamp converter with datetime.datetime.fromisoformat sounds good to me.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Mon Oct  4 19:38:58 2021
From: report at bugs.python.org (Erick)
Date: Mon, 04 Oct 2021 23:38:58 +0000
Subject: [issue45339] concurrent.future.ThreadPoolExecutor should parameterize
 class used for threads
In-Reply-To: <1633084673.43.0.269469120691.issue45339@roundup.psfhosted.org>
Message-ID: <1633390738.82.0.688205637944.issue45339@roundup.psfhosted.org>


Erick <erick.peirson at gmail.com> added the comment:

> What are examples of your some_important_context()? Is it important to call some code before destroying the thread?

To be honest, pulled a context manager example out of thin air to illustrate the point. But sure, I want to allocate a resource before the thread runs, and release it when the work is done.

> The problem with allowing the user to specify the Thread subclass is that in general using Thread is an implementation detail. ThreadPoolExecutor could be implemented using the low-level _thread module instead. Or in future it can need to create a special Thread subclass, and user-specified Thread subclass can be not compatible with it. 

This is surprising to hear, since I imagine that there are many potential users of this library that are evolving from direct wrangling of Thread objects, where custom Thread subclasses are commonplace. This was certainly the scenario that prompted me to post.

Ultimately it's up to the maintainers what direction the library will go. Are there specific plans to adopt an alternative implementation that is orthogonal to `threading.Thread`? Or are there reasons to think that it is likely? I would submit that maintaining smooth interoperability between this library and the `threading` library would be a welcome constraint, absent specific drivers to the contrary.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45339>
_______________________________________

From report at bugs.python.org  Mon Oct  4 19:41:58 2021
From: report at bugs.python.org (Erick)
Date: Mon, 04 Oct 2021 23:41:58 +0000
Subject: [issue45339] concurrent.future.ThreadPoolExecutor should parameterize
 class used for threads
In-Reply-To: <1633084673.43.0.269469120691.issue45339@roundup.psfhosted.org>
Message-ID: <1633390918.93.0.529125483011.issue45339@roundup.psfhosted.org>


Erick <erick.peirson at gmail.com> added the comment:

It also occurs to me that even if `concurrent.futures` adopted an alternative Thread class, it would still be preferable to allow for composition in the manner that was originally proposed.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45339>
_______________________________________

From report at bugs.python.org  Mon Oct  4 20:00:22 2021
From: report at bugs.python.org (Ian Fisher)
Date: Tue, 05 Oct 2021 00:00:22 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1633392022.46.0.664250160652.issue45335@roundup.psfhosted.org>


Ian Fisher <ian at iafisher.com> added the comment:

Unfortunately fixing this will have to be considered a backwards-incompatible change, since Python doesn't allow naive and aware datetime objects to be compared, so if sqlite3 starts returning aware datetimes, existing code might break.

Alternatively, perhaps this could be fixed in conjunction with changing sqlite3's API to allow per-database converters and adapters. Then, the old global TIMESTAMP converter could be retained for compatibility with existing code, and new code could opt-in to a per-database TIMESTAMP converter with the correct behavior.

----------
title: Default TIMESTAMP converter in sqlite3 ignores time zone -> Default TIMESTAMP converter in sqlite3 ignores UTC offset

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Mon Oct  4 23:44:12 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Tue, 05 Oct 2021 03:44:12 +0000
Subject: [issue45367] Specialize BINARY_MULTIPLY
Message-ID: <1633405452.94.0.0777171864008.issue45367@roundup.psfhosted.org>


New submission from Dennis Sweeney <sweeney.dennis650 at gmail.com>:

I'm having trouble setting up a rigorous benchmark (Windows doesn't want to install greenlet for pyperformance), but just running a couple of individual files, I got this:

Mean +- std dev: [nbody_main] 208 ms +- 2 ms -> [nbody_specialized] 180 ms +- 2 ms: 1.16x faster
Benchmark hidden because not significant (1): pidigits
Mean +- std dev: [chaos_main] 127 ms +- 2 ms -> [chaos_specialized] 120 ms +- 1 ms: 1.06x faster
Mean +- std dev: [spectral_norm_main] 190 ms +- 10 ms -> [spectral_norm_specialized] 175 ms +- 1 ms: 1.09x faster
Mean +- std dev: [raytrace_main] 588 ms +- 48 ms -> [raytrace_specialized] 540 ms +- 4 ms: 1.09x faster

Hopefully those are accurate.

----------
components: Interpreter Core
messages: 403189
nosy: Dennis Sweeney
priority: normal
severity: normal
status: open
title: Specialize BINARY_MULTIPLY
type: performance
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45367>
_______________________________________

From report at bugs.python.org  Mon Oct  4 23:45:02 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Tue, 05 Oct 2021 03:45:02 +0000
Subject: [issue45367] Specialize BINARY_MULTIPLY
In-Reply-To: <1633405452.94.0.0777171864008.issue45367@roundup.psfhosted.org>
Message-ID: <1633405502.6.0.809023330445.issue45367@roundup.psfhosted.org>


Change by Dennis Sweeney <sweeney.dennis650 at gmail.com>:


----------
keywords: +patch
pull_requests: +27074
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28727

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45367>
_______________________________________

From report at bugs.python.org  Mon Oct  4 23:55:55 2021
From: report at bugs.python.org (Karthikeyan Singaravelan)
Date: Tue, 05 Oct 2021 03:55:55 +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: <1633406155.83.0.0734225859192.issue45366@roundup.psfhosted.org>


Change by Karthikeyan Singaravelan <tir.karthi at gmail.com>:


----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45366>
_______________________________________

From report at bugs.python.org  Tue Oct  5 00:26:55 2021
From: report at bugs.python.org (Narendra Madurkar)
Date: Tue, 05 Oct 2021 04:26:55 +0000
Subject: [issue45368] ~(True) and ~(False) gives incorrect result
Message-ID: <1633408015.49.0.720577239656.issue45368@roundup.psfhosted.org>


New submission from Narendra Madurkar <nmadurkar at gmail.com>:

~(True) returns -2
~(False) returns -1

----------
messages: 403190
nosy: nmadurkar
priority: normal
severity: normal
status: open
title: ~(True) and ~(False) gives incorrect result

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45368>
_______________________________________

From report at bugs.python.org  Tue Oct  5 00:40:36 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Tue, 05 Oct 2021 04:40:36 +0000
Subject: [issue45368] ~(True) and ~(False) gives incorrect result
In-Reply-To: <1633408015.49.0.720577239656.issue45368@roundup.psfhosted.org>
Message-ID: <1633408836.49.0.236490094389.issue45368@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

What were you expecting?

I think those are correct. See:
>>> ~1
-2
>>> ~0
-1

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45368>
_______________________________________

From report at bugs.python.org  Tue Oct  5 00:52:40 2021
From: report at bugs.python.org (Narendra Madurkar)
Date: Tue, 05 Oct 2021 04:52:40 +0000
Subject: [issue45368] ~(True) and ~(False) gives incorrect result
In-Reply-To: <1633408015.49.0.720577239656.issue45368@roundup.psfhosted.org>
Message-ID: <1633409560.01.0.208104346302.issue45368@roundup.psfhosted.org>


Narendra Madurkar <nmadurkar at gmail.com> added the comment:

True is a boolean so ~True should return False according to me.
True is not the same as 1

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45368>
_______________________________________

From report at bugs.python.org  Tue Oct  5 00:56:22 2021
From: report at bugs.python.org (ramikg)
Date: Tue, 05 Oct 2021 04:56:22 +0000
Subject: [issue45369] Remove LibreSSL support
Message-ID: <1633409782.22.0.215867949251.issue45369@roundup.psfhosted.org>


New submission from ramikg <ramikgold at gmail.com>:

Python 3.10 drops support for LibreSSL (as per PEP 644), but there are still a few workarounds & mentions of LibreSSL in the source code.

The related PR cleans the code of any LibreSSL workarounds or mentions.

----------
assignee: christian.heimes
components: SSL
messages: 403193
nosy: christian.heimes, ramikg
priority: normal
severity: normal
status: open
title: Remove LibreSSL support
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45369>
_______________________________________

From report at bugs.python.org  Tue Oct  5 00:57:59 2021
From: report at bugs.python.org (ramikg)
Date: Tue, 05 Oct 2021 04:57:59 +0000
Subject: [issue45369] Remove LibreSSL support
In-Reply-To: <1633409782.22.0.215867949251.issue45369@roundup.psfhosted.org>
Message-ID: <1633409879.99.0.813365075327.issue45369@roundup.psfhosted.org>


Change by ramikg <ramikgold at gmail.com>:


----------
keywords: +patch
pull_requests: +27075
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28728

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45369>
_______________________________________

From report at bugs.python.org  Tue Oct  5 01:03:10 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Tue, 05 Oct 2021 05:03:10 +0000
Subject: [issue41682] [Windows] test_asyncio: Proactor
 test_sendfile_close_peer_in_the_middle_of_receiving failure
In-Reply-To: <1598923449.65.0.107960415995.issue41682@roundup.psfhosted.org>
Message-ID: <1633410190.59.0.270769077704.issue41682@roundup.psfhosted.org>


Change by Dennis Sweeney <sweeney.dennis650 at gmail.com>:


----------
nosy: +Dennis Sweeney
nosy_count: 8.0 -> 9.0
pull_requests: +27076
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/28727

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41682>
_______________________________________

From report at bugs.python.org  Tue Oct  5 01:05:44 2021
From: report at bugs.python.org (Lorenz Panny)
Date: Tue, 05 Oct 2021 05:05:44 +0000
Subject: [issue27637] int.to_bytes(-1,
 ...) should automatically choose required count of bytes
In-Reply-To: <1469675712.56.0.174576481029.issue27637@psf.upfronthosting.co.za>
Message-ID: <1633410344.97.0.0405261649761.issue27637@roundup.psfhosted.org>


Lorenz Panny <lorenz at yx7.cc> added the comment:

I would like to express my support for making length=None to automatically use the minimal possible length. It's true that this will rarely be needed in production-grade serialization code, but this functionality is worth its weight in gold for quickly written proof-of-concept code or when using Python as a "pocket calculator" in an interactive shell.

I'm sure I've personally typed the expression (n.bit_length()+7)//8 approximately a million times while quickly trying something. It'd be nice if Python could just do this simple computation for me instead. The code changes required are minimal and there shouldn't be any performance impact.

In fact, in my opinion this should even be the default behaviour, but 3.11 just made length=1 the default (see #45155) and changing this now would cause an (albeit very mild) API incompatibility.

----------
nosy: +lorenz_

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27637>
_______________________________________

From report at bugs.python.org  Tue Oct  5 01:59:39 2021
From: report at bugs.python.org (Ned Deily)
Date: Tue, 05 Oct 2021 05:59:39 +0000
Subject: [issue45163] Haiku build fix
In-Reply-To: <1631349993.04.0.408583087956.issue45163@roundup.psfhosted.org>
Message-ID: <1633413579.32.0.373044857882.issue45163@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
nosy: +ned.deily
nosy_count: 2.0 -> 3.0
pull_requests: +27077
pull_request: https://github.com/python/cpython/pull/28729

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45163>
_______________________________________

From report at bugs.python.org  Tue Oct  5 01:59:53 2021
From: report at bugs.python.org (John Belmonte)
Date: Tue, 05 Oct 2021 05:59:53 +0000
Subject: [issue44594] AsyncExitStack.enter_async_context() is mishandling
 exception __context__
In-Reply-To: <1625875193.61.0.628325060677.issue44594@roundup.psfhosted.org>
Message-ID: <1633413593.23.0.471177645583.issue44594@roundup.psfhosted.org>


Change by John Belmonte <john at neggie.net>:


----------
pull_requests: +27078
pull_request: https://github.com/python/cpython/pull/28730

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44594>
_______________________________________

From report at bugs.python.org  Tue Oct  5 02:10:32 2021
From: report at bugs.python.org (John Belmonte)
Date: Tue, 05 Oct 2021 06:10:32 +0000
Subject: [issue44594] AsyncExitStack.enter_async_context() is mishandling
 exception __context__
In-Reply-To: <1625875193.61.0.628325060677.issue44594@roundup.psfhosted.org>
Message-ID: <1633414232.94.0.0840292811688.issue44594@roundup.psfhosted.org>


Change by John Belmonte <john at neggie.net>:


----------
pull_requests: +27079
pull_request: https://github.com/python/cpython/pull/28731

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44594>
_______________________________________

From report at bugs.python.org  Tue Oct  5 02:13:32 2021
From: report at bugs.python.org (Ned Deily)
Date: Tue, 05 Oct 2021 06:13:32 +0000
Subject: [issue45163] Haiku build fix
In-Reply-To: <1631349993.04.0.408583087956.issue45163@roundup.psfhosted.org>
Message-ID: <1633414412.32.0.819298327251.issue45163@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

Thanks for the PR. However, it did introduce a breakage in certain builds due to unconditionally adding a check for libnetwork. For example, on older releases of macOS there is no libnetwork but building on newer systems it creates a dynamic load reference to a spurious and unrelated libnetworking library which causes multi-version binaries built on newer releases, like those of the python.org macOS installers, to fail to load on older systems. PR 28729 adds a Haiku-only guard around the added configure check.

----------
components: +Build
priority: normal -> release blocker
resolution: fixed -> 
stage: resolved -> commit review
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45163>
_______________________________________

From report at bugs.python.org  Tue Oct  5 02:13:50 2021
From: report at bugs.python.org (Ned Deily)
Date: Tue, 05 Oct 2021 06:13:50 +0000
Subject: [issue45163] Haiku build fix
In-Reply-To: <1631349993.04.0.408583087956.issue45163@roundup.psfhosted.org>
Message-ID: <1633414430.41.0.138914979264.issue45163@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45163>
_______________________________________

From report at bugs.python.org  Tue Oct  5 02:16:57 2021
From: report at bugs.python.org (Xavier Morel)
Date: Tue, 05 Oct 2021 06:16:57 +0000
Subject: [issue45368] ~(True) and ~(False) gives incorrect result
In-Reply-To: <1633408015.49.0.720577239656.issue45368@roundup.psfhosted.org>
Message-ID: <1633414617.96.0.248743777253.issue45368@roundup.psfhosted.org>


Xavier Morel <xavier.morel at masklinn.net> added the comment:

> True is a boolean so ~True should return False according to me.

That's be a BC break for no reason: if you want to invert a boolean you can just `not` it.

> True is not the same as 1

For historical reasons, in Python it is:

>>> bool.mro()
[<class 'bool'>, <class 'int'>, <class 'object'>]
>>> True == 1
True
>>> False == 0
True

So when you call ~True, you're calling `int.__invert__(True)`, which behaves as what it is: the bitwise inverse of a two's-complement signed integer.

----------
nosy: +xmorel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45368>
_______________________________________

From report at bugs.python.org  Tue Oct  5 02:21:47 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 05 Oct 2021 06:21:47 +0000
Subject: [issue44594] AsyncExitStack.enter_async_context() is mishandling
 exception __context__
In-Reply-To: <1625875193.61.0.628325060677.issue44594@roundup.psfhosted.org>
Message-ID: <1633414907.16.0.144471291525.issue44594@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 872b1e537e96d0dc4ff37c738031940b5d271366 by John Belmonte in branch '3.10':
[3.10] bpo-44594: fix (Async)ExitStack handling of __context__ (gh-27089) (GH-28730)
https://github.com/python/cpython/commit/872b1e537e96d0dc4ff37c738031940b5d271366


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44594>
_______________________________________

From report at bugs.python.org  Tue Oct  5 02:37:31 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 05 Oct 2021 06:37:31 +0000
Subject: [issue44594] AsyncExitStack.enter_async_context() is mishandling
 exception __context__
In-Reply-To: <1625875193.61.0.628325060677.issue44594@roundup.psfhosted.org>
Message-ID: <1633415851.21.0.29719215478.issue44594@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 7c2a040a10654d67ff543a55858ba2d7a9f7eea8 by John Belmonte in branch '3.9':
[3.9] bpo-44594: fix (Async)ExitStack handling of __context__ (gh-27089) (GH-28731)
https://github.com/python/cpython/commit/7c2a040a10654d67ff543a55858ba2d7a9f7eea8


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44594>
_______________________________________

From report at bugs.python.org  Tue Oct  5 03:35:24 2021
From: report at bugs.python.org (Chris Hills)
Date: Tue, 05 Oct 2021 07:35:24 +0000
Subject: [issue43466] ssl/hashlib: Add configure option to set or auto-detect
 rpath to OpenSSL libs
In-Reply-To: <1615418043.46.0.229114131093.issue43466@roundup.psfhosted.org>
Message-ID: <1633419324.74.0.435784842523.issue43466@roundup.psfhosted.org>


Chris Hills <chaz at chaz6.com> added the comment:

The new behaviour seems broken on my system.

$ PYTHON_VERSION=3.10.0

$ PKG_CONFIG_PATH="/home/chaz/.local/local/sqlite3/lib/pkgconfig:/home/chaz/.local/local/openssl3/lib64/pkgconfig"

$ LLVM_PROFDATA=/home/chaz/.local/local/clang+llvm/bin/llvm-profdata CC=clang CXX=clang++ ./configure --prefix=/home/chaz/.local/local/python-${PYTHON_VERSION} --enable-optimizations --enable-shared --enable-loadable-sqlite-extensions --with-openssl-rpath=auto

[..]

building '_ssl' extension
clang -pthread -fPIC -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-instr-use=code.profclangd -I./Include/internal -I/home/chaz/.local/local/openssl-3.0.0/include -I./Include -I. -I/usr/local/include -I/home/chaz/Downloads/Python-3.10.0/Include -I/home/chaz/Downloads/Python-3.10.0 -c /home/chaz/Downloads/Python-3.10.0/Modules/_ssl.c -o build/temp.linux-x86_64-3.10/home/chaz/Downloads/Python-3.10.0/Modules/_ssl.o
warning: no profile data available for file "_ssl.c" [-Wprofile-instr-unprofiled]
clang -pthread -shared build/temp.linux-x86_64-3.10/home/chaz/Downloads/Python-3.10.0/Modules/_ssl.o -L/home/chaz/.local/local/openssl-3.0.0/lib64 -L. -L/usr/local/lib -R/home/chaz/.local/local/openssl-3.0.0/lib64 -lssl -lcrypto -o build/lib.linux-x86_64-3.10/_ssl.cpython-310-x86_64-linux-gnu.so
clang -pthread -fPIC -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-instr-use=code.profclangd -I./Include/internal -I/home/chaz/.local/local/openssl-3.0.0/include -I./Include -I. -I/usr/local/include -I/home/chaz/Downloads/Python-3.10.0/Include -I/home/chaz/Downloads/Python-3.10.0 -c /home/chaz/Downloads/Python-3.10.0/Modules/_hashopenssl.c -o build/temp.linux-x86_64-3.10/home/chaz/Downloads/Python-3.10.0/Modules/_hashopenssl.o
warning: no profile data available for file "_hashopenssl.c" [-Wprofile-instr-unprofiled]
clang -pthread -shared build/temp.linux-x86_64-3.10/home/chaz/Downloads/Python-3.10.0/Modules/_hashopenssl.o -L/home/chaz/.local/local/openssl-3.0.0/lib64 -L. -L/usr/local/lib -R/home/chaz/.local/local/openssl-3.0.0/lib64 -lssl -lcrypto -o build/lib.linux-x86_64-3.10/_hashlib.cpython-310-x86_64-linux-gnu.so
*** WARNING: renaming "_ssl" since importing it failed: libssl.so.3: cannot open shared object file: No such file or directory
*** WARNING: renaming "_hashlib" since importing it failed: libssl.so.3: cannot open shared object file: No such file or directory

$ ldd /home/chaz/Downloads/Python-3.10.0/build/lib.linux-x86_64-3.10/_ssl.cpython-310-x86_64-linux-gnu_failed.so
        linux-vdso.so.1 =>  (0x00007fffc99f4000)
        libssl.so.3 => not found
        libcrypto.so.3 => not found
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007faa70802000)
        libc.so.6 => /lib64/libc.so.6 (0x00007faa70434000)
        /lib64/ld-linux-x86-64.so.2 (0x00007faa70a1e000)

$ readelf -d /home/chaz/Downloads/Python-3.10.0/build/lib.linux-x86_64-3.10/_ssl.cpython-310-x86_64-linux-gnu_failed.so | grep PATH

It appears that RPATH/RUNPATH is not getting set.

----------
nosy: +chaz6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43466>
_______________________________________

From report at bugs.python.org  Tue Oct  5 03:54:02 2021
From: report at bugs.python.org (Chris Hills)
Date: Tue, 05 Oct 2021 07:54:02 +0000
Subject: [issue43466] ssl/hashlib: Add configure option to set or auto-detect
 rpath to OpenSSL libs
In-Reply-To: <1615418043.46.0.229114131093.issue43466@roundup.psfhosted.org>
Message-ID: <1633420442.87.0.402677826008.issue43466@roundup.psfhosted.org>


Chris Hills <chaz at chaz6.com> added the comment:

If I set LDFLAGS as with previous versions, it works as expected. I do not know if it is related, but I noticed that by default rpath does not get set for the files in DESTDIR/bin/* (e.g. python3.10 or pip3.10) hence the inclusion of /home/chaz/.local/local/python-${PYTHON_VERSION}/lib in the rpath.

LDFLAGS="-Wl,-rpath,'/home/chaz/.local/local/openssl3/lib64:/home/chaz/.local/local/sqlite3/lib:/home/chaz/.local/local/python-'${PYTHON_VERSION}'/lib' -Wl,--enable-new-dtags"

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43466>
_______________________________________

From report at bugs.python.org  Tue Oct  5 04:10:47 2021
From: report at bugs.python.org (AdrienGoncalves)
Date: Tue, 05 Oct 2021 08:10:47 +0000
Subject: [issue45370] Typo in pep-0636 page
Message-ID: <1633421447.57.0.976232598926.issue45370@roundup.psfhosted.org>


New submission from AdrienGoncalves <goncalves.adrien at gmail.com>:

There is a typo in https://www.python.org/dev/peps/pep-0636/#composing-patterns

The second sentence in the first paragraph : "[...] we have being doing that implicitly in the examples above."

When it should be "[...] we have been doing that implicitly in the examples above."

----------
assignee: docs at python
components: Documentation
messages: 403201
nosy: adrigs, docs at python
priority: normal
severity: normal
status: open
title: Typo in pep-0636 page
type: enhancement
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45370>
_______________________________________

From report at bugs.python.org  Tue Oct  5 04:28:56 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 05 Oct 2021 08:28:56 +0000
Subject: [issue43466] ssl/hashlib: Add configure option to set or auto-detect
 rpath to OpenSSL libs
In-Reply-To: <1615418043.46.0.229114131093.issue43466@roundup.psfhosted.org>
Message-ID: <1633422536.29.0.447188763262.issue43466@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Chris, this bug report is closed. Please open a new bug report.

I think it's a bug in distutils. UnixCCompiler.runtime_library_dir_option() may not support clang and add wrong option "-R/home/chaz/.local/local/openssl-3.0.0/lib64".

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43466>
_______________________________________

From report at bugs.python.org  Tue Oct  5 04:38:58 2021
From: report at bugs.python.org (Rubin Simons)
Date: Tue, 05 Oct 2021 08:38:58 +0000
Subject: [issue33125] Windows 10 ARM64 platform support
In-Reply-To: <1521767011.97.0.467229070634.issue33125@psf.upfronthosting.co.za>
Message-ID: <1633423138.92.0.682280499401.issue33125@roundup.psfhosted.org>


Rubin Simons <me at rubin55.org> added the comment:

Hi Python peeps,

* distlib-0.3.3 and higher now has support for windows on ARM64, see: https://github.com/pypa/pip/issues/10489#issuecomment-924677949

* setuptools-58.2.0 and higher now has support for Windows on ARM64, see: https://github.com/pypa/setuptools/pull/2758#issuecomment-932874436

* pip-21.3 and higher now has support for Windows on ARM64, see: https://github.com/pypa/pip/issues/10489#issuecomment-932896285

* nsait-linaro offered ci/cd services on Windows on ARM64 hardware so Python release builds can be tested and released

It sounds to me like all stars are aligned for a Windows on ARM64 release, it would be rather great if this could happen!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33125>
_______________________________________

From report at bugs.python.org  Tue Oct  5 04:43:40 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 05 Oct 2021 08:43:40 +0000
Subject: [issue45368] ~(True) and ~(False) gives incorrect result
In-Reply-To: <1633408015.49.0.720577239656.issue45368@roundup.psfhosted.org>
Message-ID: <1633423420.8.0.128782884729.issue45368@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45368>
_______________________________________

From report at bugs.python.org  Tue Oct  5 04:45:15 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 05 Oct 2021 08:45:15 +0000
Subject: [issue45369] Remove LibreSSL workarounds
In-Reply-To: <1633409782.22.0.215867949251.issue45369@roundup.psfhosted.org>
Message-ID: <1633423515.97.0.538438310392.issue45369@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
title: Remove LibreSSL support -> Remove LibreSSL workarounds
versions: +Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45369>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:00:35 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 05 Oct 2021 09:00:35 +0000
Subject: [issue45371] distutil's runtime_library_dir (rpath) option doesn't
 work with clang
Message-ID: <1633424435.3.0.953181779215.issue45371@roundup.psfhosted.org>


New submission from Christian Heimes <lists at cheimes.de>:

Chris Hills reported in bpo-43466 that the new --with-openssl-rpath=auto does not work with clang. It turns out to be a bug in distutils. UnixCCompiler.runtime_library_dir_option() does not detect clang correctly and emits wrong option for rpath.

----------
components: Distutils
messages: 403204
nosy: christian.heimes, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: distutil's runtime_library_dir (rpath) option doesn't work with clang
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45371>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:06:21 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 05 Oct 2021 09:06:21 +0000
Subject: [issue45371] distutil's runtime_library_dir (rpath) option doesn't
 work with clang
In-Reply-To: <1633424435.3.0.953181779215.issue45371@roundup.psfhosted.org>
Message-ID: <1633424781.31.0.593507263316.issue45371@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
keywords: +patch
pull_requests: +27080
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28732

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45371>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:06:36 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 05 Oct 2021 09:06:36 +0000
Subject: [issue45371] distutil's runtime_library_dir (rpath) option doesn't
 work with clang
In-Reply-To: <1633424435.3.0.953181779215.issue45371@roundup.psfhosted.org>
Message-ID: <1633424796.53.0.225034247713.issue45371@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

$ CC=clang ./configure --with-openssl=/home/heimes/dev/python/multissl/openssl/3.0.0 --with-openssl-rpath=auto
$ make
$ readelf -d build/lib.linux-x86_64-3.11/_ssl.cpython-311-x86_64-linux-gnu.so | grep RUNPATH
 0x000000000000001d (RUNPATH)            Library runpath: [/home/heimes/dev/python/multissl/openssl/3.0.0/lib]

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45371>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:10:15 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Tue, 05 Oct 2021 09:10:15 +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: <1633425015.13.0.599859919363.issue45366@roundup.psfhosted.org>


Nikita Sobolev <mail at sobolevn.me> added the comment:

Right now `dataclasses.py` has this explanation: https://github.com/python/cpython/blame/07cf10bafc8f6e1fcc82c10d97d3452325fc7c04/Lib/dataclasses.py#L962-L966

```
         if isinstance(getattr(cls, f.name, None), Field):
            if f.default is MISSING:
                # If there's no default, delete the class attribute.
                # This happens if we specify field(repr=False), for
                # example (that is, we specified a field object, but
                # no default value).  Also if we're using a default
                # factory.  The class attribute should not be set at
                # all in the post-processed class.
                delattr(cls, f.name)
            else:
                setattr(cls, f.name, f.default)
```

This is why: imagine, that we execute `.default_factory` there.
It will be vulnerable to "default mutable" problem:

```
from dataclasses import dataclass, field

@dataclass(init=False)
class TestObject(object):
    m: str = field(default='hi')
    k: list = field(default_factory=list)

    def test(self):
        print(f'm is {self.m} ')
        self.k.append(1)
        print(f'k is {self.k}')

if __name__ == '__main__':
    myobject = TestObject()
    print(TestObject.m)  # hi
    print(TestObject.k)  # []

    myobject.test()
    # m is hi 
    # k is [1]

    other_object = TestObject()
    other_object.test()
    # m is hi 
    # k is [1, 1]
```

Another, more complex solution is to track fields with `default_factory` and still generate `__init__` / `__new__` / etc for them to run their `default_factories`s when object is created.

----------
nosy: +sobolevn

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45366>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:12:18 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 05 Oct 2021 09:12:18 +0000
Subject: [issue43466] ssl/hashlib: Add configure option to set or auto-detect
 rpath to OpenSSL libs
In-Reply-To: <1615418043.46.0.229114131093.issue43466@roundup.psfhosted.org>
Message-ID: <1633425138.46.0.579444736621.issue43466@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Chris, please try the fix from bpo-45371.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43466>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:17:20 2021
From: report at bugs.python.org (Aivar Annamaa)
Date: Tue, 05 Oct 2021 09:17:20 +0000
Subject: [issue45372] Unwarranted "certificate has expired" when urlopen-ing
 R3 sites
Message-ID: <1633425440.6.0.270287663773.issue45372@roundup.psfhosted.org>


New submission from Aivar Annamaa <aivar.annamaa at gmail.com>:

In one of my Windows 10 computers I'm not able to urlopen sites which use R3 certificates. The same is reported by several of the users of my software.

Following is taken from a session in the fresh IDLE 3.10 in up-to date Windows 10:


Python 3.10.0 (tags/v3.10.0:b494f59, Oct  4 2021, 18:46:30) [MSC v.1929 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> from urllib.request import urlopen
>>> urlopen("https://openssl.org")
Traceback (most recent call last):
  File "C:\Python310-32\lib\urllib\request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "C:\Python310-32\lib\http\client.py", line 1276, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "C:\Python310-32\lib\http\client.py", line 1322, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "C:\Python310-32\lib\http\client.py", line 1271, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "C:\Python310-32\lib\http\client.py", line 1031, in _send_output
    self.send(msg)
  File "C:\Python310-32\lib\http\client.py", line 969, in send
    self.connect()
  File "C:\Python310-32\lib\http\client.py", line 1448, in connect
    self.sock = self._context.wrap_socket(self.sock,
  File "C:\Python310-32\lib\ssl.py", line 512, in wrap_socket
    return self.sslsocket_class._create(
  File "C:\Python310-32\lib\ssl.py", line 1070, in _create
    self.do_handshake()
  File "C:\Python310-32\lib\ssl.py", line 1341, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    urlopen("https://openssl.org")
  File "C:\Python310-32\lib\urllib\request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Python310-32\lib\urllib\request.py", line 519, in open
    response = self._open(req, data)
  File "C:\Python310-32\lib\urllib\request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "C:\Python310-32\lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
  File "C:\Python310-32\lib\urllib\request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "C:\Python310-32\lib\urllib\request.py", line 1351, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)>



In the same session, requests works fine:

>>> import requests
>>> requests.get("https://openssl.org")
<Response [200]>



It's really weird, that in my another Windows 10, also 64-bit, having same state of updates, using same version of Python 3.10, connected to the same network -- everything works fine. Neither of the computers use any extra network middleware or proxies.

In both computers Chrome and Firefox are happy with the certificate of https://openssl.org

Same applies to Python 3.7

It must be somehow related to https://www.fortinet.com/blog/psirt-blogs/fortinet-and-expiring-lets-encrypt-certificates

----------
messages: 403208
nosy: aivarannamaa
priority: normal
severity: normal
status: open
title: Unwarranted "certificate has expired" when urlopen-ing R3 sites
versions: Python 3.10, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45372>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:19:26 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 05 Oct 2021 09:19:26 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633425566.15.0.856813211634.issue29410@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
nosy: +erlendaasland

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:32:25 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 05 Oct 2021 09:32:25 +0000
Subject: [issue45373] ./configure --enable-optimizations should enable LTO
Message-ID: <1633426345.9.0.0201314807782.issue45373@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

When Python is configured with:

   ./configure --enable-optimizations

PGO is enabled but not LTO.

I recall that a few years ago, GCC with LTO had bugs. But now, GCC with LTO is reliable. I suggest to enable it by default in Python 3.11.

Or did I miss a reason to not do that?

----------
components: Build
messages: 403209
nosy: vstinner
priority: normal
severity: normal
status: open
title: ./configure --enable-optimizations should enable LTO
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45373>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:34:55 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Tue, 05 Oct 2021 09:34:55 +0000
Subject: [issue45373] ./configure --enable-optimizations should enable LTO
In-Reply-To: <1633426345.9.0.0201314807782.issue45373@roundup.psfhosted.org>
Message-ID: <1633426495.17.0.0509526264504.issue45373@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

IIRC activating lto is specially annoying on MacOS due to the need of some llvm components that are a bit hard to get. Let me dig a bit to see if I reproduce the problem

----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45373>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:38:32 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 05 Oct 2021 09:38:32 +0000
Subject: [issue45373] ./configure --enable-optimizations should enable LTO
In-Reply-To: <1633426345.9.0.0201314807782.issue45373@roundup.psfhosted.org>
Message-ID: <1633426712.62.0.67862528197.issue45373@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Pablo:
> IIRC activating lto is specially annoying on MacOS due to the need of some llvm components that are a bit hard to get. Let me dig a bit to see if I reproduce the problem

Ah, I guess that you are referring to this requirement:
"The C compiler Clang requires llvm-ar for LTO (ar on macOS), as well as an LTO-aware linker (ld.gold or lld)."
https://docs.python.org/dev/using/configure.html#cmdoption-with-lto

Maybe configure can enable LTO on all platforms but macOS.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45373>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:41:03 2021
From: report at bugs.python.org (Chris Hills)
Date: Tue, 05 Oct 2021 09:41:03 +0000
Subject: [issue45371] distutil's runtime_library_dir (rpath) option doesn't
 work with clang
In-Reply-To: <1633424435.3.0.953181779215.issue45371@roundup.psfhosted.org>
Message-ID: <1633426863.18.0.767315395061.issue45371@roundup.psfhosted.org>


Chris Hills <chaz at chaz6.com> added the comment:

I tested this both with and without LDFLAGS="-Wl,-rpath -Wl,/home/chaz/.local/local/python3.10.0/lib", and in both cases this patch works as expected. Thank you!

----------
nosy: +chaz6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45371>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:43:50 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 05 Oct 2021 09:43:50 +0000
Subject: [issue45371] distutil's runtime_library_dir (rpath) option doesn't
 work with clang
In-Reply-To: <1633424435.3.0.953181779215.issue45371@roundup.psfhosted.org>
Message-ID: <1633427030.6.0.0971569806915.issue45371@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset ef6196028f966f22d82930b66e1371e75c5df2f7 by Christian Heimes in branch 'main':
bpo-45371: Fix distutils' rpath support for clang (GH-28732)
https://github.com/python/cpython/commit/ef6196028f966f22d82930b66e1371e75c5df2f7


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45371>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:44:08 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 05 Oct 2021 09:44:08 +0000
Subject: [issue45371] distutil's runtime_library_dir (rpath) option doesn't
 work with clang
In-Reply-To: <1633424435.3.0.953181779215.issue45371@roundup.psfhosted.org>
Message-ID: <1633427048.3.0.399900988284.issue45371@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27081
pull_request: https://github.com/python/cpython/pull/28733

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45371>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:44:12 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 05 Oct 2021 09:44:12 +0000
Subject: [issue45371] distutil's runtime_library_dir (rpath) option doesn't
 work with clang
In-Reply-To: <1633424435.3.0.953181779215.issue45371@roundup.psfhosted.org>
Message-ID: <1633427052.89.0.0291032231786.issue45371@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27082
pull_request: https://github.com/python/cpython/pull/28734

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45371>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:47:10 2021
From: report at bugs.python.org (Chris Hills)
Date: Tue, 05 Oct 2021 09:47:10 +0000
Subject: [issue45374] sqlite3: Add configure option to set or auto-detect
 rpath to sqlite3 libs
Message-ID: <1633427230.04.0.331465850003.issue45374@roundup.psfhosted.org>


New submission from Chris Hills <chaz at chaz6.com>:

Similar to https://bugs.python.org/issue43466 for openssl, please add a configure option to set rpath for sqlite3.

--with-sqlite-rpath=<DIR|auto|no>

Ideally, when any dpeendency is discovered with pkg-config, the correct rpath should be set, but this would be a breaking change.

----------
assignee: docs at python
components: Documentation, Installation
messages: 403214
nosy: chaz6, docs at python
priority: normal
severity: normal
status: open
title: sqlite3: Add configure option to set or auto-detect rpath to sqlite3 libs
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45374>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:49:53 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 05 Oct 2021 09:49:53 +0000
Subject: [issue45374] sqlite3: Add configure option to set or auto-detect
 rpath to sqlite3 libs
In-Reply-To: <1633427230.04.0.331465850003.issue45374@roundup.psfhosted.org>
Message-ID: <1633427393.07.0.343587411217.issue45374@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
components: +Build -Documentation
type:  -> enhancement
versions: +Python 3.11 -Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45374>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:52:23 2021
From: report at bugs.python.org (Niyas Sait)
Date: Tue, 05 Oct 2021 09:52:23 +0000
Subject: [issue33125] Windows 10 ARM64 platform support
In-Reply-To: <1521767011.97.0.467229070634.issue33125@psf.upfronthosting.co.za>
Message-ID: <1633427543.04.0.552993421027.issue33125@roundup.psfhosted.org>


Niyas Sait <niyas.sait at linaro.org> added the comment:

Python buildbot worker for woa is up and running as well

https://buildbot.python.org/all/#/workers/45

Would be great to see official support and installer added for woa

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33125>
_______________________________________

From report at bugs.python.org  Tue Oct  5 05:54:18 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Tue, 05 Oct 2021 09:54:18 +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: <2b309818-1ccb-4ede-7b2b-4851b29f7e4f@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

Are you sure that all updates on the failing machine have been correctly
installed ? It's possible that the list of CA root certs is not up to date
on the machine.

You can use certmgr.msc to check the list of installed CA root certs.

----------
nosy: +lemburg

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45372>
_______________________________________

From report at bugs.python.org  Tue Oct  5 06:01:16 2021
From: report at bugs.python.org (Mark Shannon)
Date: Tue, 05 Oct 2021 10:01:16 +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: <1633428076.15.0.0354735639627.issue43760@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:


New changeset bd627eb7ed08a891dd1356756feb1ce2600358e4 by Mark Shannon in branch 'main':
bpo-43760: Check for tracing using 'bitwise or' instead of branch in dispatch. (GH-28723)
https://github.com/python/cpython/commit/bd627eb7ed08a891dd1356756feb1ce2600358e4


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43760>
_______________________________________

From report at bugs.python.org  Tue Oct  5 06:03:01 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Tue, 05 Oct 2021 10:03:01 +0000
Subject: [issue45163] Haiku build fix
In-Reply-To: <1631349993.04.0.408583087956.issue45163@roundup.psfhosted.org>
Message-ID: <1633428181.5.0.0878445130745.issue45163@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 0af08f343a7b792f527b78e2a35d9453039940c2 by Ned Deily in branch 'main':
bpo-45163: Restrict added libnetwork check to builds on Haiku. (GH-28729)
https://github.com/python/cpython/commit/0af08f343a7b792f527b78e2a35d9453039940c2


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45163>
_______________________________________

From report at bugs.python.org  Tue Oct  5 06:03:12 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Tue, 05 Oct 2021 10:03:12 +0000
Subject: [issue45163] Haiku build fix
In-Reply-To: <1631349993.04.0.408583087956.issue45163@roundup.psfhosted.org>
Message-ID: <1633428192.74.0.270823109146.issue45163@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45163>
_______________________________________

From report at bugs.python.org  Tue Oct  5 06:04:55 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 05 Oct 2021 10:04:55 +0000
Subject: [issue45371] distutil's runtime_library_dir (rpath) option doesn't
 work with clang
In-Reply-To: <1633424435.3.0.953181779215.issue45371@roundup.psfhosted.org>
Message-ID: <1633428295.97.0.0494152617006.issue45371@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 3733dddecaa332966e200718d4993545f8e52247 by Miss Islington (bot) in branch '3.10':
[3.10] bpo-45371: Fix distutils' rpath support for clang (GH-28732) (GH-28733)
https://github.com/python/cpython/commit/3733dddecaa332966e200718d4993545f8e52247


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45371>
_______________________________________

From report at bugs.python.org  Tue Oct  5 06:09:24 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 05 Oct 2021 10:09:24 +0000
Subject: [issue45371] distutil's runtime_library_dir (rpath) option doesn't
 work with clang
In-Reply-To: <1633424435.3.0.953181779215.issue45371@roundup.psfhosted.org>
Message-ID: <1633428564.94.0.338787490736.issue45371@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 3ce5e07e9a4b78302b69f898527396ff7b5fd448 by Miss Islington (bot) in branch '3.9':
bpo-45371: Fix distutils' rpath support for clang (GH-28732)
https://github.com/python/cpython/commit/3ce5e07e9a4b78302b69f898527396ff7b5fd448


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45371>
_______________________________________

From report at bugs.python.org  Tue Oct  5 06:12:37 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 05 Oct 2021 10:12:37 +0000
Subject: [issue45371] distutil's runtime_library_dir (rpath) option doesn't
 work with clang
In-Reply-To: <1633424435.3.0.953181779215.issue45371@roundup.psfhosted.org>
Message-ID: <1633428757.7.0.0261345329335.issue45371@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Thanks for confirming that the fix works for you. The fix will be in 3.10.1, which should be released in early December.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45371>
_______________________________________

From report at bugs.python.org  Tue Oct  5 06:46:21 2021
From: report at bugs.python.org (=?utf-8?q?Ra=C3=BAl_Cumplido?=)
Date: Tue, 05 Oct 2021 10:46:21 +0000
Subject: [issue45370] Typo in pep-0636 page
In-Reply-To: <1633421447.57.0.976232598926.issue45370@roundup.psfhosted.org>
Message-ID: <1633430781.3.0.719813232727.issue45370@roundup.psfhosted.org>


Ra?l Cumplido <raulcumplido at gmail.com> added the comment:

Thanks! I have created a PR for it on the peps repo.
https://github.com/python/peps/pull/2101
I can't seem to be able to link the Github PR correctly. Probably because it's not on the cpython repo.

----------
nosy: +raulcd

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45370>
_______________________________________

From report at bugs.python.org  Tue Oct  5 06:48:43 2021
From: report at bugs.python.org (Aivar Annamaa)
Date: Tue, 05 Oct 2021 10:48: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: <1633430923.34.0.0540269413479.issue45372@roundup.psfhosted.org>


Aivar Annamaa <aivar.annamaa at gmail.com> added the comment:

I can list the root certs with certmgr, but I'm not sure which piece to investigate further. 

Even if there is problem with installed certs, it's interesting, why doesn't it bother the browsers and requests? Maybe this is opportunity to make something better in urllib?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45372>
_______________________________________

From report at bugs.python.org  Tue Oct  5 06:53:34 2021
From: report at bugs.python.org (=?utf-8?q?Ra=C3=BAl_Cumplido?=)
Date: Tue, 05 Oct 2021 10:53:34 +0000
Subject: [issue45370] Typo in pep-0636 page
In-Reply-To: <1633421447.57.0.976232598926.issue45370@roundup.psfhosted.org>
Message-ID: <1633431214.94.0.591393744467.issue45370@roundup.psfhosted.org>


Ra?l Cumplido <raulcumplido at gmail.com> added the comment:

This has been merged on the peps repo and can be closed.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45370>
_______________________________________

From report at bugs.python.org  Tue Oct  5 06:56:11 2021
From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Blondon?=)
Date: Tue, 05 Oct 2021 10:56:11 +0000
Subject: [issue42914] pprint numbers with underscore
In-Reply-To: <1610493681.29.0.683565759752.issue42914@roundup.psfhosted.org>
Message-ID: <1633431371.61.0.775921971147.issue42914@roundup.psfhosted.org>


St?phane Blondon <stephane.blondon at gmail.com> added the comment:

Python 3.10 has now been released with the underscore_numbers parameter.
I wonder which release could enable the parameter by default (so it would break the previous behavior):
 - the next release (3.11) is probably too short.
 - the safest strategy is to wait until 3.9 will be end-of-life (2025-10 according to [1]). In such case, it could be integrated in 3.14.

Could it be accepted before (like 3.12 or 3.13)?

If there is no reply, I will create a new issue and PR for 3.14 inclusion ( = safest strategy).


1: https://devguide.python.org/#status-of-python-branches

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42914>
_______________________________________

From report at bugs.python.org  Tue Oct  5 06:59:16 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Tue, 05 Oct 2021 10:59:16 +0000
Subject: [issue42914] pprint numbers with underscore
In-Reply-To: <1610493681.29.0.683565759752.issue42914@roundup.psfhosted.org>
Message-ID: <1633431556.65.0.33544840944.issue42914@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

The safest thing to do is never make it the default. It would always be an opt-in behavior.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42914>
_______________________________________

From report at bugs.python.org  Tue Oct  5 06:59:46 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Tue, 05 Oct 2021 10:59:46 +0000
Subject: [issue45372] Unwarranted "certificate has expired" when urlopen-ing
 R3 sites
In-Reply-To: <1633430923.34.0.0540269413479.issue45372@roundup.psfhosted.org>
Message-ID: <e9150875-5cf6-1b73-6c0d-46d0a038f4ec@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 05.10.2021 12:48, Aivar Annamaa wrote:
> 
> I can list the root certs with certmgr, but I'm not sure which piece to investigate further. 

Check the certs in the LE chain as listed on the page you quoted
and compare them to the working installation.

> Even if there is problem with installed certs, it's interesting, why doesn't it bother the browsers and requests? Maybe this is opportunity to make something better in urllib?

Browsers and requests use their own list of trusted CAs.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45372>
_______________________________________

From report at bugs.python.org  Tue Oct  5 07:01:23 2021
From: report at bugs.python.org (Karthikeyan Singaravelan)
Date: Tue, 05 Oct 2021 11:01:23 +0000
Subject: [issue45370] Typo in pep-0636 page
In-Reply-To: <1633421447.57.0.976232598926.issue45370@roundup.psfhosted.org>
Message-ID: <1633431683.19.0.342107176901.issue45370@roundup.psfhosted.org>


Karthikeyan Singaravelan <tir.karthi at gmail.com> added the comment:

Thanks for the report and fix. Closing it as third party since PEPs are maintained in different repo using GitHub issues.

----------
nosy: +xtreak
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45370>
_______________________________________

From report at bugs.python.org  Tue Oct  5 07:38:41 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 05 Oct 2021 11:38:41 +0000
Subject: [issue45375] Windows assertion in out-of-tree debug build
Message-ID: <1633433921.42.0.136161828718.issue45375@roundup.psfhosted.org>


New submission from Steve Dower <steve.dower at python.org>:

As seen in the release build for 3.11a1, an assertion is raised when attempting to launch the debug build out of tree.

       _RegenTestFrozenmain:
         Regenerate test_frozenmain.h
         D:\a\1\b\bin\amd64\python_d.exe Programs\freeze_test_frozenmain.py Programs/test_frozenmain.h
         Assertion failed: stdlibdir[wcslen(prefix)] == SEP, file D:\a\1\s\PC\getpathp.c, line 300

This causes the release to fail.

----------
assignee: steve.dower
components: Windows
messages: 403229
nosy: pablogsal, paul.moore, steve.dower, tim.golden, zach.ware
priority: release blocker
severity: normal
status: open
title: Windows assertion in out-of-tree debug build
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45375>
_______________________________________

From report at bugs.python.org  Tue Oct  5 07:43:14 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 05 Oct 2021 11:43:14 +0000
Subject: [issue45375] Windows assertion in out-of-tree debug build
In-Reply-To: <1633433921.42.0.136161828718.issue45375@roundup.psfhosted.org>
Message-ID: <1633434194.55.0.174855569481.issue45375@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

I believe this is because getpath has hit its final fallback case of looking in ".\DLLs" and ".\Lib" for the standard library, and has not performed proper normalisation on these paths. So after removing the last segment, the result is "." which does not end in SEP.

So at least in this case, we can probably just ignore the assertion. However, I'm concerned that this would open up other cases where search paths may be added that are otherwise unintended.

The expected behaviour when the stdlib can't be found is a detailed error message, not a debug assertion/crash.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45375>
_______________________________________

From report at bugs.python.org  Tue Oct  5 08:01:42 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Tue, 05 Oct 2021 12:01:42 +0000
Subject: [issue15870] PyType_FromSpec should take metaclass as an argument
In-Reply-To: <1346946566.36.0.583610018294.issue15870@psf.upfronthosting.co.za>
Message-ID: <1633435302.01.0.320310874601.issue15870@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

> I am slightly surprised we actually care about static C-definitions?

And I'm surprised that you're surprised :)
AFAIK, supporting dynamically allocated specs/slots was an afterthought. I do agree they should be supported, though! Thanks for filing bpo-45315, and please file any more bugs your find.

But I'd still say that best practice is to make specs static if possible. (And I have some plans to make static specs useful in type checking, since we can assume that types made from the same spec share the memory layout.)


> My patch tries to address the first (the class creator has to take care that this is reasonable for the metaclass).  I had hoped the `slot` mechanism can avoid the API discussion for the second one, but I guess not.

Whoa, I missed the patch completely --  2021 looks too much like 2012, I'm used to patches being old since we use pull requests now, and the conversation turned to slots too quickly... but missing that you mentioned it is completely on me. Sorry!

Do you want to go through with the patch yourself, or should I take over? It still needs:
- opening a PR on GitHub
- tests
- documentation & a What's New entry
- probably separate bug as well, since it doesn't fix this one

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15870>
_______________________________________

From report at bugs.python.org  Tue Oct  5 08:06:11 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 05 Oct 2021 12:06:11 +0000
Subject: [issue45375] Windows assertion in out-of-tree debug build
In-Reply-To: <1633433921.42.0.136161828718.issue45375@roundup.psfhosted.org>
Message-ID: <1633435571.92.0.445138494464.issue45375@roundup.psfhosted.org>


Change by Steve Dower <steve.dower at python.org>:


----------
keywords: +patch
pull_requests: +27083
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28735

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45375>
_______________________________________

From report at bugs.python.org  Tue Oct  5 08:09:54 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 05 Oct 2021 12:09:54 +0000
Subject: [issue45376] Run Windows release docs build on regular CI
Message-ID: <1633435794.37.0.111310196296.issue45376@roundup.psfhosted.org>


New submission from Steve Dower <steve.dower at python.org>:

Currently the release build of the CHM file runs on my dedicated build machine, which means there's no way to do a test run without starting the machine (normally clearing the code signing and PGO properties allows a build without needing it).

Originally the issue was that the docs build was taking >10minutes on CI, but not on my machine, which is why I moved it.

Should try moving it back, or at least enabling a skip option for it so that test runs can be done purely on free CI, rather than needing my account.

----------
assignee: steve.dower
components: Windows
messages: 403232
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Run Windows release docs build on regular CI

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45376>
_______________________________________

From report at bugs.python.org  Tue Oct  5 08:17:20 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 05 Oct 2021 12:17:20 +0000
Subject: [issue45354] test_winconsoleio fails on Windows 11
In-Reply-To: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org>
Message-ID: <1633436240.78.0.821683043787.issue45354@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:


New changeset de4052fe0633e3a053e66c8477f13677054d6ede by Jeremy Kloth in branch 'main':
bpo-45354: Skip obsolete device name tests on Windows 11 (GH-28712)
https://github.com/python/cpython/commit/de4052fe0633e3a053e66c8477f13677054d6ede


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45354>
_______________________________________

From report at bugs.python.org  Tue Oct  5 08:18:31 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 05 Oct 2021 12:18:31 +0000
Subject: [issue45354] test_winconsoleio fails on Windows 11
In-Reply-To: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org>
Message-ID: <1633436311.04.0.651413212619.issue45354@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27085
pull_request: https://github.com/python/cpython/pull/28737

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45354>
_______________________________________

From report at bugs.python.org  Tue Oct  5 08:18:27 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 05 Oct 2021 12:18:27 +0000
Subject: [issue45354] test_winconsoleio fails on Windows 11
In-Reply-To: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org>
Message-ID: <1633436307.01.0.900721012594.issue45354@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +27084
pull_request: https://github.com/python/cpython/pull/28736

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45354>
_______________________________________

From report at bugs.python.org  Tue Oct  5 08:19:52 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 05 Oct 2021 12:19:52 +0000
Subject: [issue45354] test_winconsoleio fails on Windows 11
In-Reply-To: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org>
Message-ID: <1633436392.18.0.316657798934.issue45354@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

Thanks, Jeremy! And thanks for being on top of getting the Win11 buildbot set up!

----------
resolution:  -> fixed
stage: patch review -> backport needed
versions: +Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45354>
_______________________________________

From report at bugs.python.org  Tue Oct  5 08:35:05 2021
From: report at bugs.python.org (=?utf-8?q?Ra=C3=BAl_Cumplido?=)
Date: Tue, 05 Oct 2021 12:35:05 +0000
Subject: [issue45377] Default python 3 docs still pointing to 3.9.7
Message-ID: <1633437305.72.0.650229498176.issue45377@roundup.psfhosted.org>


New submission from Ra?l Cumplido <raulcumplido at gmail.com>:

We are going to start the python 3.10 work on the python-docs-es and we have realised that when accessing: https://docs.python.org/3/
It is still redirecting to Python 3.9.7 documentation

As Python 3.10 was released yesterday shouldn't the default docs point to python 3.10 already?

----------
assignee: docs at python
components: Documentation
messages: 403235
nosy: docs at python, mdk, raulcd
priority: normal
severity: normal
status: open
title: Default python 3 docs still pointing to 3.9.7
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45377>
_______________________________________

From report at bugs.python.org  Tue Oct  5 08:37:54 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 05 Oct 2021 12:37:54 +0000
Subject: [issue45375] Windows assertion in out-of-tree debug build
In-Reply-To: <1633433921.42.0.136161828718.issue45375@roundup.psfhosted.org>
Message-ID: <1633437474.91.0.698541110731.issue45375@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:


New changeset 5146877623ebe8a2806411703b0de9c0aba179a1 by Steve Dower in branch 'main':
bpo-45375: Fix assertion failure due to searching for stdlib in unnormalised paths (GH-28735)
https://github.com/python/cpython/commit/5146877623ebe8a2806411703b0de9c0aba179a1


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45375>
_______________________________________

From report at bugs.python.org  Tue Oct  5 08:38:54 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 05 Oct 2021 12:38:54 +0000
Subject: [issue45354] test_winconsoleio fails on Windows 11
In-Reply-To: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org>
Message-ID: <1633437534.53.0.0567473632365.issue45354@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:


New changeset d0d0909a3a0b553826d1ddbb04a676fdabb61359 by Miss Islington (bot) in branch '3.10':
bpo-45354: Skip obsolete device name tests on Windows 11 (GH-28712)
https://github.com/python/cpython/commit/d0d0909a3a0b553826d1ddbb04a676fdabb61359


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45354>
_______________________________________

From report at bugs.python.org  Tue Oct  5 08:39:19 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 05 Oct 2021 12:39:19 +0000
Subject: [issue45354] test_winconsoleio fails on Windows 11
In-Reply-To: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org>
Message-ID: <1633437559.42.0.23772332234.issue45354@roundup.psfhosted.org>


Change by Steve Dower <steve.dower at python.org>:


----------
stage: backport needed -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45354>
_______________________________________

From report at bugs.python.org  Tue Oct  5 08:39:22 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 05 Oct 2021 12:39:22 +0000
Subject: [issue45354] test_winconsoleio fails on Windows 11
In-Reply-To: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org>
Message-ID: <1633437562.15.0.808712206605.issue45354@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 63c9a6cc8b48740c88199b5150c9948b1a61756b by Miss Islington (bot) in branch '3.9':
bpo-45354: Skip obsolete device name tests on Windows 11 (GH-28712)
https://github.com/python/cpython/commit/63c9a6cc8b48740c88199b5150c9948b1a61756b


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45354>
_______________________________________

From report at bugs.python.org  Tue Oct  5 09:19:41 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 05 Oct 2021 13:19:41 +0000
Subject: [issue44050] [subinterpreters] _PyImport_FixupExtensionObject()
 regression in Python 3.9
In-Reply-To: <1620224531.72.0.42100874633.issue44050@roundup.psfhosted.org>
Message-ID: <1633439981.55.0.0234784379511.issue44050@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27086
pull_request: https://github.com/python/cpython/pull/28738

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44050>
_______________________________________

From report at bugs.python.org  Tue Oct  5 09:19:39 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 05 Oct 2021 13:19:39 +0000
Subject: [issue44050] [subinterpreters] _PyImport_FixupExtensionObject()
 regression in Python 3.9
In-Reply-To: <1620224531.72.0.42100874633.issue44050@roundup.psfhosted.org>
Message-ID: <1633439979.6.0.587018740381.issue44050@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset b9bb74871b27d9226df2dd3fce9d42bda8b43c2b by Hai Shi in branch 'main':
bpo-44050: Extension modules can share state when they don't support sub-interpreters. (GH-27794)
https://github.com/python/cpython/commit/b9bb74871b27d9226df2dd3fce9d42bda8b43c2b


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44050>
_______________________________________

From report at bugs.python.org  Tue Oct  5 09:25:51 2021
From: report at bugs.python.org (Ken Jin)
Date: Tue, 05 Oct 2021 13:25:51 +0000
Subject: [issue45367] Specialize BINARY_MULTIPLY
In-Reply-To: <1633405452.94.0.0777171864008.issue45367@roundup.psfhosted.org>
Message-ID: <1633440351.71.0.389815752561.issue45367@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

> (Windows doesn't want to install greenlet for pyperformance)

I had the *exact* same issues, I eventually found a workaround for it after many hours spent guessing.

Initially, setuptools complained that I needed MSVC++ 14.0 or later (even after I had the latest one installed). I found that for some strange reason, *only* 14.0 worked, 14.2x etc. don't. After installing MSVC 14.0, there was then some strange complaint about missing some .exe/.dll. Searching that entire error message led me to a result on StackOverflow advising copying said files from the Windows SDK in Visual Studio over to the MSVC 14.0 folder. This finally allowed greenlet to compile. I've since lost the exact SO links, but I hope this leads you somewhere.

Anyways, I don't recommend benchmarking on Windows for stable results (trust me, I've tried ;-). `pyperf system tune` doesn't work on Windows. This leads to very inconsistent results unless you manually disable turbo boost, set core affinities, etc. Also, PGO for _PyEvalFrameDefaultEx might be broken on Windows on the main branch (see issue45116).

Eventually I gave up and just used Linux for stable benchmarking. pyperformance `compile_all` also works properly there, which allows you to automate your benchmarks https://pyperformance.readthedocs.io/usage.html#compile-python-to-run-benchmarks

PS. are your numbers with PGO and LTO? If so, they're spectacular!

----------
nosy: +kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45367>
_______________________________________

From report at bugs.python.org  Tue Oct  5 09:31:06 2021
From: report at bugs.python.org (Ken Jin)
Date: Tue, 05 Oct 2021 13:31:06 +0000
Subject: [issue45362] dis does not work with the new optimized ops
In-Reply-To: <1633341412.48.0.798356810047.issue45362@roundup.psfhosted.org>
Message-ID: <1633440666.97.0.179914680129.issue45362@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

Closing this issue as the behavior in dis module is as intended. For any potential issues to 3rd party packages discovered in the future, consider opening an issue in that package's issue tracker, or submitting a brand new issue to bugs.python.org.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45362>
_______________________________________

From report at bugs.python.org  Tue Oct  5 10:54:55 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Tue, 05 Oct 2021 14:54:55 +0000
Subject: [issue45367] Specialize BINARY_MULTIPLY
In-Reply-To: <1633405452.94.0.0777171864008.issue45367@roundup.psfhosted.org>
Message-ID: <1633445695.3.0.724126799751.issue45367@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

Hm the above was not PGO. I tried again with PGO and it is not so good:

Mean +- std dev: [nbody_main_pgo] 177 ms +- 4 ms -> [nbody_specialized_pgo] 190 ms +- 2 ms: 1.07x slower
Mean +- std dev: [pidigits_main_pgo] 208 ms +- 1 ms -> [pidigits_specialized_pgo] 210 ms +- 2 ms: 1.01x slower
Mean +- std dev: [chaos_main_pgo] 106 ms +- 1 ms -> [chaos_specialized_pgo] 110 ms +- 1 ms: 1.04x slower
Mean +- std dev: [spectral_norm_main_pgo] 169 ms +- 7 ms -> [spectral_norm_specialized_pgo] 167 ms +- 1 ms: 1.02x faster
Benchmark hidden because not significant (1): raytrace

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45367>
_______________________________________

From report at bugs.python.org  Tue Oct  5 11:19:59 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 05 Oct 2021 15:19:59 +0000
Subject: [issue44050] [subinterpreters] _PyImport_FixupExtensionObject()
 regression in Python 3.9
In-Reply-To: <1620224531.72.0.42100874633.issue44050@roundup.psfhosted.org>
Message-ID: <1633447199.01.0.40540027345.issue44050@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Thanks for the fix. I don't understand well this code :-(

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44050>
_______________________________________

From report at bugs.python.org  Tue Oct  5 11:20:11 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 05 Oct 2021 15:20:11 +0000
Subject: [issue45375] Windows assertion in out-of-tree debug build
In-Reply-To: <1633433921.42.0.136161828718.issue45375@roundup.psfhosted.org>
Message-ID: <1633447211.82.0.194985164718.issue45375@roundup.psfhosted.org>


Change by Steve Dower <steve.dower at python.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45375>
_______________________________________

From report at bugs.python.org  Tue Oct  5 11:49:28 2021
From: report at bugs.python.org (Ned Deily)
Date: Tue, 05 Oct 2021 15:49:28 +0000
Subject: [issue45373] ./configure --enable-optimizations should enable LTO
In-Reply-To: <1633426345.9.0.0201314807782.issue45373@roundup.psfhosted.org>
Message-ID: <1633448968.09.0.561937242091.issue45373@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

> IIRC activating lto is specially annoying on MacOS due to the need of some llvm components that are a bit hard to get

Can you say more? We are currently using --with-lto with a vanilla Apple Command Line Tools (or Xcode) for macOS installer builds when building on macOS 10.15 High Sierra or higher.  Perhaps this was just an issue on older versions.

----------
nosy: +ned.deily

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45373>
_______________________________________

From report at bugs.python.org  Tue Oct  5 11:51:22 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Tue, 05 Oct 2021 15:51:22 +0000
Subject: [issue45378] Can't find "map" with search on docs.python.org
Message-ID: <1633449082.64.0.24886590221.issue45378@roundup.psfhosted.org>


New submission from Guido van Rossum <guido at python.org>:

I was looking for the docs for 'map' and tried to use the search box on docs.python.org. This gave a lot of things whose name started with or contained 'map', but the entry for the builtin map() function was hidden really far down under the heading "Builtin Functions" (https://docs.python.org/3.10/library/functions.html?highlight=map) rather than deep-linking to the entry I was looking for (https://docs.python.org/3.10/library/functions.html#map).

I'm sure that some tweak to the index builder could fix this, in general, for all builtin functions and types (many of which I imagine suffer from the effect -- having a short name that is used a lot as a part of other names).

----------
assignee: docs at python
components: Documentation
messages: 403245
nosy: docs at python, gvanrossum
priority: normal
severity: normal
status: open
title: Can't find "map" with search on docs.python.org
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45378>
_______________________________________

From report at bugs.python.org  Tue Oct  5 11:52:00 2021
From: report at bugs.python.org (Eric Snow)
Date: Tue, 05 Oct 2021 15:52:00 +0000
Subject: [issue45379] Improve errors related to frozen modules.
Message-ID: <1633449120.03.0.98563217148.issue45379@roundup.psfhosted.org>


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

In Python/import.c there are various situations in which an error state related to frozen modules might result and even lead to an exception.  In gh-28633 we consolidated these cases into a new "frozen_status" enum and added "set_frozen_error()" to set a consistent exception based on a status.

There are several deficiencies to address at this point:

* the conditions for the statuses are unclear [1][2]
* the error messages could be more helpful [3]
* maybe use a different error message for FROZEN_BAD_NAME (and perhaps FROZEN_DISABLED), rather than combining with FROZEN_NOT_FOUND 


[1] https://github.com/python/cpython/pull/28633#discussion_r720503665
[2] https://github.com/python/cpython/pull/28633#discussion_r720504275
[3] https://github.com/python/cpython/pull/28633#discussion_r720987412

----------
components: Interpreter Core
messages: 403246
nosy: barry, brett.cannon, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Improve errors related to frozen modules.
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45379>
_______________________________________

From report at bugs.python.org  Tue Oct  5 11:59:25 2021
From: report at bugs.python.org (=?utf-8?q?Ra=C3=BAl_Cumplido?=)
Date: Tue, 05 Oct 2021 15:59:25 +0000
Subject: [issue45378] Can't find "map" with search on docs.python.org
In-Reply-To: <1633449082.64.0.24886590221.issue45378@roundup.psfhosted.org>
Message-ID: <1633449565.06.0.346333191348.issue45378@roundup.psfhosted.org>


Change by Ra?l Cumplido <raulcumplido at gmail.com>:


----------
nosy: +raulcd

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45378>
_______________________________________

From report at bugs.python.org  Tue Oct  5 12:01:35 2021
From: report at bugs.python.org (Eric Snow)
Date: Tue, 05 Oct 2021 16:01:35 +0000
Subject: [issue45324] The frozen importer should capture info in find_spec().
In-Reply-To: <1632938224.05.0.143549467143.issue45324@roundup.psfhosted.org>
Message-ID: <1633449695.31.0.0328319946182.issue45324@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:


New changeset c3d9ac8b340fcbf54cee865737e67f11fcd70ed3 by Eric Snow in branch 'main':
bpo-45324: Capture data in FrozenImporter.find_spec() to use in exec_module(). (gh-28633)
https://github.com/python/cpython/commit/c3d9ac8b340fcbf54cee865737e67f11fcd70ed3


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45324>
_______________________________________

From report at bugs.python.org  Tue Oct  5 12:02:33 2021
From: report at bugs.python.org (Eric Snow)
Date: Tue, 05 Oct 2021 16:02:33 +0000
Subject: [issue45324] The frozen importer should capture info in find_spec().
In-Reply-To: <1632938224.05.0.143549467143.issue45324@roundup.psfhosted.org>
Message-ID: <1633449753.61.0.305293967155.issue45324@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45324>
_______________________________________

From report at bugs.python.org  Tue Oct  5 12:09:57 2021
From: report at bugs.python.org (Eric Snow)
Date: Tue, 05 Oct 2021 16:09:57 +0000
Subject: [issue45324] The frozen importer should capture info in find_spec().
In-Reply-To: <1632938224.05.0.143549467143.issue45324@roundup.psfhosted.org>
Message-ID: <1633450197.18.0.518327885832.issue45324@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
pull_requests: +27087
pull_request: https://github.com/python/cpython/pull/28740

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45324>
_______________________________________

From report at bugs.python.org  Tue Oct  5 12:12:11 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Tue, 05 Oct 2021 16:12:11 +0000
Subject: [issue45373] ./configure --enable-optimizations should enable LTO
In-Reply-To: <1633426345.9.0.0201314807782.issue45373@roundup.psfhosted.org>
Message-ID: <1633450331.62.0.196552946272.issue45373@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Yeah, I had problems in the past to get llvm-ar or some other component. I still need time to reproduce and to see if this still happens on new versions.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45373>
_______________________________________

From report at bugs.python.org  Tue Oct  5 12:15:00 2021
From: report at bugs.python.org (Ned Deily)
Date: Tue, 05 Oct 2021 16:15:00 +0000
Subject: [issue45373] ./configure --enable-optimizations should enable LTO
In-Reply-To: <1633426345.9.0.0201314807782.issue45373@roundup.psfhosted.org>
Message-ID: <1633450500.55.0.144251789853.issue45373@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

I don't think you need llvm-ar anymore with the Apple Tool Chain but let me look into it as I have all the relevant previous macOS releases as VMs to test with.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45373>
_______________________________________

From report at bugs.python.org  Tue Oct  5 12:34:27 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 05 Oct 2021 16:34:27 +0000
Subject: [issue44050] [subinterpreters] _PyImport_FixupExtensionObject()
 regression in Python 3.9
In-Reply-To: <1620224531.72.0.42100874633.issue44050@roundup.psfhosted.org>
Message-ID: <1633451667.71.0.768773337699.issue44050@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
pull_requests: +27088
pull_request: https://github.com/python/cpython/pull/28741

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44050>
_______________________________________

From report at bugs.python.org  Tue Oct  5 12:35:08 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 05 Oct 2021 16:35:08 +0000
Subject: [issue44050] [subinterpreters] _PyImport_FixupExtensionObject()
 regression in Python 3.9
In-Reply-To: <1620224531.72.0.42100874633.issue44050@roundup.psfhosted.org>
Message-ID: <1633451708.25.0.107408742503.issue44050@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset d0d29655ffc43d426ad68542d8de8304f7f1346a by Miss Islington (bot) in branch '3.10':
bpo-44050: Extension modules can share state when they don't support sub-interpreters. (GH-27794) (GH-28738)
https://github.com/python/cpython/commit/d0d29655ffc43d426ad68542d8de8304f7f1346a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44050>
_______________________________________

From report at bugs.python.org  Tue Oct  5 12:35:34 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Tue, 05 Oct 2021 16:35:34 +0000
Subject: [issue45378] Can't find "map" with search on docs.python.org
In-Reply-To: <1633449082.64.0.24886590221.issue45378@roundup.psfhosted.org>
Message-ID: <1633451734.32.0.443743394612.issue45378@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

I'm surprised no one else noticed this until now.  

The doc search finds some entries such as: "sum", "min", "max", and "enumerate".  However, it is missing others such as: "map" and "filter".

----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45378>
_______________________________________

From report at bugs.python.org  Tue Oct  5 12:36:53 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 05 Oct 2021 16:36:53 +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: <1633451813.14.0.255997524901.issue39573@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I wrote an article about these changes:
https://vstinner.github.io/c-api-abstract-pyobject.html

It elaborates the rationale for making these changes.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39573>
_______________________________________

From report at bugs.python.org  Tue Oct  5 13:06:39 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 05 Oct 2021 17:06:39 +0000
Subject: [issue33125] Windows 10 ARM64 platform support
In-Reply-To: <1521767011.97.0.467229070634.issue33125@psf.upfronthosting.co.za>
Message-ID: <1633453599.51.0.622332108331.issue33125@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

Yeah, we're getting close. I'll reopen this issue for tracking.

We still need that pip release and it'll have to be merged into ensurepip. We'll also need better access to test systems than any of us currently have (the buildbot is great, but we need interactive systems too).

There are already binary releases at https://www.nuget.org/packages/pythonarm64/ that should be suitable for most testing. I'll probably make the ARM64 packages available through the Windows Store for 3.11's prereleases, and possibly as a side-loadable MSIX from python.org.

I'm strongly considering not offering the regular executable installer on ARM64, since it seems we don't have the back-compat demand right now. It would be a good opportunity to try and fix the issues with that installer and really put the focus on the MSIX as the user-friendly approach. But that's still future thoughts, no concrete plans yet :)

----------
resolution: fixed -> 
status: closed -> open
versions: +Python 3.11 -Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33125>
_______________________________________

From report at bugs.python.org  Tue Oct  5 13:24:09 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Tue, 05 Oct 2021 17:24:09 +0000
Subject: [issue45378] Can't find "map" with search on docs.python.org
In-Reply-To: <1633449082.64.0.24886590221.issue45378@roundup.psfhosted.org>
Message-ID: <1633454649.99.0.135375280391.issue45378@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

> I'm surprised no one else noticed this until now.  

Most people probably just use Google and read whatever comes up. I was looking whether the official docs for map mentioned that map is actually an iterator class. (They don't.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45378>
_______________________________________

From report at bugs.python.org  Tue Oct  5 13:26:41 2021
From: report at bugs.python.org (Eric Snow)
Date: Tue, 05 Oct 2021 17:26:41 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org>
Message-ID: <1633454801.18.0.179400336717.issue45020@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:


New changeset 08285d563e64c179a56ab2f952345b3dbcdb54f3 by Eric Snow in branch 'main':
bpo-45020: Identify which frozen modules are actually aliases. (gh-28655)
https://github.com/python/cpython/commit/08285d563e64c179a56ab2f952345b3dbcdb54f3


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Tue Oct  5 13:30:16 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 05 Oct 2021 17:30:16 +0000
Subject: [issue42327] Add PyModule_Add()
In-Reply-To: <1605126914.46.0.774673816158.issue42327@roundup.psfhosted.org>
Message-ID: <1633455016.42.0.430202998224.issue42327@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
nosy: +lukasz.langa
nosy_count: 3.0 -> 4.0
pull_requests: +27089
pull_request: https://github.com/python/cpython/pull/28741

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42327>
_______________________________________

From report at bugs.python.org  Tue Oct  5 13:30:56 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Tue, 05 Oct 2021 17:30:56 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org>
Message-ID: <1633455056.56.0.828667111562.issue45020@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

Whoa. os.path is not always an alias for posixpath, is it?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Tue Oct  5 13:48:16 2021
From: report at bugs.python.org (Sebastian Berg)
Date: Tue, 05 Oct 2021 17:48:16 +0000
Subject: [issue15870] PyType_FromSpec should take metaclass as an argument
In-Reply-To: <1346946566.36.0.583610018294.issue15870@psf.upfronthosting.co.za>
Message-ID: <1633456096.02.0.994398505918.issue15870@roundup.psfhosted.org>


Sebastian Berg <sebastian at sipsolutions.net> added the comment:

Yeah, I will try and have a look.  I had posted the patch, because the test looked like a bit of a larger chunk of work ;).

> And I'm surprised that you're surprised :)

:).  I am coming from a completely different angle, probably.  Just if you are curious, I use a from-spec like API (not public yet) in NumPy and dynamic use seemed natural/logical in that use-case, e.g.: https://github.com/numpy/numpy/blob/c92864091e5928d92bc109d1505febe35f3909f1/numpy/core/src/multiarray/convert_datatype.c#L2434

But, I am trying to understand the preference for static better.  There is probably something to learn or even important I am missing.


> And I have some plans to make static specs useful in type checking, since we can assume that types made from the same spec share the memory layout.

(I don't understand how it is useful, unless you reuse slot structs?)
It sounds interesting, but even static does not guarantee constant unless the user indicates it through a flag?
Maybe you could achieve this by figuring it out by inspecting/comparing content rather than using the spec pointer(s)? (More complex, but also more powerful?)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15870>
_______________________________________

From report at bugs.python.org  Tue Oct  5 14:29:03 2021
From: report at bugs.python.org (Alex Waygood)
Date: Tue, 05 Oct 2021 18:29:03 +0000
Subject: [issue45380] help() appears confused about the module of
 typing.Annotated
Message-ID: <1633458543.21.0.19270161871.issue45380@roundup.psfhosted.org>


New submission from Alex Waygood <Alex.Waygood at Gmail.com>:

`help()` appears confused about the module of `typing.Annotated`. If you call `help()` on a parameterised "instance" of `typing.Annotated`, it will claim that `Annotated` belongs to whatever module the annotated type is from. Additionally, `help()` appears not to know about the `__metadata__` attribute of `typing.Annotated`.

```
>>> from typing import Annotated, Callable
>>> t = Annotated[int | str, "Some metadata"]
>>> help(t)
Help on _AnnotatedAlias in module types:

Annotated = int | str
>>> u = Annotated[Callable[[int], str], "Some metadata"]
>>> help(u)
Help on _AnnotatedAlias in module typing:

Annotated = typing.Callable[[int], str]
>>> s = Annotated[int, "Some metadata"]
Help on _AnnotatedAlias in module builtins:

Annotated = class int(object)
 |  int([x]) -> integer
 |  int(x, base=10) -> integer

# (etc., giving the entire output of help() for `int`)
```

----------
assignee: docs at python
components: Documentation, Library (Lib)
messages: 403258
nosy: AlexWaygood, docs at python
priority: normal
severity: normal
status: open
title: help() appears confused about the module of typing.Annotated
type: behavior
versions: Python 3.10, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45380>
_______________________________________

From report at bugs.python.org  Tue Oct  5 15:11:17 2021
From: report at bugs.python.org (A A)
Date: Tue, 05 Oct 2021 19:11:17 +0000
Subject: [issue45381] IDLE cannot kill process. "interupt" ctl+c and "restart
 shell" freeze program.
Message-ID: <1633461077.55.0.535298106793.issue45381@roundup.psfhosted.org>


New submission from A A <capsicumw at gmail.com>:

Idle3 with python 3.7.3 on Debian Buster and XFCE.
Attempting to run the line 'print ("Hello World" * 8**8)' from either the Idle shell window or Idle editor will cause Idle to hang and one CPU core runs 100%.(allowed it to run for several minutes) 
ctl+c or menu Shell>interrupt execution simply pauses CPU processing but does not terminate the process nor is there an option to continue the process. Following this interrupt with use of menu Shell>Restart-shell causes Idle to fully freeze and then requires a system terminate signal to close Idle.
The same line of python used in Idle on another student's MS-Windows laptop required ctl-alt-del this was a fresh download with v3.9 as I recall.

When used used on the system Bash shell and python 3.7.3, the line operates without any trouble and finishes in 20seconds as: $ python3 -c 'print ( "Hello World " * 8**8)' 

Suggestion is that the ctl+c or the Interrupt menu option in Idle should terminate the running code rather than pause it.

----------
assignee: terry.reedy
components: IDLE
messages: 403259
nosy: capsicumw, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE cannot kill process. "interupt" ctl+c and "restart shell" freeze program.
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45381>
_______________________________________

From report at bugs.python.org  Tue Oct  5 15:43:57 2021
From: report at bugs.python.org (Alex Zaslavskis)
Date: Tue, 05 Oct 2021 19:43:57 +0000
Subject: [issue45382] platform() is not able to detect windows 11
Message-ID: <1633463037.19.0.965519087659.issue45382@roundup.psfhosted.org>


New submission from Alex Zaslavskis <sahsariga111 at gmail.com>:

I am updated to windows 11 . Now I am trying to write script that will detect is user use windows 11 or windows 10 . 
I was using the simplest way as possible: 
import platform 
print(platform.platform())
The result I got is : Windows-10-10.0.22000-SP0
That is quite correct . The build version is correct ,but the windows version is still not .

----------
components: Library (Lib)
messages: 403260
nosy: sahsariga111
priority: normal
severity: normal
status: open
title: platform() is not able to detect windows 11
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Tue Oct  5 15:46:01 2021
From: report at bugs.python.org (Alex Zaslavskis)
Date: Tue, 05 Oct 2021 19:46:01 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633463037.19.0.965519087659.issue45382@roundup.psfhosted.org>
Message-ID: <1633463161.78.0.343065360101.issue45382@roundup.psfhosted.org>


Alex Zaslavskis <sahsariga111 at gmail.com> added the comment:

The 
platform.win32_ver() returns same answer

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Tue Oct  5 15:52:28 2021
From: report at bugs.python.org (Alex Zaslavskis)
Date: Tue, 05 Oct 2021 19:52:28 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633463037.19.0.965519087659.issue45382@roundup.psfhosted.org>
Message-ID: <1633463548.11.0.0233082985346.issue45382@roundup.psfhosted.org>


Alex Zaslavskis <sahsariga111 at gmail.com> added the comment:

The bug comes from Microsoft  terminal bug : If I type there : ver it will return Microsoft Windows [Version 10.0.22000.194] only one patch is if that will check the build . 
so : 
 info = subprocess.check_output(cmd,
                                           stdin=subprocess.DEVNULL,
                                           stderr=subprocess.DEVNULL,
                                           text=True,
                                           shell=True)
if(int(info.strip(".")[2])==22000):
 return "Windows [Version 11.0.22000.194]

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Tue Oct  5 15:58:45 2021
From: report at bugs.python.org (Alex Zaslavskis)
Date: Tue, 05 Oct 2021 19:58:45 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633463037.19.0.965519087659.issue45382@roundup.psfhosted.org>
Message-ID: <1633463925.23.0.640874204694.issue45382@roundup.psfhosted.org>


Alex Zaslavskis <sahsariga111 at gmail.com> added the comment:

demo.py contains dirty hack that can be used as a fix for some time before microsoft will not fix it.

----------
Added file: https://bugs.python.org/file50327/demo.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Tue Oct  5 16:17:15 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Tue, 05 Oct 2021 20:17:15 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633463037.19.0.965519087659.issue45382@roundup.psfhosted.org>
Message-ID: <1633465035.53.0.963308818026.issue45382@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

win32_ver() should be using the internal Windows APIs to figure out the version. I do wonder why those don't return the same version as the "ver" command line tool.

Adding our Windows experts to the noisy list.

----------
nosy: +lemburg, paul.moore, steve.dower, tim.golden, zach.ware

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Tue Oct  5 16:30:35 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 05 Oct 2021 20:30:35 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633463037.19.0.965519087659.issue45382@roundup.psfhosted.org>
Message-ID: <1633465835.09.0.831584151068.issue45382@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

The version number for "Windows 11" still starts with 10.0. Just like how Windows 5.x and 6.x were around for a very long time each ;)

There are tables in platform module that map the specific version to the release name. These probably need to be updated to return "11" for versions 10.0.22000 and greater.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Tue Oct  5 16:30:42 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 05 Oct 2021 20:30:42 +0000
Subject: [issue44050] [subinterpreters] _PyImport_FixupExtensionObject()
 regression in Python 3.9
In-Reply-To: <1620224531.72.0.42100874633.issue44050@roundup.psfhosted.org>
Message-ID: <1633465842.94.0.0757579278016.issue44050@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 52d9d3b75441ae6038fadead89eac5eecdd34501 by ?ukasz Langa in branch '3.9':
[3.9] bpo-44050: Extension modules can share state when they don't support sub-interpreters. (GH-27794) (GH-28741)
https://github.com/python/cpython/commit/52d9d3b75441ae6038fadead89eac5eecdd34501


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44050>
_______________________________________

From report at bugs.python.org  Tue Oct  5 16:35:06 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Tue, 05 Oct 2021 20:35:06 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633465835.09.0.831584151068.issue45382@roundup.psfhosted.org>
Message-ID: <7019d62f-e169-0bff-b4ec-bd9c55045796@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 05.10.2021 22:30, Steve Dower wrote:
> The version number for "Windows 11" still starts with 10.0. Just like how Windows 5.x and 6.x were around for a very long time each ;)
> 
> There are tables in platform module that map the specific version to the release name. These probably need to be updated to return "11" for versions 10.0.22000 and greater.

Hmm, but the "ver" output seems to have more information than those
APIs.

Note: The tables for mapping to releases for Windows only take the
major.minor versions as key. Unfortunately, those did not change. It's
actually the build version which provides the indicator, it seems.

Any idea, whether a patch will fix this on Windows soonish ?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Tue Oct  5 16:42:37 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 05 Oct 2021 20:42:37 +0000
Subject: [issue44050] [subinterpreters] _PyImport_FixupExtensionObject()
 regression in Python 3.9
In-Reply-To: <1620224531.72.0.42100874633.issue44050@roundup.psfhosted.org>
Message-ID: <1633466557.13.0.848105358192.issue44050@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Hai Shi! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44050>
_______________________________________

From report at bugs.python.org  Tue Oct  5 17:17:02 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 05 Oct 2021 21:17:02 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1633468622.58.0.607867562352.issue45335@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

> [...] if sqlite3 starts returning aware datetimes, existing code might break.

True.

> [...] perhaps this could be fixed in conjunction with changing sqlite3's API to allow per-database converters and adapters

Another option could be to deprecate the current behaviour and then change it to being timezone aware in Python 3.13.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Tue Oct  5 17:17:34 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 05 Oct 2021 21:17:34 +0000
Subject: [issue45374] sqlite3: Add configure option to set or auto-detect
 rpath to sqlite3 libs
In-Reply-To: <1633427230.04.0.331465850003.issue45374@roundup.psfhosted.org>
Message-ID: <1633468654.57.0.667004741387.issue45374@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
nosy: +erlendaasland

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45374>
_______________________________________

From report at bugs.python.org  Tue Oct  5 17:30:48 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 05 Oct 2021 21:30:48 +0000
Subject: [issue45343] Update bundled pip to 21.2.4 and setuptools to 58.1.0
Message-ID: <1633469448.29.0.62421206655.issue45343@roundup.psfhosted.org>


New submission from ?ukasz Langa <lukasz at langa.pl>:


New changeset 4c8d543823dde5a30615da61727837a48f7ab847 by Illia Volochii in branch 'main':
bpo-45343: Update bundled pip to 21.2.4 and setuptools to 58.1.0 (GH-28684)
https://github.com/python/cpython/commit/4c8d543823dde5a30615da61727837a48f7ab847


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45343>
_______________________________________

From report at bugs.python.org  Tue Oct  5 17:31:26 2021
From: report at bugs.python.org (Eryk Sun)
Date: Tue, 05 Oct 2021 21:31:26 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633463037.19.0.965519087659.issue45382@roundup.psfhosted.org>
Message-ID: <1633469486.47.0.0471510625001.issue45382@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

The _WIN32_CLIENT_RELEASES table based on major.minor version number isn't helpful since Windows 10 and 11 have the same version number. win32_ver() needs a workaround to return release "11" if the build number is 22000 or greater. Is there any need/desire to also identify Server 2016, 2019, and 2022?

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Tue Oct  5 17:32:44 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 05 Oct 2021 21:32:44 +0000
Subject: [issue45343] Update bundled pip to 21.2.4 and setuptools to 58.1.0
In-Reply-To: <1633469448.29.0.62421206655.issue45343@roundup.psfhosted.org>
Message-ID: <1633469564.59.0.323391384729.issue45343@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +27091
pull_request: https://github.com/python/cpython/pull/28746

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45343>
_______________________________________

From report at bugs.python.org  Tue Oct  5 17:41:33 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 05 Oct 2021 21:41:33 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633463037.19.0.965519087659.issue45382@roundup.psfhosted.org>
Message-ID: <1633470093.64.0.615437140317.issue45382@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

> Hmm, but the "ver" output seems to have more information than those APIs.

It's always had build numbers, which the regular APIs do not, because the regular APIs are meant for detecting incompatibilities rather than reporting.

Since there are some incompatibilities, I hope they'll rev the minor version number, but I have no idea if that's planned yet. In theory I have early access to the release build already, but I haven't installed it on anything.

Eventually I think we're going to need some kind of WMI call in the platform module to get the right data for reporting. Until then, we're making best guesses from heuristics.

----------
nosy:  -eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Tue Oct  5 17:43:48 2021
From: report at bugs.python.org (Zachary Ware)
Date: Tue, 05 Oct 2021 21:43:48 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633463037.19.0.965519087659.issue45382@roundup.psfhosted.org>
Message-ID: <1633470228.58.0.861307300575.issue45382@roundup.psfhosted.org>


Change by Zachary Ware <zachary.ware at gmail.com>:


----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Tue Oct  5 17:46:30 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 05 Oct 2021 21:46:30 +0000
Subject: [issue45343] Update bundled pip to 21.2.4 and setuptools to 58.1.0
In-Reply-To: <1633469448.29.0.62421206655.issue45343@roundup.psfhosted.org>
Message-ID: <1633470390.44.0.845338304341.issue45343@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
pull_requests: +27092
pull_request: https://github.com/python/cpython/pull/28747

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45343>
_______________________________________

From report at bugs.python.org  Tue Oct  5 17:51:26 2021
From: report at bugs.python.org (Sebastian Berg)
Date: Tue, 05 Oct 2021 21:51:26 +0000
Subject: [issue45383] PyType_FromSpec API fails to use metaclass of bases
Message-ID: <1633470686.49.0.00898443232155.issue45383@roundup.psfhosted.org>


New submission from Sebastian Berg <sebastian at sipsolutions.net>:

The PyType_FromSpec fails to take care about MetaClasses.

     https://bugs.python.org/issue15870

Asks to create a new API to pass in the MetaClass.  This issue is only about "inheriting" the metaclass of the bases correctly.  Currently, Python fails to take into account that the bases may be MetaClass and not `PyType_Type` instances.

----------
components: C API, Interpreter Core
messages: 403273
nosy: petr.viktorin, seberg
priority: normal
pull_requests: 27093
severity: normal
status: open
title: PyType_FromSpec API fails to use metaclass of bases
type: crash
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45383>
_______________________________________

From report at bugs.python.org  Tue Oct  5 18:15:50 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 05 Oct 2021 22:15:50 +0000
Subject: [issue45343] Update bundled pip to 21.2.4 and setuptools to 58.1.0
In-Reply-To: <1633469448.29.0.62421206655.issue45343@roundup.psfhosted.org>
Message-ID: <1633472150.32.0.104774661465.issue45343@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 325e4647afffe347cc20747f3dccc6ba9e782636 by Miss Islington (bot) in branch '3.10':
bpo-45343: Update bundled pip to 21.2.4 and setuptools to 58.1.0 (GH-28684) (GH-28746)
https://github.com/python/cpython/commit/325e4647afffe347cc20747f3dccc6ba9e782636


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45343>
_______________________________________

From report at bugs.python.org  Tue Oct  5 18:16:34 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 05 Oct 2021 22:16:34 +0000
Subject: [issue45343] Update bundled pip to 21.2.4 and setuptools to 58.1.0
In-Reply-To: <1633469448.29.0.62421206655.issue45343@roundup.psfhosted.org>
Message-ID: <1633472194.22.0.710083022891.issue45343@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 1374459c9088725e022beab418bced96a825baad by ?ukasz Langa in branch '3.9':
[3.9] bpo-45343: Update bundled pip to 21.2.4 and setuptools to 58.1.0 (GH-28684) (GH-28747)
https://github.com/python/cpython/commit/1374459c9088725e022beab418bced96a825baad


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45343>
_______________________________________

From report at bugs.python.org  Tue Oct  5 18:16:51 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 05 Oct 2021 22:16:51 +0000
Subject: [issue45343] Update bundled pip to 21.2.4 and setuptools to 58.1.0
In-Reply-To: <1633469448.29.0.62421206655.issue45343@roundup.psfhosted.org>
Message-ID: <1633472211.86.0.899785125415.issue45343@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45343>
_______________________________________

From report at bugs.python.org  Tue Oct  5 19:00:02 2021
From: report at bugs.python.org (Gregory Beauregard)
Date: Tue, 05 Oct 2021 23:00:02 +0000
Subject: [issue45384] Accept Final as indicating ClassVar for dataclass
Message-ID: <1633474802.74.0.28935369268.issue45384@roundup.psfhosted.org>


New submission from Gregory Beauregard <greg at greg.red>:

PEP 591 for the Final Attribute states "Type checkers should infer a final attribute that is initialized in a class body as being a class variable. Variables should not be annotated with both ClassVar and Final."

This is a bit of a typing conflict for dataclasses, where ClassVar is used to indicate a desired library behavior, but one may want to indicate Final.

I propose accepting the Final attribute as an indicator of a ClassVar in dataclasses class bodies in order to be better compatible with the Final PEP.

There is at least one edge case that would need to be handled where someone might want to explicitly mark a dataclass field Final, which could be allowed as a field:
a: Final[int] = dataclasses.field(init=False, default=10)

----------
components: Library (Lib)
messages: 403277
nosy: GBeauregard
priority: normal
severity: normal
status: open
title: Accept Final as indicating ClassVar for dataclass
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45384>
_______________________________________

From report at bugs.python.org  Tue Oct  5 19:02:27 2021
From: report at bugs.python.org (Gregory Beauregard)
Date: Tue, 05 Oct 2021 23:02:27 +0000
Subject: [issue45384] Accept Final as indicating ClassVar for dataclass
In-Reply-To: <1633474802.74.0.28935369268.issue45384@roundup.psfhosted.org>
Message-ID: <1633474947.11.0.629449686103.issue45384@roundup.psfhosted.org>


Change by Gregory Beauregard <greg at greg.red>:


----------
type: enhancement -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45384>
_______________________________________

From report at bugs.python.org  Tue Oct  5 19:04:21 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Tue, 05 Oct 2021 23:04:21 +0000
Subject: [issue45384] Accept Final as indicating ClassVar for dataclass
In-Reply-To: <1633474802.74.0.28935369268.issue45384@roundup.psfhosted.org>
Message-ID: <1633475061.14.0.678538541234.issue45384@roundup.psfhosted.org>


Change by Eric V. Smith <eric at trueblade.com>:


----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45384>
_______________________________________

From report at bugs.python.org  Tue Oct  5 19:06:35 2021
From: report at bugs.python.org (Ian Fisher)
Date: Tue, 05 Oct 2021 23:06:35 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1633475195.58.0.84485318379.issue45335@roundup.psfhosted.org>


Ian Fisher <ian at iafisher.com> added the comment:

> Another option could be to deprecate the current behaviour and then change it to being timezone aware in Python 3.13.

This sounds like the simplest option.

I'd be interested in working on this myself, if you think it's something that a new CPython contributor could handle.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Tue Oct  5 19:10:09 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 05 Oct 2021 23:10:09 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1633475409.01.0.471009252963.issue45335@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

> I'd be interested in working on this myself, if you think it's something that a new CPython contributor could handle.

Please, go ahead :)

However, I think this should be discussed on Discourse first (open a topic in the Core Development category).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Tue Oct  5 19:17:26 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Tue, 05 Oct 2021 23:17:26 +0000
Subject: [issue45377] Default python 3 docs still pointing to 3.9.7
In-Reply-To: <1633437305.72.0.650229498176.issue45377@roundup.psfhosted.org>
Message-ID: <1633475846.79.0.973080858209.issue45377@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

You should report this at https://github.com/python/pythondotorg/issues

----------
nosy: +eric.smith
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45377>
_______________________________________

From report at bugs.python.org  Tue Oct  5 19:57:32 2021
From: report at bugs.python.org (CoolCat467)
Date: Tue, 05 Oct 2021 23:57:32 +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: <1633478252.48.0.992655347603.issue45357@roundup.psfhosted.org>


Change by CoolCat467 <davenport.samuel09 at gmail.com>:


----------
nosy: +taleinat, terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45357>
_______________________________________

From report at bugs.python.org  Tue Oct  5 20:33:53 2021
From: report at bugs.python.org (Ian Fisher)
Date: Wed, 06 Oct 2021 00:33:53 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1633480433.65.0.342256033268.issue45335@roundup.psfhosted.org>


Ian Fisher <ian at iafisher.com> added the comment:

Okay, I started a discussion here: https://discuss.python.org/t/fixing-sqlite-timestamp-converter-to-handle-utc-offsets/10985

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Tue Oct  5 20:42:58 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 06 Oct 2021 00:42:58 +0000
Subject: [issue45385] Fix possible reference leak from descr_check
Message-ID: <1633480978.07.0.287145541934.issue45385@roundup.psfhosted.org>


New submission from Dong-hee Na <donghee.na at python.org>:

Report from @kj: https://github.com/python/cpython/pull/28719#discussion_r721249643

----------
components: Interpreter Core
messages: 403282
nosy: corona10, kj, vstinner
priority: normal
severity: normal
status: open
title: Fix possible reference leak from descr_check
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45385>
_______________________________________

From report at bugs.python.org  Tue Oct  5 20:43:17 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 06 Oct 2021 00:43:17 +0000
Subject: [issue45385] Fix possible reference leak from descr_check
In-Reply-To: <1633480978.07.0.287145541934.issue45385@roundup.psfhosted.org>
Message-ID: <1633480997.03.0.329875289046.issue45385@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
keywords: +patch
pull_requests: +27094
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28719

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45385>
_______________________________________

From report at bugs.python.org  Tue Oct  5 22:03:04 2021
From: report at bugs.python.org (Senthil Kumaran)
Date: Wed, 06 Oct 2021 02:03:04 +0000
Subject: [issue40321] urllib.request does not support HTTP response status
 code 308
In-Reply-To: <1587232058.85.0.573866772263.issue40321@roundup.psfhosted.org>
Message-ID: <1633485784.75.0.395194547439.issue40321@roundup.psfhosted.org>


Senthil Kumaran <senthil at python.org> added the comment:


New changeset c379bc5ec9012cf66424ef3d80612cf13ec51006 by Jochem Schulenklopper in branch 'main':
bpo-40321: Support HTTP response status code 308 in urllib.request (#19588)
https://github.com/python/cpython/commit/c379bc5ec9012cf66424ef3d80612cf13ec51006


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40321>
_______________________________________

From report at bugs.python.org  Tue Oct  5 22:03:24 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 06 Oct 2021 02:03:24 +0000
Subject: [issue40321] urllib.request does not support HTTP response status
 code 308
In-Reply-To: <1587232058.85.0.573866772263.issue40321@roundup.psfhosted.org>
Message-ID: <1633485804.79.0.915488775097.issue40321@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +27095
pull_request: https://github.com/python/cpython/pull/28750

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40321>
_______________________________________

From report at bugs.python.org  Tue Oct  5 22:03:29 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 06 Oct 2021 02:03:29 +0000
Subject: [issue40321] urllib.request does not support HTTP response status
 code 308
In-Reply-To: <1587232058.85.0.573866772263.issue40321@roundup.psfhosted.org>
Message-ID: <1633485809.19.0.481941591621.issue40321@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27096
pull_request: https://github.com/python/cpython/pull/28751

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40321>
_______________________________________

From report at bugs.python.org  Tue Oct  5 22:17:55 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 06 Oct 2021 02:17:55 +0000
Subject: [issue45381] IDLE cannot kill process. "interupt" ctl+c and "restart
 shell" freeze program.
In-Reply-To: <1633461077.55.0.535298106793.issue45381@roundup.psfhosted.org>
Message-ID: <1633486675.73.0.693086952981.issue45381@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

IDLE uses tk/tkinter text widgets for Editor and Shell windows.  A known downside of this is that long lines, greater than about 2000 chars, slow down scrolling. See #1442493 for instance.

Part of the Squeezer feature was meant to alleviate this by squeezing long lines as well as many lines.  This was meant to be documented but the main sentence is garbled a bit and needs to be rewritten.  Squeezer can be partly deactivated by raising the threshhold to, for instance, 1_000_000_000.

Another feature of IDLE is that is executes user code in a separate process, sending user code output back to the GUI process through a socket.  Massive amounts of output are noticeably slower than in the terminal/console.  This can be eliminated by starting IDLE with -n.

On my machine, 'a'*n takes about 1 second per 133_333 chars, or 12 for 1.6M.  160M would take 1200 seconds or 20 minutes.  This of course, has nothing to do with any normal use of IDLE.

Keyboard Interrupt, Ctrl-C: It is a known CPython (not IDLE) issue (discussed on the tracker) that this does not always interrupt execution of user code.  This may depend on the OS.  On my machine, I see

'a'*1_600_000  # hit ^C during 12 second wait.
[Squeezed text (20001 lines.)] Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    'a'*1_600_000
KeyboardInterrupt

This is not supposed to terminate the execution process, but merely to end execution of the statement.  A prompt for another statement should be and for me is displayed.  For me, following the above with restart Ctrl-F6 works normally.

However, Restart during the wait, with or without ^c, puts IDLE into a recoverable state.  Since Restart during time.sleep or 'while True: pass' work, I suspect the issue is restarting while receiving input.

----------
nosy: +taleinat

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45381>
_______________________________________

From report at bugs.python.org  Tue Oct  5 22:20:00 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 06 Oct 2021 02:20:00 +0000
Subject: [issue45381] IDLE: "restart shell" while receiving output disables
 program
In-Reply-To: <1633461077.55.0.535298106793.issue45381@roundup.psfhosted.org>
Message-ID: <1633486800.27.0.38314166941.issue45381@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
stage:  -> needs patch
title: IDLE cannot kill process. "interupt" ctl+c and "restart shell" freeze program. -> IDLE: "restart shell" while receiving output disables program
versions: +Python 3.11 -Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45381>
_______________________________________

From report at bugs.python.org  Wed Oct  6 00:21:54 2021
From: report at bugs.python.org (Ned Deily)
Date: Wed, 06 Oct 2021 04:21:54 +0000
Subject: [issue44998] macOS build test failure
In-Reply-To: <1629886173.59.0.970748469767.issue44998@roundup.psfhosted.org>
Message-ID: <1633494114.36.0.825523350023.issue44998@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

> /Library/Developer/CommandLineTools/usr/bin/make build_all_merge_profile
> /usr/local/bin/llvm-profdata merge -output=code.profclangd *.profclangr

It looks like your build was trying to use a mixture of llvm tools, probably clang from the Apple-supplied Command Line Tools and llvm from /usr/local/bin, perhaps from some package manager like Homebrew. Use one or the other; we strongly recommend building with, and only test with, the Apple-supplied tool chains from either the most Xcode or Command Line Tools release for each macOS release.

----------
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44998>
_______________________________________

From report at bugs.python.org  Wed Oct  6 00:50:07 2021
From: report at bugs.python.org (Inada Naoki)
Date: Wed, 06 Oct 2021 04:50:07 +0000
Subject: [issue45330] dulwich_log performance regression in 3.10
In-Reply-To: <1633007368.54.0.0773120735117.issue45330@roundup.psfhosted.org>
Message-ID: <1633495807.72.0.774913534086.issue45330@roundup.psfhosted.org>


Inada Naoki <songofacandy at gmail.com> added the comment:

I can not confirm performance regression between 33ec88ac and 23ae2c3b.

```
Performance version: 1.0.2
Python version: 3.10.0a7+ (64-bit) revision 33ec88ac81
Report on Linux-5.4.0-81-generic-x86_64-with-glibc2.31
Number of logical CPUs: 8
Start date: 2021-10-06 13:47:33.468553
End date: 2021-10-06 13:47:52.054876

### dulwich_log ###
Mean +- std dev: 99.7 ms +- 0.9 ms

Performance version: 1.0.2
Python version: 3.11.0a0 (64-bit) revision 23ae2c3bac
Report on Linux-5.4.0-81-generic-x86_64-with-glibc2.31
Number of logical CPUs: 8
Start date: 2021-10-06 13:47:07.767177
End date: 2021-10-06 13:47:26.175560

### dulwich_log ###
Mean +- std dev: 98.6 ms +- 0.9 ms
```

----------
nosy: +methane

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45330>
_______________________________________

From report at bugs.python.org  Wed Oct  6 01:08:19 2021
From: report at bugs.python.org (Inada Naoki)
Date: Wed, 06 Oct 2021 05:08:19 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633496899.93.0.0599887682162.issue29410@roundup.psfhosted.org>


Change by Inada Naoki <songofacandy at gmail.com>:


----------
pull_requests: +27097
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28752

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Wed Oct  6 01:12:13 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Wed, 06 Oct 2021 05:12:13 +0000
Subject: [issue45361] Provide a more convenient way to set an exception as
 "active", from Python code
In-Reply-To: <1633329776.11.0.630918001556.issue45361@roundup.psfhosted.org>
Message-ID: <1633497133.4.0.198150808425.issue45361@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

Do you think the API you're looking for is available at the C level? Like PyErr_SetExcInfo()?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45361>
_______________________________________

From report at bugs.python.org  Wed Oct  6 02:53:27 2021
From: report at bugs.python.org (R)
Date: Wed, 06 Oct 2021 06:53:27 +0000
Subject: [issue45386] xmlrpc.client unimportable due to strfmt ValueError
Message-ID: <1633503207.0.0.80221316205.issue45386@roundup.psfhosted.org>


New submission from R <rtobarc at gmail.com>:

This is a problem caused by https://bugs.python.org/issue13305.

When running python in SerenityOS (https://serenityos.org/), the xmlrpc.client module fails to be imported. This is because the code that decides which format to use for getting 4-digit years, which issues a call to strfmt, raises a ValueError. The ValueError is raised because the second format that is tested yields no output with Serenity's strfmt implementation, so timemodule.strfmt returns NULL.

For reference, this is the code that fails:


_day0 = datetime(1, 1, 1)
if _day0.strftime('%Y') == '0001':      # Mac OS X
    def _iso8601_format(value):
        return value.strftime("%Y%m%dT%H:%M:%S")
elif _day0.strftime('%4Y') == '0001':   # Linux   <-- ValueError
    def _iso8601_format(value):
        return value.strftime("%4Y%m%dT%H:%M:%S")
else:
    def _iso8601_format(value):
        return value.strftime("%Y%m%dT%H:%M:%S").zfill(17)
del _day0

We have a local patch that improves on the current code, which I'll post as a PR now.

----------
components: Library (Lib)
messages: 403288
nosy: rtobar2
priority: normal
severity: normal
status: open
title: xmlrpc.client unimportable due to strfmt ValueError
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45386>
_______________________________________

From report at bugs.python.org  Wed Oct  6 04:27:09 2021
From: report at bugs.python.org (nahco314)
Date: Wed, 06 Oct 2021 08:27:09 +0000
Subject: [issue45191] Error.__traceback__.tb_lineno is wrong
In-Reply-To: <1631595400.46.0.316069984941.issue45191@roundup.psfhosted.org>
Message-ID: <1633508829.77.0.140069123206.issue45191@roundup.psfhosted.org>


Change by nahco314 <nahco3_ta at yahoo.co.jp>:


----------
pull_requests: +27098
pull_request: https://github.com/python/cpython/pull/28753

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45191>
_______________________________________

From report at bugs.python.org  Wed Oct  6 04:42:34 2021
From: report at bugs.python.org (Ruben Vorderman)
Date: Wed, 06 Oct 2021 08:42:34 +0000
Subject: [issue45387] GzipFile.write should be buffered
Message-ID: <1633509754.51.0.179214714383.issue45387@roundup.psfhosted.org>


New submission from Ruben Vorderman <r.h.p.vorderman at lumc.nl>:

Please consider the following code snippet:

    import gzip
    import sys

    with gzip.open(sys.argv[1], "rt") as in_file_h:
        with gzip.open(sys.argv[2], "wt", compresslevel=1) as out_file_h:
            for line in in_file_h:
                # Do processing on line here
                modified_line = line
                # End processing
                out_file_h.write(modified_line)

This is very slow, due to write being called for every line. This is the current implementation of write:
https://github.com/python/cpython/blob/c379bc5ec9012cf66424ef3d80612cf13ec51006/Lib/gzip.py#L272

It:
- Checks if the file is not closed
- Checks if the correct mode is set
- Checks if the file is not closed (again, but in a different way)
- Checks if the data is bytes, bytearray or something that supports the buffer protocol
- Gets the length
- Compresses the data
- updates the size and offset
- updates the checksum

Doing this for every line written is very costly and creates a lot of overhead in Python calls. We spent a lot of time in Python and a lot less in the fast C zlib code that does the actual compression.

This problem is already solved on the read side. A _GzipReader object is used for reading. This is put in an io.BufferedReader which is used as the underlying buffer for GzipFile.read. This way, lines  are read quite fast from a GzipFile without the checksum etc. being updated on every line read.

A similar solution should be written for write.
I volunteer (I have done some other work on gzip.py already), although I cannot give an ETA at this time.

----------
messages: 403289
nosy: rhpvorderman
priority: normal
severity: normal
status: open
title: GzipFile.write should be buffered

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45387>
_______________________________________

From report at bugs.python.org  Wed Oct  6 04:42:56 2021
From: report at bugs.python.org (Ruben Vorderman)
Date: Wed, 06 Oct 2021 08:42:56 +0000
Subject: [issue45387] GzipFile.write should be buffered
In-Reply-To: <1633509754.51.0.179214714383.issue45387@roundup.psfhosted.org>
Message-ID: <1633509776.63.0.878682395123.issue45387@roundup.psfhosted.org>


Change by Ruben Vorderman <r.h.p.vorderman at lumc.nl>:


----------
components: +Library (Lib)
type:  -> performance
versions: +Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45387>
_______________________________________

From report at bugs.python.org  Wed Oct  6 04:59:49 2021
From: report at bugs.python.org (Marcel Martin)
Date: Wed, 06 Oct 2021 08:59:49 +0000
Subject: [issue45387] GzipFile.write should be buffered
In-Reply-To: <1633509754.51.0.179214714383.issue45387@roundup.psfhosted.org>
Message-ID: <1633510789.94.0.778748063792.issue45387@roundup.psfhosted.org>


Change by Marcel Martin <python at marcelm.net>:


----------
nosy: +marcelm

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45387>
_______________________________________

From report at bugs.python.org  Wed Oct  6 05:01:18 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 06 Oct 2021 09:01:18 +0000
Subject: [issue45367] Specialize BINARY_MULTIPLY
In-Reply-To: <1633405452.94.0.0777171864008.issue45367@roundup.psfhosted.org>
Message-ID: <1633510878.7.0.0916150871419.issue45367@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:

If some misses are caused by mixed int/float operands, it might be worth investigating whether these occur in loops.

Most JIT compilers perform some sort of loop peeling to counter this form of type instability.

E.g.
x = 0
for ...
    x += some_float()

`x` is an int for the first iteration, and a float for the others.


By unpeeling the first iteration, we get type stability in the loop

x = 0
#first iteration
x += some_float()
for ... #Remaining iterations
    x += some_float()  # x is always a float here.

----------
nosy: +Mark.Shannon

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45367>
_______________________________________

From report at bugs.python.org  Wed Oct  6 06:06:24 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 06 Oct 2021 10:06:24 +0000
Subject: [issue45388] Use JUMP_FORWARD for all forward jumps.
Message-ID: <1633514784.49.0.280393257711.issue45388@roundup.psfhosted.org>


New submission from Mark Shannon <mark at hotpy.org>:

Python has two unconditional jumps, JUMP_ABSOLUTE and JUMP_FORWARD.

The bytecode compiler should ensure that all forward jumps use JUMP_FORWARD and all backwards jumps use JUMP_ABSOLUTE.

That way, the interpreter will know that JUMP_ABSOLUTE jumps are backwards and won't need to check.

----------
assignee: Mark.Shannon
components: Interpreter Core
messages: 403291
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Use JUMP_FORWARD for all forward jumps.
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45388>
_______________________________________

From report at bugs.python.org  Wed Oct  6 06:21:01 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 06 Oct 2021 10:21:01 +0000
Subject: [issue45119] test_signal.test_itimer_virtual() failed on AMD64 Fedora
 Rawhide: Linux kernel 5.15 regression
In-Reply-To: <1630948256.1.0.298507689656.issue45119@roundup.psfhosted.org>
Message-ID: <1633515661.58.0.408414077604.issue45119@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

The fix is part of Linux kernel v5.15-rc3:
https://github.com/torvalds/linux/commit/8cd9da85d2bd87ce889043e7b1735723dd10eb89#diff-40ae7979f67be398216a482f7b3937f9847a79e626665082886fb63e898b5247

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45119>
_______________________________________

From report at bugs.python.org  Wed Oct  6 06:21:38 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 06 Oct 2021 10:21:38 +0000
Subject: [issue45388] Use JUMP_FORWARD for all forward jumps.
In-Reply-To: <1633514784.49.0.280393257711.issue45388@roundup.psfhosted.org>
Message-ID: <1633515698.47.0.247575996691.issue45388@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
keywords: +patch
pull_requests: +27099
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28755

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45388>
_______________________________________

From report at bugs.python.org  Wed Oct  6 07:27:00 2021
From: report at bugs.python.org (gaborjbernat)
Date: Wed, 06 Oct 2021 11:27:00 +0000
Subject: [issue45389] https://docs.python.org/3/objects.inv still points to 3.9
In-Reply-To: <1633519580.67.0.482188362776.issue45389@roundup.psfhosted.org>
Message-ID: <1633519620.1.0.718399642267.issue45389@roundup.psfhosted.org>


Change by gaborjbernat <gaborjbernat at gmail.com>:


----------
title: https://docs.python.org/3/objects.inv still points to 3.10 -> https://docs.python.org/3/objects.inv still points to 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45389>
_______________________________________

From report at bugs.python.org  Wed Oct  6 07:26:20 2021
From: report at bugs.python.org (gaborjbernat)
Date: Wed, 06 Oct 2021 11:26:20 +0000
Subject: [issue45389] https://docs.python.org/3/objects.inv still points to
 3.10
Message-ID: <1633519580.67.0.482188362776.issue45389@roundup.psfhosted.org>


New submission from gaborjbernat <gaborjbernat at gmail.com>:

https://docs.python.org/3/library/ links now to 3.10; however, the objects inventory does not.

? curl -s https://docs.python.org/3/objects.inv | head -n 3
# Sphinx inventory version 2
# Project: Python
# Version: 3.9

? curl -s https://docs.python.org/3.10/objects.inv | head -n 3
# Sphinx inventory version 2
# Project: Python
# Version: 3.10

----------
assignee: docs at python
components: Documentation
messages: 403293
nosy: docs at python, gaborjbernat
priority: normal
severity: normal
status: open
title: https://docs.python.org/3/objects.inv still points to 3.10
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45389>
_______________________________________

From report at bugs.python.org  Wed Oct  6 07:30:42 2021
From: report at bugs.python.org (Marco Pagliaricci)
Date: Wed, 06 Oct 2021 11:30:42 +0000
Subject: [issue45390] asyncio.Task doesn't propagate CancelledError()
 exception correctly.
Message-ID: <1633519842.27.0.396754460358.issue45390@roundup.psfhosted.org>


New submission from Marco Pagliaricci <pagliaricci.m at gmail.com>:

I've spotted a little bug in how asyncio.CancelledError() exception is propagated inside an asyncio.Task.

Since python 3.9 the asyncio.Task.cancel() method has a new 'msg' parameter, that will create an asyncio.CancelledError(msg) exception incorporating that message.

The exception is successfully propagated to the coroutine the asyncio.Task is running, so the coroutine successfully gets raised an asyncio.CancelledError(msg) with the specified message in asyncio.Task.cancel(msg) method.

But, once the asyncio.Task is cancelled, is impossible to retrieve that original asyncio.CancelledError(msg) exception with the message, because it seems that *a new* asyncio.CancelledError() [without the message] is raised when asyncio.Task.result() or asyncio.Task.exception() methods are called.

I have the feeling that this is just wrong, and that the original message specified in asyncio.Task.cancel(msg) should be propagated even also asyncio.Task.result() is called.

I'm including a little snippet of code that clearly shows this bug.

I'm using python 3.9.6, in particular:
Python 3.9.6 (default, Aug 21 2021, 09:02:49) 
[GCC 10.2.1 20210110] on linux

----------
components: asyncio
files: task_bug.py
messages: 403294
nosy: asvetlov, pagliaricci.m, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.Task doesn't propagate CancelledError() exception correctly.
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file50328/task_bug.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45390>
_______________________________________

From report at bugs.python.org  Wed Oct  6 07:31:13 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 06 Oct 2021 11:31:13 +0000
Subject: [issue45119] test_signal.test_itimer_virtual() failed on AMD64 Fedora
 Rawhide: Linux kernel 5.15 regression
In-Reply-To: <1630948256.1.0.298507689656.issue45119@roundup.psfhosted.org>
Message-ID: <1633519873.64.0.311578643264.issue45119@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I upgraded Fedora Rawhide machines:

* x86-64 now runs: 5.15.0-0.rc4.33.fc36.x86_64
* aarch64 now runs: 5.15.0-0.rc4.33.fc36.aarch64

I also disabled systemd-coredump:
---
$ cat /etc/sysctl.d/50-coredump.conf 
# Disable systemd-coredump
kernel.core_pattern=

$ cat /proc/sys/kernel/core_pattern 
---

core_pattern is now empty.

Previously, /run was out of available inodes because systemd-coredump created one file per crash in /run/systemd/propagate/.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45119>
_______________________________________

From report at bugs.python.org  Wed Oct  6 07:35:17 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 06 Oct 2021 11:35:17 +0000
Subject: [issue45119] test_signal.test_itimer_virtual() failed on AMD64 Fedora
 Rawhide: Linux kernel 5.15 regression
In-Reply-To: <1630948256.1.0.298507689656.issue45119@roundup.psfhosted.org>
Message-ID: <1633520117.47.0.325914471836.issue45119@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

And the ppc64e machine runs 5.15.0-0.rc4.33.fc36.ppc64le.

This machine was stuck at kernel 5.7, I'm not sure why. I had to regenerate the grub2 configuration.

Ok, all Rawhide buildbots should now run a kernel 5.15 without the ITIMER_VIRTUAL bug. I close the issue.

----------
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45119>
_______________________________________

From report at bugs.python.org  Wed Oct  6 07:36:52 2021
From: report at bugs.python.org (Ben)
Date: Wed, 06 Oct 2021 11:36:52 +0000
Subject: [issue45390] asyncio.Task doesn't propagate CancelledError()
 exception correctly.
In-Reply-To: <1633519842.27.0.396754460358.issue45390@roundup.psfhosted.org>
Message-ID: <1633520212.22.0.637971219867.issue45390@roundup.psfhosted.org>


Ben <benjsimner at gmail.com> added the comment:

This seems to be present in both the Python implementation as well as the accelerated C _asyncio module.

It looks like that when a Task awaits a cancelled future,
the task itself is cancelled but the cancellation message is not propagated to the task.
https://github.com/python/cpython/blob/main/Lib/asyncio/tasks.py#L242

----------
nosy: +bjs

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45390>
_______________________________________

From report at bugs.python.org  Wed Oct  6 07:40:56 2021
From: report at bugs.python.org (gaborjbernat)
Date: Wed, 06 Oct 2021 11:40:56 +0000
Subject: [issue45389] https://docs.python.org/3/objects.inv still points to 3.9
In-Reply-To: <1633519580.67.0.482188362776.issue45389@roundup.psfhosted.org>
Message-ID: <1633520456.63.0.853087129267.issue45389@roundup.psfhosted.org>


gaborjbernat <gaborjbernat at gmail.com> added the comment:

Could be not a CPython problem, but for reference when trying to look into the inventory file for 3.10 ran into https://github.com/bskinn/sphobjinv/issues/208

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45389>
_______________________________________

From report at bugs.python.org  Wed Oct  6 08:10:07 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 06 Oct 2021 12:10:07 +0000
Subject: [issue45371] distutil's runtime_library_dir (rpath) option doesn't
 work with clang
In-Reply-To: <1633424435.3.0.953181779215.issue45371@roundup.psfhosted.org>
Message-ID: <1633522207.09.0.298061312751.issue45371@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45371>
_______________________________________

From report at bugs.python.org  Wed Oct  6 08:20:01 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 06 Oct 2021 12:20:01 +0000
Subject: [issue40116] Regression in memory use of shared key dictionaries for
 "compact dicts"
In-Reply-To: <1585581236.94.0.571794171265.issue40116@roundup.psfhosted.org>
Message-ID: <1633522801.07.0.609470993759.issue40116@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:


New changeset a7252f88d3fa33036bdd6036b8c97bc785ed6f17 by Mark Shannon in branch 'main':
bpo-40116: Add insertion order bit-vector to dict values to allow dicts to share keys more freely. (GH-28520)
https://github.com/python/cpython/commit/a7252f88d3fa33036bdd6036b8c97bc785ed6f17


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40116>
_______________________________________

From report at bugs.python.org  Wed Oct  6 08:20:50 2021
From: report at bugs.python.org (gaborjbernat)
Date: Wed, 06 Oct 2021 12:20:50 +0000
Subject: [issue45391] 3.10 objects.inv classifies UnionType as data
Message-ID: <1633522850.1.0.516575372895.issue45391@roundup.psfhosted.org>


New submission from gaborjbernat <gaborjbernat at gmail.com>:

It's a class though:

? sphobjinv suggest ./objects.inv UnionType
:py:data:`types.UnionType`

defined as:

UnionType = type(int | str)

----------
assignee: docs at python
components: Documentation
messages: 403300
nosy: docs at python, gaborjbernat
priority: normal
severity: normal
status: open
title: 3.10 objects.inv classifies UnionType as data
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45391>
_______________________________________

From report at bugs.python.org  Wed Oct  6 08:38:19 2021
From: report at bugs.python.org (gaborjbernat)
Date: Wed, 06 Oct 2021 12:38:19 +0000
Subject: [issue45391] 3.10 objects.inv classifies UnionType as data
In-Reply-To: <1633522850.1.0.516575372895.issue45391@roundup.psfhosted.org>
Message-ID: <1633523899.25.0.496226306677.issue45391@roundup.psfhosted.org>


Change by gaborjbernat <gaborjbernat at gmail.com>:


----------
keywords: +patch
pull_requests: +27100
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28757

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45391>
_______________________________________

From report at bugs.python.org  Wed Oct  6 08:45:43 2021
From: report at bugs.python.org (gaborjbernat)
Date: Wed, 06 Oct 2021 12:45:43 +0000
Subject: [issue45391] 3.10 objects.inv classifies UnionType as data
In-Reply-To: <1633522850.1.0.516575372895.issue45391@roundup.psfhosted.org>
Message-ID: <1633524343.04.0.543221876364.issue45391@roundup.psfhosted.org>


gaborjbernat <gaborjbernat at gmail.com> added the comment:

The issue with the current state this is that intersphinx fails to find types.UnionType in objects.inv because of leaves under the incorrect namespace (data vs class).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45391>
_______________________________________

From report at bugs.python.org  Wed Oct  6 09:53:40 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 06 Oct 2021 13:53:40 +0000
Subject: [issue40321] urllib.request does not support HTTP response status
 code 308
In-Reply-To: <1587232058.85.0.573866772263.issue40321@roundup.psfhosted.org>
Message-ID: <1633528420.57.0.949945529574.issue40321@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
nosy: +lukasz.langa
nosy_count: 5.0 -> 6.0
pull_requests: +27101
pull_request: https://github.com/python/cpython/pull/28760

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40321>
_______________________________________

From report at bugs.python.org  Wed Oct  6 09:54:59 2021
From: report at bugs.python.org (Mark Dickinson)
Date: Wed, 06 Oct 2021 13:54:59 +0000
Subject: [issue45392] docstring of "type" could use an update
Message-ID: <1633528499.41.0.143485330537.issue45392@roundup.psfhosted.org>


New submission from Mark Dickinson <dickinsm at gmail.com>:

The docstring of the "type" builtin is mildly confusing. Here's what the first few lines of the output for `help(type)` look like for me (on Python 3.10.0rc2):

class type(object)
 |  type(object_or_name, bases, dict)
 |  type(object) -> the object's type
 |  type(name, bases, dict) -> a new type

The first line there seems redundant, and potentially misleading, since it suggests that `type(object, bases, dict)` might be legal.

The third line is missing mention of possible keyword arguments.

----------
messages: 403302
nosy: mark.dickinson
priority: normal
severity: normal
status: open
title: docstring of "type" could use an update

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45392>
_______________________________________

From report at bugs.python.org  Wed Oct  6 10:12:55 2021
From: report at bugs.python.org (Aivar Annamaa)
Date: Wed, 06 Oct 2021 14:12:55 +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: <1633529575.03.0.806757083764.issue45372@roundup.psfhosted.org>


Aivar Annamaa <aivar.annamaa at gmail.com> added the comment:

I was not able to find out why one of my Windows box failed to update the certificate store, but I was able to work around this by manually installing https://letsencrypt.org/certs/lets-encrypt-r3.der

It looks like this is actually a Windows problem, so I'm closing this issue.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45372>
_______________________________________

From report at bugs.python.org  Wed Oct  6 10:26:28 2021
From: report at bugs.python.org (Eryk Sun)
Date: Wed, 06 Oct 2021 14:26:28 +0000
Subject: [issue45375] Windows assertion in out-of-tree debug build
In-Reply-To: <1633433921.42.0.136161828718.issue45375@roundup.psfhosted.org>
Message-ID: <1633530388.39.0.814879002843.issue45375@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

I left a message on the PR a day ago about a one-off error in the allocation of `buff`. The size should be `MAXPATHLEN + 1`. That's what's used everywhere else in PC/getpathp.c and what gets passed in the PathCchCombineEx(buff, MAXPATHLEN + 1, ...) call.

----------
nosy: +eryksun
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45375>
_______________________________________

From report at bugs.python.org  Wed Oct  6 10:52:04 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 06 Oct 2021 14:52:04 +0000
Subject: [issue34804] Repetition of 'for example' in documentation
In-Reply-To: <1537939388.49.0.545547206417.issue34804@psf.upfronthosting.co.za>
Message-ID: <1633531924.46.0.331551801648.issue34804@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 7af95a1e8097b2aab2cbe8de88727809e745b658 by DonnaDia in branch 'main':
bpo-34804: [doc] Rephrase section on side effects in functional.rst for clarity (GH-27989)
https://github.com/python/cpython/commit/7af95a1e8097b2aab2cbe8de88727809e745b658


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34804>
_______________________________________

From report at bugs.python.org  Wed Oct  6 10:52:31 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 06 Oct 2021 14:52:31 +0000
Subject: [issue34804] Repetition of 'for example' in documentation
In-Reply-To: <1537939388.49.0.545547206417.issue34804@psf.upfronthosting.co.za>
Message-ID: <1633531951.51.0.578057868713.issue34804@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27103
pull_request: https://github.com/python/cpython/pull/28763

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34804>
_______________________________________

From report at bugs.python.org  Wed Oct  6 10:52:26 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 06 Oct 2021 14:52:26 +0000
Subject: [issue34804] Repetition of 'for example' in documentation
In-Reply-To: <1537939388.49.0.545547206417.issue34804@psf.upfronthosting.co.za>
Message-ID: <1633531946.31.0.193855874183.issue34804@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 8.0 -> 9.0
pull_requests: +27102
pull_request: https://github.com/python/cpython/pull/28762

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34804>
_______________________________________

From report at bugs.python.org  Wed Oct  6 10:55:04 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 06 Oct 2021 14:55:04 +0000
Subject: [issue45385] Fix possible reference leak from descr_check
In-Reply-To: <1633480978.07.0.287145541934.issue45385@roundup.psfhosted.org>
Message-ID: <1633532104.74.0.34798143664.issue45385@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

Compiler warnings from PR 28572:

Objects/descrobject.c#L183
?res? may be used uninitialized in this function [-Wmaybe-uninitialized]

Objects/descrobject.c#L201
?res? may be used uninitialized in this function [-Wmaybe-uninitialized]

Objects/descrobject.c#L217
?res? may be used uninitialized in this function [-Wmaybe-uninitialized]

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45385>
_______________________________________

From report at bugs.python.org  Wed Oct  6 10:55:10 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 06 Oct 2021 14:55:10 +0000
Subject: [issue45385] Fix reference leak from descr_check
In-Reply-To: <1633480978.07.0.287145541934.issue45385@roundup.psfhosted.org>
Message-ID: <1633532110.16.0.560223810229.issue45385@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
title: Fix possible reference leak from descr_check -> Fix reference leak from descr_check

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45385>
_______________________________________

From report at bugs.python.org  Wed Oct  6 10:56:22 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Wed, 06 Oct 2021 14:56:22 +0000
Subject: [issue45371] distutil's runtime_library_dir (rpath) option doesn't
 work with clang
In-Reply-To: <1633424435.3.0.953181779215.issue45371@roundup.psfhosted.org>
Message-ID: <1633532182.18.0.608971052725.issue45371@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

The fix that was merged seems a bit hacky to me -- it changes the _is_gcc check so that it returns True on clang.

Even though distutils is deprecated and no longer synced externally, if someone needs to issue a similar fix, this might trip them over.

I would recommend replacing it with [1], from the now externally maintained distutils module.

[1] https://github.com/pypa/distutils/pull/55

----------
nosy: +FFY00

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45371>
_______________________________________

From report at bugs.python.org  Wed Oct  6 11:03:17 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 06 Oct 2021 15:03:17 +0000
Subject: [issue45391] 3.10 objects.inv classifies UnionType as data
In-Reply-To: <1633522850.1.0.516575372895.issue45391@roundup.psfhosted.org>
Message-ID: <1633532597.78.0.566245628852.issue45391@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

On the PR you mention there's more types with this problem. Can we get a full list?

----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45391>
_______________________________________

From report at bugs.python.org  Wed Oct  6 11:07:41 2021
From: report at bugs.python.org (Mark Dickinson)
Date: Wed, 06 Oct 2021 15:07:41 +0000
Subject: [issue45392] docstring of "type" could use an update
In-Reply-To: <1633528499.41.0.143485330537.issue45392@roundup.psfhosted.org>
Message-ID: <1633532861.41.0.531666687737.issue45392@roundup.psfhosted.org>


Mark Dickinson <dickinsm at gmail.com> added the comment:

Larry: the first line was introduced in #20189. Does it still make sense to keep it at this point?

----------
nosy: +larry

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45392>
_______________________________________

From report at bugs.python.org  Wed Oct  6 11:08:42 2021
From: report at bugs.python.org (gaborjbernat)
Date: Wed, 06 Oct 2021 15:08:42 +0000
Subject: [issue45391] 3.10 objects.inv classifies UnionType as data
In-Reply-To: <1633522850.1.0.516575372895.issue45391@roundup.psfhosted.org>
Message-ID: <1633532922.56.0.946050418461.issue45391@roundup.psfhosted.org>


gaborjbernat <gaborjbernat at gmail.com> added the comment:

Not easily, but, e.g. the EllipsisType is one. I would have to create some script which I haven't done yet. 

The best would be to create a sphinx plugin that collects entries registered in the doc and displays the discrepancy against the intershpinx object. This way, we could defend against future such issues too. I can give it a go in a few days if no one else wants to do so before that.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45391>
_______________________________________

From report at bugs.python.org  Wed Oct  6 11:13:37 2021
From: report at bugs.python.org (Brian Skinn)
Date: Wed, 06 Oct 2021 15:13:37 +0000
Subject: [issue45391] 3.10 objects.inv classifies UnionType as data
In-Reply-To: <1633522850.1.0.516575372895.issue45391@roundup.psfhosted.org>
Message-ID: <1633533217.29.0.0731385416598.issue45391@roundup.psfhosted.org>


Brian Skinn <bskinn at alum.mit.edu> added the comment:

If I understand the problem correctly, these mis-attributions of roles (to 'data' instead of 'class' come about when a thing that is technically a class is defined in source using simple assignment, as with UnionType.

Problematic entries will thus have 'data' as role, and their identifiers will be camel-cased.

So, as a quick search to identify likely candidates:


>>> import re, sphobjinv as soi
>>> from pprint import pprint
>>> inv = soi.Inventory(url="https://docs.python.org/3.10/objects.inv")

# Find entries where the first character after the final period
# is uppercase, and the second character after the final period
# is lowercase.
>>> pat = re.compile(r"([.][A-Z][a-z])[^.]*$")

>>> pprint([obj.name for obj in inv.objects if obj.role == "data" and pat.search(obj.name)])

['_thread.LockType',
 'ast.PyCF_ALLOW_TOP_LEVEL_AWAIT',
 'ast.PyCF_ONLY_AST',
 'ast.PyCF_TYPE_COMMENTS',
 'importlib.resources.Package',
 'importlib.resources.Resource',
 'socket.SocketType',
 'types.AsyncGeneratorType',
 'types.BuiltinFunctionType',
 'types.BuiltinMethodType',
 'types.CellType',
 'types.ClassMethodDescriptorType',
 'types.CoroutineType',
 'types.EllipsisType',
 'types.FrameType',
 'types.FunctionType',
 'types.GeneratorType',
 'types.GetSetDescriptorType',
 'types.LambdaType',
 'types.MemberDescriptorType',
 'types.MethodDescriptorType',
 'types.MethodType',
 'types.MethodWrapperType',
 'types.NoneType',
 'types.NotImplementedType',
 'types.UnionType',
 'types.WrapperDescriptorType',
 'typing.Annotated',
 'typing.Any',
 'typing.AnyStr',
 'typing.Callable',
 'typing.ClassVar',
 'typing.Concatenate',
 'typing.Final',
 'typing.Literal',
 'typing.NoReturn',
 'typing.Optional',
 'typing.ParamSpecArgs',
 'typing.ParamSpecKwargs',
 'typing.Tuple',
 'typing.TypeAlias',
 'typing.TypeGuard',
 'typing.Union',
 'weakref.CallableProxyType',
 'weakref.ProxyType',
 'weakref.ProxyTypes',
 'weakref.ReferenceType']


I would guess those 'ast.PyCF...' objects can be ignored, they appear to be constants?

----------
nosy: +bskinn

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45391>
_______________________________________

From report at bugs.python.org  Wed Oct  6 11:15:51 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 06 Oct 2021 15:15:51 +0000
Subject: [issue34804] Repetition of 'for example' in documentation
In-Reply-To: <1537939388.49.0.545547206417.issue34804@psf.upfronthosting.co.za>
Message-ID: <1633533351.34.0.119529719541.issue34804@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset dcdeb96495fa105098544e2be7b74fa288589912 by Miss Islington (bot) in branch '3.10':
bpo-34804: [doc] Rephrase section on side effects in functional.rst for clarity (GH-27989) (GH-28762)
https://github.com/python/cpython/commit/dcdeb96495fa105098544e2be7b74fa288589912


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34804>
_______________________________________

From report at bugs.python.org  Wed Oct  6 11:17:55 2021
From: report at bugs.python.org (Larry Hastings)
Date: Wed, 06 Oct 2021 15:17:55 +0000
Subject: [issue45392] docstring of "type" could use an update
In-Reply-To: <1633528499.41.0.143485330537.issue45392@roundup.psfhosted.org>
Message-ID: <1633533475.51.0.384258525071.issue45392@roundup.psfhosted.org>


Larry Hastings <larry at hastings.org> added the comment:

Removing it makes sense to me.  Not sure what I was thinking, way back when.  Thanks for catching--and volunteering to fix--this!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45392>
_______________________________________

From report at bugs.python.org  Wed Oct  6 11:17:42 2021
From: report at bugs.python.org (Brian Skinn)
Date: Wed, 06 Oct 2021 15:17:42 +0000
Subject: [issue45391] 3.10 objects.inv classifies UnionType as data
In-Reply-To: <1633522850.1.0.516575372895.issue45391@roundup.psfhosted.org>
Message-ID: <1633533462.33.0.541331584308.issue45391@roundup.psfhosted.org>


Brian Skinn <bskinn at alum.mit.edu> added the comment:

Identifiers starting with two uppercase letters returns a HUGE list.

>>> pat2 = re.compile(r"([.][A-Z][A-Z])[^.]*$")

Filtering down by only those that contain.lower() "type":

>>> pprint([obj.name for obj in inv.objects if obj.role == "data" and pat2.search(obj.name) and "type" in obj.name.lower()])

['errno.EPROTOTYPE',
 'locale.LC_CTYPE',
 'sqlite3.PARSE_DECLTYPES',
 'ssl.CHANNEL_BINDING_TYPES',
 'token.TYPE_COMMENT',
 'token.TYPE_IGNORE',
 'typing.TYPE_CHECKING',
 'xml.parsers.expat.XMLParserType']

Of these, only 'xml.parsers.expat.XMLParserType' seems to me a likely problem entry.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45391>
_______________________________________

From report at bugs.python.org  Wed Oct  6 11:19:55 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 06 Oct 2021 15:19:55 +0000
Subject: [issue34804] Repetition of 'for example' in documentation
In-Reply-To: <1537939388.49.0.545547206417.issue34804@psf.upfronthosting.co.za>
Message-ID: <1633533595.33.0.588668823408.issue34804@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 496d1aa0b84466cc9b11f4f3b90cee93af1f393e by Miss Islington (bot) in branch '3.9':
bpo-34804: [doc] Rephrase section on side effects in functional.rst for clarity (GH-27989) (GH-28763)
https://github.com/python/cpython/commit/496d1aa0b84466cc9b11f4f3b90cee93af1f393e


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34804>
_______________________________________

From report at bugs.python.org  Wed Oct  6 11:22:47 2021
From: report at bugs.python.org (Ammar Askar)
Date: Wed, 06 Oct 2021 15:22:47 +0000
Subject: [issue45006] Add data_offset field to ZipInfo
In-Reply-To: <1629945022.64.0.0597946135718.issue45006@roundup.psfhosted.org>
Message-ID: <1633533767.42.0.957065093298.issue45006@roundup.psfhosted.org>


Ammar Askar <ammar at ammaraskar.com> added the comment:

Could you explain your use-case for this feature in a bit more detail? zipfile is meant to be a relatively high level library to do common tasks such as reading/writing/listing files.

The use case for `data_offset` proposed here seems to be relatively advanced and I don't see how it would be to useful for the vast majority of users.


(Without adding to the public API, I think you can achieve a pretty similar functionality by using the following)

compressed_data = zipfile.open(zipinfo)._read2(compressed_size)

Obviously, this relies on undocumented internals, but for a niche use case that might not be the worst thing: https://github.com/python/cpython/blob/61892c04764e1f3a659bbd09e6373687a27d36e2/Lib/zipfile.py#L1042-L1056

----------
nosy: +ammar2

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45006>
_______________________________________

From report at bugs.python.org  Wed Oct  6 11:24:18 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 06 Oct 2021 15:24:18 +0000
Subject: [issue34804] Repetition of 'for example' in documentation
In-Reply-To: <1537939388.49.0.545547206417.issue34804@psf.upfronthosting.co.za>
Message-ID: <1633533858.11.0.230487019702.issue34804@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Diana! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34804>
_______________________________________

From report at bugs.python.org  Wed Oct  6 11:24:54 2021
From: report at bugs.python.org (gaborjbernat)
Date: Wed, 06 Oct 2021 15:24:54 +0000
Subject: [issue45391] 3.10 objects.inv classifies UnionType as data
In-Reply-To: <1633522850.1.0.516575372895.issue45391@roundup.psfhosted.org>
Message-ID: <1633533894.01.0.0936769900861.issue45391@roundup.psfhosted.org>


gaborjbernat <gaborjbernat at gmail.com> added the comment:

I think Brian Skinn script is a rough approximation, but definitely entirely accurate. You'd have to match up what sphinx thinks per doc vs what you import for an accurate view.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45391>
_______________________________________

From report at bugs.python.org  Wed Oct  6 11:28:25 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 06 Oct 2021 15:28:25 +0000
Subject: [issue40321] urllib.request does not support HTTP response status
 code 308
In-Reply-To: <1587232058.85.0.573866772263.issue40321@roundup.psfhosted.org>
Message-ID: <1633534105.22.0.82209398118.issue40321@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset f528045f695f7483d955a1eae4c1df68b1b4cacd by ?ukasz Langa in branch 'main':
bpo-40321: Add missing test, slightly expand documentation (GH-28760)
https://github.com/python/cpython/commit/f528045f695f7483d955a1eae4c1df68b1b4cacd


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40321>
_______________________________________

From report at bugs.python.org  Wed Oct  6 11:29:43 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 06 Oct 2021 15:29:43 +0000
Subject: [issue40321] urllib.request does not support HTTP response status
 code 308
In-Reply-To: <1587232058.85.0.573866772263.issue40321@roundup.psfhosted.org>
Message-ID: <1633534183.04.0.403356088742.issue40321@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Senthil, we can't be backporting new APIs to bugfix versions. I took care of updating tests and docs (versionadded), thanks for the code review.

Thanks for the fix, Jochem! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type: behavior -> enhancement
versions: +Python 3.11 -Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40321>
_______________________________________

From report at bugs.python.org  Wed Oct  6 11:33:48 2021
From: report at bugs.python.org (Max)
Date: Wed, 06 Oct 2021 15:33:48 +0000
Subject: [issue45393] help() on operator precedence has confusing entries
 "avait" "x" and "not" "x"
Message-ID: <1633534428.51.0.112977953361.issue45393@roundup.psfhosted.org>


New submission from Max <mh+bugs.python.org at dsi972.fr>:

Nobody seems to have noticed this AFAICS: 
If you type, e.g., help('+') to get help on operator precedence, the fist column gives a lit of operators for each row corresponding to a given precedence. However, the row for "not" (and similar for "await"), has the entry

"not" "x"

That looks as if there were two operators, "not" and "x". But the letter x is just an argument to the operator, so it should be:

 "not x"

exactly as for "+x" and "-x" and "~x" and "x[index]" and "x.attribute", where also x is not part of the operator but an argument.

On the corresponding web page https://docs.python.org/3/reference/expressions.html#operator-summary
it is displayed correctly, there are no quotes.

----------
assignee: docs at python
components: Documentation
messages: 403321
nosy: MFH, docs at python
priority: normal
severity: normal
status: open
title: help() on operator precedence has confusing entries "avait" "x" and "not" "x"
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45393>
_______________________________________

From report at bugs.python.org  Wed Oct  6 11:41:31 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 06 Oct 2021 15:41:31 +0000
Subject: [issue45393] help() on operator precedence has confusing entries
 "await" "x" and "not" "x"
In-Reply-To: <1633534428.51.0.112977953361.issue45393@roundup.psfhosted.org>
Message-ID: <1633534891.85.0.433130529148.issue45393@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
title: help() on operator precedence has confusing entries "avait" "x" and "not" "x" -> help() on operator precedence has confusing entries "await" "x" and "not" "x"
versions:  -Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45393>
_______________________________________

From report at bugs.python.org  Wed Oct  6 12:00:26 2021
From: report at bugs.python.org (Steve Dower)
Date: Wed, 06 Oct 2021 16:00:26 +0000
Subject: [issue45375] Windows assertion in out-of-tree debug build
In-Reply-To: <1633433921.42.0.136161828718.issue45375@roundup.psfhosted.org>
Message-ID: <1633536026.22.0.924864747707.issue45375@roundup.psfhosted.org>


Change by Steve Dower <steve.dower at python.org>:


----------
pull_requests: +27104
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/28764

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45375>
_______________________________________

From report at bugs.python.org  Wed Oct  6 12:03:37 2021
From: report at bugs.python.org (Steve Dower)
Date: Wed, 06 Oct 2021 16:03:37 +0000
Subject: [issue45375] Windows assertion in out-of-tree debug build
In-Reply-To: <1633433921.42.0.136161828718.issue45375@roundup.psfhosted.org>
Message-ID: <1633536217.65.0.20519088421.issue45375@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

Thanks for mentioning it! New PR to fix

----------
priority: release blocker -> high

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45375>
_______________________________________

From report at bugs.python.org  Wed Oct  6 12:06:45 2021
From: report at bugs.python.org (Rodrigo)
Date: Wed, 06 Oct 2021 16:06:45 +0000
Subject: [issue45386] xmlrpc.client unimportable due to strfmt ValueError
In-Reply-To: <1633503207.0.0.80221316205.issue45386@roundup.psfhosted.org>
Message-ID: <1633536405.91.0.497848853035.issue45386@roundup.psfhosted.org>


Change by Rodrigo <rtobar at icrar.org>:


----------
keywords: +patch
nosy: +rtobar
nosy_count: 1.0 -> 2.0
pull_requests: +27105
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28765

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45386>
_______________________________________

From report at bugs.python.org  Wed Oct  6 12:26:26 2021
From: report at bugs.python.org (Larry Hastings)
Date: Wed, 06 Oct 2021 16:26:26 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org>
Message-ID: <1633537586.53.0.784088086951.issue45020@roundup.psfhosted.org>


Larry Hastings <larry at hastings.org> added the comment:

Nope.  On Windows, os.path is "ntpath".

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Wed Oct  6 13:18:37 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 06 Oct 2021 17:18:37 +0000
Subject: [issue45328] http.client.HTTPConnection doesn't work without
 TCP_NODELAY
In-Reply-To: <1632989216.99.0.864211743878.issue45328@roundup.psfhosted.org>
Message-ID: <1633540717.84.0.196691249724.issue45328@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
versions: +Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45328>
_______________________________________

From report at bugs.python.org  Wed Oct  6 13:20:46 2021
From: report at bugs.python.org (Illia Volochii)
Date: Wed, 06 Oct 2021 17:20:46 +0000
Subject: [issue43669] PEP 644: Require OpenSSL 1.1.1 or newer
In-Reply-To: <1617106246.37.0.0210118077092.issue43669@roundup.psfhosted.org>
Message-ID: <1633540846.46.0.218332079528.issue43669@roundup.psfhosted.org>


Change by Illia Volochii <illia.volochii at gmail.com>:


----------
nosy: +illia-v
nosy_count: 3.0 -> 4.0
pull_requests: +27106
pull_request: https://github.com/python/cpython/pull/28768

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43669>
_______________________________________

From report at bugs.python.org  Wed Oct  6 13:22:01 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 06 Oct 2021 17:22:01 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1633455056.56.0.828667111562.issue45020@roundup.psfhosted.org>
Message-ID: <CALFfu7Czh3ZUPTagqz6nWmbuOALu_yFvOUfOwQ7uj7LkMJPbLQ@mail.gmail.com>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

On Tue, Oct 5, 2021 at 11:31 AM Guido van Rossum <report at bugs.python.org> wrote:
> Whoa. os.path is not always an alias for posixpath, is it?

Steve brought this to my attention a couple weeks ago.  Bottom line:
the frozen module entry is only there for checks, not for actual
import, but should probably be removed regardless.  See
https://bugs.python.org/issue45272.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Wed Oct  6 13:35:15 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 06 Oct 2021 17:35:15 +0000
Subject: [issue45394] pip install numpy not working in 3.11.0a on macOS 11.6
In-Reply-To: <1633541284.23.0.881547184304.issue45394@roundup.psfhosted.org>
Message-ID: <1633541715.6.0.963380604388.issue45394@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Please open a bug with NumPy. The expression

    Py_TYPE(&new_fields) = NULL;

is no longer valid. NumPy has to use new Py_SET_TYPE() API to modify the type field.

----------
nosy: +christian.heimes
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45394>
_______________________________________

From report at bugs.python.org  Wed Oct  6 13:38:34 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Wed, 06 Oct 2021 17:38:34 +0000
Subject: [issue45272] 'os.path' should not be a frozen module
In-Reply-To: <1632414295.46.0.740648553614.issue45272@roundup.psfhosted.org>
Message-ID: <1633541914.53.0.287706599738.issue45272@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

I'm trying to understand the proposed solution, "have _imp.is_frozen() check the module in sys.modules." Does that mean it would do a dict lookup first? Maybe you should do that in the caller instead? importlib/_bootstrap.py calls it a few times, but I'm not convinced that all call sites can be called with "os.path" -- do you know which path was taken when this failed?

I worry about the complexity of the importlib bootstrapping mechanism. Grepping through the source for _bootstrap and _bootstrap_external has not given me any understanding of how this works. Do you know if there are docs for this? Or do we just need to ask Brett?

----------
nosy: +gvanrossum

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45272>
_______________________________________

From report at bugs.python.org  Wed Oct  6 13:49:48 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 06 Oct 2021 17:49:48 +0000
Subject: [issue45328] http.client.HTTPConnection doesn't work without
 TCP_NODELAY
In-Reply-To: <1632989216.99.0.864211743878.issue45328@roundup.psfhosted.org>
Message-ID: <1633542588.11.0.341677045186.issue45328@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 0571b934f5f9198c3461a7b631d7073ac0a5676f by rtobar in branch 'main':
bpo-45328: Avoid failure in OSs without TCP_NODELAY support (GH-28646)
https://github.com/python/cpython/commit/0571b934f5f9198c3461a7b631d7073ac0a5676f


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45328>
_______________________________________

From report at bugs.python.org  Wed Oct  6 13:49:55 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 06 Oct 2021 17:49:55 +0000
Subject: [issue45328] http.client.HTTPConnection doesn't work without
 TCP_NODELAY
In-Reply-To: <1632989216.99.0.864211743878.issue45328@roundup.psfhosted.org>
Message-ID: <1633542595.36.0.536717561889.issue45328@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27107
pull_request: https://github.com/python/cpython/pull/28770

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45328>
_______________________________________

From report at bugs.python.org  Wed Oct  6 13:50:24 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 06 Oct 2021 17:50:24 +0000
Subject: [issue45328] http.client.HTTPConnection doesn't work without
 TCP_NODELAY
In-Reply-To: <1632989216.99.0.864211743878.issue45328@roundup.psfhosted.org>
Message-ID: <1633542624.97.0.629874947457.issue45328@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27108
pull_request: https://github.com/python/cpython/pull/28771

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45328>
_______________________________________

From report at bugs.python.org  Wed Oct  6 14:29:33 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 06 Oct 2021 18:29:33 +0000
Subject: [issue45328] http.client.HTTPConnection doesn't work without
 TCP_NODELAY
In-Reply-To: <1632989216.99.0.864211743878.issue45328@roundup.psfhosted.org>
Message-ID: <1633544973.66.0.367042793744.issue45328@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 4c35a2aa80d7f55573d83651883d8733fac01e31 by Miss Islington (bot) in branch '3.10':
bpo-45328: Avoid failure in OSs without TCP_NODELAY support (GH-28646) (GH-28771)
https://github.com/python/cpython/commit/4c35a2aa80d7f55573d83651883d8733fac01e31


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45328>
_______________________________________

From report at bugs.python.org  Wed Oct  6 14:29:45 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 06 Oct 2021 18:29:45 +0000
Subject: [issue45328] http.client.HTTPConnection doesn't work without
 TCP_NODELAY
In-Reply-To: <1632989216.99.0.864211743878.issue45328@roundup.psfhosted.org>
Message-ID: <1633544985.46.0.0201539213767.issue45328@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 92018a08240308c5beef9ccc712bef5c2e582926 by Miss Islington (bot) in branch '3.9':
bpo-45328: Avoid failure in OSs without TCP_NODELAY support (GH-28646) (GH-28770)
https://github.com/python/cpython/commit/92018a08240308c5beef9ccc712bef5c2e582926


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45328>
_______________________________________

From report at bugs.python.org  Wed Oct  6 14:30:23 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 06 Oct 2021 18:30:23 +0000
Subject: [issue45328] http.client.HTTPConnection doesn't work without
 TCP_NODELAY
In-Reply-To: <1632989216.99.0.864211743878.issue45328@roundup.psfhosted.org>
Message-ID: <1633545023.49.0.339644382182.issue45328@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, rtobar! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45328>
_______________________________________

From report at bugs.python.org  Wed Oct  6 14:49:55 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 06 Oct 2021 18:49:55 +0000
Subject: [issue45272] 'os.path' should not be a frozen module
In-Reply-To: <1632414295.46.0.740648553614.issue45272@roundup.psfhosted.org>
Message-ID: <1633546195.5.0.191522982322.issue45272@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

On Wed, Oct 6, 2021 at 11:38 AM Guido van Rossum <report at bugs.python.org> wrote:
> I'm trying to understand the proposed solution, "have _imp.is_frozen() check the module in sys.modules." Does that mean it would do a dict lookup first?

Correct.  We'd look up the module in sys.modules and, if there, check its loader.

> Maybe you should do that in the caller instead? importlib/_bootstrap.py calls it a few times, but I'm not convinced that all call sites can be called with "os.path" -- do you know which path was taken when this failed?

Good point.  The only place where it matters is the FrozenImporter methods that are wrapped with _requires_frozen().  So the fix can go there instead of _imp.is_frozen().

> I worry about the complexity of the importlib bootstrapping mechanism. Grepping through the source for _bootstrap and _bootstrap_external has not given me any understanding of how this works. Do you know if there are docs for this? Or do we just need to ask Brett?

Are you talking about the use of _imp.is_frozen() or do you mean the code in _bootstrap.py (and _bootstrap_external.py) as a whole?  I don't believe there's any official documentation about the implementation in _bootstrap.py.  At best there have been some PyCon talks about how the import system works (but probably not at the level of the implementation) and Brett may have a blog post or two.  Keep in mind that I'm quite familiar with the importlib code, though Brett is definitely the mastermind behind the overall implementation.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45272>
_______________________________________

From report at bugs.python.org  Wed Oct  6 15:09:45 2021
From: report at bugs.python.org (Steve Dower)
Date: Wed, 06 Oct 2021 19:09:45 +0000
Subject: [issue45375] Windows assertion in out-of-tree debug build
In-Reply-To: <1633433921.42.0.136161828718.issue45375@roundup.psfhosted.org>
Message-ID: <1633547385.68.0.721145503702.issue45375@roundup.psfhosted.org>


Change by Steve Dower <steve.dower at python.org>:


----------
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45375>
_______________________________________

From report at bugs.python.org  Wed Oct  6 15:09:41 2021
From: report at bugs.python.org (Steve Dower)
Date: Wed, 06 Oct 2021 19:09:41 +0000
Subject: [issue45375] Windows assertion in out-of-tree debug build
In-Reply-To: <1633433921.42.0.136161828718.issue45375@roundup.psfhosted.org>
Message-ID: <1633547381.4.0.83086397207.issue45375@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:


New changeset 6c942a86a4fb4c8b731cb1bd2933dba554eb79cd by Steve Dower in branch 'main':
bpo-45375: Fix off by one error in buffer allocation (GH-28764)
https://github.com/python/cpython/commit/6c942a86a4fb4c8b731cb1bd2933dba554eb79cd


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45375>
_______________________________________

From report at bugs.python.org  Wed Oct  6 15:46:00 2021
From: report at bugs.python.org (Ammar Askar)
Date: Wed, 06 Oct 2021 19:46:00 +0000
Subject: [issue35970] no help flag in base64 util
In-Reply-To: <1549911460.74.0.450147054737.issue35970@roundup.psfhosted.org>
Message-ID: <1633549560.73.0.0573669907293.issue35970@roundup.psfhosted.org>


Change by Ammar Askar <ammar at ammaraskar.com>:


----------
keywords: +patch
nosy: +ammar2
nosy_count: 1.0 -> 2.0
pull_requests: +27109
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28774

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35970>
_______________________________________

From report at bugs.python.org  Wed Oct  6 15:57:06 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Wed, 06 Oct 2021 19:57:06 +0000
Subject: [issue45272] 'os.path' should not be a frozen module
In-Reply-To: <1632414295.46.0.740648553614.issue45272@roundup.psfhosted.org>
Message-ID: <1633550226.03.0.0991292280859.issue45272@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

It was a comment about my general lack of understanding of how the importlib bootstrap process works. I should probably start reading the docstrings before complaining more. :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45272>
_______________________________________

From report at bugs.python.org  Wed Oct  6 16:21:03 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 06 Oct 2021 20:21:03 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
Message-ID: <1633551663.5.0.531821025802.issue45395@roundup.psfhosted.org>


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

The mechanism to add custom frozen modules to the Python runtime is to set PyImport_FrozenModules (see Python/frozen.c) to some new array.  This means that the default frozen modules (from _PyImport_FrozenModules) are no longer used unless explicitly added to the custom array.  This is unlikely to be what the user wants.  It's especially problematic since it's easy to not realize this (or forget) and forgetting essential modules (like _frozen_importlib) will cause crashes.

It would probably make more sense to have PyImport_FrozenModules be an array of *additional* frozen modules, defaulting to an empty array.  Before going down that route we need to be sure that isn't going to break folks that are accommodating the existing behavior.

----------
components: Interpreter Core
messages: 403335
nosy: brett.cannon, eric.snow, lemburg
priority: normal
severity: normal
stage: needs patch
status: open
title: Frozen stdlib modules are discarded if custom frozen modules added.
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Wed Oct  6 13:28:04 2021
From: report at bugs.python.org (Joshua)
Date: Wed, 06 Oct 2021 17:28:04 +0000
Subject: [issue45394] pip install numpy not working in 3.11.0a on macOS 11.6
Message-ID: <1633541284.23.0.881547184304.issue45394@roundup.psfhosted.org>


New submission from Joshua <joshua at himmens.com>:

pip3.11 install numpy failed on a fresh install of python 3.11.0a on macOS 11.6.



pip3.11 install numpy
Collecting numpy
  Downloading numpy-1.21.1.zip (10.3 MB)
     |????????????????????????????????| 10.3 MB 14.1 MB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: numpy
  Building wheel for numpy (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/tmpiixoj1ei
       cwd: /private/var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/pip-install-bqxq7z4_/numpy_7a95a59cf3dd4798b2039e070138356e
  Complete output (936 lines):
  setup.py:63: RuntimeWarning: NumPy 1.21.1 may not yet support Python 3.11.
    warnings.warn(
  Running from numpy source directory.
  /private/var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/pip-install-bqxq7z4_/numpy_7a95a59cf3dd4798b2039e070138356e/tools/cythonize.py:69: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
    from distutils.version import LooseVersion
  Processing numpy/random/_bounded_integers.pxd.in
  Processing numpy/random/_philox.pyx
  Processing numpy/random/_bounded_integers.pyx.in
  Processing numpy/random/_sfc64.pyx
  Processing numpy/random/_mt19937.pyx
  Processing numpy/random/bit_generator.pyx
  Processing numpy/random/mtrand.pyx
  Processing numpy/random/_generator.pyx
  Processing numpy/random/_pcg64.pyx
  Processing numpy/random/_common.pyx
  Cythonizing sources
  blas_opt_info:
  blas_mkl_info:
  customize UnixCCompiler
    libraries mkl_rt not found in ['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
  
  blis_info:
    libraries blis not found in ['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
  
  openblas_info:
    libraries openblas not found in ['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
  
  accelerate_info:
    libraries accelerate not found in ['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', '/usr/lib']
  Library accelerate was not found. Ignoring
    libraries veclib not found in ['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', '/usr/lib']
  Library veclib was not found. Ignoring
    FOUND:
      extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
      extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
      define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
  
    FOUND:
      extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
      extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
      define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
  
  non-existing path in 'numpy/distutils': 'site.cfg'
  lapack_opt_info:
  lapack_mkl_info:
    libraries mkl_rt not found in ['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
  
  openblas_lapack_info:
    libraries openblas not found in ['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
  
  openblas_clapack_info:
    libraries openblas,lapack not found in ['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
  
  flame_info:
    libraries flame not found in ['/Library/Frameworks/Python.framework/Versions/3.11/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
  
    FOUND:
      extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
      extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
      define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
  
  Warning: attempted relative import with no known parent package
  /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running config_cc
  unifing config_cc, config, build_clib, build_ext, build commands --compiler options
  running config_fc
  unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
  running build_src
  build_src
  building py_modules sources
  creating build
  creating build/src.macosx-10.9-universal2-3.11
  creating build/src.macosx-10.9-universal2-3.11/numpy
  creating build/src.macosx-10.9-universal2-3.11/numpy/distutils
  building library "npymath" sources
  Could not locate executable gfortran
  Could not locate executable f95
  Could not locate executable f90
  Could not locate executable f77
  Could not locate executable xlf90
  Could not locate executable xlf
  Could not locate executable ifort
  Could not locate executable ifc
  Could not locate executable g77
  Could not locate executable g95
  Could not locate executable pgfortran
  don't know how to compile Fortran code on platform 'posix'
  creating build/src.macosx-10.9-universal2-3.11/numpy/core
  creating build/src.macosx-10.9-universal2-3.11/numpy/core/src
  creating build/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath/npy_math_internal.h
    adding 'build/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath' to include_dirs.
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath/ieee754.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath/npy_math_complex.c
  None - nothing done with h_files = ['build/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath/npy_math_internal.h']
  building library "npyrandom" sources
  building extension "numpy.core._multiarray_tests" sources
  creating build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/_multiarray_tests.c
  building extension "numpy.core._multiarray_umath" sources
  non-existing path in 'numpy/core': 'build/src.macosx-10.9-universal2-3.11/numpy/core/src/common'
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/arraytypes.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/einsum.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/einsum_sumprod.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/lowlevel_strided_loops.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/nditer_templ.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/scalartypes.c
  creating build/src.macosx-10.9-universal2-3.11/numpy/core/src/common
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/common/npy_sort.h
    adding 'build/src.macosx-10.9-universal2-3.11/numpy/core/src/common' to include_dirs.
  creating build/src.macosx-10.9-universal2-3.11/numpy/core/src/npysort
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/npysort/quicksort.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/npysort/mergesort.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/npysort/timsort.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/npysort/heapsort.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/npysort/radixsort.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/common/npy_partition.h
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/npysort/selection.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/common/npy_binsearch.h
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/npysort/binsearch.c
  creating build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/funcs.inc
    adding 'build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath' to include_dirs.
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/simd.inc
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops.h
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_utils.h
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_unary_fp.dispatch.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_arithm_fp.dispatch.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_arithmetic.dispatch.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_trigonometric.dispatch.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_exponent_log.dispatch.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/matmul.h
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/matmul.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/clip.h
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/clip.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/scalarmath.c
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/common/templ_common.h
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/common/npy_cpu_features.c
  numpy.core - nothing done with h_files = ['build/src.macosx-10.9-universal2-3.11/numpy/core/src/common/npy_sort.h', 'build/src.macosx-10.9-universal2-3.11/numpy/core/src/common/npy_partition.h', 'build/src.macosx-10.9-universal2-3.11/numpy/core/src/common/npy_binsearch.h', 'build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/funcs.inc', 'build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/simd.inc', 'build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops.h', 'build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_utils.h', 'build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/matmul.h', 'build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/clip.h', 'build/src.macosx-10.9-universal2-3.11/numpy/core/src/common/templ_common.h', 'build/src.macosx-10.9-universal2-3.11/numpy/core/include/numpy/config.h', 'build/src.macosx-10.9-universal2-3.11/numpy/core/include/numpy/_numpyconfig.h', 'build/src.macosx-10.9-universal2-3.11/numpy/core/include/numpy/__multiarray_api.h', 'build/src.macosx-10.9-universal2-3.11/numpy/core/include/numpy/__ufunc_api.h']
  building extension "numpy.core._umath_tests" sources
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/_umath_tests.c
  building extension "numpy.core._rational_tests" sources
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/_rational_tests.c
  building extension "numpy.core._struct_ufunc_tests" sources
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/_struct_ufunc_tests.c
  building extension "numpy.core._operand_flag_tests" sources
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/_operand_flag_tests.c
  building extension "numpy.core._simd" sources
  creating build/src.macosx-10.9-universal2-3.11/numpy/core/src/_simd
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/_simd/_simd_inc.h
    adding 'build/src.macosx-10.9-universal2-3.11/numpy/core/src/_simd' to include_dirs.
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/_simd/_simd_data.inc
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/core/src/_simd/_simd.dispatch.c
  numpy.core - nothing done with h_files = ['build/src.macosx-10.9-universal2-3.11/numpy/core/src/_simd/_simd_inc.h', 'build/src.macosx-10.9-universal2-3.11/numpy/core/src/_simd/_simd_data.inc']
  building extension "numpy.fft._pocketfft_internal" sources
  building extension "numpy.linalg.lapack_lite" sources
  creating build/src.macosx-10.9-universal2-3.11/numpy/linalg
  building extension "numpy.linalg._umath_linalg" sources
  conv_template:> build/src.macosx-10.9-universal2-3.11/numpy/linalg/umath_linalg.c
  building extension "numpy.random._mt19937" sources
  building extension "numpy.random._philox" sources
  building extension "numpy.random._pcg64" sources
  building extension "numpy.random._sfc64" sources
  building extension "numpy.random._common" sources
  building extension "numpy.random.bit_generator" sources
  building extension "numpy.random._generator" sources
  building extension "numpy.random._bounded_integers" sources
  building extension "numpy.random.mtrand" sources
  building data_files sources
  build_src: building npy-pkg config files
  running build_py
  creating build/lib.macosx-10.9-universal2-3.11
  creating build/lib.macosx-10.9-universal2-3.11/numpy
  copying numpy/conftest.py -> build/lib.macosx-10.9-universal2-3.11/numpy
  copying numpy/version.py -> build/lib.macosx-10.9-universal2-3.11/numpy
  copying numpy/_version.py -> build/lib.macosx-10.9-universal2-3.11/numpy
  copying numpy/_globals.py -> build/lib.macosx-10.9-universal2-3.11/numpy
  copying numpy/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy
  copying numpy/dual.py -> build/lib.macosx-10.9-universal2-3.11/numpy
  copying numpy/_distributor_init.py -> build/lib.macosx-10.9-universal2-3.11/numpy
  copying numpy/setup.py -> build/lib.macosx-10.9-universal2-3.11/numpy
  copying numpy/ctypeslib.py -> build/lib.macosx-10.9-universal2-3.11/numpy
  copying numpy/matlib.py -> build/lib.macosx-10.9-universal2-3.11/numpy
  copying numpy/_pytesttester.py -> build/lib.macosx-10.9-universal2-3.11/numpy
  copying build/src.macosx-10.9-universal2-3.11/numpy/__config__.py -> build/lib.macosx-10.9-universal2-3.11/numpy
  creating build/lib.macosx-10.9-universal2-3.11/numpy/compat
  copying numpy/compat/py3k.py -> build/lib.macosx-10.9-universal2-3.11/numpy/compat
  copying numpy/compat/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/compat
  copying numpy/compat/setup.py -> build/lib.macosx-10.9-universal2-3.11/numpy/compat
  copying numpy/compat/_inspect.py -> build/lib.macosx-10.9-universal2-3.11/numpy/compat
  creating build/lib.macosx-10.9-universal2-3.11/numpy/compat/tests
  copying numpy/compat/tests/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/compat/tests
  copying numpy/compat/tests/test_compat.py -> build/lib.macosx-10.9-universal2-3.11/numpy/compat/tests
  creating build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/umath.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/fromnumeric.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/_dtype.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/_add_newdocs.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/_methods.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/_internal.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/_string_helpers.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/multiarray.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/_asarray.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/records.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/_add_newdocs_scalars.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/setup_common.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/memmap.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/overrides.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/getlimits.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/_dtype_ctypes.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/defchararray.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/shape_base.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/machar.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/setup.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/numeric.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/function_base.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/einsumfunc.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/umath_tests.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/_ufunc_config.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/_exceptions.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/numerictypes.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/_type_aliases.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/cversions.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/arrayprint.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  copying numpy/core/code_generators/generate_numpy_api.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core
  creating build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_numerictypes.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_scalar_methods.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_scalarmath.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_item_selection.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_array_coercion.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_machar.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_unicode.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_cpu_dispatcher.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_arrayprint.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_scalarbuffer.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_indexerrors.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_print.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_half.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_arraymethod.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_mem_overlap.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_shape_base.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_deprecations.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_errstate.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_records.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_simd.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_scalarinherit.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_indexing.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_umath.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_numeric.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_function_base.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_datetime.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test__exceptions.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_extint128.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_cython.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_umath_complex.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/_locales.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_defchararray.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_conversion_utils.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_scalarprint.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_casting_unittests.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_abc.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_ufunc.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_dtype.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_umath_accuracy.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_simd_module.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_getlimits.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_einsum.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_api.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_longdouble.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_overrides.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_scalar_ctors.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_multiarray.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_memmap.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_nditer.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_cpu_features.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_protocols.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_argparse.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  copying numpy/core/tests/test_regression.py -> build/lib.macosx-10.9-universal2-3.11/numpy/core/tests
  creating build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/unixccompiler.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/numpy_distribution.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/conv_template.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/cpuinfo.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/ccompiler.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/msvc9compiler.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/npy_pkg_config.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/misc_util.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/log.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/line_endings.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/lib2def.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/pathccompiler.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/system_info.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/core.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/exec_command.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/from_template.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/mingw32ccompiler.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/setup.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/extension.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/msvccompiler.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/intelccompiler.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/_shell_utils.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying numpy/distutils/ccompiler_opt.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  copying build/src.macosx-10.9-universal2-3.11/numpy/distutils/__config__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils
  creating build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/build.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/config_compiler.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/build_ext.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/config.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/install_headers.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/build_py.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/build_src.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/sdist.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/build_scripts.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/bdist_rpm.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/install_clib.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/build_clib.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/autodist.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/egg_info.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/install.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/develop.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  copying numpy/distutils/command/install_data.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/command
  creating build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/gnu.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/compaq.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/intel.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/none.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/nag.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/pg.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/ibm.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/sun.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/nv.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/lahey.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/g95.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/mips.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/hpux.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/environment.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/pathf95.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/fujitsu.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/absoft.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  copying numpy/distutils/fcompiler/vast.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/fcompiler
  creating build/lib.macosx-10.9-universal2-3.11/numpy/distutils/tests
  copying numpy/distutils/tests/test_system_info.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/tests
  copying numpy/distutils/tests/test_ccompiler_opt_conf.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/tests
  copying numpy/distutils/tests/test_mingw32ccompiler.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/tests
  copying numpy/distutils/tests/test_from_template.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/tests
  copying numpy/distutils/tests/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/tests
  copying numpy/distutils/tests/test_fcompiler_intel.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/tests
  copying numpy/distutils/tests/test_misc_util.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/tests
  copying numpy/distutils/tests/test_fcompiler.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/tests
  copying numpy/distutils/tests/test_build_ext.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/tests
  copying numpy/distutils/tests/test_shell_utils.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/tests
  copying numpy/distutils/tests/test_exec_command.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/tests
  copying numpy/distutils/tests/test_npy_pkg_config.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/tests
  copying numpy/distutils/tests/test_fcompiler_nagfor.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/tests
  copying numpy/distutils/tests/test_ccompiler_opt.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/tests
  copying numpy/distutils/tests/test_fcompiler_gnu.py -> build/lib.macosx-10.9-universal2-3.11/numpy/distutils/tests
  creating build/lib.macosx-10.9-universal2-3.11/numpy/doc
  copying numpy/doc/constants.py -> build/lib.macosx-10.9-universal2-3.11/numpy/doc
  copying numpy/doc/ufuncs.py -> build/lib.macosx-10.9-universal2-3.11/numpy/doc
  copying numpy/doc/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/doc
  creating build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/cfuncs.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/common_rules.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/crackfortran.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/cb_rules.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/rules.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/f2py2e.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/func2subr.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/__version__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/diagnose.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/setup.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/capi_maps.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/f90mod_rules.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/f2py_testing.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/use_rules.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/auxfuncs.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  copying numpy/f2py/__main__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py
  creating build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_mixed.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_return_logical.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_assumed_shape.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_common.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_kind.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_array_from_pyobj.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_return_real.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/util.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_size.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_callback.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_string.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_module_doc.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_quoted_character.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_parameter.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_abstract_interface.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_semicolon_split.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_compile_function.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_block_docstring.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_return_integer.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_return_character.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_return_complex.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_crackfortran.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  copying numpy/f2py/tests/test_regression.py -> build/lib.macosx-10.9-universal2-3.11/numpy/f2py/tests
  creating build/lib.macosx-10.9-universal2-3.11/numpy/fft
  copying numpy/fft/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/fft
  copying numpy/fft/setup.py -> build/lib.macosx-10.9-universal2-3.11/numpy/fft
  copying numpy/fft/helper.py -> build/lib.macosx-10.9-universal2-3.11/numpy/fft
  copying numpy/fft/_pocketfft.py -> build/lib.macosx-10.9-universal2-3.11/numpy/fft
  creating build/lib.macosx-10.9-universal2-3.11/numpy/fft/tests
  copying numpy/fft/tests/test_pocketfft.py -> build/lib.macosx-10.9-universal2-3.11/numpy/fft/tests
  copying numpy/fft/tests/test_helper.py -> build/lib.macosx-10.9-universal2-3.11/numpy/fft/tests
  copying numpy/fft/tests/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/fft/tests
  creating build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/_iotools.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/mixins.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/nanfunctions.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/recfunctions.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/histograms.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/scimath.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/_version.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/user_array.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/format.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/twodim_base.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/index_tricks.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/npyio.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/shape_base.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/setup.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/stride_tricks.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/utils.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/arrayterator.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/function_base.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/arraysetops.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/arraypad.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/type_check.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/polynomial.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/_datasource.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  copying numpy/lib/ufunclike.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib
  creating build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_type_check.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_utils.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_financial_expired.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_twodim_base.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_polynomial.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test__iotools.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_shape_base.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_ufunclike.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_index_tricks.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_arrayterator.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test__version.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_io.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_arraysetops.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_function_base.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_arraypad.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_mixins.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_packbits.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test__datasource.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_stride_tricks.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_recfunctions.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_nanfunctions.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_format.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_histograms.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  copying numpy/lib/tests/test_regression.py -> build/lib.macosx-10.9-universal2-3.11/numpy/lib/tests
  creating build/lib.macosx-10.9-universal2-3.11/numpy/linalg
  copying numpy/linalg/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/linalg
  copying numpy/linalg/setup.py -> build/lib.macosx-10.9-universal2-3.11/numpy/linalg
  copying numpy/linalg/linalg.py -> build/lib.macosx-10.9-universal2-3.11/numpy/linalg
  creating build/lib.macosx-10.9-universal2-3.11/numpy/linalg/tests
  copying numpy/linalg/tests/test_linalg.py -> build/lib.macosx-10.9-universal2-3.11/numpy/linalg/tests
  copying numpy/linalg/tests/test_deprecations.py -> build/lib.macosx-10.9-universal2-3.11/numpy/linalg/tests
  copying numpy/linalg/tests/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/linalg/tests
  copying numpy/linalg/tests/test_build.py -> build/lib.macosx-10.9-universal2-3.11/numpy/linalg/tests
  copying numpy/linalg/tests/test_regression.py -> build/lib.macosx-10.9-universal2-3.11/numpy/linalg/tests
  creating build/lib.macosx-10.9-universal2-3.11/numpy/ma
  copying numpy/ma/extras.py -> build/lib.macosx-10.9-universal2-3.11/numpy/ma
  copying numpy/ma/testutils.py -> build/lib.macosx-10.9-universal2-3.11/numpy/ma
  copying numpy/ma/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/ma
  copying numpy/ma/core.py -> build/lib.macosx-10.9-universal2-3.11/numpy/ma
  copying numpy/ma/bench.py -> build/lib.macosx-10.9-universal2-3.11/numpy/ma
  copying numpy/ma/setup.py -> build/lib.macosx-10.9-universal2-3.11/numpy/ma
  copying numpy/ma/timer_comparison.py -> build/lib.macosx-10.9-universal2-3.11/numpy/ma
  copying numpy/ma/mrecords.py -> build/lib.macosx-10.9-universal2-3.11/numpy/ma
  creating build/lib.macosx-10.9-universal2-3.11/numpy/ma/tests
  copying numpy/ma/tests/test_old_ma.py -> build/lib.macosx-10.9-universal2-3.11/numpy/ma/tests
  copying numpy/ma/tests/test_core.py -> build/lib.macosx-10.9-universal2-3.11/numpy/ma/tests
  copying numpy/ma/tests/test_deprecations.py -> build/lib.macosx-10.9-universal2-3.11/numpy/ma/tests
  copying numpy/ma/tests/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/ma/tests
  copying numpy/ma/tests/test_subclassing.py -> build/lib.macosx-10.9-universal2-3.11/numpy/ma/tests
  copying numpy/ma/tests/test_extras.py -> build/lib.macosx-10.9-universal2-3.11/numpy/ma/tests
  copying numpy/ma/tests/test_mrecords.py -> build/lib.macosx-10.9-universal2-3.11/numpy/ma/tests
  copying numpy/ma/tests/test_regression.py -> build/lib.macosx-10.9-universal2-3.11/numpy/ma/tests
  creating build/lib.macosx-10.9-universal2-3.11/numpy/matrixlib
  copying numpy/matrixlib/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/matrixlib
  copying numpy/matrixlib/setup.py -> build/lib.macosx-10.9-universal2-3.11/numpy/matrixlib
  copying numpy/matrixlib/defmatrix.py -> build/lib.macosx-10.9-universal2-3.11/numpy/matrixlib
  creating build/lib.macosx-10.9-universal2-3.11/numpy/matrixlib/tests
  copying numpy/matrixlib/tests/test_matrix_linalg.py -> build/lib.macosx-10.9-universal2-3.11/numpy/matrixlib/tests
  copying numpy/matrixlib/tests/test_defmatrix.py -> build/lib.macosx-10.9-universal2-3.11/numpy/matrixlib/tests
  copying numpy/matrixlib/tests/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/matrixlib/tests
  copying numpy/matrixlib/tests/test_interaction.py -> build/lib.macosx-10.9-universal2-3.11/numpy/matrixlib/tests
  copying numpy/matrixlib/tests/test_numeric.py -> build/lib.macosx-10.9-universal2-3.11/numpy/matrixlib/tests
  copying numpy/matrixlib/tests/test_masked_matrix.py -> build/lib.macosx-10.9-universal2-3.11/numpy/matrixlib/tests
  copying numpy/matrixlib/tests/test_multiarray.py -> build/lib.macosx-10.9-universal2-3.11/numpy/matrixlib/tests
  copying numpy/matrixlib/tests/test_regression.py -> build/lib.macosx-10.9-universal2-3.11/numpy/matrixlib/tests
  creating build/lib.macosx-10.9-universal2-3.11/numpy/polynomial
  copying numpy/polynomial/laguerre.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial
  copying numpy/polynomial/_polybase.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial
  copying numpy/polynomial/polyutils.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial
  copying numpy/polynomial/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial
  copying numpy/polynomial/setup.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial
  copying numpy/polynomial/hermite_e.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial
  copying numpy/polynomial/chebyshev.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial
  copying numpy/polynomial/polynomial.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial
  copying numpy/polynomial/legendre.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial
  copying numpy/polynomial/hermite.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial
  creating build/lib.macosx-10.9-universal2-3.11/numpy/polynomial/tests
  copying numpy/polynomial/tests/test_chebyshev.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial/tests
  copying numpy/polynomial/tests/test_hermite_e.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial/tests
  copying numpy/polynomial/tests/test_polynomial.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial/tests
  copying numpy/polynomial/tests/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial/tests
  copying numpy/polynomial/tests/test_laguerre.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial/tests
  copying numpy/polynomial/tests/test_legendre.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial/tests
  copying numpy/polynomial/tests/test_printing.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial/tests
  copying numpy/polynomial/tests/test_hermite.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial/tests
  copying numpy/polynomial/tests/test_classes.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial/tests
  copying numpy/polynomial/tests/test_polyutils.py -> build/lib.macosx-10.9-universal2-3.11/numpy/polynomial/tests
  creating build/lib.macosx-10.9-universal2-3.11/numpy/random
  copying numpy/random/_pickle.py -> build/lib.macosx-10.9-universal2-3.11/numpy/random
  copying numpy/random/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/random
  copying numpy/random/setup.py -> build/lib.macosx-10.9-universal2-3.11/numpy/random
  creating build/lib.macosx-10.9-universal2-3.11/numpy/random/tests
  copying numpy/random/tests/test_generator_mt19937.py -> build/lib.macosx-10.9-universal2-3.11/numpy/random/tests
  copying numpy/random/tests/test_randomstate.py -> build/lib.macosx-10.9-universal2-3.11/numpy/random/tests
  copying numpy/random/tests/test_direct.py -> build/lib.macosx-10.9-universal2-3.11/numpy/random/tests
  copying numpy/random/tests/test_extending.py -> build/lib.macosx-10.9-universal2-3.11/numpy/random/tests
  copying numpy/random/tests/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/random/tests
  copying numpy/random/tests/test_smoke.py -> build/lib.macosx-10.9-universal2-3.11/numpy/random/tests
  copying numpy/random/tests/test_randomstate_regression.py -> build/lib.macosx-10.9-universal2-3.11/numpy/random/tests
  copying numpy/random/tests/test_seed_sequence.py -> build/lib.macosx-10.9-universal2-3.11/numpy/random/tests
  copying numpy/random/tests/test_generator_mt19937_regressions.py -> build/lib.macosx-10.9-universal2-3.11/numpy/random/tests
  copying numpy/random/tests/test_random.py -> build/lib.macosx-10.9-universal2-3.11/numpy/random/tests
  copying numpy/random/tests/test_regression.py -> build/lib.macosx-10.9-universal2-3.11/numpy/random/tests
  creating build/lib.macosx-10.9-universal2-3.11/numpy/testing
  copying numpy/testing/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/testing
  copying numpy/testing/setup.py -> build/lib.macosx-10.9-universal2-3.11/numpy/testing
  copying numpy/testing/utils.py -> build/lib.macosx-10.9-universal2-3.11/numpy/testing
  copying numpy/testing/print_coercion_tables.py -> build/lib.macosx-10.9-universal2-3.11/numpy/testing
  creating build/lib.macosx-10.9-universal2-3.11/numpy/testing/_private
  copying numpy/testing/_private/nosetester.py -> build/lib.macosx-10.9-universal2-3.11/numpy/testing/_private
  copying numpy/testing/_private/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/testing/_private
  copying numpy/testing/_private/noseclasses.py -> build/lib.macosx-10.9-universal2-3.11/numpy/testing/_private
  copying numpy/testing/_private/utils.py -> build/lib.macosx-10.9-universal2-3.11/numpy/testing/_private
  copying numpy/testing/_private/parameterized.py -> build/lib.macosx-10.9-universal2-3.11/numpy/testing/_private
  copying numpy/testing/_private/decorators.py -> build/lib.macosx-10.9-universal2-3.11/numpy/testing/_private
  creating build/lib.macosx-10.9-universal2-3.11/numpy/testing/tests
  copying numpy/testing/tests/test_utils.py -> build/lib.macosx-10.9-universal2-3.11/numpy/testing/tests
  copying numpy/testing/tests/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/testing/tests
  copying numpy/testing/tests/test_doctesting.py -> build/lib.macosx-10.9-universal2-3.11/numpy/testing/tests
  creating build/lib.macosx-10.9-universal2-3.11/numpy/typing
  copying numpy/typing/_char_codes.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing
  copying numpy/typing/_extended_precision.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing
  copying numpy/typing/_callable.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing
  copying numpy/typing/_generic_alias.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing
  copying numpy/typing/_nbit.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing
  copying numpy/typing/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing
  copying numpy/typing/_dtype_like.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing
  copying numpy/typing/mypy_plugin.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing
  copying numpy/typing/setup.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing
  copying numpy/typing/_array_like.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing
  copying numpy/typing/_scalars.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing
  copying numpy/typing/_shape.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing
  copying numpy/typing/_add_docstring.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing
  creating build/lib.macosx-10.9-universal2-3.11/numpy/typing/tests
  copying numpy/typing/tests/test_isfile.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing/tests
  copying numpy/typing/tests/test_typing.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing/tests
  copying numpy/typing/tests/test_runtime.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing/tests
  copying numpy/typing/tests/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing/tests
  copying numpy/typing/tests/test_generic_alias.py -> build/lib.macosx-10.9-universal2-3.11/numpy/typing/tests
  creating build/lib.macosx-10.9-universal2-3.11/numpy/tests
  copying numpy/tests/test_warnings.py -> build/lib.macosx-10.9-universal2-3.11/numpy/tests
  copying numpy/tests/test_matlib.py -> build/lib.macosx-10.9-universal2-3.11/numpy/tests
  copying numpy/tests/test_ctypeslib.py -> build/lib.macosx-10.9-universal2-3.11/numpy/tests
  copying numpy/tests/test_numpy_version.py -> build/lib.macosx-10.9-universal2-3.11/numpy/tests
  copying numpy/tests/__init__.py -> build/lib.macosx-10.9-universal2-3.11/numpy/tests
  copying numpy/tests/test_reloading.py -> build/lib.macosx-10.9-universal2-3.11/numpy/tests
  copying numpy/tests/test_public_api.py -> build/lib.macosx-10.9-universal2-3.11/numpy/tests
  copying numpy/tests/test_scripts.py -> build/lib.macosx-10.9-universal2-3.11/numpy/tests
  UPDATING build/lib.macosx-10.9-universal2-3.11/numpy/_version.py
  set build/lib.macosx-10.9-universal2-3.11/numpy/_version.py to '1.21.1'
  running build_clib
  customize UnixCCompiler
  customize UnixCCompiler using new_build_clib
  CCompilerOpt.__init__[948] : unable to detect CPU architecture which lead to disable the optimization. check dist_info:<<
  ('macosx-10.9-universal2', 'clang', '-Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -ffp-exception-behavior=strict')
  >>
  CCompilerOpt.cc_test_flags[1008] : testing flags (-march=native)
  C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g
  
  creating /var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/tmp9fkpontu/private
  creating /var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/tmp9fkpontu/private/var
  creating /var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/tmp9fkpontu/private/var/folders
  creating /var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/tmp9fkpontu/private/var/folders/js
  creating /var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/tmp9fkpontu/private/var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn
  creating /var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/tmp9fkpontu/private/var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T
  creating /var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/tmp9fkpontu/private/var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/pip-install-bqxq7z4_
  creating /var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/tmp9fkpontu/private/var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/pip-install-bqxq7z4_/numpy_7a95a59cf3dd4798b2039e070138356e
  creating /var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/tmp9fkpontu/private/var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/pip-install-bqxq7z4_/numpy_7a95a59cf3dd4798b2039e070138356e/numpy
  creating /var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/tmp9fkpontu/private/var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/pip-install-bqxq7z4_/numpy_7a95a59cf3dd4798b2039e070138356e/numpy/distutils
  creating /var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/tmp9fkpontu/private/var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/pip-install-bqxq7z4_/numpy_7a95a59cf3dd4798b2039e070138356e/numpy/distutils/checks
  compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath -c'
  extra options: '-march=native'
  CCompilerOpt.dist_test[576] : CCompilerOpt._dist_test_spawn[711] : Command (clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath -c /private/var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/pip-install-bqxq7z4_/numpy_7a95a59cf3dd4798b2039e070138356e/numpy/distutils/checks/test_flags.c -o /var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/tmp9fkpontu/private/var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/pip-install-bqxq7z4_/numpy_7a95a59cf3dd4798b2039e070138356e/numpy/distutils/checks/test_flags.o -MMD -MF /var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/tmp9fkpontu/private/var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/pip-install-bqxq7z4_/numpy_7a95a59cf3dd4798b2039e070138356e/numpy/distutils/checks/test_flags.o.d -march=native) failed with exit status 1 output ->
  clang: error: the clang compiler does not support '-march=native'
  
  CCompilerOpt.cc_test_flags[1012] : testing failed
  CCompilerOpt.cc_test_flags[1008] : testing flags (-O3)
  C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g
  
  compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath -c'
  extra options: '-O3'
  CCompilerOpt.cc_test_flags[1008] : testing flags (-Werror)
  C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g
  
  compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath -c'
  extra options: '-Werror'
  CCompilerOpt.__init__[1696] : check requested baseline
  CCompilerOpt.__init__[1705] : check requested dispatch-able features
  CCompilerOpt.__init__[1721] : initialize targets groups
  CCompilerOpt.__init__[1723] : parse target group simd_test
  CCompilerOpt._parse_target_tokens[1934] : skip targets (VSX2 FMA4 AVX512F NEON (FMA3 AVX2) SSE2 AVX512_SKX SSE42 VSX3 VSX XOP ASIMD) not part of baseline or dispatch-able features
  CCompilerOpt.generate_dispatch_header[2267] : generate CPU dispatch header: (build/src.macosx-10.9-universal2-3.11/numpy/distutils/include/npy_cpu_dispatch_config.h)
  CCompilerOpt.generate_dispatch_header[2276] : dispatch header dir build/src.macosx-10.9-universal2-3.11/numpy/distutils/include does not exist, creating it
  building 'npymath' library
  compiling C sources
  C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g
  
  creating build/temp.macosx-10.9-universal2-3.11
  creating build/temp.macosx-10.9-universal2-3.11/numpy
  creating build/temp.macosx-10.9-universal2-3.11/numpy/core
  creating build/temp.macosx-10.9-universal2-3.11/numpy/core/src
  creating build/temp.macosx-10.9-universal2-3.11/numpy/core/src/npymath
  creating build/temp.macosx-10.9-universal2-3.11/build
  creating build/temp.macosx-10.9-universal2-3.11/build/src.macosx-10.9-universal2-3.11
  creating build/temp.macosx-10.9-universal2-3.11/build/src.macosx-10.9-universal2-3.11/numpy
  creating build/temp.macosx-10.9-universal2-3.11/build/src.macosx-10.9-universal2-3.11/numpy/core
  creating build/temp.macosx-10.9-universal2-3.11/build/src.macosx-10.9-universal2-3.11/numpy/core/src
  creating build/temp.macosx-10.9-universal2-3.11/build/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath
  compile options: '-Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath -Inumpy/core/include -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/include/numpy -Ibuild/src.macosx-10.9-universal2-3.11/numpy/distutils/include -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath -c'
  clang: numpy/core/src/npymath/npy_math.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath/npy_math_complex.c
  clang: numpy/core/src/npymath/halffloat.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath/ieee754.c
  xcrun: adding 4 object files to build/temp.macosx-10.9-universal2-3.11/libnpymath.a
  warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: archive library: build/temp.macosx-10.9-universal2-3.11/libnpymath.a will be fat and ar(1) will not be able to operate on it
  ranlib:@ build/temp.macosx-10.9-universal2-3.11/libnpymath.a
  building 'npyrandom' library
  compiling C sources
  C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g
  
  creating build/temp.macosx-10.9-universal2-3.11/numpy/random
  creating build/temp.macosx-10.9-universal2-3.11/numpy/random/src
  creating build/temp.macosx-10.9-universal2-3.11/numpy/random/src/distributions
  compile options: '-Inumpy/core/include -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/include/numpy -Ibuild/src.macosx-10.9-universal2-3.11/numpy/distutils/include -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath -c'
  clang: numpy/random/src/distributions/logfactorial.c
  clang: numpy/random/src/distributions/distributions.c
  clang: numpy/random/src/distributions/random_mvhg_count.c
  clang: numpy/random/src/distributions/random_mvhg_marginals.c
  clang: numpy/random/src/distributions/random_hypergeometric.c
  xcrun: adding 5 object files to build/temp.macosx-10.9-universal2-3.11/libnpyrandom.a
  warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: archive library: build/temp.macosx-10.9-universal2-3.11/libnpyrandom.a will be fat and ar(1) will not be able to operate on it
  ranlib:@ build/temp.macosx-10.9-universal2-3.11/libnpyrandom.a
  running build_ext
  customize UnixCCompiler
  customize UnixCCompiler using new_build_ext
  CCompilerOpt.__init__[781] : hit the memory cache
  CCompilerOpt.generate_dispatch_header[2267] : generate CPU dispatch header: (build/src.macosx-10.9-universal2-3.11/numpy/distutils/include/npy_cpu_dispatch_config.h)
  building 'numpy.core._multiarray_tests' extension
  compiling C sources
  C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g
  
  creating build/temp.macosx-10.9-universal2-3.11/build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray
  creating build/temp.macosx-10.9-universal2-3.11/numpy/core/src/common
  compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/include/numpy -Ibuild/src.macosx-10.9-universal2-3.11/numpy/distutils/include -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath -c'
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/_multiarray_tests.c
  clang: numpy/core/src/common/mem_overlap.c
  clang: numpy/core/src/common/npy_argparse.c
  clang -bundle -undefined dynamic_lookup -arch arm64 -arch x86_64 -g build/temp.macosx-10.9-universal2-3.11/build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/_multiarray_tests.o build/temp.macosx-10.9-universal2-3.11/numpy/core/src/common/mem_overlap.o build/temp.macosx-10.9-universal2-3.11/numpy/core/src/common/npy_argparse.o -Lbuild/temp.macosx-10.9-universal2-3.11 -lnpymath -o build/lib.macosx-10.9-universal2-3.11/numpy/core/_multiarray_tests.cpython-311-darwin.so
  building 'numpy.core._multiarray_umath' extension
  compiling C dispatch-able sources
  CCompilerOpt.parse_targets[1763] : looking for '@targets' inside ->  build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_unary_fp.dispatch.c
  CCompilerOpt._parse_target_tokens[1934] : skip targets (VSX2 SSE2 NEON) not part of baseline or dispatch-able features
  CCompilerOpt._parse_target_tokens[1958] : policy 'MAXOPT' is ON
  CCompilerOpt._parse_policy_maxopt[2067] : debug mode is detected, policy 'maxopt' is skipped.
  CCompilerOpt._generate_config[2501] : generate dispatched config ->  build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_unary_fp.dispatch.h
  CCompilerOpt.parse_targets[1763] : looking for '@targets' inside ->  build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_arithm_fp.dispatch.c
  CCompilerOpt._parse_target_tokens[1934] : skip targets (SSE2 AVX512F AVX2) not part of baseline or dispatch-able features
  CCompilerOpt._parse_target_tokens[1958] : policy 'MAXOPT' is ON
  CCompilerOpt._parse_policy_maxopt[2067] : debug mode is detected, policy 'maxopt' is skipped.
  CCompilerOpt._generate_config[2501] : generate dispatched config ->  build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_arithm_fp.dispatch.h
  CCompilerOpt.parse_targets[1763] : looking for '@targets' inside ->  build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_arithmetic.dispatch.c
  CCompilerOpt._parse_target_tokens[1934] : skip targets (VSX2 AVX512F SSE2 AVX512_SKX AVX2 NEON SSE41) not part of baseline or dispatch-able features
  CCompilerOpt._parse_target_tokens[1958] : policy 'MAXOPT' is ON
  CCompilerOpt._parse_policy_maxopt[2067] : debug mode is detected, policy 'maxopt' is skipped.
  CCompilerOpt._generate_config[2501] : generate dispatched config ->  build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_arithmetic.dispatch.h
  CCompilerOpt.parse_targets[1763] : looking for '@targets' inside ->  build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_trigonometric.dispatch.c
  CCompilerOpt._parse_target_tokens[1934] : skip targets (VSX2 (FMA3 AVX2) NEON_VFPV4 AVX512F) not part of baseline or dispatch-able features
  CCompilerOpt._parse_target_tokens[1958] : policy 'MAXOPT' is ON
  CCompilerOpt._parse_policy_maxopt[2067] : debug mode is detected, policy 'maxopt' is skipped.
  CCompilerOpt._generate_config[2501] : generate dispatched config ->  build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_trigonometric.dispatch.h
  CCompilerOpt.parse_targets[1763] : looking for '@targets' inside ->  build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_exponent_log.dispatch.c
  CCompilerOpt._parse_target_tokens[1934] : skip targets ((FMA3 AVX2) AVX512_SKX AVX512F) not part of baseline or dispatch-able features
  CCompilerOpt._parse_target_tokens[1958] : policy 'MAXOPT' is ON
  CCompilerOpt._parse_policy_maxopt[2067] : debug mode is detected, policy 'maxopt' is skipped.
  CCompilerOpt._generate_config[2501] : generate dispatched config ->  build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_exponent_log.dispatch.h
  C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g
  
  creating build/temp.macosx-10.9-universal2-3.11/build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath
  compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=3 -DHAVE_CBLAS -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/umath -Inumpy/core/include -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/include/numpy -Ibuild/src.macosx-10.9-universal2-3.11/numpy/distutils/include -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath -c'
  extra options: '-msse3 -I/System/Library/Frameworks/vecLib.framework/Headers'
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_arithm_fp.dispatch.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_arithmetic.dispatch.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_unary_fp.dispatch.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_exponent_log.dispatch.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops_trigonometric.dispatch.c
  numpy/core/src/umath/loops_arithm_fp.dispatch.c.src:454:1: warning: unused function 'run_binary_simd_add_LONGDOUBLE' [-Wunused-function]
  run_binary_simd_add_LONGDOUBLE(char **args, npy_intp const *dimensions, npy_intp const *steps)
  ^
  numpy/core/src/umath/loops_arithm_fp.dispatch.c.src:454:1: warning: unused function 'run_binary_simd_subtract_LONGDOUBLE' [-Wunused-function]
  run_binary_simd_subtract_LONGDOUBLE(char **args, npy_intp const *dimensions, npy_intp const *steps)
  ^
  numpy/core/src/umath/loops_arithm_fp.dispatch.c.src:454:1: warning: unused function 'run_binary_simd_multiply_LONGDOUBLE' [-Wunused-function]
  run_binary_simd_multiply_LONGDOUBLE(char **args, npy_intp const *dimensions, npy_intp const *steps)
  ^
  numpy/core/src/umath/loops_arithm_fp.dispatch.c.src:454:1: warning: unused function 'run_binary_simd_divide_LONGDOUBLE' [-Wunused-function]
  run_binary_simd_divide_LONGDOUBLE(char **args, npy_intp const *dimensions, npy_intp const *steps)
  ^
  4 warnings generated.
  numpy/core/src/umath/loops_arithm_fp.dispatch.c.src:454:1: warning: unused function 'run_binary_simd_add_LONGDOUBLE' [-Wunused-function]
  run_binary_simd_add_LONGDOUBLE(char **args, npy_intp const *dimensions, npy_intp const *steps)
  ^
  numpy/core/src/umath/loops_arithm_fp.dispatch.c.src:454:1: warning: unused function 'run_binary_simd_subtract_LONGDOUBLE' [-Wunused-function]
  run_binary_simd_subtract_LONGDOUBLE(char **args, npy_intp const *dimensions, npy_intp const *steps)
  ^
  numpy/core/src/umath/loops_arithm_fp.dispatch.c.src:454:1: warning: unused function 'run_binary_simd_multiply_LONGDOUBLE' [-Wunused-function]
  run_binary_simd_multiply_LONGDOUBLE(char **args, npy_intp const *dimensions, npy_intp const *steps)
  ^
  numpy/core/src/umath/loops_arithm_fp.dispatch.c.src:454:1: warning: unused function 'run_binary_simd_divide_LONGDOUBLE' [-Wunused-function]
  run_binary_simd_divide_LONGDOUBLE(char **args, npy_intp const *dimensions, npy_intp const *steps)
  ^
  4 warnings generated.
  compiling C sources
  C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g
  
  creating build/temp.macosx-10.9-universal2-3.11/numpy/core/src/multiarray
  creating build/temp.macosx-10.9-universal2-3.11/build/src.macosx-10.9-universal2-3.11/numpy/core/src/npysort
  creating build/temp.macosx-10.9-universal2-3.11/numpy/core/src/umath
  creating build/temp.macosx-10.9-universal2-3.11/build/src.macosx-10.9-universal2-3.11/numpy/core/src/common
  compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=3 -DHAVE_CBLAS -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/umath -Inumpy/core/include -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/include/numpy -Ibuild/src.macosx-10.9-universal2-3.11/numpy/distutils/include -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath -c'
  extra options: '-msse3 -I/System/Library/Frameworks/vecLib.framework/Headers'
  clang: numpy/core/src/multiarray/abstractdtypes.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/arraytypes.c
  clang: numpy/core/src/multiarray/array_assign_scalar.c
  clang: numpy/core/src/multiarray/common.c
  clang: numpy/core/src/multiarray/buffer.c
  clang: numpy/core/src/multiarray/convert_datatype.c
  clang: numpy/core/src/multiarray/datetime.c
  clang: numpy/core/src/multiarray/datetime_busdaycal.c
  numpy/core/src/multiarray/convert_datatype.c:249:9: warning: comparison of nonnull parameter 'dtype' equal to a null pointer is 'false' on first encounter [-Wtautological-pointer-compare]
      if (dtype == NULL) {
          ^~~~~    ~~~~
  build/src.macosx-10.9-universal2-3.11/numpy/core/include/numpy/__multiarray_api.h:112:40: note: declared 'nonnull' here
  NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(2) NPY_GCC_NONNULL(2) PyObject * PyArray_CastToType \
                                         ^
  numpy/core/include/numpy/npy_common.h:81:43: note: expanded from macro 'NPY_GCC_NONNULL'
  #define NPY_GCC_NONNULL(n) __attribute__((nonnull(n)))
                                            ^
  numpy/core/src/multiarray/arraytypes.c.src:65:26: error: expression is not assignable
      Py_TYPE(&new_fields) = NULL;
      ~~~~~~~~~~~~~~~~~~~~ ^
  clang: numpy/core/src/multiarray/alloc.c
  clang: numpy/core/src/multiarray/array_assign_array.c
  clang: numpy/core/src/multiarray/common_dtype.c
  1 error generated.
  clang: numpy/core/src/multiarray/dragon4.c
  clang: numpy/core/src/multiarray/descriptor.c
  clang: numpy/core/src/multiarray/arrayobject.c
  clang: numpy/core/src/multiarray/convert.c
  1 warning generated.
  clang: numpy/core/src/multiarray/arrayfunction_override.c
  clang: numpy/core/src/multiarray/calculation.c
  numpy/core/src/multiarray/convert_datatype.c:249:9: warning: comparison of nonnull parameter 'dtype' equal to a null pointer is 'false' on first encounter [-Wtautological-pointer-compare]
      if (dtype == NULL) {
          ^~~~~    ~~~~
  build/src.macosx-10.9-universal2-3.11/numpy/core/include/numpy/__multiarray_api.h:112:40: note: declared 'nonnull' here
  NPY_NO_EXPORT NPY_STEALS_REF_TO_ARG(2) NPY_GCC_NONNULL(2) PyObject * PyArray_CastToType \
                                         ^
  numpy/core/include/numpy/npy_common.h:81:43: note: expanded from macro 'NPY_GCC_NONNULL'
  #define NPY_GCC_NONNULL(n) __attribute__((nonnull(n)))
                                            ^
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/einsum_sumprod.c
  clang: numpy/core/src/multiarray/hashdescr.c
  1 warning generated.
  clang: numpy/core/src/multiarray/conversion_utils.c
  clang: numpy/core/src/multiarray/item_selection.c
  clang: numpy/core/src/multiarray/compiled_base.c
  clang: numpy/core/src/multiarray/datetime_strings.c
  clang: numpy/core/src/multiarray/dtype_transfer.c
  clang: numpy/core/src/multiarray/legacy_dtype_implementation.c
  clang: numpy/core/src/multiarray/dtypemeta.c
  clang: numpy/core/src/multiarray/ctors.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/lowlevel_strided_loops.c
  clang: numpy/core/src/multiarray/datetime_busday.c
  clang: numpy/core/src/multiarray/methods.c
  clang: numpy/core/src/multiarray/nditer_api.c
  clang: numpy/core/src/multiarray/number.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/einsum.c
  clang: numpy/core/src/multiarray/iterators.c
  numpy/core/src/multiarray/einsum.c.src:408:32: warning: unknown warning group '-Wmaybe-uninitialized', ignored [-Wunknown-warning-option]
  #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
                                 ^
  clang: numpy/core/src/multiarray/shape.c
  clang: numpy/core/src/multiarray/refcount.c
  clang: numpy/core/src/multiarray/multiarraymodule.c
  1 warning generated.
  numpy/core/src/multiarray/einsum.c.src:408:32: warning: unknown warning group '-Wmaybe-uninitialized', ignored [-Wunknown-warning-option]
  #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
                                 ^
  clang: numpy/core/src/multiarray/sequence.c
  1 warning generated.
  clang: numpy/core/src/multiarray/strfuncs.c
  clang: numpy/core/src/multiarray/usertypes.c
  clang: numpy/core/src/multiarray/scalarapi.c
  clang: numpy/core/src/multiarray/temp_elide.c
  clang: numpy/core/src/multiarray/nditer_constr.c
  clang: numpy/core/src/multiarray/vdot.c
  clang: numpy/core/src/multiarray/typeinfo.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/npysort/mergesort.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/npysort/quicksort.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/scalartypes.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/npysort/radixsort.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/npysort/selection.c
  clang: numpy/core/src/multiarray/nditer_pywrap.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/npysort/timsort.c
  clang: numpy/core/src/umath/umathmodule.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/matmul.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/nditer_templ.c
  clang: numpy/core/src/umath/reduction.c
  clang: numpy/core/src/umath/extobj.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/loops.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/scalarmath.c
  clang: numpy/core/src/multiarray/flagsobject.c
  clang: numpy/core/src/multiarray/getset.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/umath/clip.c
  clang: numpy/core/src/umath/override.c
  clang: numpy/core/src/common/array_assign.c
  clang: numpy/core/src/common/npy_argparse.c
  clang: numpy/core/src/common/mem_overlap.c
  clang: numpy/core/src/common/npy_longdouble.c
  clang: numpy/core/src/common/ucsnarrow.c
  clang: numpy/core/src/umath/ufunc_object.c
  clang: numpy/core/src/common/ufunc_override.c
  clang: numpy/core/src/common/cblasfuncs.c
  clang: numpy/core/src/common/numpyos.c
  clang: numpy/core/src/common/python_xerbla.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/common/npy_cpu_features.c
  numpy/core/src/common/npy_cpu_features.c.src:125:1: warning: unused function 'npy__cpu_baseline_fid' [-Wunused-function]
  npy__cpu_baseline_fid(const char *feature)
  ^
  numpy/core/src/common/npy_cpu_features.c.src:138:1: warning: unused function 'npy__cpu_dispatch_fid' [-Wunused-function]
  npy__cpu_dispatch_fid(const char *feature)
  ^
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/npysort/binsearch.c
  2 warnings generated.
  numpy/core/src/common/npy_cpu_features.c.src:125:1: warning: unused function 'npy__cpu_baseline_fid' [-Wunused-function]
  npy__cpu_baseline_fid(const char *feature)
  ^
  numpy/core/src/common/npy_cpu_features.c.src:138:1: warning: unused function 'npy__cpu_dispatch_fid' [-Wunused-function]
  npy__cpu_dispatch_fid(const char *feature)
  ^
  2 warnings generated.
  clang: numpy/core/src/umath/ufunc_type_resolution.c
  clang: build/src.macosx-10.9-universal2-3.11/numpy/core/src/npysort/heapsort.c
  clang: numpy/core/src/multiarray/mapping.c
  error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=3 -DHAVE_CBLAS -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/umath -Inumpy/core/include -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/include/numpy -Ibuild/src.macosx-10.9-universal2-3.11/numpy/distutils/include -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/common -Ibuild/src.macosx-10.9-universal2-3.11/numpy/core/src/npymath -c build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/arraytypes.c -o build/temp.macosx-10.9-universal2-3.11/build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/arraytypes.o -MMD -MF build/temp.macosx-10.9-universal2-3.11/build/src.macosx-10.9-universal2-3.11/numpy/core/src/multiarray/arraytypes.o.d -msse3 -I/System/Library/Frameworks/vecLib.framework/Headers" failed with exit status 1
  
  ########### EXT COMPILER OPTIMIZATION ###########
  Platform      :
    Architecture: unsupported
    Compiler    : clang
  
  CPU baseline  :
    Requested   : optimization disabled
    Enabled     : none
    Flags       : none
    Extra checks: none
    Requested   : optimization disabled
  
  CPU dispatch  :
    Enabled     : none
    Generated   : none
  CCompilerOpt.cache_flush[804] : write cache to path -> /private/var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/pip-install-bqxq7z4_/numpy_7a95a59cf3dd4798b2039e070138356e/build/temp.macosx-10.9-universal2-3.11/ccompiler_opt_cache_ext.py
  
  ########### CLIB COMPILER OPTIMIZATION ###########
  Platform      :
    Architecture: unsupported
    Compiler    : clang
  
  CPU baseline  :
    Requested   : optimization disabled
    Enabled     : none
    Flags       : none
    Extra checks: none
    Requested   : optimization disabled
  
  CPU dispatch  :
    Enabled     : none
    Generated   : none
  CCompilerOpt.cache_flush[804] : write cache to path -> /private/var/folders/js/z0nzng056v5b32z5_jfxwj_r0000gn/T/pip-install-bqxq7z4_/numpy_7a95a59cf3dd4798b2039e070138356e/build/temp.macosx-10.9-universal2-3.11/ccompiler_opt_cache_clib.py
  ----------------------------------------
  ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly

----------
components: macOS
messages: 403325
nosy: Joshuah143, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: pip install numpy not working in 3.11.0a on macOS 11.6
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45394>
_______________________________________

From report at bugs.python.org  Wed Oct  6 16:22:14 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 06 Oct 2021 20:22:14 +0000
Subject: [issue45396] Custom frozen modules get ignored.
Message-ID: <1633551734.9.0.785349509784.issue45396@roundup.psfhosted.org>


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

Recently we added the "-X frozen_modules" CLI option to control whether or not (non-essential) frozen modules get used.  Currently the default is "off", though the plan is to make the default "on".  Regardless, this is problematic for executables with custom frozen modules (where PyImport_FrozenModules is overridden).  If there are custom frozen modules then they should always be used.

Note that there are already other problems with custom frozen modules, to be addressed separately.  (See bpo-45395.)

----------
assignee: eric.snow
components: Interpreter Core
messages: 403336
nosy: brett.cannon, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Custom frozen modules get ignored.
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45396>
_______________________________________

From report at bugs.python.org  Wed Oct  6 16:24:43 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 06 Oct 2021 20:24:43 +0000
Subject: [issue45396] Custom frozen modules get ignored.
In-Reply-To: <1633551734.9.0.785349509784.issue45396@roundup.psfhosted.org>
Message-ID: <1633551883.55.0.433904935514.issue45396@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

(This was motivated by https://github.com/python/cpython/pull/28633#discussion_r720506225.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45396>
_______________________________________

From report at bugs.python.org  Wed Oct  6 16:34:59 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 06 Oct 2021 20:34:59 +0000
Subject: [issue45396] Custom frozen modules get ignored.
In-Reply-To: <1633551734.9.0.785349509784.issue45396@roundup.psfhosted.org>
Message-ID: <1633552499.28.0.5889290766.issue45396@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
keywords: +patch
pull_requests: +27110
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/28776

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45396>
_______________________________________

From report at bugs.python.org  Wed Oct  6 16:49:43 2021
From: report at bugs.python.org (Max)
Date: Wed, 06 Oct 2021 20:49:43 +0000
Subject: [issue45393] help() on operator precedence has confusing entries
 "await" "x" and "not" "x"
In-Reply-To: <1633534428.51.0.112977953361.issue45393@roundup.psfhosted.org>
Message-ID: <1633553383.26.0.115717619487.issue45393@roundup.psfhosted.org>


Max <mh+bugs.python.org at dsi972.fr> added the comment:

Thanks for fixing the typo, didn't knnow how to do that when I spotted it (I'm new to this). 
You also removed Python version 3.6, 3.7, 3.8, however, I just tested on pythonanywhere,
>>> sys.version
'3.7.0 (default, Aug 22 2018, 20:50:05) \n[GCC 5.4.0 20160609]'
So I can confirm that the bug *is* there on 3.7 (so I put this back in the list - unless it was removed in a later 3.7.x (to you mean that?) and put back in later versions...?)
It is also on the Python 3.9.7 I'm running on my laptop, so I'd greatly be surprised if it were not present on the other two versions you also removed.

----------
versions: +Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45393>
_______________________________________

From report at bugs.python.org  Wed Oct  6 17:19:13 2021
From: report at bugs.python.org (Leo Antunes)
Date: Wed, 06 Oct 2021 21:19:13 +0000
Subject: [issue38902] image/webp support in mimetypes
In-Reply-To: <1574548382.26.0.67471558876.issue38902@roundup.psfhosted.org>
Message-ID: <1633555153.66.0.509586349417.issue38902@roundup.psfhosted.org>


Change by Leo Antunes <leo at costela.net>:


----------
nosy: +costela

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38902>
_______________________________________

From report at bugs.python.org  Wed Oct  6 17:50:05 2021
From: report at bugs.python.org (Ammar Askar)
Date: Wed, 06 Oct 2021 21:50:05 +0000
Subject: [issue29505] Submit the re, json, csv,
 & struct modules to oss-fuzz testing
In-Reply-To: <1486587261.97.0.342323514088.issue29505@psf.upfronthosting.co.za>
Message-ID: <1633557005.54.0.464177842619.issue29505@roundup.psfhosted.org>


Change by Ammar Askar <ammar at ammaraskar.com>:


----------
pull_requests: +27111
pull_request: https://github.com/python/cpython/pull/28777

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29505>
_______________________________________

From report at bugs.python.org  Wed Oct  6 18:03:56 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 06 Oct 2021 22:03:56 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <1633551663.5.0.531821025802.issue45395@roundup.psfhosted.org>
Message-ID: <1633557836.89.0.351807343549.issue45395@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
keywords: +patch
pull_requests: +27112
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/28778

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Wed Oct  6 18:04:48 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 06 Oct 2021 22:04:48 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <1633551663.5.0.531821025802.issue45395@roundup.psfhosted.org>
Message-ID: <1633557888.89.0.987093481317.issue45395@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

I've posted a PR that demonstrates a reasonable solution.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Wed Oct  6 19:22:19 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 06 Oct 2021 23:22:19 +0000
Subject: [issue29505] Submit the re, json, csv,
 & struct modules to oss-fuzz testing
In-Reply-To: <1486587261.97.0.342323514088.issue29505@psf.upfronthosting.co.za>
Message-ID: <1633562539.81.0.701540203205.issue29505@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset db72e58ea5940c3942ede9f70cb897510b52fc36 by Ammar Askar in branch 'main':
bpo-29505: Add fuzzer for ast.literal_eval (GH-28777)
https://github.com/python/cpython/commit/db72e58ea5940c3942ede9f70cb897510b52fc36


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29505>
_______________________________________

From report at bugs.python.org  Wed Oct  6 20:01:37 2021
From: report at bugs.python.org (Ned Deily)
Date: Thu, 07 Oct 2021 00:01:37 +0000
Subject: [issue45389] https://docs.python.org/3/objects.inv still points to 3.9
In-Reply-To: <1633519580.67.0.482188362776.issue45389@roundup.psfhosted.org>
Message-ID: <1633564897.04.0.680993599971.issue45389@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
assignee: docs at python -> mdk
nosy: +mdk

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45389>
_______________________________________

From report at bugs.python.org  Wed Oct  6 20:13:27 2021
From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=)
Date: Thu, 07 Oct 2021 00:13:27 +0000
Subject: [issue45393] help() on operator precedence has confusing entries
 "await" "x" and "not" "x"
In-Reply-To: <1633534428.51.0.112977953361.issue45393@roundup.psfhosted.org>
Message-ID: <1633565607.85.0.470706957868.issue45393@roundup.psfhosted.org>


Vedran ?a?i? <vedgar at gmail.com> added the comment:

I guess those old versions were removed because they are "frozen", that is, not receiving doc fixes anymore.

----------
nosy: +veky

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45393>
_______________________________________

From report at bugs.python.org  Wed Oct  6 20:52:09 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 07 Oct 2021 00:52:09 +0000
Subject: [issue45385] Fix reference leak from descr_check
In-Reply-To: <1633480978.07.0.287145541934.issue45385@roundup.psfhosted.org>
Message-ID: <1633567929.38.0.888268008246.issue45385@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27113
pull_request: https://github.com/python/cpython/pull/28779

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45385>
_______________________________________

From report at bugs.python.org  Wed Oct  6 20:52:05 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 07 Oct 2021 00:52:05 +0000
Subject: [issue45385] Fix reference leak from descr_check
In-Reply-To: <1633480978.07.0.287145541934.issue45385@roundup.psfhosted.org>
Message-ID: <1633567925.21.0.203095581991.issue45385@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset e6ff4eba6da9b64aed235ba8d730b5645f71955c by Dong-hee Na in branch 'main':
bpo-45385: Fix reference leak from descr_check (#28719)
https://github.com/python/cpython/commit/e6ff4eba6da9b64aed235ba8d730b5645f71955c


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45385>
_______________________________________

From report at bugs.python.org  Wed Oct  6 20:54:33 2021
From: report at bugs.python.org (gaborjbernat)
Date: Thu, 07 Oct 2021 00:54:33 +0000
Subject: [issue45391] 3.10 objects.inv classifies UnionType as data
In-Reply-To: <1633522850.1.0.516575372895.issue45391@roundup.psfhosted.org>
Message-ID: <1633568073.66.0.693187610783.issue45391@roundup.psfhosted.org>


gaborjbernat <gaborjbernat at gmail.com> added the comment:

Here's a gist where I managed to detect roughly 140 errors (some looks like potential false positive, so likely the real number is more around 100):

https://gist.github.com/gaborbernat/5360badab2125b3f81a3bcbce0e94c2a#file-found_issues-output-L1

This does make a few concessions:
- ignores the difference between function and method; way to many functions are documented as methods and vice-versa to disallow this (or would be a major overhaul)
- https://docs.python.org/3/c-api/structures.html?highlight=meth_class#METH_VARARGS is documented under python domain but IMHO should be C
- https://docs.python.org/3/c-api/typeobj.html?highlight=py_tpflags_base_exc_subclass#c.PyTypeObject.tp_flags is documented under python domain but IMHO should be C
- does not clarifies where to type classes goes - they seem to be a weird in-between a method and a class, satisfying neither - see related discussion on topic from https://bugs.python.org/issue41973

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45391>
_______________________________________

From report at bugs.python.org  Wed Oct  6 21:37:08 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 07 Oct 2021 01:37:08 +0000
Subject: [issue45385] Fix reference leak from descr_check
In-Reply-To: <1633480978.07.0.287145541934.issue45385@roundup.psfhosted.org>
Message-ID: <1633570628.52.0.0259689298388.issue45385@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
pull_requests: +27114
pull_request: https://github.com/python/cpython/pull/28780

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45385>
_______________________________________

From report at bugs.python.org  Wed Oct  6 21:38:51 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 07 Oct 2021 01:38:51 +0000
Subject: [issue35970] no help flag in base64 util
In-Reply-To: <1549911460.74.0.450147054737.issue35970@roundup.psfhosted.org>
Message-ID: <1633570731.66.0.878952681953.issue35970@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 5baec4aea6821256f5d1785a6bd596fab069f1b6 by Ammar Askar in branch 'main':
bpo-35970: Add help flag to base64 module (GH-28774)
https://github.com/python/cpython/commit/5baec4aea6821256f5d1785a6bd596fab069f1b6


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35970>
_______________________________________

From report at bugs.python.org  Wed Oct  6 21:45:36 2021
From: report at bugs.python.org (Ammar Askar)
Date: Thu, 07 Oct 2021 01:45:36 +0000
Subject: [issue35970] no help flag in base64 util
In-Reply-To: <1549911460.74.0.450147054737.issue35970@roundup.psfhosted.org>
Message-ID: <1633571136.4.0.77771813292.issue35970@roundup.psfhosted.org>


Change by Ammar Askar <ammar at ammaraskar.com>:


----------
components: +Library (Lib)
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35970>
_______________________________________

From report at bugs.python.org  Wed Oct  6 22:10:23 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 07 Oct 2021 02:10:23 +0000
Subject: [issue45385] Fix reference leak from descr_check
In-Reply-To: <1633480978.07.0.287145541934.issue45385@roundup.psfhosted.org>
Message-ID: <1633572623.28.0.321330037091.issue45385@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset 660718dba57624720c2a9832f10f29ace59c77cf by Dong-hee Na in branch '3.9':
[3.9] bpo-45385: Fix reference leak from descr_check (GH-28719) (GH-28780)
https://github.com/python/cpython/commit/660718dba57624720c2a9832f10f29ace59c77cf


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45385>
_______________________________________

From report at bugs.python.org  Wed Oct  6 22:10:16 2021
From: report at bugs.python.org (Hai Shi)
Date: Thu, 07 Oct 2021 02:10:16 +0000
Subject: [issue45316] [C API] Functions not exported with PyAPI_FUNC()
In-Reply-To: <1632903484.87.0.875373224779.issue45316@roundup.psfhosted.org>
Message-ID: <1633572616.35.0.950277190428.issue45316@roundup.psfhosted.org>


Change by Hai Shi <shihai1991 at 126.com>:


----------
nosy: +shihai1991

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45316>
_______________________________________

From report at bugs.python.org  Wed Oct  6 22:10:47 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 07 Oct 2021 02:10:47 +0000
Subject: [issue45385] Fix reference leak from descr_check
In-Reply-To: <1633480978.07.0.287145541934.issue45385@roundup.psfhosted.org>
Message-ID: <1633572647.58.0.121636129402.issue45385@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45385>
_______________________________________

From report at bugs.python.org  Wed Oct  6 22:22:24 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 07 Oct 2021 02:22:24 +0000
Subject: [issue45103] IDLE: make configdialog font page survive font failures
In-Reply-To: <1630790219.84.0.830457804554.issue45103@roundup.psfhosted.org>
Message-ID: <1633573344.75.0.957013950484.issue45103@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

A similar report, https://stackoverflow.com/questions/69466716/python-3-10-idle-does-not-respond-everytime-i-hit-configure-idle-from-options
but with FiraCode font https://github.com/tonsky/FiraCode.  The compatibility list includes IDLE as 'does not work' along with some other editors.

----------
assignee:  -> terry.reedy
components: +IDLE

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45103>
_______________________________________

From report at bugs.python.org  Wed Oct  6 22:45:40 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Thu, 07 Oct 2021 02:45:40 +0000
Subject: [issue40418] Small Refactoring: Use bytes.hex() in secrets.token_hex()
In-Reply-To: <1588056928.85.0.969050564689.issue40418@roundup.psfhosted.org>
Message-ID: <1633574740.25.0.0267109273926.issue40418@roundup.psfhosted.org>


Change by Dennis Sweeney <sweeney.dennis650 at gmail.com>:


----------
resolution:  -> not a bug
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40418>
_______________________________________

From report at bugs.python.org  Wed Oct  6 22:48:56 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Thu, 07 Oct 2021 02:48:56 +0000
Subject: [issue41682] [Windows] test_asyncio: Proactor
 test_sendfile_close_peer_in_the_middle_of_receiving failure
In-Reply-To: <1598923449.65.0.107960415995.issue41682@roundup.psfhosted.org>
Message-ID: <1633574936.8.0.977645029395.issue41682@roundup.psfhosted.org>


Change by Dennis Sweeney <sweeney.dennis650 at gmail.com>:


----------
pull_requests:  -27076

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41682>
_______________________________________

From report at bugs.python.org  Wed Oct  6 23:06:19 2021
From: report at bugs.python.org (Hai Shi)
Date: Thu, 07 Oct 2021 03:06:19 +0000
Subject: [issue45315] `PyType_FromSpec` does not copy the name
In-Reply-To: <1632861906.82.0.496996210358.issue45315@roundup.psfhosted.org>
Message-ID: <1633575979.66.0.515480285344.issue45315@roundup.psfhosted.org>


Hai Shi <shihai1991 at 126.com> added the comment:

> the simplest solution is calling `type_set_name`, even if that runs some unnecessary checks.

Hm, I haven't find any case who use dynamical tp_name of Type_Spec temporarily.
If we meet this user case, Adding a new object pointer of type name in is an other option maybe:)

----------
nosy: +petr.viktorin, shihai1991

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45315>
_______________________________________

From report at bugs.python.org  Wed Oct  6 23:12:17 2021
From: report at bugs.python.org (jg)
Date: Thu, 07 Oct 2021 03:12:17 +0000
Subject: [issue45397] Doc for turtle.write missing the tuple part of the font
 param in 3.10+
Message-ID: <1633576337.95.0.961564337357.issue45397@roundup.psfhosted.org>


New submission from jg <jggammon at hotmail.com>:

In the version 3.10 and 3.11 python turtle doc, the turtle.write line shows font without it's tuple parenthesis. Something change in 3.10 that makes it look like font='Arial' and 8 and 'normal' are 3 separate parameters, when it should be one tuple parameter font=(x,y,z).

Ex. of wrong entry (URL=https://docs.python.org/3.11/library/turtle.html#turtle.write)
line=turtle.write(arg, move=False, align='left', font='Arial', 8, 'normal')

Ex. of correct entry (https://docs.python.org/3.9/library/turtle.html#turtle.write)
line=turtle.write(arg, move=False, align="left", font=("Arial", 8, "normal"))

----------
assignee: docs at python
components: Documentation
messages: 403348
nosy: docs at python, jggammon
priority: normal
severity: normal
status: open
title: Doc for turtle.write missing the tuple part of the font param in 3.10+
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45397>
_______________________________________

From report at bugs.python.org  Thu Oct  7 01:33:06 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Thu, 07 Oct 2021 05:33:06 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633584786.99.0.0888730477386.issue29410@roundup.psfhosted.org>


Change by Guido van Rossum <guido at python.org>:


----------
nosy: +gvanrossum

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 01:34:10 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Thu, 07 Oct 2021 05:34:10 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633584850.28.0.00332910654683.issue29410@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

Worth revisiting?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 02:47:07 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 07 Oct 2021 06:47:07 +0000
Subject: [issue45397] Doc for turtle.write missing the tuple part of the font
 param in 3.10+
In-Reply-To: <1633576337.95.0.961564337357.issue45397@roundup.psfhosted.org>
Message-ID: <1633589227.57.0.269177625823.issue45397@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

This looks like some Sphinx bug.

In Python 3.8, using Sphinx:

>>> from sphinx.pycode import ast
>>> ast.unparse(ast.parse("('Arial', 8, 'normal')", 'eval').body)
"'Arial', 8, 'normal'"

For comparison, using builtin ast module in Python 3.9:

>>> import ast
>>> ast.unparse(ast.parse("('Arial', 8, 'normal')", 'eval').body)
"('Arial', 8, 'normal')"

----------
nosy: +georg.brandl, serhiy.storchaka
type:  -> behavior
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45397>
_______________________________________

From report at bugs.python.org  Thu Oct  7 02:46:58 2021
From: report at bugs.python.org (Chris Jerdonek)
Date: Thu, 07 Oct 2021 06:46:58 +0000
Subject: [issue45390] asyncio.Task doesn't propagate CancelledError()
 exception correctly.
In-Reply-To: <1633519842.27.0.396754460358.issue45390@roundup.psfhosted.org>
Message-ID: <1633589218.35.0.288938903015.issue45390@roundup.psfhosted.org>


Chris Jerdonek <chris.jerdonek at gmail.com> added the comment:

> But, once the asyncio.Task is cancelled, is impossible to retrieve that original asyncio.CancelledError(msg) exception with the message, because it seems that *a new* asyncio.CancelledError() [without the message] is raised when asyncio.Task.result() or asyncio.Task.exception() methods are called.

You say it's "impossible", but isn't the message accessible via the exception chain (and visible in the traceback)? One benefit of not duplicating the message on the internal call to cancel() is that it makes it easier to pinpoint which CancelledError object is associated with the user's call to cancel(), and which is associated with the call done by asyncio internals, which is a different cancellation. Another benefit is that it prevents info from being duplicated in the traceback.

----------
nosy: +chris.jerdonek

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45390>
_______________________________________

From report at bugs.python.org  Thu Oct  7 02:54:36 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 07 Oct 2021 06:54:36 +0000
Subject: [issue45397] Doc for turtle.write missing the tuple part of the font
 param in 3.10+
In-Reply-To: <1633576337.95.0.961564337357.issue45397@roundup.psfhosted.org>
Message-ID: <1633589676.86.0.459930795525.issue45397@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Seems it was fixed in Sphinx a year ago: https://github.com/sphinx-doc/sphinx/pull/8265. Maybe we need to update the Sphinx version (but it can introduce new incompatibilities).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45397>
_______________________________________

From report at bugs.python.org  Thu Oct  7 03:17:49 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 07 Oct 2021 07:17:49 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <1633551663.5.0.531821025802.issue45395@roundup.psfhosted.org>
Message-ID: <5bc549d8-6dcc-0a76-78ea-e5beca99e859@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

I'm not sure I follow, but in any case, please make sure that
the freeze tool in Tools/ continues to work with the new mechanism.

The freeze tool would also need to know which modules are already
frozen via the new script, so that modules don't get included twice.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Thu Oct  7 03:20:22 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Thu, 07 Oct 2021 07:20:22 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1633591222.99.0.690034512836.issue45335@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

See also:

- bpo-19065: sqlite3 timestamp adapter chokes on timezones
- bpo-26651 Deprecate register_adapter() and register_converter() in sqlite3


(Adding Berker to nosy list.)

----------
nosy: +berker.peksag

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Thu Oct  7 03:48:15 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 07 Oct 2021 07:48:15 +0000
Subject: [issue45385] Fix reference leak from descr_check
In-Reply-To: <1633480978.07.0.287145541934.issue45385@roundup.psfhosted.org>
Message-ID: <1633592895.92.0.632811455049.issue45385@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset 35d4857375b6ef8f1243db4da9c2cba0bee63ad6 by Miss Islington (bot) in branch '3.10':
bpo-45385: Fix reference leak from descr_check (GH-28719) (GH-28779)
https://github.com/python/cpython/commit/35d4857375b6ef8f1243db4da9c2cba0bee63ad6


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45385>
_______________________________________

From report at bugs.python.org  Thu Oct  7 03:48:23 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 07 Oct 2021 07:48:23 +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: <1633592903.03.0.769918031063.issue26651@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

FWIW: I'm -1 on removing the possibility to register conversion or adapter hooks in sqlite3. Such mechanisms have become a standard with Python database modules and are widely used to adapt them to applications or middleware using the modules.

The database module defaults don't always work well everywhere and there needs to be an efficient way to modify this behavior. Fixing all input to .execute() et al. and all output from .fetch*() is not efficient.

I'd suggest to close this as rejected. The deprecation won't do anyone good.

Related to the few such implementations in dbapi2.py of sqlite2, which I believe triggered this issue:

Those are not necessarily ideal, since they don't handle all possible cases.

The adapters (conversion from Python data type to SQLite data type) are always used, but the converters (conversion from SQLite data type to Python type) are not, since those rely on SQLite providing type information, which it only does if you pass in detect_types to the .connect() method. Many people don't notice the missing time offset support in the converters due to this (sqlite3 returns strings instead).

Modifying those preconfigured adapters / converters would need to be a separate issue, though. E.g. deprecating the date/timestamp converters would be a way forward, since applications will know better what to do in their particular use case. Such a deprecation would have to take a longer while, though, for the reasons stated by Raymond.

----------
nosy: +lemburg

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26651>
_______________________________________

From report at bugs.python.org  Thu Oct  7 03:49:14 2021
From: report at bugs.python.org (Alex Zaslavskis)
Date: Thu, 07 Oct 2021 07:49:14 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633463037.19.0.965519087659.issue45382@roundup.psfhosted.org>
Message-ID: <1633592954.41.0.926675176214.issue45382@roundup.psfhosted.org>


Alex Zaslavskis <sahsariga111 at gmail.com> added the comment:

systeminfo can be option

----------
Added file: https://bugs.python.org/file50329/import subprocess.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Thu Oct  7 03:58:49 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 07 Oct 2021 07:58:49 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633592954.41.0.926675176214.issue45382@roundup.psfhosted.org>
Message-ID: <febad875-cb2d-9665-2bc6-50bdf245ae68@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

It's probably time to extend the marketing version detection mechanism to use
the build number as reference instead of the major.minor system version numbers.

Here's a good reference for this:

https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions

MS resources:

https://docs.microsoft.com/en-us/windows/win32/sysinfo/operating-system-version
https://docs.microsoft.com/en-us/windows/release-health/release-information

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Thu Oct  7 04:08:05 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 07 Oct 2021 08:08:05 +0000
Subject: [issue44603] REPL: exit when the user types exit instead of asking
 them to explicitly type exit()
In-Reply-To: <1626059745.58.0.0764234383007.issue44603@roundup.psfhosted.org>
Message-ID: <1633594085.24.0.304021518013.issue44603@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Steven's list left out the standard way of closing *any* windowed app -- click the close button on the title bar.  Works on all major systems.

Its does a little too much when python is started on a command line (by closing the console), but beginners, at least on Windows, usually click an icon to start Python.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44603>
_______________________________________

From report at bugs.python.org  Thu Oct  7 04:11:02 2021
From: report at bugs.python.org (sedrubal)
Date: Thu, 07 Oct 2021 08:11:02 +0000
Subject: [issue31155] Encode set, frozenset, bytearray,
 and iterators as json arrays
In-Reply-To: <1502270596.69.0.819927554445.issue31155@psf.upfronthosting.co.za>
Message-ID: <1633594262.54.0.240045607877.issue31155@roundup.psfhosted.org>


Change by sedrubal <python at sedrubal.de>:


----------
nosy: +sedrubal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31155>
_______________________________________

From report at bugs.python.org  Thu Oct  7 04:25:18 2021
From: report at bugs.python.org (Thomas Grainger)
Date: Thu, 07 Oct 2021 08:25:18 +0000
Subject: [issue45390] asyncio.Task doesn't propagate CancelledError()
 exception correctly.
In-Reply-To: <1633519842.27.0.396754460358.issue45390@roundup.psfhosted.org>
Message-ID: <1633595118.89.0.347303320536.issue45390@roundup.psfhosted.org>


Thomas Grainger <tagrain at gmail.com> added the comment:

afaik this is intentional https://bugs.python.org/issue31033

----------
nosy: +graingert

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45390>
_______________________________________

From report at bugs.python.org  Thu Oct  7 04:31:29 2021
From: report at bugs.python.org (Inada Naoki)
Date: Thu, 07 Oct 2021 08:31:29 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633595489.76.0.671837590253.issue29410@roundup.psfhosted.org>


Inada Naoki <songofacandy at gmail.com> added the comment:

I am not sure this is worth doing.

Microbenchmarks:

## import time

```
$ main/opt/bin/pyperf command main/opt/bin/python3 -c 'import typing,asyncio'
.....................
command: Mean +- std dev: 49.6 ms +- 0.1 ms

$ siphash13/opt/bin/pyperf command siphash13/opt/bin/python3 -c 'import typing,asyncio'
.....................
command: Mean +- std dev: 49.3 ms +- 0.1 ms
```

0.6% faster.

## hash(s+'a')

```
# 6+1
$ siphash13/opt/bin/pyperf timeit --compare-to main/opt/bin/python3 --python-names siphash24:siphash13 -s 'b=b"x"*6' -- 'hash(b+b"a")'
siphash24: ..................... 87.7 ns +- 2.8 ns
siphash13: ..................... 84.8 ns +- 1.6 ns

Mean +- std dev: [siphash24] 87.7 ns +- 2.8 ns -> [siphash13] 84.8 ns +- 1.6 ns: 1.03x faster

# 6000+1
$ siphash13/opt/bin/pyperf timeit --compare-to main/opt/bin/python3 --python-names siphash24:siphash13 -s 'b=b"x"*6000' -- 'hash(b+b"a")'
siphash24: ..................... 2.98 us +- 0.03 us
siphash13: ..................... 1.67 us +- 0.03 us

Mean +- std dev: [siphash24] 2.98 us +- 0.03 us -> [siphash13] 1.67 us +- 0.03 us: 1.78x faster
```

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 04:47:49 2021
From: report at bugs.python.org (ramikg)
Date: Thu, 07 Oct 2021 08:47:49 +0000
Subject: [issue31399] Let OpenSSL verify hostname and IP address
In-Reply-To: <1504904686.16.0.498803825814.issue31399@psf.upfronthosting.co.za>
Message-ID: <1633596469.38.0.369966165237.issue31399@roundup.psfhosted.org>


Change by ramikg <ramikgold at gmail.com>:


----------
nosy: +ramikg
nosy_count: 4.0 -> 5.0
pull_requests: +27115
pull_request: https://github.com/python/cpython/pull/28602

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31399>
_______________________________________

From report at bugs.python.org  Thu Oct  7 04:58:12 2021
From: report at bugs.python.org (=?utf-8?b?0JDQu9C10LrRgdC10Lk=?=)
Date: Thu, 07 Oct 2021 08:58:12 +0000
Subject: [issue45398] Bugs in set operations in 3.8.10 (detected in Win7)
Message-ID: <1633597092.06.0.36085946328.issue45398@roundup.psfhosted.org>


New submission from ??????? <smi-alexey at yandex.ru>:

x = set('abcde')
y = set('bdxyz')

x | y
result:
     {'b', 'c', 'd', 'z', 'x', 'a', 'y'}
but should be:
     {'b', 'c', 'd', 'z', 'x', 'a', 'y', 'e'}

----------
messages: 403362
nosy: bfx683
priority: normal
severity: normal
status: open
title: Bugs in set operations in 3.8.10 (detected in Win7)
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45398>
_______________________________________

From report at bugs.python.org  Thu Oct  7 04:59:05 2021
From: report at bugs.python.org (Mark Shannon)
Date: Thu, 07 Oct 2021 08:59:05 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633597145.89.0.92286113811.issue29410@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:

Yes, this is worth doing, IMO.

It adds no more code and probably reduces maintenance costs as any improvements/bug-fixes to the rust/ruby versions can be easily ported.

Even if the benefit is small, the cost is basically zero.

----------
nosy: +Mark.Shannon

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 05:07:32 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 09:07:32 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633597652.58.0.608313730742.issue29410@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

"1.67 us +- 0.03 us: 1.78x faster" with a bytes string of 6k bytes sounds worth it to me.

When we talk about "security" here, we are talking about a denial of service attack on the dict worst case performance:
https://python-security.readthedocs.io/vuln/hash-dos.html

I know that it's not a popular opinion, but I don't think that this denial of service (DoS) is important. IMO there are enough other ways to crash a server. Moreover, the initial attack vector was a HTTP request with tons of header lines. In the meanwhile, the Python http module was modified to put arbitrary limits on the number of HTTP headers and the maximum length of a single HTTP header.

It's nice to limit the risk of a DoS, but I don't think that we should go too far. If it worked for Rust and Ruby, SipHash-1-3 should be good as well for Python.

I expect even more interesting speedup with bytes string longer than 6k bytes. And I'm quite sure that it's common that people manipulates long strings in Python :-)

I retarget this change to Python 3.11. Please don't backport it since it changes the Python build system (configure options).

----------
versions: +Python 3.11 -Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 05:15:54 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 07 Oct 2021 09:15:54 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633598154.14.0.00220927914861.issue29410@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

I support this change, too.

SipHash-1-3 is more than good enough for our use case. It provides sufficient diffusion of str and bytes hashes and has sufficient reliance against timing attacks on the PRF key.

Also 64bit platforms are less affected less by hash collision DoS attacks anyway. The issue was far greater on 32bit systems. Nowadays virtually all production systems are 64bit.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 05:17:03 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Thu, 07 Oct 2021 09:17:03 +0000
Subject: [issue45041] [sqlite3] simplify executescript()
In-Reply-To: <1630186940.75.0.867509999699.issue45041@roundup.psfhosted.org>
Message-ID: <1633598223.47.0.298372879852.issue45041@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 3f2c433da560d7999a52f9fcba4bbd0898848520 by Erlend Egeberg Aasland in branch 'main':
bpo-45041: Restore `sqlite3` executescript behaviour for `SELECT` queries (GH-28509)
https://github.com/python/cpython/commit/3f2c433da560d7999a52f9fcba4bbd0898848520


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45041>
_______________________________________

From report at bugs.python.org  Thu Oct  7 05:18:15 2021
From: report at bugs.python.org (ramikg)
Date: Thu, 07 Oct 2021 09:18:15 +0000
Subject: [issue43669] PEP 644: Require OpenSSL 1.1.1 or newer
In-Reply-To: <1617106246.37.0.0210118077092.issue43669@roundup.psfhosted.org>
Message-ID: <1633598295.97.0.223038986448.issue43669@roundup.psfhosted.org>


Change by ramikg <ramikgold at gmail.com>:


----------
nosy: +ramikg
nosy_count: 4.0 -> 5.0
pull_requests: +27116
pull_request: https://github.com/python/cpython/pull/28602

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43669>
_______________________________________

From report at bugs.python.org  Thu Oct  7 05:29:14 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 07 Oct 2021 09:29:14 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633598954.24.0.654148576985.issue29410@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

I recommend that you add SipHash-1-3 as an additional algorithm and make it the default. The removal of --with-hash-algorithm=siphash24 should go through regular deprecation cycle of two Python versions.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 05:36:56 2021
From: report at bugs.python.org (ramikg)
Date: Thu, 07 Oct 2021 09:36:56 +0000
Subject: [issue45399] Remove hostflags from PySSLContext
Message-ID: <1633599416.0.0.711610272152.issue45399@roundup.psfhosted.org>


New submission from ramikg <ramikgold at gmail.com>:

The PySSLContext struct mentions that "OpenSSL has no API to get hostflags from X509_VERIFY_PARAM* struct. We have to maintain our own copy".
Since OpenSSL 1.1.0i added the function X509_VERIFY_PARAM_get_hostflags, this statement is no longer true.
Because Python 3.10 requires OpenSSL 1.1.1 (PEP 644), we no longer have to maintain a copy of the host flags.

The related PR removes the hostflags member from the PySSLContext struct.

----------
assignee: christian.heimes
components: SSL
messages: 403368
nosy: christian.heimes, ramikg
priority: normal
pull_requests: 27117
severity: normal
status: open
title: Remove hostflags from PySSLContext
type: enhancement
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45399>
_______________________________________

From report at bugs.python.org  Thu Oct  7 05:39:47 2021
From: report at bugs.python.org (=?utf-8?b?0JDQu9C10LrRgdC10Lk=?=)
Date: Thu, 07 Oct 2021 09:39:47 +0000
Subject: [issue45398] Bugs in set operations in 3.8.10 (detected in Win7)
In-Reply-To: <1633597092.06.0.36085946328.issue45398@roundup.psfhosted.org>
Message-ID: <1633599587.28.0.602392317796.issue45398@roundup.psfhosted.org>


??????? <smi-alexey at yandex.ru> added the comment:

In 3.8.9 version (in Win7 too) the bug is not reproduced!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45398>
_______________________________________

From report at bugs.python.org  Thu Oct  7 05:47:34 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 09:47:34 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
Message-ID: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

One way to disable logging in a configuration file is to use /dev/null as the filename for logs. It is fine to use that with FileHandler.

The problem is when TimedRotatingFileHandler is used. When Python decides to rotate the "file", it calls os.rename() on /dev/null *device* and create a new /dev/null *file* which will be quickly filled by all applications on the system writing into /dev/null.

The problem is only possible if the process is allowed to rename the device /dev/null. For example, a regular user gets a permission error.

I see different options:

* TimedRotatingFileHandler should disable rotation if it detects that the file is a device (not a regular file)
* logging should switch to NullHandler if filename is equal to os.path.devnull.

I guess that the problem is the same if the filename points to a socket or a named pipe.


RotatingFileHandler may also be affected, I didn't check.


... I'm quite sure that I had the same issue with Twisted years ago, but I don't recall the details :-) Twisted didn't use the logging module if I recall correctly.


RHEL downstream issue: https://bugzilla.redhat.com/show_bug.cgi?id=2009200

----------
components: Library (Lib)
messages: 403371
nosy: vinay.sajip, vstinner
priority: normal
severity: normal
status: open
title: logging TimedRotatingFileHandler must not rename devices like /dev/null
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Thu Oct  7 05:47:27 2021
From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=)
Date: Thu, 07 Oct 2021 09:47:27 +0000
Subject: [issue45400]
 test_name_error_suggestions_do_not_trigger_for_too_many_locals:
 AssertionError: 'a1' unexpectedly found in Traceback
Message-ID: <1633600047.69.0.0952962991188.issue45400@roundup.psfhosted.org>


New submission from Miro Hron?ok <miro at hroncok.cz>:

The test_name_error_suggestions_do_not_trigger_for_too_many_locals test fails with the to-be-released 3.11.0a1:

======================================================================
FAIL: test_name_error_suggestions_do_not_trigger_for_too_many_locals (test.test_exceptions.NameErrorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1843, in test_name_error_suggestions_do_not_trigger_for_too_many_locals
    self.assertNotIn("a1", err.getvalue())
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'a1' unexpectedly found in 'Traceback (most recent call last):\n  File "/builddir/build/BUILD/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1838, in test_name_error_suggestions_do_not_trigger_for_too_many_locals\n    f()\n    ^^^\n  File "/builddir/build/BUILD/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1835, in f\n    print(a0)\n          ^^\nNameError: name \'a0\' is not defined\n'

----------------------------------------------------------------------
Ran 1 test in 0.016s


I believe it is the version string that triggers this failure.

----------
messages: 403370
nosy: hroncok, pablogsal, vstinner
priority: normal
severity: normal
status: open
title: test_name_error_suggestions_do_not_trigger_for_too_many_locals: AssertionError: 'a1' unexpectedly found in Traceback
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45400>
_______________________________________

From report at bugs.python.org  Thu Oct  7 05:49:07 2021
From: report at bugs.python.org (Inada Naoki)
Date: Thu, 07 Oct 2021 09:49:07 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633600147.94.0.470520821987.issue29410@roundup.psfhosted.org>


Inada Naoki <songofacandy at gmail.com> added the comment:

> I know that it's not a popular opinion, but I don't think that this denial of service (DoS) is important. IMO there are enough other ways to crash a server. Moreover, the initial attack vector was a HTTP request with tons of header lines. In the meanwhile, the Python http module was modified to put arbitrary limits on the number of HTTP headers and the maximum length of a single HTTP header.


Hash DoS is not only for HTTP headers. Everywhere creating dict from untrusted source can be attack vector.
For example, many API servers receive JSON as HTTP request body. Limiting HTTP header don't protect it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 05:49:31 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 07 Oct 2021 09:49:31 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633600171.63.0.983576209475.issue29410@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

Since the days this was discussed, a lot of new and faster hash algorithms have been developed. It may be worthwhile looking at those instead.

E.g. xxHash is a lot more performant than siphash: https://github.com/Cyan4973/xxHash (the link also has a comparison of hash algorithms)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 05:49:35 2021
From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=)
Date: Thu, 07 Oct 2021 09:49:35 +0000
Subject: [issue45400]
 test_name_error_suggestions_do_not_trigger_for_too_many_locals:
 AssertionError: 'a1' unexpectedly found in Traceback
In-Reply-To: <1633600047.69.0.0952962991188.issue45400@roundup.psfhosted.org>
Message-ID: <1633600175.95.0.363563967157.issue45400@roundup.psfhosted.org>


Miro Hron?ok <miro at hroncok.cz> added the comment:

I see this was previously added to 3.10 beta, so this never triggered. The test only fails when building from a directory that contains the full Python version.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45400>
_______________________________________

From report at bugs.python.org  Thu Oct  7 05:53:51 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 07 Oct 2021 09:53:51 +0000
Subject: [issue45398] Bugs in set operations in 3.8.10 (detected in Win7)
In-Reply-To: <1633597092.06.0.36085946328.issue45398@roundup.psfhosted.org>
Message-ID: <1633600431.36.0.0952253684501.issue45398@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45398>
_______________________________________

From report at bugs.python.org  Thu Oct  7 05:54:12 2021
From: report at bugs.python.org (Inada Naoki)
Date: Thu, 07 Oct 2021 09:54:12 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633600452.62.0.114875425641.issue29410@roundup.psfhosted.org>


Inada Naoki <songofacandy at gmail.com> added the comment:

> I recommend that you add SipHash-1-3 as an additional algorithm and make it the default. The removal of --with-hash-algorithm=siphash24 should go through regular deprecation cycle of two Python versions.

I am not sure its worth enough. Adding algorithm increase some maintenance cost... Is it really make someone happy?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 05:58:09 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 07 Oct 2021 09:58:09 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1633600147.94.0.470520821987.issue29410@roundup.psfhosted.org>
Message-ID: <34a6eadb-2434-9fc8-12dd-890a35e43671@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 07.10.2021 11:49, Inada Naoki wrote:
> Hash DoS is not only for HTTP headers. Everywhere creating dict from untrusted source can be attack vector.
> For example, many API servers receive JSON as HTTP request body. Limiting HTTP header don't protect it.

That's certainly true, but at the same time, just focusing on string
hashes only doesn't really help either, e.g. it is very easy to
create a DoS with numeric keys or other objects which use trivial
hashing algorithms.

I wouldn't focus too much on this at the Python core level.
Server implementations have other ways to protect themselves against
DoS, e.g. by monitoring process memory, CPU load or runtime, applying
limits on incoming data.

IMO, it's much better to use application and use case specific methods
for this, than trying to fix basic data types in Python to address
the issue and making all Python application suffer as a result.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 06:00:37 2021
From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=)
Date: Thu, 07 Oct 2021 10:00:37 +0000
Subject: [issue45400]
 test_name_error_suggestions_do_not_trigger_for_too_many_locals:
 AssertionError: 'a1' unexpectedly found in Traceback
In-Reply-To: <1633600047.69.0.0952962991188.issue45400@roundup.psfhosted.org>
Message-ID: <1633600837.87.0.967329306071.issue45400@roundup.psfhosted.org>


Change by Miro Hron?ok <miro at hroncok.cz>:


----------
components: +Tests

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45400>
_______________________________________

From report at bugs.python.org  Thu Oct  7 06:05:28 2021
From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=)
Date: Thu, 07 Oct 2021 10:05:28 +0000
Subject: [issue45402] ERROR: test_sundry
 (test.test_tools.test_sundry.TestSundryScripts): SystemExit: ERROR: missing
 _freeze_module
Message-ID: <1633601128.84.0.599818105628.issue45402@roundup.psfhosted.org>


New submission from Miro Hron?ok <miro at hroncok.cz>:

When we build Python 3.10.0a1 (from the git tag) in Fedora, we see:

======================================================================
ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.11.0a1/Lib/test/test_tools/test_sundry.py", line 43, in test_sundry
    import_tool(name)
    ^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/Python-3.11.0a1/Lib/test/test_tools/__init__.py", line 35, in import_tool
    return importlib.import_module(toolname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/Python-3.11.0a1/Lib/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1072, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1044, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1015, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 689, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 894, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/builddir/build/BUILD/Python-3.11.0a1/Tools/scripts/freeze_modules.py", line 37, in <module>
    sys.exit("ERROR: missing _freeze_module")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemExit: ERROR: missing _freeze_module

----------------------------------------------------------------------
Ran 3 tests in 0.209s


I see in the build log we use Programs/_freeze_module regularly in the build process, so no idea why this fails. I'll try to come up with a reporducer.

----------
components: Tests
messages: 403377
nosy: hroncok, pablogsal, vstinner
priority: normal
severity: normal
status: open
title: ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts): SystemExit: ERROR: missing _freeze_module
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45402>
_______________________________________

From report at bugs.python.org  Thu Oct  7 06:16:42 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 07 Oct 2021 10:16:42 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633601802.14.0.548575809533.issue29410@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

> That's certainly true, but at the same time, just focusing on string
hashes only doesn't really help either, e.g. it is very easy to
create a DoS with numeric keys or other objects which use trivial
hashing algorithms.

Marc-Andre, Victor, your postings are off-topic. Please move your discussion to a new BPO.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 06:20:02 2021
From: report at bugs.python.org (Alex Zaslavskis)
Date: Thu, 07 Oct 2021 10:20:02 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633463037.19.0.965519087659.issue45382@roundup.psfhosted.org>
Message-ID: <1633602002.22.0.850665746273.issue45382@roundup.psfhosted.org>


Alex Zaslavskis <sahsariga111 at gmail.com> added the comment:

That nice idea . So the dist can contain the minimal build required to say that is for example windows 11 . The simplest solution that came in mind is . Is far from perfect but it works.

----------
Added file: https://bugs.python.org/file50330/main.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Thu Oct  7 06:20:52 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 07 Oct 2021 10:20:52 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633602052.72.0.124145808017.issue29410@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

> I am not sure its worth enough. Adding algorithm increase some maintenance cost... Is it really make someone happy?

siphash13 is a short function. I wrote and designed PEP 456 so we can easily add new hashing functions. IMHO the maintenance cost is minimal.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 06:34:35 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 07 Oct 2021 10:34:35 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1633601802.14.0.548575809533.issue29410@roundup.psfhosted.org>
Message-ID: <a25e7d0e-9bf3-de08-e458-27e03c125795@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 07.10.2021 12:16, Christian Heimes wrote:
> 
>> That's certainly true, but at the same time, just focusing on string
> hashes only doesn't really help either, e.g. it is very easy to
> create a DoS with numeric keys or other objects which use trivial
> hashing algorithms.
> 
> Marc-Andre, Victor, your postings are off-topic. Please move your discussion to a new BPO.

I don't quite follow. Why is it fine that you discuss DoS, but it's not
fine when others discuss DoS ?

You're statement comes across as an attempt to shut down a possibly
fruitful discussion. Not sure if you intended it that way.

We could open a new issue to discuss faster alternatives to siphash
and then close this one, or simply rename this issue, if it bothers you
that we're not strictly focusing on siphash 1-3 :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 06:47:31 2021
From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=)
Date: Thu, 07 Oct 2021 10:47:31 +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: <1633603651.92.0.602510465636.issue45402@roundup.psfhosted.org>


Miro Hron?ok <miro at hroncok.cz> added the comment:

I can reproduce this from git main branch:

$ git clean -fdx
$ mkdir -p build/debug
$ cd build/debug
$ ../../configure --with-platlibdir=lib64 --enable-shared --without-ensurepip --with-pydebug
$ make
$ cd ../..
$ LD_LIBRARY_PATH=$PWD/build/debug build/debug/python -m test -v test_tools

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45402>
_______________________________________

From report at bugs.python.org  Thu Oct  7 06:48:49 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 07 Oct 2021 10:48:49 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633603729.99.0.96915893735.issue29410@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

> I don't quite follow. Why is it fine that you discuss DoS, but it's not
fine when others discuss DoS ?

But this BPO is not about discussing mitigations against DoS attacks in general. It's about adding SipHash1-3- and following the example of Rust and Ruby.

If you like to discuss DoS attacks on hashing of numeric types or other mitigations, then please do this in a dedicated ticket. I like to keep this BPO focused on a single topic.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 06:54:07 2021
From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=)
Date: Thu, 07 Oct 2021 10:54:07 +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: <1633604047.81.0.254500323475.issue45402@roundup.psfhosted.org>


Miro Hron?ok <miro at hroncok.cz> added the comment:

I can also reproduce this without the additional configure flags:

[cpython]$ git clean -fdx
[cpython]$ mkdir -p build/debug
[cpython]$ cd build/debug
[debug]$ ../../configure --with-pydebug
[debug]$ make
[debug]$ cd ../..
[cpython]$ build/debug/python -m test -v test_tools
...
SystemExit: ERROR: missing _freeze_module

As well as from the build dir:

[cpython]$ cd build/debug
[debug]$ ./python -m test -v test_tools
...
SystemExit: ERROR: missing _freeze_module

But when I build from the source directory directly:

[cpython]$ git clean -fdx
[cpython]$ ./configure --with-pydebug
[cpython]$ make
[cpython]$ ./python -m test -v test_tools
...
Tests result: SUCCESS

Hence, I assume the culprit is in building from a subdirectory.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45402>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:02:24 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Thu, 07 Oct 2021 11:02:24 +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: <1633604544.53.0.947644107397.issue26651@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

Yes, deprecating the preconfigured adapters and converters, but keeping the ability to register adapters/converters sounds like a very good idea to me. As you point out, Marc-Andre, they are application specific. Also, implementing converters and adapters is very trivial.

In any case, the documentation for registering converters should be improved, IMHO.

----------
nosy: +erlendaasland

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26651>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:05:47 2021
From: report at bugs.python.org (Alex Zaslavskis)
Date: Thu, 07 Oct 2021 11:05:47 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633463037.19.0.965519087659.issue45382@roundup.psfhosted.org>
Message-ID: <1633604747.5.0.974252733463.issue45382@roundup.psfhosted.org>


Alex Zaslavskis <sahsariga111 at gmail.com> added the comment:

Beter solution . Using match in python 3.10

----------
Added file: https://bugs.python.org/file50331/main.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:07:09 2021
From: report at bugs.python.org (Ian Fisher)
Date: Thu, 07 Oct 2021 11:07:09 +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: <1633604829.35.0.600761524747.issue26651@roundup.psfhosted.org>


Change by Ian Fisher <ian at iafisher.com>:


----------
nosy: +iafisher

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26651>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:07:06 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 07 Oct 2021 11:07:06 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633604826.77.0.212296927346.issue29410@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

I have contacted JP Aumasson to get his feedback on this proposal.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:07:17 2021
From: report at bugs.python.org (Ian Fisher)
Date: Thu, 07 Oct 2021 11:07:17 +0000
Subject: [issue19065] sqlite3 timestamp adapter chokes on timezones
In-Reply-To: <1379808201.46.0.645672081963.issue19065@psf.upfronthosting.co.za>
Message-ID: <1633604837.44.0.16223747211.issue19065@roundup.psfhosted.org>


Change by Ian Fisher <ian at iafisher.com>:


----------
nosy: +iafisher

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19065>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:10:00 2021
From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=)
Date: Thu, 07 Oct 2021 11:10:00 +0000
Subject: [issue45400]
 test_name_error_suggestions_do_not_trigger_for_too_many_locals:
 AssertionError: 'a1' unexpectedly found in Traceback
In-Reply-To: <1633600047.69.0.0952962991188.issue45400@roundup.psfhosted.org>
Message-ID: <1633605000.05.0.144787656515.issue45400@roundup.psfhosted.org>


Miro Hron?ok <miro at hroncok.cz> added the comment:

I am working on a fix

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45400>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:14:44 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 11:14:44 +0000
Subject: [issue45400]
 test_name_error_suggestions_do_not_trigger_for_too_many_locals:
 AssertionError: 'a1' unexpectedly found in Traceback
In-Reply-To: <1633600047.69.0.0952962991188.issue45400@roundup.psfhosted.org>
Message-ID: <1633605284.36.0.541469140993.issue45400@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
keywords: +patch
pull_requests: +27118
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28783

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45400>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:21:03 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Thu, 07 Oct 2021 11:21:03 +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: <1633605663.24.0.638236512745.issue26651@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
versions: +Python 3.11 -Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26651>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:22:16 2021
From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=)
Date: Thu, 07 Oct 2021 11:22:16 +0000
Subject: [issue45400]
 test_name_error_suggestions_do_not_trigger_for_too_many_locals:
 AssertionError: 'a1' unexpectedly found in Traceback
In-Reply-To: <1633600047.69.0.0952962991188.issue45400@roundup.psfhosted.org>
Message-ID: <1633605736.8.0.978861587942.issue45400@roundup.psfhosted.org>


Change by Miro Hron?ok <miro at hroncok.cz>:


----------
pull_requests: +27119
pull_request: https://github.com/python/cpython/pull/28784

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45400>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:25:38 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 11:25:38 +0000
Subject: [issue45403] test_sys: test_stdlib_dir() fails when Python is built
 outside the source tree
Message-ID: <1633605938.68.0.349965351809.issue45403@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

Reproduce the issue:
---
# go to Python source tree
mkdir build
cd build
../configure
make
./python -m test test_sys
---

Output:

======================================================================
FAIL: test_stdlib_dir (test.test_sys.SysModuleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/python/main/Lib/test/test_sys.py", line 1005, in test_stdlib_dir
    self.assertEqual(actual, expected)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/home/vstinner/python/main/build/../Lib' != '/home/vstinner/python/main/Lib'
- /home/vstinner/python/main/build/../Lib
?                            ---------
+ /home/vstinner/python/main/Lib


Attached PR fix the issue.

----------
components: Tests
messages: 403389
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_sys: test_stdlib_dir() fails when Python is built outside the source tree
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45403>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:26:24 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 07 Oct 2021 11:26:24 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633605984.27.0.727550131512.issue29410@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

BTW: We already use (a slight variant of) xxHash for tuples: https://bugs.python.org/issue34751

The issues is an interesting read, in particular on how xxHash was eventually chosen, with a whole set of other hash algorithms in between.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:29:05 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 11:29:05 +0000
Subject: [issue45403] test_sys: test_stdlib_dir() fails when Python is built
 outside the source tree
In-Reply-To: <1633605938.68.0.349965351809.issue45403@roundup.psfhosted.org>
Message-ID: <1633606145.61.0.482318242167.issue45403@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
keywords: +patch
pull_requests: +27120
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28785

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45403>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:31:18 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 11:31:18 +0000
Subject: [issue45403] test_sys: test_stdlib_dir() fails when Python is built
 outside the source tree
In-Reply-To: <1633605938.68.0.349965351809.issue45403@roundup.psfhosted.org>
Message-ID: <1633606278.58.0.716309905918.issue45403@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Python 3.10 is not affected: sys._stdlib_dir was added to Python 3.11.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45403>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:41:55 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 11:41:55 +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: <1633606915.36.0.791258953849.issue45402@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

My fix for bpo-45020 no longer works, I'm not sure why:

commit 41551ee7e24fb6c58846836d3655dbb212281206
Author: Victor Stinner <vstinner at python.org>
Date:   Fri Sep 17 20:20:43 2021 +0200

    bpo-45020: Fix build out of source tree (GH-28410)
    
    * Makefile.pre.in: Add $(srcdir) when needed, remove it when it was
      used by mistake.
    * freeze_modules.py tool uses ./Programs/_freeze_module if the
      executable doesn't exist in the source tree.

I'm working on a new fix.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45402>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:44:22 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 07 Oct 2021 11:44:22 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1633603729.99.0.96915893735.issue29410@roundup.psfhosted.org>
Message-ID: <c71afe64-f315-6a8c-01dd-e8284090fc19@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 07.10.2021 12:48, Christian Heimes wrote:
> 
>> I don't quite follow. Why is it fine that you discuss DoS, but it's not
> fine when others discuss DoS ?
> 
> But this BPO is not about discussing mitigations against DoS attacks in general. It's about adding SipHash1-3- and following the example of Rust and Ruby.
> 
> If you like to discuss DoS attacks on hashing of numeric types or other mitigations, then please do this in a dedicated ticket. I like to keep this BPO focused on a single topic.

The point that both Victor and I wanted to make is that we have
different views on the relevance of DoS attack mitigations
on selecting the default hash algorithm to use with Python strings
(and other objects which use pyhash.c).

The motivation for moving to siphash 1-3 is performance and we can
potentially get even better performance by looking at today's hash
algorithms and revisiting the decision to go with siphash.

This broadens the discussion, yes, but that can easily be addressed
by changing the title to e.g. "Revisiting the default hash algorithm
for strings".

Since siphash is a crypto hash function, whereas xxhash (and other
faster hash algorithms) are non-crypto hash functions, the topic of
hash collisions which can be used for DoS becomes relevant, so I
don't see why such discussions are off-topic.

With non-crypto hash algorithms available which exhibit good
collision stats and taking into account that DoS can be mitigated
using other ways (which is essential anyway, since Python doesn't
protect again hash based DoS in all cases), we get to a better Python.

More details on xxhash collision stats:
https://github.com/Cyan4973/xxHash/wiki/Collision-ratio-comparison#collision-study

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:46:39 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 11:46:39 +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: <1633607199.23.0.609645821795.issue45402@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
keywords: +patch
pull_requests: +27121
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28786

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45402>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:47:32 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 07 Oct 2021 11:47:32 +0000
Subject: [issue45400]
 test_name_error_suggestions_do_not_trigger_for_too_many_locals:
 AssertionError: 'a1' unexpectedly found in Traceback
In-Reply-To: <1633600047.69.0.0952962991188.issue45400@roundup.psfhosted.org>
Message-ID: <1633607252.63.0.867209961374.issue45400@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27122
pull_request: https://github.com/python/cpython/pull/28787

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45400>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:47:27 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 11:47:27 +0000
Subject: [issue45400]
 test_name_error_suggestions_do_not_trigger_for_too_many_locals:
 AssertionError: 'a1' unexpectedly found in Traceback
In-Reply-To: <1633600047.69.0.0952962991188.issue45400@roundup.psfhosted.org>
Message-ID: <1633607247.19.0.015090735904.issue45400@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 4e605666b08b8f863cbbbdaa34bb06988e648d26 by Victor Stinner in branch 'main':
bpo-45400: Fix suggestion test of test_exceptions (GH-28783)
https://github.com/python/cpython/commit/4e605666b08b8f863cbbbdaa34bb06988e648d26


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45400>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:48:44 2021
From: report at bugs.python.org (E. Paine)
Date: Thu, 07 Oct 2021 11:48:44 +0000
Subject: [issue45103] IDLE: make configdialog font page survive font failures
In-Reply-To: <1630790219.84.0.830457804554.issue45103@roundup.psfhosted.org>
Message-ID: <1633607324.48.0.716529986926.issue45103@roundup.psfhosted.org>


E. Paine <xepaine13 at gmail.com> added the comment:

I am unable to reproduce on either Python 3.9.6 (Tk 8.6.9) or 3.10.0 (Tk 8.6.10).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45103>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:57:28 2021
From: report at bugs.python.org (Diego Alonso)
Date: Thu, 07 Oct 2021 11:57:28 +0000
Subject: [issue45404] Undefined I_* macros when building 3.10 on Ubuntu?
Message-ID: <1633607848.34.0.992499900554.issue45404@roundup.psfhosted.org>


New submission from Diego Alonso <diego at mathisart.org>:

Trying to build Python 3.10 on Ubuntu 20.04. It builds everything but the fcntl module; ie. at the end it says:

Failed to build these modules:
fcntl.

Here are the compilation errors. It's trying to use certain macros that are undefined: I_PUSH, I_POP, I_LOOK, I_FLUSH, I_FLUSHBAND, I_SETSIG, I_GETSIG, I_FIND, I_PEEK, I_SRDOPT, I_GRDOPT, I_NREAD, I_FDINSERT, I_STR, I_SWROPT, I_SENDFD, I_RECVFD, I_LIST, I_ATMARK, I_CKBAND, I_GETBAND, I_CANPUT, I_SETCLTIME, I_LINK, I_UNLINK, I_PLINK, I_PUNLINK

----------------------------------------------------------------
Modules/_xxsubinterpretersmodule.o
In file included from ./Include/Python.h:140,
                 from /home/da/git/Python-3.10.0/Modules/fcntlmodule.c:6:
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c: In function ?all_ins?:
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:614:33: error: ?I_PUSH? undeclared (first use in this function)
  614 |     if (PyModule_AddIntMacro(m, I_PUSH)) return -1;
      |                                 ^~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:614:33: note: each undeclared identifier is reported only once for each function it appears in
  614 |     if (PyModule_AddIntMacro(m, I_PUSH)) return -1;
      |                                 ^~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:615:33: error: ?I_POP? undeclared (first use in this function)
  615 |     if (PyModule_AddIntMacro(m, I_POP)) return -1;
      |                                 ^~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:616:33: error: ?I_LOOK? undeclared (first use in this function); did you mean ?F_LOCK??
  616 |     if (PyModule_AddIntMacro(m, I_LOOK)) return -1;
      |                                 ^~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:617:33: error: ?I_FLUSH? undeclared (first use in this function); did you mean ?CFLUSH??
  617 |     if (PyModule_AddIntMacro(m, I_FLUSH)) return -1;
      |                                 ^~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:618:33: error: ?I_FLUSHBAND? undeclared (first use in this function)
  618 |     if (PyModule_AddIntMacro(m, I_FLUSHBAND)) return -1;
      |                                 ^~~~~~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:619:33: error: ?I_SETSIG? undeclared (first use in this function); did you mean ?F_SETSIG??
  619 |     if (PyModule_AddIntMacro(m, I_SETSIG)) return -1;
      |                                 ^~~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:620:33: error: ?I_GETSIG? undeclared (first use in this function); did you mean ?F_GETSIG??
  620 |     if (PyModule_AddIntMacro(m, I_GETSIG)) return -1;
      |                                 ^~~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:621:33: error: ?I_FIND? undeclared (first use in this function)
  621 |     if (PyModule_AddIntMacro(m, I_FIND)) return -1;
      |                                 ^~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:622:33: error: ?I_PEEK? undeclared (first use in this function)
  622 |     if (PyModule_AddIntMacro(m, I_PEEK)) return -1;
      |                                 ^~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:623:33: error: ?I_SRDOPT? undeclared (first use in this function)
  623 |     if (PyModule_AddIntMacro(m, I_SRDOPT)) return -1;
      |                                 ^~~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:624:33: error: ?I_GRDOPT? undeclared (first use in this function)
  624 |     if (PyModule_AddIntMacro(m, I_GRDOPT)) return -1;
      |                                 ^~~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:625:33: error: ?I_NREAD? undeclared (first use in this function); did you mean ?FIONREAD??
  625 |     if (PyModule_AddIntMacro(m, I_NREAD)) return -1;
      |                                 ^~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:626:33: error: ?I_FDINSERT? undeclared (first use in this function)
  626 |     if (PyModule_AddIntMacro(m, I_FDINSERT)) return -1;
      |                                 ^~~~~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:627:33: error: ?I_STR? undeclared (first use in this function)
  627 |     if (PyModule_AddIntMacro(m, I_STR)) return -1;
      |                                 ^~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:628:33: error: ?I_SWROPT? undeclared (first use in this function)
  628 |     if (PyModule_AddIntMacro(m, I_SWROPT)) return -1;
      |                                 ^~~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
gcc -pthread -shared -fno-semantic-interposition -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -fprofile-generate build/temp.linux-x86_64-3.10/home/da/git/Python-3.10.0/Modules/_contextvarsmodule.o -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib -o build/lib.linux-x86_64-3.10/_contextvars.cpython-310-x86_64-linux-gnu.so
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:633:33: error: ?I_SENDFD? undeclared (first use in this function)
  633 |     if (PyModule_AddIntMacro(m, I_SENDFD)) return -1;
      |                                 ^~~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:634:33: error: ?I_RECVFD? undeclared (first use in this function)
  634 |     if (PyModule_AddIntMacro(m, I_RECVFD)) return -1;
      |                                 ^~~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:635:33: error: ?I_LIST? undeclared (first use in this function)
  635 |     if (PyModule_AddIntMacro(m, I_LIST)) return -1;
      |                                 ^~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:636:33: error: ?I_ATMARK? undeclared (first use in this function)
  636 |     if (PyModule_AddIntMacro(m, I_ATMARK)) return -1;
      |                                 ^~~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:637:33: error: ?I_CKBAND? undeclared (first use in this function)
  637 |     if (PyModule_AddIntMacro(m, I_CKBAND)) return -1;
      |                                 ^~~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:638:33: error: ?I_GETBAND? undeclared (first use in this function)
  638 |     if (PyModule_AddIntMacro(m, I_GETBAND)) return -1;
      |                                 ^~~~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:639:33: error: ?I_CANPUT? undeclared (first use in this function)
  639 |     if (PyModule_AddIntMacro(m, I_CANPUT)) return -1;
      |                                 ^~~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:640:33: error: ?I_SETCLTIME? undeclared (first use in this function)
  640 |     if (PyModule_AddIntMacro(m, I_SETCLTIME)) return -1;
      |                                 ^~~~~~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:644:33: error: ?I_LINK? undeclared (first use in this function); did you mean ?EMLINK??
  644 |     if (PyModule_AddIntMacro(m, I_LINK)) return -1;
      |                                 ^~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:645:33: error: ?I_UNLINK? undeclared (first use in this function)
  645 |     if (PyModule_AddIntMacro(m, I_UNLINK)) return -1;
      |                                 ^~~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:646:33: error: ?I_PLINK? undeclared (first use in this function)
  646 |     if (PyModule_AddIntMacro(m, I_PLINK)) return -1;
      |                                 ^~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:647:33: error: ?I_PUNLINK? undeclared (first use in this function)
  647 |     if (PyModule_AddIntMacro(m, I_PUNLINK)) return -1;
      |                                 ^~~~~~~~~
./Include/modsupport.h:154:67: note: in definition of macro ?PyModule_AddIntMacro?
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |

----------
components: Build
messages: 403396
nosy: etale-cohomology
priority: normal
severity: normal
status: open
title: Undefined I_* macros when building 3.10 on Ubuntu?
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45404>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:59:00 2021
From: report at bugs.python.org (Julien Palard)
Date: Thu, 07 Oct 2021 11:59:00 +0000
Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS
In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za>
Message-ID: <1633607940.53.0.63032432126.issue10716@roundup.psfhosted.org>


Julien Palard <julien+python at palard.fr> added the comment:

Does someone want to review https://github.com/python/cpython/pull/28651?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue10716>
_______________________________________

From report at bugs.python.org  Thu Oct  7 07:59:42 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 11:59:42 +0000
Subject: [issue45400]
 test_name_error_suggestions_do_not_trigger_for_too_many_locals:
 AssertionError: 'a1' unexpectedly found in Traceback
In-Reply-To: <1633600047.69.0.0952962991188.issue45400@roundup.psfhosted.org>
Message-ID: <1633607982.54.0.859723533753.issue45400@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> I am working on a fix

Or, I missed your message. You wrote it 4 minutes before I created my PR :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45400>
_______________________________________

From report at bugs.python.org  Thu Oct  7 08:11:42 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 07 Oct 2021 12:11:42 +0000
Subject: [issue45400]
 test_name_error_suggestions_do_not_trigger_for_too_many_locals:
 AssertionError: 'a1' unexpectedly found in Traceback
In-Reply-To: <1633600047.69.0.0952962991188.issue45400@roundup.psfhosted.org>
Message-ID: <1633608702.93.0.806537100873.issue45400@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset d55bf81c4ee2dcdd5dfa3b5a9905a0b32ca8d38b by Miss Islington (bot) in branch '3.10':
bpo-45400: Fix suggestion test of test_exceptions (GH-28783)
https://github.com/python/cpython/commit/d55bf81c4ee2dcdd5dfa3b5a9905a0b32ca8d38b


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45400>
_______________________________________

From report at bugs.python.org  Thu Oct  7 08:23:08 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 07 Oct 2021 12:23:08 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633609388.8.0.629366471255.issue29410@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

SipHash is a cryptographically secure PRF, not a cryptographic hashing algorithm, https://www.python.org/dev/peps/pep-0456/#siphash

I'm strongly against using a different algorithm when the rest of the world is using either SipHash-2-4 or SipHash-1-3. A minuscule performance gain is not worth the risk.

If users like to use an alternative algorithm, then they are free to do so. PEP 456 gives them a hook point to override the algorithm on build time of CPython.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 08:47:32 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Thu, 07 Oct 2021 12:47:32 +0000
Subject: [issue45243] [sqlite3] add support for changing connection limits
In-Reply-To: <1632090954.41.0.8887678667.issue45243@roundup.psfhosted.org>
Message-ID: <1633610852.38.0.113278375598.issue45243@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
pull_requests: +27123
pull_request: https://github.com/python/cpython/pull/28790

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45243>
_______________________________________

From report at bugs.python.org  Thu Oct  7 08:56:37 2021
From: report at bugs.python.org (debohman)
Date: Thu, 07 Oct 2021 12:56:37 +0000
Subject: [issue45405] Python 3.10.0 does not configure on darwin using public
 llvm / clang
Message-ID: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>


New submission from debohman <debohman at gmail.com>:

% CC=clang CXX=clang++ ./configure --enable-optimizations --with-lto
checking build system type... x86_64-apple-darwin16.7.0
checking host system type... x86_64-apple-darwin16.7.0
checking for python3.10... no
checking for python3... python3
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "darwin"
checking for gcc... clang
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... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for a sed that does not truncate output... /usr/local/bin/sed
checking for --with-cxx-main=<compiler>... no
checking for the platform triplet based on compiler characteristics... darwin
configure: error: internal configure error for the platform triplet, please file a bug report

The problem occurs here at line 5382 of configure:

if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
  if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
    as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
  fi

The problem is that $PLATFORM_TRIPLET is set to darwin (which appears to be correct) and $MULTIARCH is set thus:

MULTIARCH=$($CC --print-multiarch 2>/dev/null)

which evaluates to x86_64-apple-darwin16.7.0.

This is with the public llvm / clang version 13.0.0.

If you set MULTIARCH=darwin in configure, python configures, builds and runs.

----------
components: Build
messages: 403401
nosy: debohman
priority: normal
severity: normal
status: open
title: Python 3.10.0 does not configure on darwin using public llvm / clang
type: compile error
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Thu Oct  7 08:57:35 2021
From: report at bugs.python.org (Alexey)
Date: Thu, 07 Oct 2021 12:57:35 +0000
Subject: [issue45398] Bugs in set operations in 3.8.10 (detected in Win7)
In-Reply-To: <1633597092.06.0.36085946328.issue45398@roundup.psfhosted.org>
Message-ID: <1633611455.01.0.973563101569.issue45398@roundup.psfhosted.org>


Alexey <smi-alexey at yandex.ru> added the comment:

Is interesting, that in win10 the bug is not reproduced too !
(only in win7!!!)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45398>
_______________________________________

From report at bugs.python.org  Thu Oct  7 09:00:40 2021
From: report at bugs.python.org (Mark Shannon)
Date: Thu, 07 Oct 2021 13:00:40 +0000
Subject: [issue45116] Performance regression 3.10b1 and later on Windows:
 Py_DECREF() not inlined in PGO build
In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org>
Message-ID: <1633611640.48.0.907643134698.issue45116@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:

Sadly the MSVC team are claiming that this isn't a bug in their compiler.
Not sure how we convince them that it is. The website rejects any attempt to reopen the issue.

How feasible would it be to use Clang or GCC on Windows?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45116>
_______________________________________

From report at bugs.python.org  Thu Oct  7 09:17:19 2021
From: report at bugs.python.org (Diego Alonso)
Date: Thu, 07 Oct 2021 13:17:19 +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: <1633612639.25.0.910431784826.issue41105@roundup.psfhosted.org>


Diego Alonso <diego at mathisart.org> added the comment:

Yes, I have the same problem. The empty file is needed to avoid compilation errors in certain builds, but in this case it creates an error...

----------
nosy: +etale-cohomology

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41105>
_______________________________________

From report at bugs.python.org  Thu Oct  7 09:17:47 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 07 Oct 2021 13:17:47 +0000
Subject: [issue45404] Undefined I_* macros when building 3.10 on Ubuntu?
In-Reply-To: <1633607848.34.0.992499900554.issue45404@roundup.psfhosted.org>
Message-ID: <1633612667.54.0.43587862657.issue45404@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

What is the output of the following command?

    ./python -m sysconfig | grep HAVE_STROPTS_H

Also, is there the stropts.h file on your system and where?

    dlocate stropts.h
    locate stropts.h

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45404>
_______________________________________

From report at bugs.python.org  Thu Oct  7 09:28:44 2021
From: report at bugs.python.org (Matthias Reichl)
Date: Thu, 07 Oct 2021 13:28:44 +0000
Subject: [issue45262] crash if asyncio is used before and after
 re-initialization if using python embedded in an application
In-Reply-To: <1632299546.72.0.498896278525.issue45262@roundup.psfhosted.org>
Message-ID: <1633613324.29.0.280117062733.issue45262@roundup.psfhosted.org>


Change by Matthias Reichl <hias at horus.com>:


----------
keywords: +patch
nosy: +HiassofT
nosy_count: 4.0 -> 5.0
pull_requests: +27124
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28796

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45262>
_______________________________________

From report at bugs.python.org  Thu Oct  7 09:29:54 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 07 Oct 2021 13:29:54 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633613394.26.0.149303567264.issue29410@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

JP got back to me

On 07/10/2021 14.34, Jean-Philippe Aumasson wrote:
> xxHash is much faster indeed, but collisions seem trivial to find, which 
> might allow hash-flood DoS again (see for example 
> https://github.com/Cyan4973/xxHash/issues/180 
> <https://github.com/Cyan4973/xxHash/issues/180>). It's however unclear 
> whether exploitable multicollisions can also be trivially found.
> 
> If collisions don't matter and if the ~10x speed-up makes a difference, 
> then probably a good option, but guess you'll need to keep SipHash (or 
> some other safe hash) when DoS resistance is needed?

This information disqualifies xxHash for our use case.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 09:37:57 2021
From: report at bugs.python.org (Matthias Reichl)
Date: Thu, 07 Oct 2021 13:37:57 +0000
Subject: [issue45262] crash if asyncio is used before and after
 re-initialization if using python embedded in an application
In-Reply-To: <1632299546.72.0.498896278525.issue45262@roundup.psfhosted.org>
Message-ID: <1633613877.96.0.697395351428.issue45262@roundup.psfhosted.org>


Matthias Reichl <hias at horus.com> added the comment:

We were hitting the same issue in kodi, which uses embedded sub-interpreters to run python addons, after one of the addons was switched to asyncio.

The immediate cause of the assertion failure is a use-after-free issue from the running loop holder cache:

When the running loop holder is deallocated (which happens eg on interpreter shutdown) cached_running_holder holds a dangling pointer.

A subsequent call to get_running_loop() may then pick that up and boom.

While probably not a full fix for this issue I think it would be good to fix the use-after-free problem - there could be other code paths that lead to this situation. I've created a github pull request for that

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45262>
_______________________________________

From report at bugs.python.org  Thu Oct  7 09:52:29 2021
From: report at bugs.python.org (=?utf-8?q?C=C3=A9dric_Krier?=)
Date: Thu, 07 Oct 2021 13:52:29 +0000
Subject: [issue17659] no way to determine First weekday (based on locale)
In-Reply-To: <1365410883.64.0.172005963141.issue17659@psf.upfronthosting.co.za>
Message-ID: <1633614749.44.0.993258012671.issue17659@roundup.psfhosted.org>


C?dric Krier <cedric.krier at b2ck.com> added the comment:

I have updated the PR to be included in 3.11

----------
versions: +Python 3.11 -Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17659>
_______________________________________

From report at bugs.python.org  Thu Oct  7 09:54:47 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 13:54:47 +0000
Subject: [issue45400]
 test_name_error_suggestions_do_not_trigger_for_too_many_locals:
 AssertionError: 'a1' unexpectedly found in Traceback
In-Reply-To: <1633600047.69.0.0952962991188.issue45400@roundup.psfhosted.org>
Message-ID: <1633614887.16.0.356083552222.issue45400@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45400>
_______________________________________

From report at bugs.python.org  Thu Oct  7 09:54:29 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 13:54:29 +0000
Subject: [issue45116] Performance regression 3.10b1 and later on Windows:
 Py_DECREF() not inlined in PGO build
In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org>
Message-ID: <1633614869.8.0.906906790119.issue45116@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> How feasible would it be to use Clang or GCC on Windows?

clang seems to have a good Windows support and tries to the ABI compatible with MSC which is a must have to keep wheel package support (especially for the stable ABI, used by PyQt on Windows for example).

Moreover, there are ways to cross-build Python from another platform to Windows which can be convenient ;-)

I don't know the Windows ecosystem. Do people want to get VS debugger for example? Is clang compatible with the VS debugger?

See the discussion of 2014: "Status of C compilers for Python on Windows"
https://mail.python.org/archives/list/python-dev at python.org/thread/SYWDJ23AQDPWQN7HD6M6YCSGXERCHWA2/

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45116>
_______________________________________

From report at bugs.python.org  Thu Oct  7 09:57:49 2021
From: report at bugs.python.org (=?utf-8?q?Miroslav_Such=C3=BD?=)
Date: Thu, 07 Oct 2021 13:57:49 +0000
Subject: [issue45406] inspect.getouterframes() tracebacks when $CWD does not
 exists
Message-ID: <1633615069.33.0.311671101448.issue45406@roundup.psfhosted.org>


New submission from Miroslav Such? <msuchy at redhat.com>:

When you exec inspect.getouterframes() in directory, which no longer exists, then you get traceback, because the code traverse to os.getcwd() which fails.

Reproducer:

$ mkdir /tmp/bar
$ cd /tmp/bar
$ rmdir /tmp/bar
$ python3
Python 3.10.0rc2 (default, Sep  8 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import inspect
>>> inspect.getouterframes(inspect.currentframe())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.10/inspect.py", line 1653, in getouterframes
    frameinfo = (frame,) + getframeinfo(frame, context)
  File "/usr/lib64/python3.10/inspect.py", line 1623, in getframeinfo
    filename = getsourcefile(frame) or getfile(frame)
  File "/usr/lib64/python3.10/inspect.py", line 829, in getsourcefile
    module = getmodule(object, filename)
  File "/usr/lib64/python3.10/inspect.py", line 861, in getmodule
    file = getabsfile(object, _filename)
  File "/usr/lib64/python3.10/inspect.py", line 845, in getabsfile
    return os.path.normcase(os.path.abspath(_filename))
  File "/usr/lib64/python3.10/posixpath.py", line 383, in abspath
    cwd = os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory

----------
components: Library (Lib)
messages: 403410
nosy: msuchy at redhat.com
priority: normal
severity: normal
status: open
title: inspect.getouterframes() tracebacks when $CWD does not exists
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45406>
_______________________________________

From report at bugs.python.org  Thu Oct  7 09:58:18 2021
From: report at bugs.python.org (=?utf-8?q?Miroslav_Such=C3=BD?=)
Date: Thu, 07 Oct 2021 13:58:18 +0000
Subject: [issue45406] inspect.getouterframes() tracebacks when $CWD does not
 exists
In-Reply-To: <1633615069.33.0.311671101448.issue45406@roundup.psfhosted.org>
Message-ID: <1633615098.95.0.000339741444091.issue45406@roundup.psfhosted.org>


Change by Miroslav Such? <msuchy at redhat.com>:


----------
type:  -> crash

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45406>
_______________________________________

From report at bugs.python.org  Thu Oct  7 09:58:27 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 07 Oct 2021 13:58:27 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1633613394.26.0.149303567264.issue29410@roundup.psfhosted.org>
Message-ID: <44b84420-6b63-940c-0d01-f10e5613217e@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 07.10.2021 15:29, Christian Heimes wrote:
> 
> Christian Heimes <lists at cheimes.de> added the comment:
> 
> JP got back to me
> 
> On 07/10/2021 14.34, Jean-Philippe Aumasson wrote:
>> xxHash is much faster indeed, but collisions seem trivial to find, which 
>> might allow hash-flood DoS again (see for example 
>> https://github.com/Cyan4973/xxHash/issues/180 
>> <https://github.com/Cyan4973/xxHash/issues/180>). It's however unclear 
>> whether exploitable multicollisions can also be trivially found.
>>
>> If collisions don't matter and if the ~10x speed-up makes a difference, 
>> then probably a good option, but guess you'll need to keep SipHash (or 
>> some other safe hash) when DoS resistance is needed?
> 
> This information disqualifies xxHash for our use case.

The quoted issue was for an early version of XXH3.

Please see
https://github.com/Cyan4973/xxHash/wiki/Collision-ratio-comparison
as reference for collision analysis of the current xxHash versions.

The numbers are close to the expected case, meaning that
collisions are not more frequent than statistically to be
expected given the hash and the test sample size.

Looking at this older comparison, it would also make sense to
revisit the hybrid approach, e.g. use FNV for strings
up to 16 bytes, XXH128 for longer strings:

https://cglab.ca/~abeinges/blah/hash-rs/

Given that dictionaries often use relatively short string keys,
this should have a significant effect on applications where the
dictionaries don't just use interned strings.

It would also have an effect on Python startup time, since all
those interned strings need to have their hash calculated
during startup.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 10:00:00 2021
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 07 Oct 2021 14:00:00 +0000
Subject: [issue45393] help() on operator precedence has confusing entries
 "await" "x" and "not" "x"
In-Reply-To: <1633534428.51.0.112977953361.issue45393@roundup.psfhosted.org>
Message-ID: <1633615200.8.0.691129502677.issue45393@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:

Correct; 3.7 and 3.8 are both in security-fix-only maintenance mode; their documentation is no longer updated unless a security-related fix causes a significant change in behavior that needs to be documented.

As far as fixing this issue, we have a few options.  The cause is that the source for these rows looks like ':keyword:`await` ``x``', which basically produces two inline code blocks with a non-code space between, which the pydoc-topics renderer renders as two separately quoted words.

Option 1: Replace ':keyword:`await` ``x``' with `:keyword:`await x <await>`.  This keeps the link to the `await` anchor, but extends it across the ' x' bit.  The pydoc rendering is '"await x"'.

Option 2: Replace ':keyword:`await` ``x``' with '``await x``.  This also gives the pydoc rendering of '"await x"', but loses the link to the `await` anchor, which I would rather not do.

Option 3: As option 2, but also replace 'Await' in the description column with a link to the `await` anchor.  This breaks from how other keywords in the table are linked.

Option 4: Adjust the pydoc-topics renderer to smush together consecutive inline code blocks.  This might cause some issues elsewhere.

----------
nosy: +zach.ware
versions:  -Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45393>
_______________________________________

From report at bugs.python.org  Thu Oct  7 10:17:46 2021
From: report at bugs.python.org (jg)
Date: Thu, 07 Oct 2021 14:17:46 +0000
Subject: [issue45397] Doc for turtle.write missing the tuple part of the font
 param in 3.10+
In-Reply-To: <1633589227.57.0.269177625823.issue45397@roundup.psfhosted.org>
Message-ID: <AT5PR8401MB059590812F4DE237CEDFA86CC5B19@AT5PR8401MB0595.NAMPRD84.PROD.OUTLOOK.COM>


jg <jggammon at hotmail.com> added the comment:

I forgot to mention I'm on Windows 10 PC and see the same thing under Edge and FireFox.

John G. Gammon -.  ..  ....  ..  .-..      .-  -..  --  ..  .-.  .-  .-.  ..
This message and any attachments hereto may contain confidential and/or privileged information. If you are not the intended recipient or authorized to receive this for the intended recipient, please advise the sender immediately by reply e-mail and delete this message; you must not use, copy, disclose or take any other action based on this message or any information herein. Thank you for your cooperation.

________________________________
From: report=bugs.python.org at roundup.psfhosted.org <report=bugs.python.org at roundup.psfhosted.org> on behalf of Serhiy Storchaka <report at bugs.python.org>
Sent: Thursday, October 7, 2021 01:47
To: jggammon at hotmail.com <jggammon at hotmail.com>
Subject: [issue45397] Doc for turtle.write missing the tuple part of the font param in 3.10+

Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

This looks like some Sphinx bug.

In Python 3.8, using Sphinx:

>>> from sphinx.pycode import ast
>>> ast.unparse(ast.parse("('Arial', 8, 'normal')", 'eval').body)
"'Arial', 8, 'normal'"

For comparison, using builtin ast module in Python 3.9:

>>> import ast
>>> ast.unparse(ast.parse("('Arial', 8, 'normal')", 'eval').body)
"('Arial', 8, 'normal')"

----------
nosy: +georg.brandl, serhiy.storchaka
type:  -> behavior
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45397>
_______________________________________

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45397>
_______________________________________

From report at bugs.python.org  Thu Oct  7 10:24:25 2021
From: report at bugs.python.org (Dulanic)
Date: Thu, 07 Oct 2021 14:24:25 +0000
Subject: [issue37157] shutil: add reflink=False to file copy functions to
 control clone/CoW copies (use copy_file_range)
In-Reply-To: <1559684200.61.0.18008315195.issue37157@roundup.psfhosted.org>
Message-ID: <1633616665.58.0.79142636174.issue37157@roundup.psfhosted.org>


Dulanic <dulanic at gmail.com> added the comment:

As a note, coreutils 9.0 cp defaults now to reflink=auto.

https://www.phoronix.com/scan.php?page=news_item&px=GNU-Coreutils-9.0

----------
nosy: +dulanic

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37157>
_______________________________________

From report at bugs.python.org  Thu Oct  7 10:24:48 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 07 Oct 2021 14:24:48 +0000
Subject: [issue45397] Doc for turtle.write missing the tuple part of the font
 param in 3.10+
In-Reply-To: <1633576337.95.0.961564337357.issue45397@roundup.psfhosted.org>
Message-ID: <1633616688.41.0.54799488913.issue45397@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

jg, please remove the copy of other message when answer. It makes painfully difficult reading the discussion for visually impaired people.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45397>
_______________________________________

From report at bugs.python.org  Thu Oct  7 10:29:12 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 07 Oct 2021 14:29:12 +0000
Subject: [issue45397] Doc for turtle.write missing the tuple part of the font
 param in 3.10+
In-Reply-To: <1633576337.95.0.961564337357.issue45397@roundup.psfhosted.org>
Message-ID: <1633616952.21.0.399197730658.issue45397@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I tested with Sphinx 1.5.4, and this issue is gone. It introduces a regression with some smart quotes (see https://github.com/sphinx-doc/sphinx/issues/9713), but it is less severe than incorrect rendering of tuples as parameter defaults.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45397>
_______________________________________

From report at bugs.python.org  Thu Oct  7 10:29:48 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 07 Oct 2021 14:29:48 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633616988.47.0.758806951649.issue29410@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

I suggest that you write a new PEP that discusses possible improvement for str and bytes hashing. This BPO is just about SipHash-1-3. As the author and implementer of PEP 456, I only approve SipHash-1-3 as new default algorithm.

All other change proposals need at least separate BPOs, preferable a PEP. I don't want to have this simple feature proposal turned into a major design epic.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 10:33:29 2021
From: report at bugs.python.org (Mark Shannon)
Date: Thu, 07 Oct 2021 14:33:29 +0000
Subject: [issue45340] Lazily create dictionaries for plain Python objects
In-Reply-To: <1633087277.57.0.188806648124.issue45340@roundup.psfhosted.org>
Message-ID: <1633617209.19.0.27640041515.issue45340@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
keywords: +patch
pull_requests: +27125
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28802

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45340>
_______________________________________

From report at bugs.python.org  Thu Oct  7 10:37:05 2021
From: report at bugs.python.org (Giampaolo Rodola')
Date: Thu, 07 Oct 2021 14:37:05 +0000
Subject: [issue37157] shutil: add reflink=False to file copy functions to
 control clone/CoW copies (use copy_file_range)
In-Reply-To: <1559684200.61.0.18008315195.issue37157@roundup.psfhosted.org>
Message-ID: <1633617425.36.0.66626636792.issue37157@roundup.psfhosted.org>


Giampaolo Rodola' <g.rodola at gmail.com> added the comment:

> So using copy_file_range (if available) should be the most generic solution, which includes copy-on-write support, and server-side copy support.

Doesn't this imply to pass some flag to copy_file_range()? "man copy_file_range" says:

> The flags argument is provided to allow for future extensions and currently must be set to 0.

How is CoW copy supposed to be done by using copy_file_range() exactly?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37157>
_______________________________________

From report at bugs.python.org  Thu Oct  7 10:38:05 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 07 Oct 2021 14:38:05 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633617485.65.0.900683528824.issue29410@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Do Rust and Ruby cache the hash of the string in the string object? If they do not then the hashing speed is more important to them.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 10:40:22 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 07 Oct 2021 14:40:22 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <5bc549d8-6dcc-0a76-78ea-e5beca99e859@egenix.com>
Message-ID: <CALFfu7AFnDO_c6wwL0zTJmRg3wc0t7k7pg_f5hyBxmVVwCaJJQ@mail.gmail.com>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

On Thu, Oct 7, 2021 at 1:17 AM Marc-Andre Lemburg
<report at bugs.python.org> wrote:
> I'm not sure I follow, but in any case, please make sure that
> the freeze tool in Tools/ continues to work with the new mechanism.
>
> The freeze tool would also need to know which modules are already
> frozen via the new script, so that modules don't get included twice.

Will do.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Thu Oct  7 10:43:14 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 07 Oct 2021 14:43:14 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <CALFfu7AFnDO_c6wwL0zTJmRg3wc0t7k7pg_f5hyBxmVVwCaJJQ@mail.gmail.com>
Message-ID: <552f2806-dbd5-572e-0160-632753a4ce75@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 07.10.2021 16:40, Eric Snow wrote:
> 
> On Thu, Oct 7, 2021 at 1:17 AM Marc-Andre Lemburg
> <report at bugs.python.org> wrote:
>> I'm not sure I follow, but in any case, please make sure that
>> the freeze tool in Tools/ continues to work with the new mechanism.
>>
>> The freeze tool would also need to know which modules are already
>> frozen via the new script, so that modules don't get included twice.
> 
> Will do.

Great, thanks, Eric.
 --
Marc-Andre Lemburg
eGenix.com

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Thu Oct  7 10:57:03 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 07 Oct 2021 14:57:03 +0000
Subject: [issue45103] IDLE: make configdialog font page survive font failures
In-Reply-To: <1630790219.84.0.830457804554.issue45103@roundup.psfhosted.org>
Message-ID: <1633618623.69.0.981280483462.issue45103@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Thanks.  Did the FiraCode font work for you or merely not work without crashing?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45103>
_______________________________________

From report at bugs.python.org  Thu Oct  7 11:07:02 2021
From: report at bugs.python.org (Albert Zeyer)
Date: Thu, 07 Oct 2021 15:07:02 +0000
Subject: [issue37157] shutil: add reflink=False to file copy functions to
 control clone/CoW copies (use copy_file_range)
In-Reply-To: <1559684200.61.0.18008315195.issue37157@roundup.psfhosted.org>
Message-ID: <1633619222.83.0.330798957741.issue37157@roundup.psfhosted.org>


Albert Zeyer <albzey at googlemail.com> added the comment:

> How is CoW copy supposed to be done by using copy_file_range() exactly?

I think copy_file_range() will just always use copy-on-write and/or server-side-copy when available. You cannot even turn that off.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37157>
_______________________________________

From report at bugs.python.org  Thu Oct  7 11:18:17 2021
From: report at bugs.python.org (Patrick Decat)
Date: Thu, 07 Oct 2021 15:18:17 +0000
Subject: [issue42066] CookieJar cookies should not be sorted
In-Reply-To: <1603011565.07.0.705714624719.issue42066@roundup.psfhosted.org>
Message-ID: <1633619897.28.0.535378181689.issue42066@roundup.psfhosted.org>


Change by Patrick Decat <pdecat at gmail.com>:


----------
nosy: +Patrick Decat

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42066>
_______________________________________

From report at bugs.python.org  Thu Oct  7 12:55:34 2021
From: report at bugs.python.org (Alexey)
Date: Thu, 07 Oct 2021 16:55:34 +0000
Subject: [issue45398] Bugs in set operations in 3.8.10 (detected in Win7)
In-Reply-To: <1633597092.06.0.36085946328.issue45398@roundup.psfhosted.org>
Message-ID: <1633625734.01.0.472794868632.issue45398@roundup.psfhosted.org>


Change by Alexey <smi-alexey at yandex.ru>:


----------
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45398>
_______________________________________

From report at bugs.python.org  Thu Oct  7 13:31:11 2021
From: report at bugs.python.org (Ned Deily)
Date: Thu, 07 Oct 2021 17:31:11 +0000
Subject: [issue45405] Python 3.10.0 does not configure on darwin using public
 llvm / clang
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1633627871.58.0.0724108647615.issue45405@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

On what platform and OS version are you building? When you say "public llvm / clang", do you mean from Apple for macOS or from some other source? Be aware that we only officially test and support building Python for macOS on macOS itself using the Apple build tools (Xcode or Command Line Tools).

----------
nosy: +ned.deily

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Thu Oct  7 13:48:45 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Thu, 07 Oct 2021 17:48:45 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633628925.23.0.0448902125114.issue29410@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

Victor:
> I expect even more interesting speedup with bytes string longer than 6k bytes. And I'm quite sure that it's common that people manipulates long strings in Python :-)

But do they use them as dict keys? AFAIK strings aren't hashed until hash() is called on them.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Thu Oct  7 13:49:27 2021
From: report at bugs.python.org (youknowone)
Date: Thu, 07 Oct 2021 17:49:27 +0000
Subject: [issue45407] Support buffer protocol for _struct.Struct format
 argument
Message-ID: <1633628967.32.0.849545614693.issue45407@roundup.psfhosted.org>


New submission from youknowone <jeong at youknowone.org>:

This feature is commented as `XXX` for years.

https://github.com/python/cpython/blob/4e605666b08b8f863cbbbdaa34bb06988e648d26/Modules/_struct.c#L1478

Giving a bug tracker id or removing the comment will clarify the problem.

----------
components: Library (Lib)
messages: 403426
nosy: youknowone
priority: normal
pull_requests: 27126
severity: normal
status: open
title: Support buffer protocol for _struct.Struct format argument
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45407>
_______________________________________

From report at bugs.python.org  Thu Oct  7 14:00:19 2021
From: report at bugs.python.org (Ammar Askar)
Date: Thu, 07 Oct 2021 18:00:19 +0000
Subject: [issue45408] [fuzzer] Weird input with continuation and newlines
 causes null deref in parser
Message-ID: <1633629619.45.0.834198327625.issue45408@roundup.psfhosted.org>


New submission from Ammar Askar <ammar at ammaraskar.com>:

>From the newly added ast.literal_eval(x) fuzzer, the following string fed to ast.literal_eval will cause a null pointer in get_error_line:

\
(\
\

This can be recreated with:

? ./python          
Python 3.11.0a1+ (heads/fuzz_ast-dirty:6c942a86a4, Oct  6 2021, 16:27:52) [GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>> ast.literal_eval(r'''\
... \
... (\
... \ ''')
[1]    15464 segmentation fault  ./python


---------------
Raw ASAN report
---------------

	==85015==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000001 (pc 0x7f987730e08c bp 0x7fff7f8e8080 sp 0x7fff7f8e7838 T0)
==85015==The signal is caused by a READ memory access.
==85015==Hint: address points to the zero page.
    #0 0x7f987730e08c in strchr-avx2.S:57 /build/glibc-eX1tMB/glibc-2.31/sysdeps/x86_64/multiarch/strchr-avx2.S:57
    #1 0x4d7a58 in strchr /src/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:0
    #2 0x9f9d95 in get_error_line cpython3/Parser/pegen.c:406:25
    #3 0x9f9d95 in _PyPegen_raise_error_known_location cpython3/Parser/pegen.c:497:26
    #4 0x9fd492 in RAISE_ERROR_KNOWN_LOCATION cpython3/Parser/pegen.h:169:5
    #5 0xa00528 in raise_unclosed_parentheses_error cpython3/Parser/pegen.c:267:8
    #6 0xa00528 in _PyPegen_check_tokenizer_errors cpython3/Parser/pegen.c:1314:25
    #7 0x9ff9e3 in _PyPegen_run_parser cpython3/Parser/pegen.c:1352:17
    #8 0xa015c5 in _PyPegen_run_parser_from_string cpython3/Parser/pegen.c:1479:14
    #9 0xa805e9 in _PyParser_ASTFromString cpython3/Parser/peg_api.c:14:21
    #10 0x85f01a in Py_CompileStringObject cpython3/Python/pythonrun.c:1371:11
    #11 0xc0785f in builtin_compile_impl cpython3/Python/bltinmodule.c:841:14
    #12 0xc0785f in builtin_compile cpython3/Python/clinic/bltinmodule.c.h:249:20
    #13 0xb7b28e in cfunction_vectorcall_FASTCALL_KEYWORDS cpython3/Objects/methodobject.c:446:24
    #14 0x764f22 in call_function cpython3/Python/ceval.c:0
    #15 0x7482e6 in _PyEval_EvalFrameDefault cpython3/Python/ceval.c:4614:19
    #16 0x741225 in _PyEval_EvalFrame cpython3/Include/internal/pycore_ceval.h:46:12
    #17 0x741225 in _PyEval_Vector cpython3/Python/ceval.c:5636:24
    #18 0x57c510 in _PyFunction_Vectorcall cpython3/Objects/call.c:0
    #19 0x764f22 in call_function cpython3/Python/ceval.c:0
    #20 0x7482e6 in _PyEval_EvalFrameDefault cpython3/Python/ceval.c:4614:19
    #21 0x741225 in _PyEval_EvalFrame cpython3/Include/internal/pycore_ceval.h:46:12
    #22 0x741225 in _PyEval_Vector cpython3/Python/ceval.c:5636:24
    #23 0x57c510 in _PyFunction_Vectorcall cpython3/Objects/call.c:0
    #24 0x579def in _PyObject_VectorcallTstate /workspace/out/libfuzzer-address-x86_64/include/python3.11/cpython/abstract.h:114:11
    #25 0x579def in PyObject_CallOneArg /workspace/out/libfuzzer-address-x86_64/include/python3.11/cpython/abstract.h:184:12
    #26 0x579def in fuzz_ast_literal_eval cpython3/Modules/_xxtestfuzz/fuzzer.c:425:25
    #27 0x579def in _run_fuzz cpython3/Modules/_xxtestfuzz/fuzzer.c:443:14
    #28 0x579def in LLVMFuzzerTestOneInput cpython3/Modules/_xxtestfuzz/fuzzer.c:565:11
    #29 0x4725e3 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) cxa_noexception.cpp:0
    #30 0x45deb2 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:324:6
    #31 0x463965 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) cxa_noexception.cpp:0
    #32 0x48c6b2 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #33 0x7f98771aa0b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/libc-start.c:308:16
    #34 0x43b16d in _start
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0x18b08c)
==85015==ABORTING

----------
components: Parser
messages: 403427
nosy: ammar2, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: [fuzzer] Weird input with continuation and newlines causes null deref in parser
type: crash
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45408>
_______________________________________

From report at bugs.python.org  Thu Oct  7 14:02:09 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Thu, 07 Oct 2021 18:02:09 +0000
Subject: [issue45408] [fuzzer] Weird input with continuation and newlines
 causes null deref in parser
In-Reply-To: <1633629619.45.0.834198327625.issue45408@roundup.psfhosted.org>
Message-ID: <1633629729.63.0.569837085543.issue45408@roundup.psfhosted.org>


Change by Gregory P. Smith <greg at krypto.org>:


----------
versions: +Python 3.10, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45408>
_______________________________________

From report at bugs.python.org  Thu Oct  7 14:15:14 2021
From: report at bugs.python.org (Max)
Date: Thu, 07 Oct 2021 18:15:14 +0000
Subject: [issue45393] help() on operator precedence has confusing entries
 "await" "x" and "not" "x"
In-Reply-To: <1633534428.51.0.112977953361.issue45393@roundup.psfhosted.org>
Message-ID: <1633630514.52.0.0328011911991.issue45393@roundup.psfhosted.org>


Max <mh+bugs.python.org at dsi972.fr> added the comment:

option 1 looks most attractive to me (and will also look most attractive in the rendering, IMHO -- certainly better than "await" "x", in any case).

P.S.: OK, thanks for explanations concerning 3.6 - 3.8. I do understand that it won't be fixed for these versions (not certain why not if possible at no cost), but I do not understand why these labels must be removed. The bug does exist but should simply be considered as "nofix" for these versions (or not), given that it's not in the "security" category. The fact that it won't be fixed, for whatever reason, should not mean that it should not be listed as existing, there.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45393>
_______________________________________

From report at bugs.python.org  Thu Oct  7 14:31:18 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Thu, 07 Oct 2021 18:31:18 +0000
Subject: [issue45408] [fuzzer] Weird input with continuation and newlines
 causes null deref in parser
In-Reply-To: <1633629619.45.0.834198327625.issue45408@roundup.psfhosted.org>
Message-ID: <1633631478.36.0.550471798161.issue45408@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

(unable to reproduce on 3.9)

----------
nosy: +gregory.p.smith
versions:  -Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45408>
_______________________________________

From report at bugs.python.org  Thu Oct  7 14:52:59 2021
From: report at bugs.python.org (Steve Dower)
Date: Thu, 07 Oct 2021 18:52:59 +0000
Subject: [issue45116] Performance regression 3.10b1 and later on Windows:
 Py_DECREF() not inlined in PGO build
In-Reply-To: <1633614869.8.0.906906790119.issue45116@roundup.psfhosted.org>
Message-ID: <535226dc-cabd-0482-eecc-fc4cbbf88c22@python.org>


Steve Dower <steve.dower at python.org> added the comment:

I would very much appreciate any new compiler be compatible with the 
standard Windows debuggers (windbg primarily, but I imagine most 
contributors would like it to keep working from VS).

Last I heard, clang is fine as a compiler for debugging if you use the 
MSVC linker to generate debug info, though it still isn't as complete as 
MSVC (ultimately by definition, since MSVC is the 
standard-by-implementation for this stuff). And I've got no idea 
how/whether link-time optimisation works when you mix tools, but I'd 
have to assume it doesn't.

Switching compiler may prevent me from being able to analyse crash 
reports (and by me, I mean the automated internal tools that do it for 
me), and certainly parts of the Windows build rely on MSVC-specific 
functionality right now (not in the main DLL) so we'd end up needing 
both for a full build.

Also, just to put it out there, I'm not volunteering to rewrite the 
build system :) If the steering council signs off on switching, I won't 
block it, but I have more interesting things to work on.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45116>
_______________________________________

From report at bugs.python.org  Thu Oct  7 14:53:21 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 07 Oct 2021 18:53:21 +0000
Subject: [issue27580] CSV Null Byte Error
In-Reply-To: <1469077368.13.0.160030895608.issue27580@psf.upfronthosting.co.za>
Message-ID: <1633632801.1.0.0176352902258.issue27580@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
keywords: +patch
pull_requests: +27127
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28808

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27580>
_______________________________________

From report at bugs.python.org  Thu Oct  7 15:02:08 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 07 Oct 2021 19:02:08 +0000
Subject: [issue27580] CSV Null Byte Error
In-Reply-To: <1469077368.13.0.160030895608.issue27580@psf.upfronthosting.co.za>
Message-ID: <1633633328.93.0.972099722043.issue27580@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

It looks to me that rejecting the null character is just an implementation artifact. 0 is used both as signalling value for "not set" character parameter and as the end-of-line character in the state automata. We can use different values outside of the range of Unicode characters (0-0x10ffff). It will automatically enable support of null characters.

----------
versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27580>
_______________________________________

From report at bugs.python.org  Thu Oct  7 15:03:01 2021
From: report at bugs.python.org (Steve Dower)
Date: Thu, 07 Oct 2021 19:03:01 +0000
Subject: [issue45116] Performance regression 3.10b1 and later on Windows:
 Py_DECREF() not inlined in PGO build
In-Reply-To: <535226dc-cabd-0482-eecc-fc4cbbf88c22@python.org>
Message-ID: <578ea8f6-b2f1-0cb7-c166-11541da19c94@python.org>


Steve Dower <steve.dower at python.org> added the comment:

If we know which parts of the function are critical, perhaps we should 
be designing a PGO profile that actually hits them all? The current 
profile is very arbitrary, basically just waiting for someone motivated 
enough to figure out a better one.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45116>
_______________________________________

From report at bugs.python.org  Thu Oct  7 15:08:47 2021
From: report at bugs.python.org (Vinay Sajip)
Date: Thu, 07 Oct 2021 19:08:47 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633633727.36.0.757161504356.issue45401@roundup.psfhosted.org>


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

RotatingFileHandler is also affected by the same issue.

Both RotatingFileHandler and TimedRotatingFileHandler have a shouldRollover method which, if it returns False, should prevent rollover.

I would think that putting something like

    if not os.path.isfile(self.baseFilename):
        return False

at the top of each of these methods should avoid rolling over any thing that isn't a regular file - devices, pipes etc. Would you agree? Can you see any drawbacks?

I'm not sure this would cover sockets, but there are separate handlers for using sockets so there would be no reason for people to use sockets with file handlers. And of course sockets are a completely different sort of beast on Windows.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Thu Oct  7 15:08:59 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 07 Oct 2021 19:08:59 +0000
Subject: [issue45393] help() on operator precedence has confusing entries
 "await" "x" and "not" "x"
In-Reply-To: <1633534428.51.0.112977953361.issue45393@roundup.psfhosted.org>
Message-ID: <1633633739.4.0.540647826668.issue45393@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

In past we could backport some simple documentation fixes to security-only branches. But currently only the release manager of the corresponded version has permission to commit to these branches, and we do not want to disturb them for such minor cause.

I concur with analysis of Zachary. All options look good to me.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45393>
_______________________________________

From report at bugs.python.org  Thu Oct  7 15:16:46 2021
From: report at bugs.python.org (Batuhan Taskaya)
Date: Thu, 07 Oct 2021 19:16:46 +0000
Subject: [issue45408] [fuzzer] Weird input with continuation and newlines
 causes null deref in parser
In-Reply-To: <1633629619.45.0.834198327625.issue45408@roundup.psfhosted.org>
Message-ID: <1633634206.48.0.970795991279.issue45408@roundup.psfhosted.org>


Change by Batuhan Taskaya <isidentical at gmail.com>:


----------
nosy: +BTaskaya

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45408>
_______________________________________

From report at bugs.python.org  Thu Oct  7 15:19:20 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 19:19:20 +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: <1633634360.11.0.824034200241.issue45402@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset ff8859d965815e8b5af346bd90299cfa5568c855 by Victor Stinner in branch 'main':
bpo-45402: Fix test_tools.test_sundry() (GH-28786)
https://github.com/python/cpython/commit/ff8859d965815e8b5af346bd90299cfa5568c855


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45402>
_______________________________________

From report at bugs.python.org  Thu Oct  7 15:19:53 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 19:19:53 +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: <1633634393.42.0.66806219429.issue45402@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Thanks Miro for the bug report, it's now fixed.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45402>
_______________________________________

From report at bugs.python.org  Thu Oct  7 15:22:30 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 07 Oct 2021 19:22:30 +0000
Subject: [issue45407] Support buffer protocol for _struct.Struct format
 argument
In-Reply-To: <1633628967.32.0.849545614693.issue45407@roundup.psfhosted.org>
Message-ID: <1633634550.67.0.331292900183.issue45407@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I prefer to remove the comment. The format string is a text by its nature, there is no reason to support arbitrary binary data. Bytes objects are only supported for compatibility (with Python 2 strings).

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45407>
_______________________________________

From report at bugs.python.org  Thu Oct  7 15:22:33 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 19:22:33 +0000
Subject: [issue45403] test_sys: test_stdlib_dir() fails when Python is built
 outside the source tree
In-Reply-To: <1633605938.68.0.349965351809.issue45403@roundup.psfhosted.org>
Message-ID: <1633634553.27.0.0214503631598.issue45403@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 768aaf6c433e6a13b82c7bdebd0062c7472c1fc7 by Victor Stinner in branch 'main':
bpo-45403: Fix test_sys.test_stdlib_dir() (GH-28785)
https://github.com/python/cpython/commit/768aaf6c433e6a13b82c7bdebd0062c7472c1fc7


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45403>
_______________________________________

From report at bugs.python.org  Thu Oct  7 15:22:47 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 19:22:47 +0000
Subject: [issue45403] test_sys: test_stdlib_dir() fails when Python is built
 outside the source tree
In-Reply-To: <1633605938.68.0.349965351809.issue45403@roundup.psfhosted.org>
Message-ID: <1633634567.73.0.495321984818.issue45403@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45403>
_______________________________________

From report at bugs.python.org  Thu Oct  7 15:23:42 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 19:23:42 +0000
Subject: [issue37157] shutil: add reflink=False to file copy functions to
 control clone/CoW copies (use copy_file_range)
In-Reply-To: <1559684200.61.0.18008315195.issue37157@roundup.psfhosted.org>
Message-ID: <1633634622.39.0.111114154909.issue37157@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
nosy:  -vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37157>
_______________________________________

From report at bugs.python.org  Thu Oct  7 15:33:08 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Thu, 07 Oct 2021 19:33:08 +0000
Subject: [issue16379] SQLite error code not exposed to python
In-Reply-To: <1351764878.68.0.13361347428.issue16379@psf.upfronthosting.co.za>
Message-ID: <1633635188.9.0.538410593225.issue16379@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
pull_requests: +27128
pull_request: https://github.com/python/cpython/pull/28809

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue16379>
_______________________________________

From report at bugs.python.org  Thu Oct  7 15:33:37 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 07 Oct 2021 19:33:37 +0000
Subject: [issue45408] [fuzzer] Weird input with continuation and newlines
 causes null deref in parser
In-Reply-To: <1633629619.45.0.834198327625.issue45408@roundup.psfhosted.org>
Message-ID: <1633635217.54.0.0927288916368.issue45408@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Confirmed in 3.10 and 3.11:

>>> ast.literal_eval(r'''\
... \
... (\
... \ ''')
fish: Job 1, 'python' terminated by signal SIGSEGV (Address boundary error)

3.9 raises SyntaxError:

>>> ast.literal_eval(r'''
... \
... (\
... \ ''')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "ast.py", line 62, in literal_eval
    node_or_string = parse(node_or_string, mode='eval')
  File "ast.py", line 50, in parse
    return compile(source, filename, mode, flags,
  File "<unknown>", line 4
    \
    ^
SyntaxError: unexpected character after line continuation character

----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45408>
_______________________________________

From report at bugs.python.org  Thu Oct  7 15:48:25 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 07 Oct 2021 19:48:25 +0000
Subject: [issue16379] SQLite error code not exposed to python
In-Reply-To: <1351764878.68.0.13361347428.issue16379@psf.upfronthosting.co.za>
Message-ID: <1633636105.82.0.557582257186.issue16379@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 8deb7afbaaaad847656842375119f8dbef8aea54 by Erlend Egeberg Aasland in branch 'main':
bpo-16379: Fix SQLite version checks in test_module_constants() (GH-28809)
https://github.com/python/cpython/commit/8deb7afbaaaad847656842375119f8dbef8aea54


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue16379>
_______________________________________

From report at bugs.python.org  Thu Oct  7 16:01:36 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Thu, 07 Oct 2021 20:01:36 +0000
Subject: [issue45408] [fuzzer] Weird input with continuation and newlines
 causes null deref in parser
In-Reply-To: <1633629619.45.0.834198327625.issue45408@roundup.psfhosted.org>
Message-ID: <1633636896.46.0.0109045946478.issue45408@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

Marking release blocker as a crash is bad for a function that is documented as safe for use on untrusted input so long as it isn't large enough to overflow the stack.

https://docs.python.org/3/library/ast.html#ast.literal_eval

----------
priority: normal -> release blocker

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45408>
_______________________________________

From report at bugs.python.org  Thu Oct  7 16:26:20 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 07 Oct 2021 20:26:20 +0000
Subject: [issue45337] Create venv with pip fails when target dir is under
 userappdata using Microsoft Store python
In-Reply-To: <1633034398.54.0.325301195524.issue45337@roundup.psfhosted.org>
Message-ID: <1633638380.88.0.842602806418.issue45337@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +27129
pull_request: https://github.com/python/cpython/pull/28810

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45337>
_______________________________________

From report at bugs.python.org  Thu Oct  7 16:26:22 2021
From: report at bugs.python.org (Steve Dower)
Date: Thu, 07 Oct 2021 20:26:22 +0000
Subject: [issue45337] Create venv with pip fails when target dir is under
 userappdata using Microsoft Store python
In-Reply-To: <1633034398.54.0.325301195524.issue45337@roundup.psfhosted.org>
Message-ID: <1633638382.04.0.628915317538.issue45337@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:


New changeset 6811fdaec825bd6ab64e358a4b480108f5634d2d by Steve Dower in branch 'main':
bpo-45337: Use the realpath of the new executable when creating a venv on Windows (GH-28663)
https://github.com/python/cpython/commit/6811fdaec825bd6ab64e358a4b480108f5634d2d


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45337>
_______________________________________

From report at bugs.python.org  Thu Oct  7 16:26:25 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 07 Oct 2021 20:26:25 +0000
Subject: [issue45337] Create venv with pip fails when target dir is under
 userappdata using Microsoft Store python
In-Reply-To: <1633034398.54.0.325301195524.issue45337@roundup.psfhosted.org>
Message-ID: <1633638385.43.0.0350628720696.issue45337@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27130
pull_request: https://github.com/python/cpython/pull/28811

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45337>
_______________________________________

From report at bugs.python.org  Thu Oct  7 16:27:23 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Thu, 07 Oct 2021 20:27:23 +0000
Subject: [issue45408] [fuzzer] Weird input with continuation and newlines
 causes null deref in parser
In-Reply-To: <1633629619.45.0.834198327625.issue45408@roundup.psfhosted.org>
Message-ID: <1633638443.25.0.700798335361.issue45408@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
keywords: +patch
pull_requests: +27131
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28812

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45408>
_______________________________________

From report at bugs.python.org  Thu Oct  7 17:31:12 2021
From: report at bugs.python.org (debohman)
Date: Thu, 07 Oct 2021 21:31:12 +0000
Subject: [issue45405] Python 3.10.0 does not configure on darwin using public
 llvm / clang
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1633642272.65.0.492900316833.issue45405@roundup.psfhosted.org>


debohman <debohman at gmail.com> added the comment:

By "public llvm / clang", I mean the toolchain version released by the llvm project.

They just released version 13.0.0 last week.

The problem is that version 12 of llvm / clang did not implement --print-multiarch, so this logic in configure was not exercised due to:

if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then

failing. In that case, $MULTIARCH would be a null string, so test x$MULTIARCH != x would fail. It seems that the logic in configure needs to be updated so that it functions correctly on darwin where --print-multiarch is implemented.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Thu Oct  7 17:33:14 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Thu, 07 Oct 2021 21:33:14 +0000
Subject: [issue45408] [fuzzer] Weird input with continuation and newlines
 causes null deref in parser
In-Reply-To: <1633629619.45.0.834198327625.issue45408@roundup.psfhosted.org>
Message-ID: <1633642394.61.0.149548380079.issue45408@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 0219017df7ec41839fd0d56a3076b5f09c58d313 by Pablo Galindo Salgado in branch 'main':
bpo-45408: Don't override previous tokenizer errors in the second parser pass (GH-28812)
https://github.com/python/cpython/commit/0219017df7ec41839fd0d56a3076b5f09c58d313


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45408>
_______________________________________

From report at bugs.python.org  Thu Oct  7 18:18:13 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Thu, 07 Oct 2021 22:18:13 +0000
Subject: [issue45408] [fuzzer] Weird input with continuation and newlines
 causes null deref in parser
In-Reply-To: <1633629619.45.0.834198327625.issue45408@roundup.psfhosted.org>
Message-ID: <1633645093.77.0.672917371643.issue45408@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
pull_requests: +27132
pull_request: https://github.com/python/cpython/pull/28813

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45408>
_______________________________________

From report at bugs.python.org  Thu Oct  7 18:47:02 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 07 Oct 2021 22:47:02 +0000
Subject: [issue45262] crash if asyncio is used before and after
 re-initialization if using python embedded in an application
In-Reply-To: <1632299546.72.0.498896278525.issue45262@roundup.psfhosted.org>
Message-ID: <1633646822.22.0.928987946161.issue45262@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 392a89835371baa0fc4bf79ae479abb80661f57d by Matthias Reichl in branch 'main':
 bpo-45262, asyncio: Fix cache of the running loop holder (GH-28796)
https://github.com/python/cpython/commit/392a89835371baa0fc4bf79ae479abb80661f57d


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45262>
_______________________________________

From report at bugs.python.org  Thu Oct  7 18:47:15 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 07 Oct 2021 22:47:15 +0000
Subject: [issue45262] crash if asyncio is used before and after
 re-initialization if using python embedded in an application
In-Reply-To: <1632299546.72.0.498896278525.issue45262@roundup.psfhosted.org>
Message-ID: <1633646835.76.0.560611256439.issue45262@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +27133
pull_request: https://github.com/python/cpython/pull/28815

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45262>
_______________________________________

From report at bugs.python.org  Thu Oct  7 18:47:42 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 07 Oct 2021 22:47:42 +0000
Subject: [issue45262] crash if asyncio is used before and after
 re-initialization if using python embedded in an application
In-Reply-To: <1632299546.72.0.498896278525.issue45262@roundup.psfhosted.org>
Message-ID: <1633646862.43.0.156981324785.issue45262@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27134
pull_request: https://github.com/python/cpython/pull/28816

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45262>
_______________________________________

From report at bugs.python.org  Thu Oct  7 18:55:13 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 07 Oct 2021 22:55:13 +0000
Subject: [issue45337] Create venv with pip fails when target dir is under
 userappdata using Microsoft Store python
In-Reply-To: <1633034398.54.0.325301195524.issue45337@roundup.psfhosted.org>
Message-ID: <1633647313.02.0.353518783432.issue45337@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset eabca6e593269301a0b7a36c4dc3525f04f5bb36 by Miss Islington (bot) in branch '3.10':
bpo-45337: Use the realpath of the new executable when creating a venv on Windows (GH-28663)
https://github.com/python/cpython/commit/eabca6e593269301a0b7a36c4dc3525f04f5bb36


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45337>
_______________________________________

From report at bugs.python.org  Thu Oct  7 18:55:19 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 07 Oct 2021 22:55:19 +0000
Subject: [issue45337] Create venv with pip fails when target dir is under
 userappdata using Microsoft Store python
In-Reply-To: <1633034398.54.0.325301195524.issue45337@roundup.psfhosted.org>
Message-ID: <1633647319.65.0.0560620671938.issue45337@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 06935bd68e3d89a4cc3f08c1d15eaa651b79a523 by Miss Islington (bot) in branch '3.9':
bpo-45337: Use the realpath of the new executable when creating a venv on Windows (GH-28663)
https://github.com/python/cpython/commit/06935bd68e3d89a4cc3f08c1d15eaa651b79a523


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45337>
_______________________________________

From report at bugs.python.org  Thu Oct  7 19:14:11 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 07 Oct 2021 23:14:11 +0000
Subject: [issue45262] crash if asyncio is used before and after
 re-initialization if using python embedded in an application
In-Reply-To: <1632299546.72.0.498896278525.issue45262@roundup.psfhosted.org>
Message-ID: <1633648451.76.0.112373228683.issue45262@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 87f0156a229e4cda92ad8e50645c5a71030caf7c by Miss Islington (bot) in branch '3.9':
bpo-45262, asyncio: Fix cache of the running loop holder (GH-28796)
https://github.com/python/cpython/commit/87f0156a229e4cda92ad8e50645c5a71030caf7c


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45262>
_______________________________________

From report at bugs.python.org  Thu Oct  7 19:24:15 2021
From: report at bugs.python.org (Steve Dower)
Date: Thu, 07 Oct 2021 23:24:15 +0000
Subject: [issue45337] Create venv with pip fails when target dir is under
 userappdata using Microsoft Store python
In-Reply-To: <1633034398.54.0.325301195524.issue45337@roundup.psfhosted.org>
Message-ID: <1633649055.24.0.841138383861.issue45337@roundup.psfhosted.org>


Change by Steve Dower <steve.dower at python.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45337>
_______________________________________

From report at bugs.python.org  Thu Oct  7 19:50:22 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Thu, 07 Oct 2021 23:50:22 +0000
Subject: [issue45408] [fuzzer] Weird input with continuation and newlines
 causes null deref in parser
In-Reply-To: <1633629619.45.0.834198327625.issue45408@roundup.psfhosted.org>
Message-ID: <1633650622.42.0.680686761237.issue45408@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45408>
_______________________________________

From report at bugs.python.org  Thu Oct  7 19:50:18 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Thu, 07 Oct 2021 23:50:18 +0000
Subject: [issue45408] [fuzzer] Weird input with continuation and newlines
 causes null deref in parser
In-Reply-To: <1633629619.45.0.834198327625.issue45408@roundup.psfhosted.org>
Message-ID: <1633650618.34.0.17710926174.issue45408@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 4ce55a2353e07962280181df40af0135aef1cf51 by Pablo Galindo Salgado in branch '3.10':
[3.10] bpo-45408: Don't override previous tokenizer errors in the second parser pass (GH-28812). (GH-28813)
https://github.com/python/cpython/commit/4ce55a2353e07962280181df40af0135aef1cf51


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45408>
_______________________________________

From report at bugs.python.org  Thu Oct  7 20:09:01 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 08 Oct 2021 00:09:01 +0000
Subject: [issue45409] Support non-standard executables in venv
Message-ID: <1633651741.67.0.0706483725716.issue45409@roundup.psfhosted.org>


New submission from Steve Dower <steve.dower at python.org>:

Currently the venv redirector on Windows is hardcoded for "python.exe" and "pythonw.exe". There is no good reason for this, and it's fairly easy to make the redirector able to invoke any executable in the base environment by inspecting its own name.

This would help support non-standard environments that include other entry points.

----------
assignee: steve.dower
components: Windows
messages: 403450
nosy: paul.moore, steve.dower, tim.golden, vinay.sajip, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Support non-standard executables in venv
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45409>
_______________________________________

From report at bugs.python.org  Thu Oct  7 20:12:53 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 08 Oct 2021 00:12:53 +0000
Subject: [issue45409] Support non-standard executables in venv
In-Reply-To: <1633651741.67.0.0706483725716.issue45409@roundup.psfhosted.org>
Message-ID: <1633651973.13.0.687730921819.issue45409@roundup.psfhosted.org>


Change by Steve Dower <steve.dower at python.org>:


----------
keywords: +patch
pull_requests: +27135
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/28817

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45409>
_______________________________________

From report at bugs.python.org  Thu Oct  7 20:14:23 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 08 Oct 2021 00:14:23 +0000
Subject: [issue45409] Support non-standard executables in venv
In-Reply-To: <1633651741.67.0.0706483725716.issue45409@roundup.psfhosted.org>
Message-ID: <1633652063.71.0.666099901176.issue45409@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

Pushed the branch so the changes are out there, but I still need to check (and probably fix) some handling of the Store package layout. The changes now will probably create some executables that won't work (pip.exe and idle.exe), so we might have to go back to the fixed list of executables.

I think the change to launcher.c is worth keeping though.

----------
stage: patch review -> needs patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45409>
_______________________________________

From report at bugs.python.org  Thu Oct  7 20:15:13 2021
From: report at bugs.python.org (Eryk Sun)
Date: Fri, 08 Oct 2021 00:15:13 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633463037.19.0.965519087659.issue45382@roundup.psfhosted.org>
Message-ID: <1633652113.32.0.577957938578.issue45382@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

> use the build number as reference instead of the major.minor

It could check the (major, minor, build) tuple, which allows reporting 10.1+ as "post11" and minimizes hard coding of build numbers. For example, given win32_ver() iterates by (major, minor, build) thresholds:

    _WIN32_CLIENT_RELEASES = [
        ((10, 1, 0), "post11"),
        ((10, 0, 22000), "11"),
        ((6, 4, 0), "10"),
        ((6, 3, 0), "8.1"),
        ((6, 2, 0), "8"),
        ((6, 1, 0), "7"),
        ((6, 0, 0), "Vista"),
        ((5, 2, 3790), "XP64"),
        ((5, 2, 0), "XPMedia"),
        ((5, 1, 0), "XP"),
        ((5, 0, 0), "2000"),
    ]

    _WIN32_SERVER_RELEASES = [
        ((10, 1, 0), "post2022Server"),
        ((10, 0, 20348), "2022Server"),
        ((10, 0, 17763), "2019Server"),
        ((6, 4, 0), "2016Server"),
        ((6, 3, 0), "2012ServerR2"),
        ((6, 2, 0), "2012Server"),
        ((6, 1, 0), "2008ServerR2"),
        ((6, 0, 0), "2008Server"),
        ((5, 2, 0), "2003Server"),
        ((5, 0, 0), "2000Server"),
    ]

In win32_ver():

    if major >= 5: # NT systems
        if getattr(winver, 'product_type', None) == 3: # VER_NT_SERVER
            release_list = _WIN32_SERVER_RELEASES
        else:
            release_list = _WIN32_CLIENT_RELEASES
        ver = major, minor, build
        for release_ver, release_name in release_list:
            if ver >= release_ver:
                release = release_name
                break

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Thu Oct  7 20:47:08 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Fri, 08 Oct 2021 00:47:08 +0000
Subject: [issue45351] List all sockets in TCP echo server using streams
In-Reply-To: <1633262301.08.0.953751090869.issue45351@roundup.psfhosted.org>
Message-ID: <1633654028.18.0.857994611055.issue45351@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

I'm not clear why you're suggesting this change. Is this additional functionality, or is the current example broken? Is the text wrong, or just the code?

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45351>
_______________________________________

From report at bugs.python.org  Thu Oct  7 21:17:29 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Fri, 08 Oct 2021 01:17:29 +0000
Subject: [issue45407] Support buffer protocol for _struct.Struct format
 argument
In-Reply-To: <1633628967.32.0.849545614693.issue45407@roundup.psfhosted.org>
Message-ID: <1633655849.79.0.241251245803.issue45407@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45407>
_______________________________________

From report at bugs.python.org  Thu Oct  7 22:11:05 2021
From: report at bugs.python.org (debohman)
Date: Fri, 08 Oct 2021 02:11:05 +0000
Subject: [issue45405] Python 3.10.0 does not configure on darwin using public
 llvm / clang
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1633659065.83.0.00874526899089.issue45405@roundup.psfhosted.org>


debohman <debohman at gmail.com> added the comment:

I can put together a pull request to fix this. The fix is in configure.ac.

Should I include the mods from the autoreconf in the PR?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Thu Oct  7 22:32:24 2021
From: report at bugs.python.org (debohman)
Date: Fri, 08 Oct 2021 02:32:24 +0000
Subject: [issue45405] Python 3.10.0 does not configure on darwin using public
 llvm / clang
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1633660344.52.0.953643558671.issue45405@roundup.psfhosted.org>


debohman <debohman at gmail.com> added the comment:

Also, what branch should the PR be on, 3.10 or main?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Thu Oct  7 22:33:07 2021
From: report at bugs.python.org (debohman)
Date: Fri, 08 Oct 2021 02:33:07 +0000
Subject: [issue45405] Python does not configure on darwin using public llvm /
 clang version 13.0.0
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1633660387.03.0.396558707409.issue45405@roundup.psfhosted.org>


Change by debohman <debohman at gmail.com>:


----------
title: Python 3.10.0 does not configure on darwin using public llvm / clang -> Python does not configure on darwin using public llvm / clang version 13.0.0
versions:  -Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Thu Oct  7 23:20:26 2021
From: report at bugs.python.org (debohman)
Date: Fri, 08 Oct 2021 03:20:26 +0000
Subject: [issue45405] Python does not configure on darwin using public llvm /
 clang version 13.0.0
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1633663226.59.0.286099723645.issue45405@roundup.psfhosted.org>


debohman <debohman at gmail.com> added the comment:

Okay, I see from the developer guide, that the generated files should be included. Is it permissible to use the current version of autoconf?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Thu Oct  7 23:20:38 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 08 Oct 2021 03:20:38 +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: <1633663238.2.0.281740150385.issue45357@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I am puzzled by your report. As explained in the top of idlelib/confix-extensions.def, the options for four features are still defined there for compatibility reasons and user changes to those option *are* stored in ~/.idlerc/config-extensions.cfg and read on startup.  At least on Windows with 3.9 and 3.11. I also tested changing options for test extension zzdummy and that works also.  For instance, click enable, exit dialog, exit IDLE, reload, edit something, select Format, and the z options are listed.  The default config is not changed.  What tests did you run?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45357>
_______________________________________

From report at bugs.python.org  Fri Oct  8 02:45:18 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Fri, 08 Oct 2021 06:45:18 +0000
Subject: [issue45407] Support buffer protocol for _struct.Struct format
 argument
In-Reply-To: <1633628967.32.0.849545614693.issue45407@roundup.psfhosted.org>
Message-ID: <1633675518.7.0.580217434874.issue45407@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset 9f7a94fd66e05ae040a67e32c397091fe5939ced by Jeong YunWon in branch 'main':
bpo-45407: Remove outdated XXX comment from Struct___init___impl (GH-28805)
https://github.com/python/cpython/commit/9f7a94fd66e05ae040a67e32c397091fe5939ced


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45407>
_______________________________________

From report at bugs.python.org  Fri Oct  8 02:46:16 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Fri, 08 Oct 2021 06:46:16 +0000
Subject: [issue45407] Support buffer protocol for _struct.Struct format
 argument
In-Reply-To: <1633628967.32.0.849545614693.issue45407@roundup.psfhosted.org>
Message-ID: <1633675576.81.0.151950123614.issue45407@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45407>
_______________________________________

From report at bugs.python.org  Fri Oct  8 03:18:56 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Fri, 08 Oct 2021 07:18:56 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633652113.32.0.577957938578.issue45382@roundup.psfhosted.org>
Message-ID: <911d75f2-c141-0ecc-5539-05bef1b5d2c4@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 08.10.2021 02:15, Eryk Sun wrote:
> 
>> use the build number as reference instead of the major.minor
> 
> It could check the (major, minor, build) tuple, which allows reporting 10.1+ as "post11" and minimizes hard coding of build numbers. For example, given win32_ver() iterates by (major, minor, build) thresholds:

Great idea.

Could you prepare a PR for this ?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Fri Oct  8 03:35:10 2021
From: report at bugs.python.org (Olaf van der Spek)
Date: Fri, 08 Oct 2021 07:35:10 +0000
Subject: [issue45351] List all sockets in TCP echo server using streams
In-Reply-To: <1633262301.08.0.953751090869.issue45351@roundup.psfhosted.org>
Message-ID: <1633678510.59.0.0917824793029.issue45351@roundup.psfhosted.org>


Olaf van der Spek <olafvdspek at gmail.com> added the comment:

> server = await asyncio.start_server(handle_echo, '127.0.0.1', 8888)

If 127.0.0.1 is replaced by localhost, the server might listen on ::1 and 127.0.0.1 but only one address will be printed, which is confusing (and wrong IMO).

So the output of the example isn't wrong if you don't change it, but the example code itself could be better.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45351>
_______________________________________

From report at bugs.python.org  Fri Oct  8 04:07:58 2021
From: report at bugs.python.org (za)
Date: Fri, 08 Oct 2021 08:07:58 +0000
Subject: [issue20692] Tutorial and  FAQ: how to call a method on an int
In-Reply-To: <1392850224.09.0.571764135364.issue20692@psf.upfronthosting.co.za>
Message-ID: <1633680478.44.0.607783383932.issue20692@roundup.psfhosted.org>


Change by za <za at python.or.id>:


----------
nosy: +za3
nosy_count: 10.0 -> 11.0
pull_requests: +27136
pull_request: https://github.com/python/cpython/pull/28818

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20692>
_______________________________________

From report at bugs.python.org  Fri Oct  8 04:13:30 2021
From: report at bugs.python.org (=?utf-8?q?Ra=C3=BAl_Cumplido?=)
Date: Fri, 08 Oct 2021 08:13:30 +0000
Subject: [issue45406] inspect.getouterframes() tracebacks when $CWD does not
 exists
In-Reply-To: <1633615069.33.0.311671101448.issue45406@roundup.psfhosted.org>
Message-ID: <1633680810.34.0.147126710824.issue45406@roundup.psfhosted.org>


Ra?l Cumplido <raulcumplido at gmail.com> added the comment:

I have reproduced on python3.10 and validated this is also happening for other python versions:

# PYTHON 3.9
$ mkdir /tmp/bar
$ cd /tmp/bar
$ rmdir /tmp/bar
$ python3.9
Python 3.9.5 (default, May 19 2021, 11:32:47) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import inspect
>>> inspect.getouterframes(inspect.currentframe())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.9/inspect.py", line 1529, in getouterframes
    frameinfo = (frame,) + getframeinfo(frame, context)
  File "/usr/lib/python3.9/inspect.py", line 1499, in getframeinfo
    filename = getsourcefile(frame) or getfile(frame)
  File "/usr/lib/python3.9/inspect.py", line 709, in getsourcefile
    if getattr(getmodule(object, filename), '__loader__', None) is not None:
  File "/usr/lib/python3.9/inspect.py", line 738, in getmodule
    file = getabsfile(object, _filename)
  File "/usr/lib/python3.9/inspect.py", line 722, in getabsfile
    return os.path.normcase(os.path.abspath(_filename))
  File "/usr/lib/python3.9/posixpath.py", line 379, in abspath
    cwd = os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory

# PYTHON 3.8
$ mkdir /tmp/bar
$ cd /tmp/bar
$ rmdir /tmp/bar
$ python3.8
Python 3.8.10 (default, Sep 28 2021, 16:10:42) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import inspect
>>> inspect.getouterframes(inspect.currentframe())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/inspect.py", line 1503, in getouterframes
    frameinfo = (frame,) + getframeinfo(frame, context)
  File "/usr/lib/python3.8/inspect.py", line 1473, in getframeinfo
    filename = getsourcefile(frame) or getfile(frame)
  File "/usr/lib/python3.8/inspect.py", line 708, in getsourcefile
    if getattr(getmodule(object, filename), '__loader__', None) is not None:
  File "/usr/lib/python3.8/inspect.py", line 737, in getmodule
    file = getabsfile(object, _filename)
  File "/usr/lib/python3.8/inspect.py", line 721, in getabsfile
    return os.path.normcase(os.path.abspath(_filename))
  File "/usr/lib/python3.8/posixpath.py", line 379, in abspath
    cwd = os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 76, in apport_excepthook
    binary = os.path.realpath(os.path.join(os.getcwd(), sys.argv[0]))
FileNotFoundError: [Errno 2] No such file or directory

Original exception was:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/inspect.py", line 1503, in getouterframes
    frameinfo = (frame,) + getframeinfo(frame, context)
  File "/usr/lib/python3.8/inspect.py", line 1473, in getframeinfo
    filename = getsourcefile(frame) or getfile(frame)
  File "/usr/lib/python3.8/inspect.py", line 708, in getsourcefile
    if getattr(getmodule(object, filename), '__loader__', None) is not None:
  File "/usr/lib/python3.8/inspect.py", line 737, in getmodule
    file = getabsfile(object, _filename)
  File "/usr/lib/python3.8/inspect.py", line 721, in getabsfile
    return os.path.normcase(os.path.abspath(_filename))
  File "/usr/lib/python3.8/posixpath.py", line 379, in abspath
    cwd = os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory
>>>

----------
nosy: +raulcd

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45406>
_______________________________________

From report at bugs.python.org  Fri Oct  8 04:55:30 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 08:55:30 +0000
Subject: [issue45262] crash if asyncio is used before and after
 re-initialization if using python embedded in an application
In-Reply-To: <1632299546.72.0.498896278525.issue45262@roundup.psfhosted.org>
Message-ID: <1633683330.86.0.245633154883.issue45262@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Is Matthias Reichl's fix enough to use asyncio in a subinterpreter?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45262>
_______________________________________

From report at bugs.python.org  Fri Oct  8 04:55:45 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 08:55:45 +0000
Subject: [issue45262] crash if asyncio is used before and after
 re-initialization if using python embedded in an application
In-Reply-To: <1632299546.72.0.498896278525.issue45262@roundup.psfhosted.org>
Message-ID: <1633683345.47.0.138859520402.issue45262@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 6846d6712a0894f8e1a91716c11dd79f42864216 by Miss Islington (bot) in branch '3.10':
bpo-45262, asyncio: Fix cache of the running loop holder (GH-28796) (GH-28816)
https://github.com/python/cpython/commit/6846d6712a0894f8e1a91716c11dd79f42864216


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45262>
_______________________________________

From report at bugs.python.org  Fri Oct  8 05:11:57 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 08 Oct 2021 09:11:57 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633684317.61.0.847819203558.issue45401@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Fri Oct  8 05:21:13 2021
From: report at bugs.python.org (Ma Lin)
Date: Fri, 08 Oct 2021 09:21:13 +0000
Subject: [issue45116] Performance regression 3.10b1 and later on Windows:
 Py_DECREF() not inlined in PGO build
In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org>
Message-ID: <1633684873.24.0.988141862602.issue45116@roundup.psfhosted.org>


Ma Lin <malincns at 163.com> added the comment:

Today I tested with msvc2022-preview, `__forceinline` attribute will not hang the build.

64-bit PGO builds:

    28d28e0~1,vc2022   : baseline
    28d28e0~1+F,vc2022 : 1.02x slower  <1>
    28d28e0,vc2022     : 1.03x slower  <2>
    28d28e0+F,vc2022   : 1.03x slower
    3.10 final,vc2022  : 1.03x slower
    3.10 final+F,vc2022: 1.03x slower
    28d28e0~1,vc2019   : 1.00x slower  <3>

28d28e0~1 is the last fast commit, 28d28e0 is the first slow commit.
`+F` means add `__forceinline` attribute to all inline functions in object.h
vc2019 and vc2022 are the latest version.

<1> Forcing inline is slower.
<2> 28d28e0 is still slow, but not that much.
<3> Normally, msvc2019 and msvc2022 have the same performance.

Is it possible to write a PGO profile for 28d28e0? 
https://github.com/python/cpython/commit/28d28e053db6b69d91c2dfd579207cd8ccbc39e7

msvc2022 will be released in November this year, and maybe subsequent versions can be built with msvc2022.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45116>
_______________________________________

From report at bugs.python.org  Fri Oct  8 05:38:16 2021
From: report at bugs.python.org (E. Paine)
Date: Fri, 08 Oct 2021 09:38:16 +0000
Subject: [issue45103] IDLE: make configdialog font page survive font failures
In-Reply-To: <1630790219.84.0.830457804554.issue45103@roundup.psfhosted.org>
Message-ID: <1633685896.64.0.82887130896.issue45103@roundup.psfhosted.org>


E. Paine <xepaine13 at gmail.com> added the comment:

> Did the FiraCode font work for you or merely not work without crashing?

It worked fine (other than a few missing features such as context-aware punctuation).

The steps I did to test were:

- Load IDLE
- Enter config dialog
- Set IDLE to use Fira Code font
- Use 'OK' button to exit config dialog
- Close IDLE
- Reload IDLE
- Enter config dialog
- Revert font

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45103>
_______________________________________

From report at bugs.python.org  Fri Oct  8 07:02:41 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 11:02:41 +0000
Subject: [issue44359] test_ftplib 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: <1633690961.05.0.527126074092.issue44359@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Another error on AMD64 Fedora Rawhide LTO + PGO 3.x:
https://buildbot.python.org/all/#/builders/79/builds/870

0:01:10 load avg: 4.48 [236/427/1] test_ftplib failed (env changed) -- running: (...)
Warning -- Uncaught thread exception: Exception
Exception in thread Thread-67:
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-x86_64.lto-pgo/build/Lib/asyncore.py", line 90, in read
    obj.handle_read_event()
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-x86_64.lto-pgo/build/Lib/test/test_ftplib.py", line 384, in handle_read_event
    self._do_ssl_handshake()
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-x86_64.lto-pgo/build/Lib/test/test_ftplib.py", line 345, in _do_ssl_handshake
    self.socket.do_handshake()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-x86_64.lto-pgo/build/Lib/ssl.py", line 1346, in do_handshake
    self._sslobj.do_handshake()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:998)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-x86_64.lto-pgo/build/Lib/threading.py", line 1031, in _bootstrap_inner
    self.run()
    ^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-x86_64.lto-pgo/build/Lib/test/test_ftplib.py", line 298, in run
    asyncore.loop(timeout=0.1, count=1)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-x86_64.lto-pgo/build/Lib/asyncore.py", line 214, in loop
    poll_fun(timeout, map)
    ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-x86_64.lto-pgo/build/Lib/asyncore.py", line 157, in poll
    read(obj)
    ^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-x86_64.lto-pgo/build/Lib/asyncore.py", line 94, in read
    obj.handle_error()
    ^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-x86_64.lto-pgo/build/Lib/test/test_ftplib.py", line 421, in handle_error
    raise Exception
    ^^^^^^^^^^^^^^^
Exception

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44359>
_______________________________________

From report at bugs.python.org  Fri Oct  8 07:15:36 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 11:15:36 +0000
Subject: [issue45410] python -m test -jN: write stderr in stdout to get
 messages in order
Message-ID: <1633691736.44.0.338544053782.issue45410@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

In buildbot logs, when a worker process is run, two pipes are created for stdout and stderr. The problem is that using two pipes produce an output which is hard to read.

Pseudo output:
---
stdout time 1
stdout time 2
stdout time 3
stderr time 1
stderr time 2
---

I would prefer:
---
stdout time 1
stderr time 1
stdout time 2
stderr time 2
stdout time 3
---

Real logs:
https://buildbot.python.org/all/#/builders/79/builds/870
---
0:01:10 load avg: 4.48 [236/427/1] test_ftplib failed (env changed) -- (...)
Warning -- Uncaught thread exception: Exception
Exception in thread Thread-67:
Traceback (most recent call last):
  (...)
Exception
test__all__ (test.test_ftplib.MiscTestCase) ... ok
test_abort (test.test_ftplib.TestFTPClass) ... ok
test_acct (test.test_ftplib.TestFTPClass) ... ok
test_all_errors (test.test_ftplib.TestFTPClass) ... ok
(...)
Ran 94 tests in 2.326s
---

The Warning is logged at the beginning, it's not possible to know which test emitted this warning.

I propose to write stdout and stderr of a worker process into a single pipe to keep messages order.

In the past, I saw buildbot logging stderr messages in a different color. But it no longer seems to be the case.

I'm working on a PR.

----------
components: Tests
messages: 403467
nosy: vstinner
priority: normal
severity: normal
status: open
title: python -m test -jN: write stderr in stdout to get messages in order
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45410>
_______________________________________

From report at bugs.python.org  Fri Oct  8 07:25:41 2021
From: report at bugs.python.org (Josephine Stolle)
Date: Fri, 08 Oct 2021 11:25:41 +0000
Subject: [issue45411] Add Mimetypes for Subtitle Files
Message-ID: <1633692340.99.0.107401828025.issue45411@roundup.psfhosted.org>


New submission from Josephine Stolle <josephine.stolle11 at gmail.com>:

Since Python is used for webdevelopment, it would be very beneficial for developers to have subtitle files as default mimetypes.

----------
components: Library (Lib)
messages: 403468
nosy: Josephine-Marie
priority: normal
pull_requests: 27137
severity: normal
status: open
title: Add Mimetypes for Subtitle Files
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45411>
_______________________________________

From report at bugs.python.org  Fri Oct  8 07:30:10 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 08 Oct 2021 11:30:10 +0000
Subject: [issue45411] Add Mimetypes for Subtitle Files
In-Reply-To: <1633692340.99.0.107401828025.issue45411@roundup.psfhosted.org>
Message-ID: <1633692610.19.0.766893934745.issue45411@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

What standard specifies these MIME types?

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45411>
_______________________________________

From report at bugs.python.org  Fri Oct  8 07:36:49 2021
From: report at bugs.python.org (Josephine Stolle)
Date: Fri, 08 Oct 2021 11:36:49 +0000
Subject: [issue45411] Add Mimetypes for Subtitle Files
In-Reply-To: <1633692340.99.0.107401828025.issue45411@roundup.psfhosted.org>
Message-ID: <1633693009.41.0.07600184231.issue45411@roundup.psfhosted.org>


Josephine Stolle <josephine.stolle11 at gmail.com> added the comment:

text/vtt is has IANA registration 
https://www.iana.org/assignments/media-types/text/vtt 
and .srt is plain/text https://www.matroska.org/technical/subtitles.html#srt-subtitles

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45411>
_______________________________________

From report at bugs.python.org  Fri Oct  8 08:05:59 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 12:05:59 +0000
Subject: [issue45410] python -m test -jN: write stderr in stdout to get
 messages in order
In-Reply-To: <1633691736.44.0.338544053782.issue45410@roundup.psfhosted.org>
Message-ID: <1633694759.46.0.315356098515.issue45410@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
keywords: +patch
pull_requests: +27138
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28819

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45410>
_______________________________________

From report at bugs.python.org  Fri Oct  8 08:10:40 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 12:10:40 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633463037.19.0.965519087659.issue45382@roundup.psfhosted.org>
Message-ID: <1633695040.47.0.402118218329.issue45382@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

macOS has a similar issue in the platform module. Previously, platform gave the darwin kernel version, whereas most users only know macOS versions. See bpo-35344.

Even if Microsoft decided to internally stay at 10.x, IMO users really expect "Windows 11" when requesting the Windows version, especially in platform.platform().

----------
nosy: +vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Fri Oct  8 08:15:33 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 12:15:33 +0000
Subject: [issue45351] asyncio doc: List all sockets in TCP echo server using
 streams
In-Reply-To: <1633262301.08.0.953751090869.issue45351@roundup.psfhosted.org>
Message-ID: <1633695333.11.0.493195217329.issue45351@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I agree that all socket addresses must be listed. But I would prefer to write a single line. Maybe something like:

addresses = ', '.join(sock.getsockname() for sock in server.sockets)
print('Serving on {addresses}')

Do you want to propose a PR to enhance the example?

----------
nosy: +vstinner
title: List all sockets in TCP echo server using streams -> asyncio doc: List all sockets in TCP echo server using streams
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45351>
_______________________________________

From report at bugs.python.org  Fri Oct  8 09:39:11 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 13:39:11 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
Message-ID: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

I propose to remove the following macros from the Python C API:

* Py_OVERFLOWED()
* _Py_SET_EDOM_FOR_NAN()
* Py_SET_ERRNO_ON_MATH_ERROR()
* Py_SET_ERANGE_IF_OVERFLOW()
* Py_ADJUST_ERANGE1()
* Py_ADJUST_ERANGE2()

Only Py_ADJUST_ERANGE1() and Py_ADJUST_ERANGE2() are still used by Python itself, other macros are no longer used since Python 2.7:

* Py_OVERFLOWED(): no longer used since Python 2.7
* _Py_SET_EDOM_FOR_NAN(): used by Py_SET_ERRNO_ON_MATH_ERROR() which is no longer used
* Py_SET_ERRNO_ON_MATH_ERROR(): no longer used since Python 2.6
* Py_SET_ERANGE_IF_OVERFLOW(): no longer used since Python 2.4
* Py_ADJUST_ERANGE1(): used by Objects/floatobject.c
* Py_ADJUST_ERANGE2(): used by Objects/complexobject.c

I searched for these macros in the PyPI top 5000 modules: none of these macros are used. There is a single match: frozendict-2.0.6 which contains a Include/pyport.h copy, but it doesn't use these macros.

--

Py_OVERFLOWED() was used by long_true_divide() and PyLong_AsDouble() in Python 2.6, but Python 2.7 no longer used them.


(1) Py_OVERFLOWED() call in long_true_divide() was removed in Python 2.7 by bpo-1811:

commit 465728364749e903fb4293b2f7a266b58de6bde4
Author: Mark Dickinson <dickinsm at gmail.com>
Date:   Sun Dec 27 14:55:57 2009 +0000

    Issue #1811:  Improve accuracy and consistency of true division for integers.


(2) Py_OVERFLOWED() call in PyLong_AsDouble() was removed in Python 2.7 by bpo-3166:

commit 6736cf8d20b67b74e8e959622132963285156242
Author: Mark Dickinson <dickinsm at gmail.com>
Date:   Mon Apr 20 21:13:33 2009 +0000

    Issue #3166: Make long -> float (and int -> float) conversions
    correctly rounded, using round-half-to-even.  This ensures that the
    value of float(n) doesn't depend on whether we're using 15-bit digits
    or 30-bit digits for Python longs.

--

Py_SET_ERRNO_ON_MATH_ERROR() and Py_SET_ERANGE_IF_OVERFLOW() were used in Objects/mathmodule.c in Python 2.5.


(1) The last call to Py_SET_ERRNO_ON_MATH_ERROR() was removed by in Python 2.6 by:

commit 6f34109384f3a78d5f4f8bdd418a89caca19631e
Author: Christian Heimes <christian at cheimes.de>
Date:   Fri Apr 18 23:13:07 2008 +0000

    I finally got the time to update and merge Mark's and my trunk-math branch. The patch is collaborated work of Mark Dickinson and me. It was mostly done a few months ago. The patch fixes a lot of loose ends and edge cases related to operations with NaN, INF, very small values and complex math.
    
    The patch also adds acosh, asinh, atanh, log1p and copysign to all platforms. Finally it fixes differences between platforms like different results or exceptions for edge cases. Have fun :)


(2) The last call to Py_SET_ERANGE_IF_OVERFLOW() was removed in Python 2.4 by:

commit 77d9a3effa21b8987ceac26d67ad676e1c5afb49
Author: Hye-Shik Chang <hyeshik at gmail.com>
Date:   Mon Mar 22 08:43:55 2004 +0000

    Patch #871657: Set EDOM for `nan' return values on FreeBSD and OpenBSD.
    This fixes a problem that math.sqrt(-1) doesn't raise math.error.

----------
components: C API
messages: 403473
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Fri Oct  8 09:59:17 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 13:59:17 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633701557.64.0.392608161149.issue45412@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
keywords: +patch
pull_requests: +27139
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28820

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Fri Oct  8 09:59:39 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 13:59:39 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633701579.51.0.146944729985.issue45412@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
nosy: +mark.dickinson

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Fri Oct  8 10:00:48 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 14:00:48 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633701648.12.0.681387521919.issue45412@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Py_OVERFLOWED() documentation says that the function is not reliable since C99. Python is using C99 since Python 3.6.

/* Py_OVERFLOWED(X)
 * Return 1 iff a libm function overflowed.  Set errno to 0 before calling
 * a libm function, and invoke this macro after, passing the function
 * result.
 * Caution:
 *    This isn't reliable.  C99 no longer requires libm to set errno under
 *        any exceptional condition, but does require +- HUGE_VAL return
 *        values on overflow.  A 754 box *probably* maps HUGE_VAL to a
 *        double infinity, and we're cool if that's so, unless the input
 *        was an infinity and an infinity is the expected result.  A C89
 *        system sets errno to ERANGE, so we check for that too.  We're
 *        out of luck if a C99 754 box doesn't map HUGE_VAL to +Inf, or
 *        if the returned result is a NaN, or if a C89 box returns HUGE_VAL
 *        in non-overflow cases.
 *    X is evaluated more than once.
 * Some platforms have better way to spell this, so expect some #ifdef'ery.
 *
 * OpenBSD uses 'isinf()' because a compiler bug on that platform causes
 * the longer macro version to be mis-compiled. This isn't optimal, and
 * should be removed once a newer compiler is available on that platform.
 * The system that had the failure was running OpenBSD 3.2 on Intel, with
 * gcc 2.95.3.
 *
 * According to Tim's checkin, the FreeBSD systems use isinf() to work
 * around a FPE bug on that platform.
 */

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Fri Oct  8 10:01:58 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 14:01:58 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633701718.91.0.934278080048.issue45412@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Py_SET_ERRNO_ON_MATH_ERROR() documentation also says that it is not reliable:

/* Py_SET_ERRNO_ON_MATH_ERROR(x)
 * If a libm function did not set errno, but it looks like the result
 * overflowed or not-a-number, set errno to ERANGE or EDOM.  Set errno
 * to 0 before calling a libm function, and invoke this macro after,
 * passing the function result.
 * Caution:
 *    This isn't reliable.  See Py_OVERFLOWED comments.
 *    X is evaluated more than once.
 */

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Fri Oct  8 10:02:43 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 14:02:43 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633701763.01.0.190769106097.issue45412@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Py_ADJUST_ERANGE1() is used by float ** float.

Py_ADJUST_ERANGE2() is used by complex ** complex.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Fri Oct  8 10:05:38 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 14:05:38 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633701938.19.0.97357050103.issue45412@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I add Mark Dickinson and Tim Peters who were involved in changes removing usage of these macros.

----------
nosy: +tim.peters

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Fri Oct  8 10:06:30 2021
From: report at bugs.python.org (Julien Palard)
Date: Fri, 08 Oct 2021 14:06:30 +0000
Subject: [issue45411] Add Mimetypes for Subtitle Files
In-Reply-To: <1633692340.99.0.107401828025.issue45411@roundup.psfhosted.org>
Message-ID: <1633701990.63.0.480900103079.issue45411@roundup.psfhosted.org>


Julien Palard <julien+python at palard.fr> added the comment:

Those two looks legit to me.

----------
nosy: +mdk

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45411>
_______________________________________

From report at bugs.python.org  Fri Oct  8 10:22:55 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 14:22:55 +0000
Subject: [issue45404] Undefined I_* macros when building 3.10 on Ubuntu?
In-Reply-To: <1633607848.34.0.992499900554.issue45404@roundup.psfhosted.org>
Message-ID: <1633702974.99.0.19154052208.issue45404@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

On my Fedora 34, the HAVE_STROPTS_H macro is not defined in pyconfig.h:

/* Define to 1 if you have the <stropts.h> header file. */
/* #undef HAVE_STROPTS_H */

I confirm that I cannot find this file:

$ find /usr/include/ -name stropts.h
$ find /usr/lib/gcc/x86_64-redhat-linux/11/ -name stropts.h

----------
nosy: +vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45404>
_______________________________________

From report at bugs.python.org  Fri Oct  8 10:24:13 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 14:24:13 +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: <1633703053.88.0.816680294705.issue45404@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
title: Undefined I_* macros when building 3.10 on Ubuntu? -> Undefined I_* macros of stropts.h when building Python 3.10 on Ubuntu: fail to build the fcntl module

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45404>
_______________________________________

From report at bugs.python.org  Fri Oct  8 11:14:49 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 08 Oct 2021 15:14:49 +0000
Subject: [issue45410] python -m test -jN: write stderr in stdout to get
 messages in order
In-Reply-To: <1633691736.44.0.338544053782.issue45410@roundup.psfhosted.org>
Message-ID: <1633706089.96.0.33502547906.issue45410@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset b108db63e02797a795840152b82cab9792fd3ed2 by Victor Stinner in branch 'main':
bpo-45410: libregrtest -jN writes stderr into stdout (GH-28819)
https://github.com/python/cpython/commit/b108db63e02797a795840152b82cab9792fd3ed2


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45410>
_______________________________________

From report at bugs.python.org  Fri Oct  8 11:26:53 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Fri, 08 Oct 2021 15:26:53 +0000
Subject: [issue14757] INCA: Inline Caching meets Quickening in Python 3.3
In-Reply-To: <1336498675.39.0.776636251166.issue14757@psf.upfronthosting.co.za>
Message-ID: <1633706813.71.0.502727944776.issue14757@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

See GitHub.com/faster-cpython/ideas/issues/93 for a belated follow-up.

----------
nosy: +gvanrossum

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue14757>
_______________________________________

From report at bugs.python.org  Fri Oct  8 11:39:45 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Fri, 08 Oct 2021 15:39:45 +0000
Subject: [issue14757] INCA: Inline Caching meets Quickening in Python 3.3
In-Reply-To: <1336498675.39.0.776636251166.issue14757@psf.upfronthosting.co.za>
Message-ID: <1633707585.96.0.542321265634.issue14757@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

Followup: https://github.com/faster-cpython/ideas/issues/93

New paper: https://arxiv.org/abs/2109.02958

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue14757>
_______________________________________

From report at bugs.python.org  Fri Oct  8 11:39:59 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Fri, 08 Oct 2021 15:39:59 +0000
Subject: [issue14757] INCA: Inline Caching meets Quickening in Python 3.3
In-Reply-To: <1336498675.39.0.776636251166.issue14757@psf.upfronthosting.co.za>
Message-ID: <1633707599.21.0.228412917795.issue14757@roundup.psfhosted.org>


Change by Guido van Rossum <guido at python.org>:


----------
Removed message: https://bugs.python.org/msg403481

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue14757>
_______________________________________

From report at bugs.python.org  Fri Oct  8 11:45:02 2021
From: report at bugs.python.org (CoolCat467)
Date: Fri, 08 Oct 2021 15:45:02 +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: <1633707902.09.0.630680352543.issue45357@roundup.psfhosted.org>


CoolCat467 <davenport.samuel09 at gmail.com> added the comment:

Yes, changing settings on ZzDummy works correctly, but this is because an entry for it exists in the default config file. The problem is when if you attempt to add a new extension through the user config file. When IDLE is looking for extensions to load, it only checks the default config file, not the user config file. So if I add a new extension entry to my ~/.idlerc/config-extensions.cfg file, "[lintcheck]\nenable = True", and have a module installed on my system called "lintcheck", with a class named "lintcheck". Because IDLE is only looking in the default config file for extensions to load, it never finds lintcheck and therefore it is never loaded. On the contrary, if it were in the system default config file, IDLE would find it and "lintcheck" would be loaded.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45357>
_______________________________________

From report at bugs.python.org  Fri Oct  8 11:57:01 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 08 Oct 2021 15:57:01 +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: <1633708621.14.0.435290754908.issue45404@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

It is not defined on my Ubuntu 20.04 either. But stropts.h could be installed by some Ubuntu package not installed on my computer, or came from some non-standard source.

On my computer:

$ dlocate stropts.h
manpages-posix-dev: /usr/share/man/man7/stropts.h.7posix.gz
python3-pycparser: /usr/share/python3-pycparser/fake_libc_include/stropts.h
python-pycparser: /usr/share/python-pycparser/fake_libc_include/stropts.h

$ locate stropts.h
/usr/share/man/man7/stropts.h.7posix.gz
/usr/share/python-pycparser/fake_libc_include/stropts.h
/usr/share/python3-pycparser/fake_libc_include/stropts.h

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45404>
_______________________________________

From report at bugs.python.org  Fri Oct  8 12:11:44 2021
From: report at bugs.python.org (Vinay Sajip)
Date: Fri, 08 Oct 2021 16:11:44 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633709504.13.0.521272673372.issue45401@roundup.psfhosted.org>


Change by Vinay Sajip <vinay_sajip at yahoo.co.uk>:


----------
keywords: +patch
pull_requests: +27140
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28822

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Fri Oct  8 13:50:02 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Fri, 08 Oct 2021 17:50:02 +0000
Subject: [issue45413] Add install scheme for virtual environment
Message-ID: <1633715402.49.0.434363843275.issue45413@roundup.psfhosted.org>


New submission from Filipe La?ns <lains at riseup.net>:

Python 3.10 introduced sysconfig._get_preferred_schemes[1], a mechanism to allow downstream distributors to overwrite the default install scheme.
This is done to support downstream modifications where distributors change the installation layout (eg. different site-packages directory). So, distributors will change the default scheme to one that correctly represents their layout.

This presents an issue for projects/people that need to bootstrap virtual environments, like virtualenv (see [2]). As distributors might now be customizing the default install scheme, there is no guarantee that the information returned by sysconfig.get_default_scheme/get_paths is correct for the virtual environment, the only guarantee we have is that it correct for the *current* environment. When bootstrapping a virtual environment, we need to know its layout, so that we can place the files in the correct locations.

The usual solution in situations like this would be to invoke the interpreter we are targeting to get the correct information (eg. path/to/python -m sysconfig), but that is not possible here as the environment does not exist yet -- we are the ones trying to create it.

To solve this issue, I propose the addition of a "virtual" or "venv" install scheme, for virtual environments. The idea is that virtual environments (defined by the presence of pyvenv.cfg, see [3][4]) will always use this scheme, they will use the paths specified by this scheme and sysconfig.get_default_scheme will always return it (_get_preferred_schemes would have no effect here!).
This makes it possible to know the virtual environment layout for another interpreter, via sysconfig.get_paths(scheme='virtual').

I am not cure if this should be adopted in 3.10 or 3.11, as it effectively makes it impossible to reliably construct virtual environments, and requires workarounds such as [5], that pretty much implements this proposal with non-standardized downstream patches.

[1] https://docs.python.org/3/library/sysconfig.html#sysconfig._get_preferred_schemes
[2] https://github.com/pypa/virtualenv/issues/2208
[3] https://docs.python.org/3/library/site.html?highlight=pyvenv.cfg
[4] https://docs.python.org/3/library/venv.html?highlight=pyvenv.cfg
[5] https://github.com/pypa/virtualenv/pull/2209

----------
assignee: FFY00
messages: 403485
nosy: FFY00, gaborjbernat, hroncok, jaraco
priority: normal
severity: normal
status: open
title: Add install scheme for virtual environment
type: enhancement
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45413>
_______________________________________

From report at bugs.python.org  Fri Oct  8 13:50:08 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Fri, 08 Oct 2021 17:50:08 +0000
Subject: [issue45413] Add install scheme for virtual environments
In-Reply-To: <1633715402.49.0.434363843275.issue45413@roundup.psfhosted.org>
Message-ID: <1633715408.14.0.38497679886.issue45413@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
title: Add install scheme for virtual environment -> Add install scheme for virtual environments

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45413>
_______________________________________

From report at bugs.python.org  Fri Oct  8 14:01:46 2021
From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=)
Date: Fri, 08 Oct 2021 18:01:46 +0000
Subject: [issue45413] Add install scheme for virtual environments
In-Reply-To: <1633715402.49.0.434363843275.issue45413@roundup.psfhosted.org>
Message-ID: <1633716106.78.0.420963607366.issue45413@roundup.psfhosted.org>


Miro Hron?ok <miro at hroncok.cz> added the comment:

The existing install schemes contain values for all different kinds of OSes, somehow named according to them.

If we introduce a single "virtual"/"venv" scheme, it would need to have different contents on different OSes (e.g. Windows vs POSIX). I don't think that would cause any actual trouble, but it would be somewhat different than all the other schemes.

If we introduce multiple ones (e.g. "posix_venv" and "nt_venv") we would need an additional layer to get the one appropriate for the current platform.

Hence, I think having a single one is more pragmatic.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45413>
_______________________________________

From report at bugs.python.org  Fri Oct  8 14:10:46 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 08 Oct 2021 18:10:46 +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: <1633716646.76.0.669004083462.issue45357@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

The current configuration design is that user .idlerc config-x.cfg files contain changes from the idlelib config-x.def files.  A proposal to change this is an enhancement request rather than a bugfix request.  It will make the logic more complex, increase maintenance burden, and likely make changes to the configuration system harder.

If Python is installed for one user, any changes to config-extensions.def only apply to that one user, just as with additions to site-packages.  If Python is installed for all users, why shouldn't extensions be available to all, just as with additions to site-packages?  Assuming that extensions are by default not enabled, users will have to explicitly enable them, just as they have to explicitly import added packages.

On a system with non-admin users, such as in a classroom, I can imagine that the admin user(s) might not want non-admin users to be able to modify IDLE behavior.  I am reluctant to open this can of worms and would not do so by myself.

----------
stage: patch review -> test needed
type: behavior -> enhancement
versions: +Python 3.11 -Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45357>
_______________________________________

From report at bugs.python.org  Fri Oct  8 14:11:18 2021
From: report at bugs.python.org (Josh Rosenberg)
Date: Fri, 08 Oct 2021 18:11:18 +0000
Subject: [issue45414] pathlib.Path.parents negative indexing is wrong for
 absolute paths
Message-ID: <1633716678.9.0.917396229112.issue45414@roundup.psfhosted.org>


New submission from Josh Rosenberg <shadowranger+python at gmail.com>:

At least on PosixPath (not currently able to try on Windows to check WindowsPath, but from a quick code check I think it'll behave the same way), the negative indexing added in #21041 is implemented incorrectly for absolute paths. Passing either -1 or -2 will return a path representing the root, '/' for PosixPath (which should only be returned for -1), and passing an index of -3 or beyond returns the value expected for that index + 1, e.g. -3 gets the result expected for -2, -4 gets the result for -3, etc. And for the negative index that should be equivalent to index 0, you end up with an IndexError.

The underlying problem appears to be that absolute paths (at least, those created from a string) are represented in self._parts with the root '/' included (redundantly, since self._root has it too), so all the actual components of the path are offset by one.

This does not affect slicing (slicing is implemented using range and slice.indices to perform normalization from negative to positive indices, so it never indexes with a negative index).

Example:

>>> from pathlib import Path
>>> p = Path('/1/2/3')
>>> p._parts
['/', '1', '2', '3']
>>> p.parents[:]
(PosixPath('/1/2'), PosixPath('/1'), PosixPath('/'))
>>> p.parents[-1]
PosixPath('/')
>>> p.parents[-1]._parts  # Still behaves normally as self._root is still '/'
[]
>>> p.parents[-2]
PosixPath('/')
>>> p.parents[-2]._parts
['/']
>>> p.parents[-3]
PosixPath('/1')
>>> p.parents[-4]
Traceback (most recent call last):
    ...
IndexError: -4

It looks like the underlying problem is that the negative indexing code doesn't account for the possibility of '/' being in _parts and behaving as a component separate from the directory/files in the path. Frankly, it's a little odd that _parts includes '/' at all (Path has a ._root/.root attribute that stores it too, and even when '/' isn't in the ._parts/.parts, the generated complete path includes it because of ._root), but it looks like the docs guaranteed that behavior in their examples.

It looks like one of two options must be chosen:

1. Fix the negative indexing code to account for absolute paths, and ensure absolute paths store '/' in ._parts consistently (it should not be possible to get two identical Paths, one of which includes '/' in _parts, one of which does not, which is possible with the current negative indexing bug; not sure if there are any documented code paths that might produce this warped sort of object outside of the buggy .parents), or

2. Make no changes to the negative indexing code, but make absolute paths *never* store the root as the first element of _parts (.parts can prepend self._drive/self._root on demand to match documentation). This probably involves more changes (lots of places assume _parts includes the root, e.g. the _PathParents class's own __len__ method raises a ValueError when called on the warped object returned by p.parents[-1], because it adjusts for the root, and the lack of one means it returns a length of -1).

I think #1 is probably the way to go. I believe all that would require is to add:

if idx < 0:
    return self.__getitem__(len(self) + idx)

just before:

return self._pathcls._from_parsed_parts(self._drv, self._root, self._parts[:-idx - 1])

so it never tries to use a negative idx directly (it has to occur after the check for valid index in [-len(self), len(self) so very negative indices don't recurse until they become positive).

This takes advantage of _PathParents's already adjusting the reported length for the presence of drive/root, keeping the code simple; the alternative I came up with that doesn't recurse changes the original return line:

return self._pathcls._from_parsed_parts(self._drv, self._root, self._parts[:-idx - 1])

to:

adjust = idx >= 0 or not (self._drv or self._root)
return self._pathcls._from_parsed_parts(self._drv, self._root, self._parts[:-idx - adjust])

which is frankly terrible, even if it's a little faster.

----------
components: Library (Lib)
messages: 403488
nosy: josh.r
priority: normal
severity: normal
status: open
title: pathlib.Path.parents negative indexing is wrong for absolute paths
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45414>
_______________________________________

From report at bugs.python.org  Fri Oct  8 14:12:25 2021
From: report at bugs.python.org (Josh Rosenberg)
Date: Fri, 08 Oct 2021 18:12:25 +0000
Subject: [issue21041] pathlib.PurePath.parents rejects negative indexes
In-Reply-To: <1395613011.22.0.29152070109.issue21041@psf.upfronthosting.co.za>
Message-ID: <1633716745.91.0.783086710393.issue21041@roundup.psfhosted.org>


Josh Rosenberg <shadowranger+python at gmail.com> added the comment:

Negative indexing is broken for absolute paths, see #45414.

----------
nosy: +josh.r

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21041>
_______________________________________

From report at bugs.python.org  Fri Oct  8 14:28:43 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 08 Oct 2021 18:28:43 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633717723.53.0.425452205787.issue45412@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

And I have doubts about Py_ADJUST_ERANGE2(). I think that it is used incorrectly. See issue44970.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Fri Oct  8 14:40:12 2021
From: report at bugs.python.org (=?utf-8?b?VsOtY3RvciBUZXJyw7Nu?=)
Date: Fri, 08 Oct 2021 18:40:12 +0000
Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS
In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za>
Message-ID: <1633718412.31.0.760581338165.issue10716@roundup.psfhosted.org>


Change by V?ctor Terr?n <quintanar at gmail.com>:


----------
nosy:  -vterron

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue10716>
_______________________________________

From report at bugs.python.org  Fri Oct  8 14:41:16 2021
From: report at bugs.python.org (Paul Ganssle)
Date: Fri, 08 Oct 2021 18:41:16 +0000
Subject: [issue45414] pathlib.Path.parents negative indexing is wrong for
 absolute paths
In-Reply-To: <1633716678.9.0.917396229112.issue45414@roundup.psfhosted.org>
Message-ID: <1633718476.58.0.151744105847.issue45414@roundup.psfhosted.org>


Change by Paul Ganssle <bpo at m.ganssle.io>:


----------
nosy: +p-ganssle

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45414>
_______________________________________

From report at bugs.python.org  Fri Oct  8 14:55:43 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 08 Oct 2021 18:55:43 +0000
Subject: [issue45406] inspect.getouterframes() tracebacks when $CWD does not
 exists
In-Reply-To: <1633615069.33.0.311671101448.issue45406@roundup.psfhosted.org>
Message-ID: <1633719343.13.0.278007370225.issue45406@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Thanks for the report, crash typically refers to segfaults rather than exceptions being raised. Updated versions.

----------
nosy: +iritkatriel
type: crash -> behavior
versions: +Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45406>
_______________________________________

From report at bugs.python.org  Fri Oct  8 14:56:23 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 08 Oct 2021 18:56:23 +0000
Subject: [issue45406] inspect.getouterframes() tracebacks when $CWD does not
 exists
In-Reply-To: <1633615069.33.0.311671101448.issue45406@roundup.psfhosted.org>
Message-ID: <1633719383.02.0.886352738571.issue45406@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
keywords: +patch
pull_requests: +27141
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28824

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45406>
_______________________________________

From report at bugs.python.org  Fri Oct  8 15:03:23 2021
From: report at bugs.python.org (Josh Rosenberg)
Date: Fri, 08 Oct 2021 19:03:23 +0000
Subject: [issue45340] Lazily create dictionaries for plain Python objects
In-Reply-To: <1633087277.57.0.188806648124.issue45340@roundup.psfhosted.org>
Message-ID: <1633719803.37.0.989542155304.issue45340@roundup.psfhosted.org>


Josh Rosenberg <shadowranger+python at gmail.com> added the comment:

Hmm... Key-sharing dictionaries were accepted largely without question because they didn't harm code that broke them (said code gained nothing, but lost nothing either), and provided a significant benefit. Specifically:

1. They imposed no penalty on code that violated the code-style recommendation to initialize all variables consistently in __init__ (code that always ended up using a non-sharing dict). Such classes don't benefit, but neither do they get penalized (just a minor CPU cost to unshare when it realized sharing wouldn't work). 

2. It imposes no penalty for using vars(object)/object.__dict__ when you don't modify the set of keys (so reading or changing values of existing attributes caused no problems).

The initial version of this worsens case #2; you'd have to convert to key-sharing dicts, and possibly to unshared dicts a moment later, if the set of attributes is changed. And when it happens, you'd be paying the cost of the now defunct values pointer storage for the life of each instance (admittedly a small cost).

But the final proposal compounds this, because the penalty for lazy attribute creation (directly, or dynamically by modifying via vars()/__dict__) is now a per-instance cost of n pointers (one for each value).

The CPython codebase rarely uses lazy attribute creation, but AFAIK there is no official recommendation to avoid it (not in PEP 8, not in the official tutorial, not even in PEP 412 which introduced Key-Sharing Dictionaries). Imposing a fairly significant penalty on people who aren't even violating language recommendations, let alone language rules, seems harsh.

I'm not against this initial version (one pointer wasted isn't so bad), but the additional waste in the final version worries me greatly.

Beyond the waste, I'm worried how you'd handle the creation of the first instance of such a class; you'd need to allocate and initialize an instance before you know how many values to tack on to the object. Would the first instance use a real dict during the first __init__ call that it would use to realloc the instance (and size all future instances) at the end of __init__? Or would it be realloc-ing for each and every attribute creation? In either case, threading issues seem like a problem.

Seems like:

1. Even in the ideal case, this only slightly improves memory locality, and only provides a fixed reduction in memory usage per-instance (the dict header and a little allocator round-off waste), not one that scales with number of attributes.

2. Classes that would benefit from this would typically do better to use __slots__ (now that dataclasses.dataclass supports slots=True, encouraging that as a default use case adds little work for class writers to use them)

If the gains are really impressive, might still be worth it. But I'm just worried that we'll make the language penalize people who don't know to avoid lazy attribute creation. And the complexity of this layered:

1. Not-a-dict
2. Key-sharing-dict
3. Regular dict

approach makes me worry it will allow subtle bugs in key-sharing dicts to go unnoticed (because so little code would still use them).

----------
nosy: +josh.r

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45340>
_______________________________________

From report at bugs.python.org  Fri Oct  8 15:08:20 2021
From: report at bugs.python.org (Paul Ganssle)
Date: Fri, 08 Oct 2021 19:08:20 +0000
Subject: [issue45414] pathlib.Path.parents negative indexing is wrong for
 absolute paths
In-Reply-To: <1633716678.9.0.917396229112.issue45414@roundup.psfhosted.org>
Message-ID: <1633720100.42.0.426447756208.issue45414@roundup.psfhosted.org>


Paul Ganssle <bpo at m.ganssle.io> added the comment:

This is a great bug report, but for anyone else who gets a bit lost in the details, here's the core of the issue:

>>> p = Path("/1/2")
>>> q = Path("1/2")

>>> p.parents[-1]  # This is correct
PosixPath('/')
>>> q.parents[-1]
PosixPath('.')

>>> p.parents[-2]  # Should be PosixPath('/1')
PosixPath('/')
>>> q.parents[-2]
PosixPath('1')

>>> p.parents[-3]  # Should be PosixPath('/1/2')
PosixPath('/1')
>>> q.parents[-3]
PosixPath('1/2')

I think a refactoring where '/' doesn't appear in ._parts would be a good idea if we can get past Chesterton's Fence and determine that this was indeed not a deliberate design decision (or at least one whose concerns no longer apply), but at least in the short term, I agree that transforming negative indexes into positive indices is the right, expedient thing to do.

We'll definitely want to make sure that we're careful about bad indices (and add relevant tests), though, since it would be easy to get weird behavior where too-large negative indexes start "wrapping around" (e.g. p.parents[-4] with len(p._parents) == 3 ? p.parents[-1]).

----------
type:  -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45414>
_______________________________________

From report at bugs.python.org  Fri Oct  8 15:09:20 2021
From: report at bugs.python.org (Josh Rosenberg)
Date: Fri, 08 Oct 2021 19:09:20 +0000
Subject: [issue45340] Lazily create dictionaries for plain Python objects
In-Reply-To: <1633087277.57.0.188806648124.issue45340@roundup.psfhosted.org>
Message-ID: <1633720160.57.0.000390946026441.issue45340@roundup.psfhosted.org>


Josh Rosenberg <shadowranger+python at gmail.com> added the comment:

Hmm... And there's one other issue (that wouldn't affect people until they actually start worrying about memory overhead). Right now, if you want to determine the overhead of an instance, the options are:

1. Has __dict__: sys.getsizeof(obj) + sys.getsizeof(obj.__dict__)
2. Lacks __dict__ (built-ins, slotted classes): sys.getsizeof(obj)

This change would mean even checking if something using this setup has a __dict__ creates one. Without additional introspection support, there's no way to tell the real memory usage of the instance without changing the memory usage (for the worse).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45340>
_______________________________________

From report at bugs.python.org  Fri Oct  8 15:33:14 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 08 Oct 2021 19:33:14 +0000
Subject: [issue45415] Assert oparg < INSTR_OFFSET()
Message-ID: <1633721594.06.0.212064470222.issue45415@roundup.psfhosted.org>


New submission from Steve Dower <steve.dower at python.org>:

encodings.search_function is triggering this assertion at Python/ceval.c#L4055:

       TARGET(JUMP_ABSOLUTE) {
            PREDICTED(JUMP_ABSOLUTE);
            assert(oparg < INSTR_OFFSET());    <<<

It seems to be saying that absolute jumps should only go backwards?

The assertion is triggering reliably in a Windows debug build (including as part of the build process, which means we can't release right now). I don't see anything Windows-specific here though, so I assume it's core and may just be a codepath in encodings that Linux doesn't use?

----------
components: Interpreter Core
messages: 403495
nosy: steve.dower
priority: release blocker
severity: normal
stage: test needed
status: open
title: Assert oparg < INSTR_OFFSET()
type: compile error
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45415>
_______________________________________

From report at bugs.python.org  Fri Oct  8 15:35:36 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 08 Oct 2021 19:35:36 +0000
Subject: [issue45415] Assert oparg < INSTR_OFFSET()
In-Reply-To: <1633721594.06.0.212064470222.issue45415@roundup.psfhosted.org>
Message-ID: <1633721736.58.0.525980625582.issue45415@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

+Pablo because of blocker.

+Mark because it seems like f6eafe18c004 is probably the cause

----------
nosy: +Mark.Shannon, pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45415>
_______________________________________

From report at bugs.python.org  Fri Oct  8 15:45:21 2021
From: report at bugs.python.org (Josh Rosenberg)
Date: Fri, 08 Oct 2021 19:45:21 +0000
Subject: [issue45414] pathlib.Path.parents negative indexing is wrong for
 absolute paths
In-Reply-To: <1633716678.9.0.917396229112.issue45414@roundup.psfhosted.org>
Message-ID: <1633722321.3.0.292756370253.issue45414@roundup.psfhosted.org>


Josh Rosenberg <shadowranger+python at gmail.com> added the comment:

"We'll definitely want to make sure that we're careful about bad indices ... since it would be easy to get weird behavior where too-large negative indexes start 'wrapping around'"

When I noticed the problem, I originally thought "Hey, the test for a negative index can come *before* the range check and save some work for negative indices". Then I realized, while composing this bug report, that that would make p.parents[-4] with len(p.parents) == 3 ? p.parents[-1] as you said, and die with a RecursionError for p.parents[-3000] or so. I'm going to ignore the possibility I'm sleep-deprived and/or sloppy, and assume a lot of good programmers would think to make that "optimization" and accidentally introduce new bugs. :-) So yeah, all the tests.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45414>
_______________________________________

From report at bugs.python.org  Fri Oct  8 15:50:11 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 08 Oct 2021 19:50:11 +0000
Subject: [issue45415] Assert oparg < INSTR_OFFSET()
In-Reply-To: <1633721594.06.0.212064470222.issue45415@roundup.psfhosted.org>
Message-ID: <1633722611.01.0.274013497661.issue45415@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

Also +Victor, because I think we should switch back to debug builds in CI in order to catch failed assertions before they get merged.

Since you're the most strongly against this, I wanted to give you a chance to argue against it (or suggest a better approach than just switching to the debug build).

----------
nosy: +vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45415>
_______________________________________

From report at bugs.python.org  Fri Oct  8 16:05:57 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Fri, 08 Oct 2021 20:05:57 +0000
Subject: [issue45415] Assert oparg < INSTR_OFFSET()
In-Reply-To: <1633721594.06.0.212064470222.issue45415@roundup.psfhosted.org>
Message-ID: <1633723557.01.0.975447924408.issue45415@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

I bet you can trigger this on Linux compiling with '--without-computed-gotos'.

Maybe we need a buildbot in that mode

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45415>
_______________________________________

From report at bugs.python.org  Fri Oct  8 16:30:58 2021
From: report at bugs.python.org (Simon Willison)
Date: Fri, 08 Oct 2021 20:30:58 +0000
Subject: [issue45416] "loop argument must agree with lock" instantiating
 asyncio.Condition
Message-ID: <1633725058.57.0.682695156248.issue45416@roundup.psfhosted.org>


New submission from Simon Willison <swillison at gmail.com>:

In Python 3.10 it is not possible to instantiate an asyncio.Condition that wraps an asyncio.Lock without raising a "loop argument must agree with lock" exception.

This code raises that exception:

    asyncio.Condition(asyncio.Lock())

This worked in previous Python versions.

Note that the error only occurs if an event loop is running. Here's a simple script that replicates the problem:

    import asyncio

    # This runs without an exception:
    print(asyncio.Condition(asyncio.Lock()))

    # This does not work:
    async def example():
        print(asyncio.Condition(asyncio.Lock()))

    # This raises "ValueError: loop argument must agree with lock":
    asyncio.run(example())

----------
components: asyncio
messages: 403500
nosy: asvetlov, simonw, yselivanov
priority: normal
severity: normal
status: open
title: "loop argument must agree with lock" instantiating asyncio.Condition
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45416>
_______________________________________

From report at bugs.python.org  Fri Oct  8 16:31:57 2021
From: report at bugs.python.org (Simon Willison)
Date: Fri, 08 Oct 2021 20:31:57 +0000
Subject: [issue45416] "loop argument must agree with lock" instantiating
 asyncio.Condition
In-Reply-To: <1633725058.57.0.682695156248.issue45416@roundup.psfhosted.org>
Message-ID: <1633725117.91.0.227873394907.issue45416@roundup.psfhosted.org>


Simon Willison <swillison at gmail.com> added the comment:

I ran across this issue while trying to use the https://pypi.org/project/janus/ locking library with Python 3.10 - see my issue on their tracker here: https://github.com/aio-libs/janus/issues/358

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45416>
_______________________________________

From report at bugs.python.org  Fri Oct  8 16:33:32 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 08 Oct 2021 20:33:32 +0000
Subject: [issue45352] Move documentation for typed generic forms of standard
 collections to collections.abc
In-Reply-To: <1633266753.15.0.403359406575.issue45352@roundup.psfhosted.org>
Message-ID: <1633725212.87.0.264511693792.issue45352@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
stage:  -> needs patch
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45352>
_______________________________________

From report at bugs.python.org  Fri Oct  8 16:38:06 2021
From: report at bugs.python.org (Simon Willison)
Date: Fri, 08 Oct 2021 20:38:06 +0000
Subject: [issue45416] "loop argument must agree with lock" instantiating
 asyncio.Condition
In-Reply-To: <1633725058.57.0.682695156248.issue45416@roundup.psfhosted.org>
Message-ID: <1633725486.09.0.458280505164.issue45416@roundup.psfhosted.org>


Simon Willison <swillison at gmail.com> added the comment:

It looks like the relevant test is here: https://github.com/python/cpython/blob/a1092f62492a3fcd6195bea94eccf8d5a300acb1/Lib/test/test_asyncio/test_locks.py#L722-L727

    def test_explicit_lock(self):
        lock = asyncio.Lock()
        cond = asyncio.Condition(lock)

        self.assertIs(cond._lock, lock)
        self.assertIs(cond._loop, lock._loop)

But... that test doesn't appear to run inside an event loop, so it's not covering the behaviour described in this issue.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45416>
_______________________________________

From report at bugs.python.org  Fri Oct  8 16:41:27 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 08 Oct 2021 20:41:27 +0000
Subject: [issue45353] sys.modules: dictionary changed size during iteration
In-Reply-To: <1633271811.32.0.73963856747.issue45353@roundup.psfhosted.org>
Message-ID: <1633725687.51.0.88762680287.issue45353@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Do you have an example for which "for m in sys.modules: print(m, end=' ')" fails?  In particular, is there code in the stdlib that fails iterating over sys.modules?  If not the latter, this should be closed as 'Not a bug'.

Note that questions about using Python should go elsewhere, such as python-list or stackoverflow.

----------
nosy: +terry.reedy
stage:  -> test needed
type:  -> behavior
versions: +Python 3.11 -Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45353>
_______________________________________

From report at bugs.python.org  Fri Oct  8 16:47:43 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 08 Oct 2021 20:47:43 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1633726063.6.0.0467600112786.issue45356@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Randolf, what specific behaviors do you consider to be bugs that should be fixed.  What would a test of the the changed behavior look like?

This should perhaps be closed as a duplicate of #44904.  Randolf, please check and say what you thing.

----------
nosy: +terry.reedy
stage:  -> test needed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Fri Oct  8 16:53:12 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 08 Oct 2021 20:53:12 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1633726392.15.0.686969473183.issue45356@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

On current 3.9, 3.10, 3.11, on Windows running in IDLE, I see
computing class property ..
computing class property ..
computing class property ..
computing class property ..
computing class property ..
Help ...

----------
versions: +Python 3.11 -Python 3.10, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Fri Oct  8 17:16:42 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 08 Oct 2021 21:16:42 +0000
Subject: [issue45416] "loop argument must agree with lock" instantiating
 asyncio.Condition
In-Reply-To: <1633725058.57.0.682695156248.issue45416@roundup.psfhosted.org>
Message-ID: <1633727802.06.0.781167329942.issue45416@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Issue confirmed. The problem is that `Condition.__init__` compares its own loop with Lock's internal `_loop` attribute. That attribute is set to None unless the lock waited to be acquired.

uriyyo, Andrew, Yury, since it's pretty likely that Lock objects will now have `_loop` set to None, I think the check for "loop agreement" in Condition is kind of useless. So I propose to simply remove it. It's the only such check in all of asyncio.

If you insist on keeping the loop check, it should special-case `_loop is None`.

Simon, thanks for your detailed report! As a backwards-compatible workaround till we get a fix in, your user code can do the following:

>>> l = asyncio.Lock()
>>> getattr(l, '_get_loop', lambda: None)()
<_UnixSelectorEventLoop running=True closed=False debug=False>

You can use such lock without issues now:

>>> asyncio.Condition(l)
<asyncio.locks.Condition object at 0x10c05bee0 [unlocked]>

Alternatively, if the above disgusts you and you only want to trigger public APIs, you can do this dance:

>>> l = asyncio.Lock()
>>> await l.acquire()  # first acquire will just work
True
>>> try:
...   # second acquire will block so we time it out
...   await asyncio.wait_for(l.acquire(), 0.1)
... except asyncio.TimeoutError:
...   pass
...
>>> l.release()

Now the lock is fully initialized and we can use it:

>>> c = asyncio.Condition(l)

Both workarounds should be compatible with Python 3.7+ asyncio.

----------
nosy: +lukasz.langa, uriyyo

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45416>
_______________________________________

From report at bugs.python.org  Fri Oct  8 17:19:51 2021
From: report at bugs.python.org (Josh Rosenberg)
Date: Fri, 08 Oct 2021 21:19:51 +0000
Subject: [issue45414] pathlib.Path.parents negative indexing is wrong for
 absolute paths
In-Reply-To: <1633716678.9.0.917396229112.issue45414@roundup.psfhosted.org>
Message-ID: <1633727991.06.0.237957260514.issue45414@roundup.psfhosted.org>


Josh Rosenberg <shadowranger+python at gmail.com> added the comment:

On the subject of sleep-deprived and/or sloppy, just realized:

return self.__getitem__(len(self) + idx)

should really just be:

idx += len(self)

no need to recurse.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45414>
_______________________________________

From report at bugs.python.org  Fri Oct  8 17:22:50 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 08 Oct 2021 21:22:50 +0000
Subject: [issue45365] Make concurrent.futures.Future usable outside of
 executors
In-Reply-To: <1633375882.11.0.38644719586.issue45365@roundup.psfhosted.org>
Message-ID: <1633728170.94.0.200352355096.issue45365@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
stage:  -> test needed
title: concurrent.futures.Future should be suitable for use outside of executors -> Make concurrent.futures.Future usable outside of executors
versions: +Python 3.11 -Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45365>
_______________________________________

From report at bugs.python.org  Fri Oct  8 17:28:51 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 08 Oct 2021 21:28:51 +0000
Subject: [issue45415] Assert oparg < INSTR_OFFSET()
In-Reply-To: <1633721594.06.0.212064470222.issue45415@roundup.psfhosted.org>
Message-ID: <1633728531.31.0.295118221102.issue45415@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

I can't get it to go with that option (with or without -DDEBUG, which I *think* is needed to get assert to work?), and I also don't see anything obvious in the changeset I linked. So I guess there's some other assumption that isn't holding?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45415>
_______________________________________

From report at bugs.python.org  Fri Oct  8 17:32:49 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 08 Oct 2021 21:32:49 +0000
Subject: [issue45378] Can't find "map" with search on docs.python.org
In-Reply-To: <1633449082.64.0.24886590221.issue45378@roundup.psfhosted.org>
Message-ID: <1633728769.45.0.0141103548235.issue45378@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

The iterator classes are not identified as such because being a class instead of a function, such as a generator function, is a CPython implementation detail, not a language requirement.

Searching for filter seems as bad -- builtin filter is about the 60th hit.  Builtins should be listed first instead.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45378>
_______________________________________

From report at bugs.python.org  Fri Oct  8 17:51:01 2021
From: report at bugs.python.org (Mark Shannon)
Date: Fri, 08 Oct 2021 21:51:01 +0000
Subject: [issue45415] Assert oparg < INSTR_OFFSET()
In-Reply-To: <1633721594.06.0.212064470222.issue45415@roundup.psfhosted.org>
Message-ID: <1633729861.78.0.929948462097.issue45415@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:

Nothing to do with it being Windows, or computed gotos.
I forgot to bump magic number again :(

----------
assignee:  -> Mark.Shannon

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45415>
_______________________________________

From report at bugs.python.org  Fri Oct  8 19:08:40 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 08 Oct 2021 23:08:40 +0000
Subject: [issue45415] Assert oparg < INSTR_OFFSET()
In-Reply-To: <1633721594.06.0.212064470222.issue45415@roundup.psfhosted.org>
Message-ID: <1633734520.58.0.934705927031.issue45415@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

*facepalm* on myself, for not even thinking of that. Indeed, clearing all my .pyc files fixes it.

I think I got distracted by the error coming from one of the newly frozen modules, except because we're in tree it shouldn't be using the frozen one, so it is picking up the cached file instead.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45415>
_______________________________________

From report at bugs.python.org  Fri Oct  8 19:52:33 2021
From: report at bugs.python.org (Oliver Margetts)
Date: Fri, 08 Oct 2021 23:52:33 +0000
Subject: [issue45417] Enum creation non-linear in the number of values
Message-ID: <1633737153.71.0.819400116811.issue45417@roundup.psfhosted.org>


New submission from Oliver Margetts <oliver.margetts at gmail.com>:

Creating large enums takes a significant amount of time. Moreover this appears to be nonlinear in the number of entries in the enum. Locally, importing a single python file and taking this to the extreme:

 1000 entries - 0.058s
10000 entries - 4.327s

This is partially addressed by https://bugs.python.org/issue38659 and I can confirm that using `@_simple_enum` does not have this problem. But it seems like that API is only intended for internal use and the 'happy path' for user-defined enums is still not good.

Note that it is not simply parsing the file / creating the instances, it is to do with the cardinality. Creating 100 enums with 100 entries each is far faster than a single 10000 entry enum.

----------
files: huge.py
messages: 403512
nosy: olliemath
priority: normal
severity: normal
status: open
title: Enum creation non-linear in the number of values
type: performance
versions: Python 3.10, Python 3.11, Python 3.7
Added file: https://bugs.python.org/file50332/huge.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45417>
_______________________________________

From report at bugs.python.org  Fri Oct  8 20:30:45 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 09 Oct 2021 00:30:45 +0000
Subject: [issue45413] Add install scheme for virtual environments
In-Reply-To: <1633715402.49.0.434363843275.issue45413@roundup.psfhosted.org>
Message-ID: <1633739445.62.0.720913586224.issue45413@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

Yes, we could have several schemes, but I think having only one is more sensible.

The implementation would be fairly easy. We would just copy the "nt" scheme if on Windows, otherwise "posix_prefix".

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45413>
_______________________________________

From report at bugs.python.org  Fri Oct  8 22:51:05 2021
From: report at bugs.python.org (komugi)
Date: Sat, 09 Oct 2021 02:51:05 +0000
Subject: [issue45399] Remove hostflags from PySSLContext
In-Reply-To: <1633599416.0.0.711610272152.issue45399@roundup.psfhosted.org>
Message-ID: <1633747865.12.0.980187140532.issue45399@roundup.psfhosted.org>


komugi <alexk-m at outlook.com> added the comment:

Hi, I would like to work on it. I'll send the PR tomorrow.

----------
nosy: +komugi

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45399>
_______________________________________

From report at bugs.python.org  Fri Oct  8 23:21:59 2021
From: report at bugs.python.org (Ned Deily)
Date: Sat, 09 Oct 2021 03:21:59 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1633749719.3.0.904979981364.issue45405@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

OK, I've had a chance to look at this issue and I now understand what you were describing. So, yes, it would be good to fix the test in configure so that it does work with a newer clang that does implement the --print-multiarch command line option. FTR, this is not an issue with clang from any Apple tools chains (Xcode or Command Line Tools) released to this point. A PR against configure.ac in main would be welcome, we can auto-backport to other active branches as necessary. We currently use autoconf 2.69 but, if that is not available, a core developer can regenerate configure prior to merging.

----------
stage:  -> needs patch
title: Python does not configure on darwin using public llvm / clang version 13.0.0 -> configure fails on macOS with non-Apple clang version 13 which implements --print-multiarch
versions: +Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Sat Oct  9 00:20:28 2021
From: report at bugs.python.org (Ken Jin)
Date: Sat, 09 Oct 2021 04:20:28 +0000
Subject: [issue45415] Assert oparg < INSTR_OFFSET()
In-Reply-To: <1633721594.06.0.212064470222.issue45415@roundup.psfhosted.org>
Message-ID: <1633753228.54.0.126206492393.issue45415@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

> I think we should switch back to debug builds in CI in order to catch failed assertions before they get merged.

I'm not Victor, but +1. I've been bitten by release builds not catching things, see issue44348 for example where I advocated for switching back to debug builds for Windows.

FWIW, the macOS and Ubuntu CI use debug builds too. So I don't see why Windows is special.

----------
nosy: +kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45415>
_______________________________________

From report at bugs.python.org  Sat Oct  9 00:44:06 2021
From: report at bugs.python.org (zcpara)
Date: Sat, 09 Oct 2021 04:44:06 +0000
Subject: [issue45260] Implement superinstruction UNPACK_SEQUENCE_ST
In-Reply-To: <1632291277.5.0.29382799945.issue45260@roundup.psfhosted.org>
Message-ID: <1633754646.03.0.308008847341.issue45260@roundup.psfhosted.org>


Change by zcpara <zhangchaospecial at gmail.com>:


----------
nosy: +Mark.Shannon

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45260>
_______________________________________

From report at bugs.python.org  Sat Oct  9 01:52:43 2021
From: report at bugs.python.org (Armin Rigo)
Date: Sat, 09 Oct 2021 05:52:43 +0000
Subject: [issue38659] enum classes cause slow startup time
In-Reply-To: <1572570768.69.0.355804772721.issue38659@roundup.psfhosted.org>
Message-ID: <1633758763.08.0.377989614976.issue38659@roundup.psfhosted.org>


Armin Rigo <arigo at users.sourceforge.net> added the comment:

Nobody seemed to mention it so I might as well: defining a regular Enum class takes an amount of time that is clearly quadratic in the number of attributes.  That means that the problem is not Python-versus-C or small speed-ups or adding secret APIs to do the simple case faster.  The problem is in the algorithm which needs to be fixed somewhere.  My timings:

number of attributes     time
1500                     0.24s
3000                     0.94s
6000                     3.74s
12000                    15.57s

----------
nosy: +arigo

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38659>
_______________________________________

From report at bugs.python.org  Sat Oct  9 02:49:16 2021
From: report at bugs.python.org (ramikg)
Date: Sat, 09 Oct 2021 06:49:16 +0000
Subject: [issue45399] Remove hostflags from PySSLContext
In-Reply-To: <1633599416.0.0.711610272152.issue45399@roundup.psfhosted.org>
Message-ID: <1633762156.94.0.218924838646.issue45399@roundup.psfhosted.org>


ramikg <ramikgold at gmail.com> added the comment:

In addition to https://github.com/python/cpython/pull/28602?
What would the PR include?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45399>
_______________________________________

From report at bugs.python.org  Sat Oct  9 03:36:58 2021
From: report at bugs.python.org (Julien Palard)
Date: Sat, 09 Oct 2021 07:36:58 +0000
Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS
In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za>
Message-ID: <1633765018.57.0.887597664139.issue10716@roundup.psfhosted.org>


Julien Palard <julien+python at palard.fr> added the comment:


New changeset c91b6f57f3f75b482e4a9d30ad2afe37892a8ceb by Julien Palard in branch 'main':
bpo-10716: Migrating pydoc to html5. (GH-28651)
https://github.com/python/cpython/commit/c91b6f57f3f75b482e4a9d30ad2afe37892a8ceb


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue10716>
_______________________________________

From report at bugs.python.org  Sat Oct  9 03:38:23 2021
From: report at bugs.python.org (Marco Pagliaricci)
Date: Sat, 09 Oct 2021 07:38:23 +0000
Subject: [issue45390] asyncio.Task doesn't propagate CancelledError()
 exception correctly.
In-Reply-To: <1633595118.89.0.347303320536.issue45390@roundup.psfhosted.org>
Message-ID: <CAHWeiQXtt+b-Of7Eo68oZ5ZggOtb4T-XkdAudbQQgJhOKXg_rw@mail.gmail.com>


Marco Pagliaricci <pagliaricci.m at gmail.com> added the comment:

OK, I see your point.
But I still can't understand one thing and I think it's very confusing:

1) if you see my example, inside the job() coroutine, I get correctly
cancelled with an `asyncio.CancelledError` exception containing my message.
2) Now: if I re-raise the asyncio.CancelledError as-is, I lose the message,
if I call the `asyncio.Task.exception()` function.
3) If I raise a *new* asyncio.CancelledError with a new message, inside the
job() coroutine's `except asyncio.CancelledError:` block, I still lose the
message if I call `asyncio.Task.exception()`.
4) But if I raise another exception, say `raise ValueError("TEST")`, always
from the `except asyncio.CancelledError:` block of the job() coroutine, I
*get* the message!
I get `ValueError("TEST")` by calling `asyncio.Task.exception()`, while I
don't with the `asyncio.CancelledError()` one.

Is this really wanted? Sorry, but I still find this a lot confusing.
Shouldn't it be better to return from the `asyncio.Task.exception()` the
old one (containing the message) ?
Or, otherwise, create a new instance of the exception for *ALL* the
exception classes?

Thank you for your time,
My Best Regards,

M.

On Thu, Oct 7, 2021 at 10:25 AM Thomas Grainger <report at bugs.python.org>
wrote:

>
> Thomas Grainger <tagrain at gmail.com> added the comment:
>
> afaik this is intentional https://bugs.python.org/issue31033
>
> ----------
> nosy: +graingert
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue45390>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45390>
_______________________________________

From report at bugs.python.org  Sat Oct  9 03:49:07 2021
From: report at bugs.python.org (Julien Palard)
Date: Sat, 09 Oct 2021 07:49:07 +0000
Subject: [issue42238] Deprecate suspicious.py?
In-Reply-To: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org>
Message-ID: <1633765747.26.0.465355704165.issue42238@roundup.psfhosted.org>


Change by Julien Palard <julien+python at palard.fr>:


----------
pull_requests: +27143
pull_request: https://github.com/python/cpython/pull/28827

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42238>
_______________________________________

From report at bugs.python.org  Sat Oct  9 03:56:50 2021
From: report at bugs.python.org (STINNER Victor)
Date: Sat, 09 Oct 2021 07:56:50 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633766210.91.0.0719852167571.issue45412@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> And I have doubts about Py_ADJUST_ERANGE2(). I think that it is used incorrectly. See issue44970.

The question here is if it should be exported in the C API. I propose to remove it.

Fixing it is a different issue: bpo-44970 :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Sat Oct  9 03:59:37 2021
From: report at bugs.python.org (Julien Palard)
Date: Sat, 09 Oct 2021 07:59:37 +0000
Subject: [issue42238] Deprecate suspicious.py?
In-Reply-To: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org>
Message-ID: <1633766377.53.0.765653102116.issue42238@roundup.psfhosted.org>


Julien Palard <julien+python at palard.fr> added the comment:

New suspicious today:

    [library/typing:1011] "`" found in "        # Type of ``val`` is narrowed to ``list[str]``."

But it's only because the old one with List[str] instead of list[str] was in susp-ignored.csv, so I just fixed susp-ignored.csv in https://github.com/python/cpython/pull/28827.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42238>
_______________________________________

From report at bugs.python.org  Sat Oct  9 05:06:24 2021
From: report at bugs.python.org (komugi)
Date: Sat, 09 Oct 2021 09:06:24 +0000
Subject: [issue45399] Remove hostflags from PySSLContext
In-Reply-To: <1633599416.0.0.711610272152.issue45399@roundup.psfhosted.org>
Message-ID: <1633770384.89.0.989576317192.issue45399@roundup.psfhosted.org>


komugi <alexk-m at outlook.com> added the comment:

You've already done it, my bad. It was a waste of time.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45399>
_______________________________________

From report at bugs.python.org  Sat Oct  9 05:15:33 2021
From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Blondon?=)
Date: Sat, 09 Oct 2021 09:15:33 +0000
Subject: [issue42914] pprint numbers with underscore
In-Reply-To: <1610493681.29.0.683565759752.issue42914@roundup.psfhosted.org>
Message-ID: <1633770933.39.0.290051681997.issue42914@roundup.psfhosted.org>


St?phane Blondon <stephane.blondon at gmail.com> added the comment:

Ok, I will not send a PR to change the current behavior until python4 (in case it exists one day).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42914>
_______________________________________

From report at bugs.python.org  Sat Oct  9 05:20:20 2021
From: report at bugs.python.org (komugi)
Date: Sat, 09 Oct 2021 09:20:20 +0000
Subject: [issue20803] doc: clarify that struct.pack_into writes 0x00 for pad
 bytes
In-Reply-To: <1393579049.39.0.501282349647.issue20803@psf.upfronthosting.co.za>
Message-ID: <1633771220.3.0.462235704231.issue20803@roundup.psfhosted.org>


komugi <alexk-m at outlook.com> added the comment:

The PR is stale. Can I work on it ?

----------
nosy: +komugi

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20803>
_______________________________________

From report at bugs.python.org  Sat Oct  9 05:26:25 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sat, 09 Oct 2021 09:26:25 +0000
Subject: [issue45399] Remove hostflags from PySSLContext
In-Reply-To: <1633599416.0.0.711610272152.issue45399@roundup.psfhosted.org>
Message-ID: <1633771585.58.0.462620381414.issue45399@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

I have limited time to review code at the moment. It might take a while until I can get back to you.

----------
stage:  -> patch review

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45399>
_______________________________________

From report at bugs.python.org  Sat Oct  9 06:14:39 2021
From: report at bugs.python.org (=?utf-8?q?Benjamin_Sz=C5=91ke?=)
Date: Sat, 09 Oct 2021 10:14:39 +0000
Subject: [issue21302] time.sleep (floatsleep()) should use clock_nanosleep()
 on Linux
In-Reply-To: <1397851923.06.0.0550198760464.issue21302@psf.upfronthosting.co.za>
Message-ID: <1633774479.3.0.904362376659.issue21302@roundup.psfhosted.org>


Benjamin Sz?ke <egyszeregy at freemail.hu> added the comment:

https://www.python.org/downloads/windows/
"Note that Python 3.10.0 cannot be used on Windows 7 or earlier."

vstinner: Is it true that Windows 7 is not supported OS anymore? In this case we do not need to care about Windows 7 and earlier Windows OS compatibility and it is time to use nicely GetSystemTimePreciseAsFileTime() in time.time() and time.sleep() as absolute sleeping because it is available since Windows 8.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21302>
_______________________________________

From report at bugs.python.org  Sat Oct  9 06:42:28 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 09 Oct 2021 10:42:28 +0000
Subject: [issue45416] "loop argument must agree with lock" instantiating
 asyncio.Condition
In-Reply-To: <1633725058.57.0.682695156248.issue45416@roundup.psfhosted.org>
Message-ID: <1633776148.73.0.792187657284.issue45416@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45416>
_______________________________________

From report at bugs.python.org  Sat Oct  9 07:40:47 2021
From: report at bugs.python.org (Roundup Robot)
Date: Sat, 09 Oct 2021 11:40:47 +0000
Subject: [issue45351] asyncio doc: List all sockets in TCP echo server using
 streams
In-Reply-To: <1633262301.08.0.953751090869.issue45351@roundup.psfhosted.org>
Message-ID: <1633779647.1.0.448745222246.issue45351@roundup.psfhosted.org>


Change by Roundup Robot <devnull at psf.upfronthosting.co.za>:


----------
keywords: +patch
nosy: +python-dev
nosy_count: 4.0 -> 5.0
pull_requests: +27144
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28828

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45351>
_______________________________________

From report at bugs.python.org  Sat Oct  9 07:58:28 2021
From: report at bugs.python.org (Idan Cohen)
Date: Sat, 09 Oct 2021 11:58:28 +0000
Subject: [issue45353] sys.modules: dictionary changed size during iteration
In-Reply-To: <1633271811.32.0.73963856747.issue45353@roundup.psfhosted.org>
Message-ID: <1633780708.64.0.671580449137.issue45353@roundup.psfhosted.org>


Idan Cohen <idan57 at gmail.com> added the comment:

An example can be found here: https://github.com/python/cpython/commit/7058d2d96c5ca4dfc6c754c5cd737c6eb2a8fd67
https://bugs.python.org/issue13487

Those links are about an issue that was until March 2020 with how sys.modules is iterated. It is not safe to iterate over since it can get updated during the iteration because of lazy importing for example.

If you look in older reports you can find that there us an issue with iterating over it and it was not addressed yet at all.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45353>
_______________________________________

From report at bugs.python.org  Sat Oct  9 08:25:48 2021
From: report at bugs.python.org (Mark Shannon)
Date: Sat, 09 Oct 2021 12:25:48 +0000
Subject: [issue45388] Use JUMP_FORWARD for all forward jumps.
In-Reply-To: <1633514784.49.0.280393257711.issue45388@roundup.psfhosted.org>
Message-ID: <1633782348.78.0.297721702133.issue45388@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
pull_requests: +27145
pull_request: https://github.com/python/cpython/pull/28829

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45388>
_______________________________________

From report at bugs.python.org  Sat Oct  9 08:51:00 2021
From: report at bugs.python.org (Chris Jerdonek)
Date: Sat, 09 Oct 2021 12:51:00 +0000
Subject: [issue45390] asyncio.Task doesn't propagate CancelledError()
 exception correctly.
In-Reply-To: <1633519842.27.0.396754460358.issue45390@roundup.psfhosted.org>
Message-ID: <1633783860.72.0.303940725357.issue45390@roundup.psfhosted.org>


Chris Jerdonek <chris.jerdonek at gmail.com> added the comment:

> 2) Now: if I re-raise the asyncio.CancelledError as-is, I lose the message,
if I call the `asyncio.Task.exception()` function.

Re-raise asyncio.CancelledError where? (And what do you mean by "re-raise"?) Call asyncio.Task.exception() where? This isn't part of your example, so it's not clear what you mean exactly.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45390>
_______________________________________

From report at bugs.python.org  Sat Oct  9 09:00:14 2021
From: report at bugs.python.org (Marco Pagliaricci)
Date: Sat, 09 Oct 2021 13:00:14 +0000
Subject: [issue45390] asyncio.Task doesn't propagate CancelledError()
 exception correctly.
In-Reply-To: <1633783860.72.0.303940725357.issue45390@roundup.psfhosted.org>
Message-ID: <CAHWeiQXw1LCv5A6qpUM=XVGHqG_PanpBSKG7egB-SSHzmRXG=A@mail.gmail.com>


Marco Pagliaricci <pagliaricci.m at gmail.com> added the comment:

Chris,
I'm attaching to this e-mail the code I'm referring to.
As you can see, in line 10, I re-raise the asyncio.CancelledError exception
with a message "TEST".
That message is lost, due to the reasons we've talked about.

My point is that, if we substitute that line 10, with the commented line
11, and we comment the line 10, so we raise a ValueError("TEST") exception,
as you can see, the message "TEST" is NOT LOST.
I just find this counter-intuitive, and error-prone.

AT LEAST should be very well specified in the docs.

Regards,
M.

On Sat, Oct 9, 2021 at 2:51 PM Chris Jerdonek <report at bugs.python.org>
wrote:

>
> Chris Jerdonek <chris.jerdonek at gmail.com> added the comment:
>
> > 2) Now: if I re-raise the asyncio.CancelledError as-is, I lose the
> message,
> if I call the `asyncio.Task.exception()` function.
>
> Re-raise asyncio.CancelledError where? (And what do you mean by
> "re-raise"?) Call asyncio.Task.exception() where? This isn't part of your
> example, so it's not clear what you mean exactly.
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue45390>
> _______________________________________
>

----------
Added file: https://bugs.python.org/file50333/task_bug.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45390>
_______________________________________
-------------- next part --------------
import asyncio


async def job():
	print("job(): START...")
	try:
		await asyncio.sleep(5.0)
	except asyncio.CancelledError as e:
		print("job(): CANCELLED!", e)
		#raise asyncio.CancelledError("TEST")
		raise ValueError("TEST")
	print("job(): DONE.")


async def cancel_task_after(task, time):
	try:
		await asyncio.sleep(time)
	except asyncio.CancelledError:
		print("cancel_task_after(): CANCELLED!")
	except Exception as e:
		print("cancel_task_after(): Exception!", e.__class__.__name__, e)
	task.cancel("Hello!")


async def main():
	task = asyncio.create_task(job())
	# RUN/CANCEL task.
	try:
		await asyncio.gather(task, cancel_task_after(task, 1.0))
	except asyncio.CancelledError as e:
		print("In running task, we encountered a cancellation! Excpetion message is: ", e)
	except Exception as e:
		print("In running task, we got a generic Exception:", e.__class__.__name__, e)
	# GET result.
	try:
		result = task.result()
	except asyncio.CancelledError as e:
		print("Task has been cancelled, exception message is: ", e)
	except Exception as e:
		print("Task raised generic exception", e.__class__.__name__, e)
	else:
		print("Task result is: ", result)


if __name__=="__main__":
	asyncio.run(main())


From report at bugs.python.org  Sat Oct  9 09:06:02 2021
From: report at bugs.python.org (Chris Jerdonek)
Date: Sat, 09 Oct 2021 13:06:02 +0000
Subject: [issue45390] asyncio.Task doesn't propagate CancelledError()
 exception correctly.
In-Reply-To: <1633519842.27.0.396754460358.issue45390@roundup.psfhosted.org>
Message-ID: <1633784762.7.0.0585236205227.issue45390@roundup.psfhosted.org>


Chris Jerdonek <chris.jerdonek at gmail.com> added the comment:

I still don't see you calling asyncio.Task.exception() in your new attachment...

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45390>
_______________________________________

From report at bugs.python.org  Sat Oct  9 09:16:22 2021
From: report at bugs.python.org (Marco Pagliaricci)
Date: Sat, 09 Oct 2021 13:16:22 +0000
Subject: [issue45390] asyncio.Task doesn't propagate CancelledError()
 exception correctly.
In-Reply-To: <1633784762.7.0.0585236205227.issue45390@roundup.psfhosted.org>
Message-ID: <CAHWeiQVEzW=zeqR_sQO5gc_yOad2bKsdvy=JRXjMB3jbzmvxvQ@mail.gmail.com>


Marco Pagliaricci <pagliaricci.m at gmail.com> added the comment:

Chris,
ok, I have modified the snippet of code to better show what I mean.
Still here, the message of the CancelledError exception is lost, but if I
comment line 10, and uncomment line 11, so I throw a ValueError("TEST"),
that "TEST" string will be printed, so the message is not lost.
Again, I just find this behavior very counter-intuitive, and should be VERY
WELL documented in the docs.

Thanks,
M.

On Sat, Oct 9, 2021 at 3:06 PM Chris Jerdonek <report at bugs.python.org>
wrote:

>
> Chris Jerdonek <chris.jerdonek at gmail.com> added the comment:
>
> I still don't see you calling asyncio.Task.exception() in your new
> attachment...
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue45390>
> _______________________________________
>

----------
Added file: https://bugs.python.org/file50334/task_bug.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45390>
_______________________________________
-------------- next part --------------
import asyncio


async def job():
	print("job(): START...")
	try:
		await asyncio.sleep(5.0)
	except asyncio.CancelledError as e:
		print("job(): CANCELLED!", e)
		raise asyncio.CancelledError("TEST")
		#raise ValueError("TEST")
	print("job(): DONE.")


async def cancel_task_after(task, time):
	try:
		await asyncio.sleep(time)
	except asyncio.CancelledError:
		print("cancel_task_after(): CANCELLED!")
	except Exception as e:
		print("cancel_task_after(): Exception!", e.__class__.__name__, e)
	task.cancel("Hello!")


async def main():
	task = asyncio.create_task(job())
	# RUN/CANCEL task.
	try:
		await asyncio.gather(task, cancel_task_after(task, 1.0))
	except asyncio.CancelledError as e:
		try:
			task_exc = task.exception()
		except BaseException as be:
			task_exc = be
		print("In running task, we encountered a cancellation! Excpetion message is: ", e)
		print("   ^ Task exc is:", task_exc.__class__.__name__, task_exc)
	except Exception as e:
		print("In running task, we got a generic Exception:", e.__class__.__name__, e)
	# GET result.
	try:
		result = task.result()
	except asyncio.CancelledError as e:
		print("Task has been cancelled, exception message is: ", e)
	except Exception as e:
		try:
			task_exc = task.exception()
		except BaseException as be:
			task_exc = be
		print("Task raised generic exception", e.__class__.__name__, e)
		print("  ^ Task exc is:", task_exc.__class__.__name__, task_exc)
	else:
		print("Task result is: ", result)


if __name__=="__main__":
	asyncio.run(main())


From report at bugs.python.org  Sat Oct  9 10:50:20 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 09 Oct 2021 14:50:20 +0000
Subject: [issue20028] csv: Confusing error message when giving invalid
 quotechar in initializing dialect
In-Reply-To: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
Message-ID: <1633791020.48.0.918003059072.issue20028@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset 34bbc87b2ddbaf245fbed6443c3e620f80c6a843 by Dong-hee Na in branch 'main':
bpo-20028: Improve error message of csv.Dialect when initializing (GH-28705)
https://github.com/python/cpython/commit/34bbc87b2ddbaf245fbed6443c3e620f80c6a843


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20028>
_______________________________________

From report at bugs.python.org  Sat Oct  9 10:50:21 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 09 Oct 2021 14:50:21 +0000
Subject: [issue20028] csv: Confusing error message when giving invalid
 quotechar in initializing dialect
In-Reply-To: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
Message-ID: <1633791021.13.0.483109025089.issue20028@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +27146
pull_request: https://github.com/python/cpython/pull/28830

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20028>
_______________________________________

From report at bugs.python.org  Sat Oct  9 10:50:25 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 09 Oct 2021 14:50:25 +0000
Subject: [issue20028] csv: Confusing error message when giving invalid
 quotechar in initializing dialect
In-Reply-To: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
Message-ID: <1633791025.22.0.721051690883.issue20028@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27147
pull_request: https://github.com/python/cpython/pull/28831

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20028>
_______________________________________

From report at bugs.python.org  Sat Oct  9 10:54:55 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 09 Oct 2021 14:54:55 +0000
Subject: [issue20028] csv: Confusing error message when giving invalid
 quotechar in initializing dialect
In-Reply-To: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
Message-ID: <1633791295.7.0.419933134357.issue20028@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
pull_requests: +27148
pull_request: https://github.com/python/cpython/pull/28832

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20028>
_______________________________________

From report at bugs.python.org  Sat Oct  9 11:16:19 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 09 Oct 2021 15:16:19 +0000
Subject: [issue20028] csv: Confusing error message when giving invalid
 quotechar in initializing dialect
In-Reply-To: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
Message-ID: <1633792579.67.0.81629738533.issue20028@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset ec04db74e24a5f5da441bcabbe259157b4938b9b by Dong-hee Na in branch 'main':
bpo-20028: Keep original exception when PyUnicode_GetLength return -1 (GH-28832)
https://github.com/python/cpython/commit/ec04db74e24a5f5da441bcabbe259157b4938b9b


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20028>
_______________________________________

From report at bugs.python.org  Sat Oct  9 11:31:02 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 09 Oct 2021 15:31:02 +0000
Subject: [issue20028] csv: Confusing error message when giving invalid
 quotechar in initializing dialect
In-Reply-To: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
Message-ID: <1633793462.64.0.0145963920284.issue20028@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 6f3bc5eee6729197747d324c167da12902fb7c27 by Miss Islington (bot) in branch '3.9':
bpo-20028: Improve error message of csv.Dialect when initializing (GH-28705)
https://github.com/python/cpython/commit/6f3bc5eee6729197747d324c167da12902fb7c27


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20028>
_______________________________________

From report at bugs.python.org  Sat Oct  9 11:34:02 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 09 Oct 2021 15:34:02 +0000
Subject: [issue20028] csv: Confusing error message when giving invalid
 quotechar in initializing dialect
In-Reply-To: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
Message-ID: <1633793642.27.0.0804234187459.issue20028@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
pull_requests: +27149
pull_request: https://github.com/python/cpython/pull/28833

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20028>
_______________________________________

From report at bugs.python.org  Sat Oct  9 11:35:36 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 09 Oct 2021 15:35:36 +0000
Subject: [issue20028] csv: Confusing error message when giving invalid
 quotechar in initializing dialect
In-Reply-To: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
Message-ID: <1633793736.85.0.870689543132.issue20028@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 8772935765e7a4f04f7f561e37d0c0aee71d8030 by Miss Islington (bot) in branch '3.10':
bpo-20028: Improve error message of csv.Dialect when initializing (GH-28705)
https://github.com/python/cpython/commit/8772935765e7a4f04f7f561e37d0c0aee71d8030


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20028>
_______________________________________

From report at bugs.python.org  Sat Oct  9 11:36:30 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 09 Oct 2021 15:36:30 +0000
Subject: [issue20028] csv: Confusing error message when giving invalid
 quotechar in initializing dialect
In-Reply-To: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
Message-ID: <1633793790.41.0.352386424187.issue20028@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
pull_requests: +27150
pull_request: https://github.com/python/cpython/pull/28834

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20028>
_______________________________________

From report at bugs.python.org  Sat Oct  9 11:37:07 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 09 Oct 2021 15:37:07 +0000
Subject: [issue20028] csv: Confusing error message when giving invalid
 quotechar in initializing dialect
In-Reply-To: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
Message-ID: <1633793827.73.0.821897737805.issue20028@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
pull_requests: +27151
pull_request: https://github.com/python/cpython/pull/28835

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20028>
_______________________________________

From report at bugs.python.org  Sat Oct  9 11:51:34 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sat, 09 Oct 2021 15:51:34 +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: <1633794694.42.0.331237971753.issue45256@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset b4903afd4debbbd71dc49a2c8fefa74a3b6c6832 by Pablo Galindo Salgado in branch 'main':
bpo-45256: Remove the usage of the C stack in Python to Python calls (GH-28488)
https://github.com/python/cpython/commit/b4903afd4debbbd71dc49a2c8fefa74a3b6c6832


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45256>
_______________________________________

From report at bugs.python.org  Sat Oct  9 12:07:50 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sat, 09 Oct 2021 16:07:50 +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: <1633795670.21.0.444787378443.issue45256@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
pull_requests: +27152
pull_request: https://github.com/python/cpython/pull/28836

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45256>
_______________________________________

From report at bugs.python.org  Sat Oct  9 12:13:24 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 09 Oct 2021 16:13:24 +0000
Subject: [issue20028] csv: Confusing error message when giving invalid
 quotechar in initializing dialect
In-Reply-To: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
Message-ID: <1633796004.86.0.536711716295.issue20028@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset c80f0b7aa1d90332d0069d3e85ee112d0c9da7f0 by Dong-hee Na in branch '3.10':
[3.10] bpo-20028: Keep original exception when PyUnicode_GetLength return -1 (GH-28832) (GH-28834)
https://github.com/python/cpython/commit/c80f0b7aa1d90332d0069d3e85ee112d0c9da7f0


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20028>
_______________________________________

From report at bugs.python.org  Sat Oct  9 12:13:48 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 09 Oct 2021 16:13:48 +0000
Subject: [issue20028] csv: Confusing error message when giving invalid
 quotechar in initializing dialect
In-Reply-To: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
Message-ID: <1633796028.09.0.665306431145.issue20028@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset e4fcb6fd3dcc4db23867c2fbd538189b8f221225 by Dong-hee Na in branch '3.9':
[3.9] bpo-20028: Keep original exception when PyUnicode_GetLength return -1 (GH-28832) (GH-28835)
https://github.com/python/cpython/commit/e4fcb6fd3dcc4db23867c2fbd538189b8f221225


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20028>
_______________________________________

From report at bugs.python.org  Sat Oct  9 12:17:50 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 09 Oct 2021 16:17:50 +0000
Subject: [issue27580] CSV Null Byte Error
In-Reply-To: <1469077368.13.0.160030895608.issue27580@psf.upfronthosting.co.za>
Message-ID: <1633796270.65.0.406175801587.issue27580@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset b454e8e4df73bc73bc1a6f597431f171bfae8abd by Serhiy Storchaka in branch 'main':
bpo-27580: Add support of null characters in the csv module. (GH-28808)
https://github.com/python/cpython/commit/b454e8e4df73bc73bc1a6f597431f171bfae8abd


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27580>
_______________________________________

From report at bugs.python.org  Sat Oct  9 12:18:43 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 09 Oct 2021 16:18:43 +0000
Subject: [issue27580] CSV Null Byte Error
In-Reply-To: <1469077368.13.0.160030895608.issue27580@psf.upfronthosting.co.za>
Message-ID: <1633796323.52.0.207531972004.issue27580@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27580>
_______________________________________

From report at bugs.python.org  Sat Oct  9 12:31:49 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sat, 09 Oct 2021 16:31:49 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633797109.69.0.406468164018.issue29410@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

> But do they use them as dict keys? AFAIK strings aren't hashed until hash() is called on them.

That's correct. The hash of str and bytes is calculated on demand and then cached.

Frozensets also cache their hash values while tuples don't have a cache. We ran experiments with hash caching in tuples many years ago. It turned out that the increased size had an overall negative effect on performance. This may have changed with modern hardware with more RAM and much larger CPU caches, though.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Sat Oct  9 12:52:09 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sat, 09 Oct 2021 16:52:09 +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: <1633798329.01.0.558672746088.issue45256@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 543acbce5a1e23633379a853f38dc55b12f6d931 by Pablo Galindo Salgado in branch 'main':
bpo-45256: Small cleanups for the code that inlines Python-to-Python calls in ceval.c (GH-28836)
https://github.com/python/cpython/commit/543acbce5a1e23633379a853f38dc55b12f6d931


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45256>
_______________________________________

From report at bugs.python.org  Sat Oct  9 13:06:14 2021
From: report at bugs.python.org (STINNER Victor)
Date: Sat, 09 Oct 2021 17:06:14 +0000
Subject: [issue21302] time.sleep (floatsleep()) should use clock_nanosleep()
 on Linux
In-Reply-To: <1397851923.06.0.0550198760464.issue21302@psf.upfronthosting.co.za>
Message-ID: <1633799174.34.0.904632593417.issue21302@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> it is time to use nicely GetSystemTimePreciseAsFileTime() in time.time()

See bpo-19007 for that.

> it is time to (...) time.sleep() as absolute sleeping because it is available since Windows 8.

In Python 3.11, time.sleep() is now always implemented with a waitable timer. I chose to use a relative timeout since it's simpler to implement. Is there any benefit of calling SetWaitableTimer() with an absolute timeout, compared to calling it with a relative timeout?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21302>
_______________________________________

From report at bugs.python.org  Sat Oct  9 14:13:17 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 09 Oct 2021 18:13:17 +0000
Subject: [issue45353] sys.modules: dictionary changed size during iteration
In-Reply-To: <1633271811.32.0.73963856747.issue45353@roundup.psfhosted.org>
Message-ID: <1633803197.06.0.730848345629.issue45353@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

In #13487, Gregory fixed the problem by using .copy().  That seems to have worked for 1 1/2 years.  You still have not reported an actual bug in the current CPython stdlib.

Perhaps we should mention in https://docs.python.org/3/library/sys.html#sys.modules that sys.modules can be unexpectedly changed during iteration by lazy imports or other threads, so that a copy might be needed.

Gregory, what do you think?

----------
nosy: +gregory.p.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45353>
_______________________________________

From report at bugs.python.org  Sat Oct  9 14:15:55 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sat, 09 Oct 2021 18:15:55 +0000
Subject: [issue44904] Erroneous behaviour for abstract class properties
In-Reply-To: <1628803001.12.0.882298478545.issue44904@roundup.psfhosted.org>
Message-ID: <1633803355.92.0.904476321968.issue44904@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
keywords: +patch
pull_requests: +27153
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28838

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44904>
_______________________________________

From report at bugs.python.org  Sat Oct  9 14:17:17 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sat, 09 Oct 2021 18:17:17 +0000
Subject: [issue44904] Erroneous behaviour for abstract class properties
In-Reply-To: <1628803001.12.0.882298478545.issue44904@roundup.psfhosted.org>
Message-ID: <1633803437.59.0.0233524734893.issue44904@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
versions: +Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44904>
_______________________________________

From report at bugs.python.org  Sat Oct  9 14:30:34 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 09 Oct 2021 18:30:34 +0000
Subject: [issue45103] IDLE: make configdialog font page survive font failures
In-Reply-To: <1630790219.84.0.830457804554.issue45103@roundup.psfhosted.org>
Message-ID: <1633804234.18.0.871652956022.issue45103@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Bizarre.  The SO OP just reported that deleting FiraCode fixed *his* 3.10 problem.  There must be some unobvious difference in systems.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45103>
_______________________________________

From report at bugs.python.org  Sat Oct  9 15:04:14 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 09 Oct 2021 19:04:14 +0000
Subject: [issue42034] Unchecked return in Objects/typeobject.c and possible
 uninitialized variables in cls and new_mro
In-Reply-To: <1602683248.52.0.780024334642.issue42034@roundup.psfhosted.org>
Message-ID: <1633806254.47.0.886718064619.issue42034@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

There is no bug in this code. The list "temp" contains only 2- and 3-tuples. PyArg_UnpackTuple() never fails.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42034>
_______________________________________

From report at bugs.python.org  Sat Oct  9 15:26:13 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Sat, 09 Oct 2021 19:26:13 +0000
Subject: [issue45353] sys.modules: dictionary changed size during iteration
In-Reply-To: <1633271811.32.0.73963856747.issue45353@roundup.psfhosted.org>
Message-ID: <1633807573.44.0.676537764083.issue45353@roundup.psfhosted.org>


Change by Gregory P. Smith <greg at krypto.org>:


----------
keywords: +patch
pull_requests: +27154
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/28842

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45353>
_______________________________________

From report at bugs.python.org  Sat Oct  9 15:34:20 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 09 Oct 2021 19:34:20 +0000
Subject: [issue45353] sys.modules: dictionary changed size during iteration
In-Reply-To: <1633271811.32.0.73963856747.issue45353@roundup.psfhosted.org>
Message-ID: <1633808060.91.0.887843526564.issue45353@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +27155
pull_request: https://github.com/python/cpython/pull/28843

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45353>
_______________________________________

From report at bugs.python.org  Sat Oct  9 15:34:16 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Sat, 09 Oct 2021 19:34:16 +0000
Subject: [issue45353] sys.modules: dictionary changed size during iteration
In-Reply-To: <1633271811.32.0.73963856747.issue45353@roundup.psfhosted.org>
Message-ID: <1633808056.85.0.386294823428.issue45353@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:


New changeset 3d1ca867ed0e3ae343166806f8ddd9739e568ab4 by Gregory P. Smith in branch 'main':
bpo-45353: Remind sys.modules users to copy when iterating. (GH-28842)
https://github.com/python/cpython/commit/3d1ca867ed0e3ae343166806f8ddd9739e568ab4


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45353>
_______________________________________

From report at bugs.python.org  Sat Oct  9 15:36:35 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sat, 09 Oct 2021 19:36:35 +0000
Subject: [issue44904] Classmethod properties are erroneously "called" in
 multiple modules
In-Reply-To: <1628803001.12.0.882298478545.issue44904@roundup.psfhosted.org>
Message-ID: <1633808195.28.0.0304892492412.issue44904@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
nosy: +tim.peters
title: Erroneous behaviour for abstract class properties -> Classmethod properties are erroneously "called" in multiple modules

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44904>
_______________________________________

From report at bugs.python.org  Sat Oct  9 15:38:38 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Sat, 09 Oct 2021 19:38:38 +0000
Subject: [issue45353] sys.modules: dictionary changed size during iteration
In-Reply-To: <1633271811.32.0.73963856747.issue45353@roundup.psfhosted.org>
Message-ID: <1633808318.26.0.110191116428.issue45353@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

While arguably unnecessary as it is documented as a dictionary and this is a normal Python dict behavior, it is a global dict and it can be modified at times that are unintuitive to users of all experience levels.  A note in the documentation makes sense.

----------
assignee:  -> docs at python
components: +Documentation -Library (Lib)
nosy: +docs at python
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45353>
_______________________________________

From report at bugs.python.org  Sat Oct  9 15:47:59 2021
From: report at bugs.python.org (Eryk Sun)
Date: Sat, 09 Oct 2021 19:47:59 +0000
Subject: [issue21302] time.sleep (floatsleep()) should use clock_nanosleep()
 on Linux
In-Reply-To: <1397851923.06.0.0550198760464.issue21302@psf.upfronthosting.co.za>
Message-ID: <1633808879.94.0.527881496304.issue21302@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

> In Python 3.11, time.sleep() is now always implemented with a 
> waitable timer. 

A regular waitable timer in Windows becomes signaled with the same resolution as Sleep(). It's based on the current interrupt timer period, which can be lowered to 1 ms via timeBeginPeriod(). Compared to Sleep() it's more flexible in terms of periodic waits, WaitForMultipleObjects(), or MsgWaitForMultipleObjects() -- not that time.sleep() needs this flexibility.

That said, using a waitable timer leaves the door open for improvement in future versions of Python. In particular, it's possible to get higher resolution in newer versions of Windows 10 and Windows 11 with CreateWaitableTimerExW() and the undocumented flag CREATE_WAITABLE_TIMER_HIGH_RESOLUTION (2).

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21302>
_______________________________________

From report at bugs.python.org  Sat Oct  9 15:54:29 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 09 Oct 2021 19:54:29 +0000
Subject: [issue45353] sys.modules: dictionary changed size during iteration
In-Reply-To: <1633271811.32.0.73963856747.issue45353@roundup.psfhosted.org>
Message-ID: <1633809269.51.0.479320441504.issue45353@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 459a4db5eae1f5ef063b34c61cc099820aa9ed0a by Miss Islington (bot) in branch '3.10':
bpo-45353: Remind sys.modules users to copy when iterating. (GH-28842)
https://github.com/python/cpython/commit/459a4db5eae1f5ef063b34c61cc099820aa9ed0a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45353>
_______________________________________

From report at bugs.python.org  Sat Oct  9 16:00:17 2021
From: report at bugs.python.org (Gregory Beauregard)
Date: Sat, 09 Oct 2021 20:00:17 +0000
Subject: [issue45384] Accept Final as indicating ClassVar for dataclass
In-Reply-To: <1633474802.74.0.28935369268.issue45384@roundup.psfhosted.org>
Message-ID: <1633809616.99.0.710729506075.issue45384@roundup.psfhosted.org>


Gregory Beauregard <greg at greg.red> added the comment:

Hi Eric,

I've been shopping this idea around on the mailing list and haven't received any objections. Do you have any concerns? Can we handle Final with the same checks as ClassVar?

Regarding potentially merging a change, I'm not sure where this falls between a bug fix and a feature. On one hand the PEP 591 instruction to typecheckers on how to treat Final is relatively absolute and the dataclasses behavior could be considered a buggy interaction with it. On the other hand this is sorta a new behavior. Do you have any opinions? Should I not worry about it when working on patch and let core devs figure out if it would need backported?

I've read through the dataclasses code and I think I can implement this myself and submit a PR, but I may need a bit of a heavy handed code review since I've only recently started getting serious with Python.

Thanks for your time and work on dataclassess.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45384>
_______________________________________

From report at bugs.python.org  Sat Oct  9 16:40:31 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Sat, 09 Oct 2021 20:40:31 +0000
Subject: [issue45384] Accept Final as indicating ClassVar for dataclass
In-Reply-To: <1633474802.74.0.28935369268.issue45384@roundup.psfhosted.org>
Message-ID: <1633812031.89.0.134446967081.issue45384@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

I was waiting for someone smarter than me to chime in on one of the discussions.

I wouldn't worry about whether it's a bug or feature, at this point. Assuming buy-in from type checkers, I'd probably call it a bug, but I can be reasoned with.

One thing I don't understand is what you mean by:

"""
There is at least one edge case that would need to be handled where someone might want to explicitly mark a dataclass field Final, which could be allowed as a field:
a: Final[int] = dataclasses.field(init=False, default=10)
"""

I assume we'd want to treat it like a ClassVar, whatever that does. What's your thought? Are you saying ClassVar works incorrectly in this instance.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45384>
_______________________________________

From report at bugs.python.org  Sat Oct  9 17:06:59 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 09 Oct 2021 21:06:59 +0000
Subject: [issue45353] sys.modules: dictionary changed size during iteration
In-Reply-To: <1633271811.32.0.73963856747.issue45353@roundup.psfhosted.org>
Message-ID: <1633813619.45.0.81439083625.issue45353@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
stage: commit review -> resolved

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45353>
_______________________________________

From report at bugs.python.org  Sat Oct  9 17:37:56 2021
From: report at bugs.python.org (Joseph Perez)
Date: Sat, 09 Oct 2021 21:37:56 +0000
Subject: [issue45418] types.UnionType is not subscriptable
Message-ID: <1633815476.2.0.253081799183.issue45418@roundup.psfhosted.org>


New submission from Joseph Perez <joperez at hotmail.fr>:

`types.UnionType` is not subscriptable, and this is an issue when type manipulations are done.

A common maniputation I've to do is to substitute all the `TypeVar` of a potential generic type by their specialization in the given context.
For example, given a class:
```python
@dataclass
class Foo(Generic[T]):
    bar: list[T]
    baz: T | None
```
in the case of `Foo[int]`, I want to compute the effective type of the fields, which will be `list[int]` and `int | None`.
It could be done pretty easily by a recursive function:
```python
def substitute(tp, type_vars: dict):
    origin, args = get_origin(tp), get_args(tp)
    if isinstance(tp, TypeVar):
        return type_vars.get(tp, tp)
    elif origin is Annotated:
        return Annotated[(substitute(args[0], type_vars), *args[1:])]
    else:
        return origin[tuple(substitute(arg) for arg in args)]  # this line fails for types.UnionType
```

And this is not the only manipulation I've to do on generic types. In fact, all my library (apischema) is broken in Python 3.10 because of `types.UnionType`.
I've to substitute `types.UnionType` by `typing.Union` everywhere to make things work; `types.UnionType` is just not usable for dynamic manipulations.

I've read PEP 604 and it doesn't mention if `types.UnionType` should be subscriptable or not. Is there a reason for not making it subscriptable?

----------
messages: 403554
nosy: joperez
priority: normal
severity: normal
status: open
title: types.UnionType is not subscriptable
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45418>
_______________________________________

From report at bugs.python.org  Sat Oct  9 17:48:46 2021
From: report at bugs.python.org (Gregory Beauregard)
Date: Sat, 09 Oct 2021 21:48:46 +0000
Subject: [issue45384] Accept Final as indicating ClassVar for dataclass
In-Reply-To: <1633474802.74.0.28935369268.issue45384@roundup.psfhosted.org>
Message-ID: <1633816126.76.0.318331233753.issue45384@roundup.psfhosted.org>


Gregory Beauregard <greg at greg.red> added the comment:

When I originally submitted the issue I hadn't finished going through all of the dataclasses code and it hadn't even occurred to me that it could be valid to use ClassVar with field(). I (wrongly) assumed this would always raise and that field() is only valid for things intended to be instance vars.

I do find this behavior a little surprising, but on reflection I don't think it's explicitly wrong as long we raise for default_factory like it currently does. I think it's then appropriate to just do the exact same behavior for Final as ClassVar.

I'm going to start working on a PR, thanks for your feedback.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45384>
_______________________________________

From report at bugs.python.org  Sat Oct  9 18:25:48 2021
From: report at bugs.python.org (debohman)
Date: Sat, 09 Oct 2021 22:25:48 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1633818348.16.0.0689389318311.issue45405@roundup.psfhosted.org>


debohman <debohman at gmail.com> added the comment:

Yes, I don't understand why the llvm / clang decided to implement this in version 13. In version 12, the switch caused an error to stderr, and nothing to stdout. GCC 11.1 generates a single \n to stdout.

Do you plan to stick with $PLATFORM_TRIPLET = darwin, even on the arm machines? Early on, I tried setting $PLATFORM_TRIPLET in the script to the actual value returned by the complier, and that blew up later during the actual build. That was when I decided to just fix the logic so that it continued to operate the same on all platforms, even darwin with --print-multiarch generating the triplet.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Sat Oct  9 18:35:38 2021
From: report at bugs.python.org (ramikg)
Date: Sat, 09 Oct 2021 22:35:38 +0000
Subject: [issue45399] Remove hostflags from PySSLContext
In-Reply-To: <1633599416.0.0.711610272152.issue45399@roundup.psfhosted.org>
Message-ID: <1633818938.22.0.438725089715.issue45399@roundup.psfhosted.org>


ramikg <ramikgold at gmail.com> added the comment:

@komugi The same code written independently by multiple people is probably the most effective and least cost-efficient form of code review.

@christian.heimes Of course, there is no hurry.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45399>
_______________________________________

From report at bugs.python.org  Sat Oct  9 18:42:05 2021
From: report at bugs.python.org (debohman)
Date: Sat, 09 Oct 2021 22:42:05 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1633819325.1.0.308279139417.issue45405@roundup.psfhosted.org>


debohman <debohman at gmail.com> added the comment:

I have version 2.71 of autoconf and the latest autoconf-archive installed on my machine.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Sat Oct  9 19:02:46 2021
From: report at bugs.python.org (neonene)
Date: Sat, 09 Oct 2021 23:02:46 +0000
Subject: [issue45116] Performance regression 3.10b1 and later on Windows:
 Py_DECREF() not inlined in PGO build
In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org>
Message-ID: <1633820566.39.0.413482463516.issue45116@roundup.psfhosted.org>


neonene <nicesalmon at gmail.com> added the comment:

PR28475 is not in the official source archive.
https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tar.xz

I'll check later whether official binary has the fix.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45116>
_______________________________________

From report at bugs.python.org  Sat Oct  9 20:02:51 2021
From: report at bugs.python.org (Saaket Prakash)
Date: Sun, 10 Oct 2021 00:02:51 +0000
Subject: [issue45384] Accept Final as indicating ClassVar for dataclass
In-Reply-To: <1633474802.74.0.28935369268.issue45384@roundup.psfhosted.org>
Message-ID: <1633824171.71.0.905798776141.issue45384@roundup.psfhosted.org>


Saaket Prakash <saaketp at gmail.com> added the comment:

Treating Final as ClassVar by default may be fine,
but it should not throw when using default_factory like ClassVar does.

There are valid uses of Final with instance variable when one would want the value to be unchanged after the `__init__` runs
but different instances can be initialized with different values that are generated by a default_factory.

A quick search on github for this pattern gives this
https://github.com/166MMX/hiro-python-library/blob/fb29e3247a8fe1b0f7dc4e68141cf7340a8dd0a5/src/arago/hiro/model/ws.py#L120
which will break if Final throws when using default_factory.

PEP 591 says:
Type checkers should infer a final attribute _that is initialized in a class body_ as being a class variable.
When using default_factory the attribute is not initialized inside the class body but when the instance is initialized.
So allowing instance level Final with default_factory will not be going against the PEP.

----------
nosy: +saaketp

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45384>
_______________________________________

From report at bugs.python.org  Sat Oct  9 20:28:38 2021
From: report at bugs.python.org (Ned Deily)
Date: Sun, 10 Oct 2021 00:28:38 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1633825718.31.0.432571437922.issue45405@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

> Do you plan to stick with $PLATFORM_TRIPLET = darwin, even on the arm machines?

For now, yes. Apple long ago implemented the equivalent of multi-architecture support using "-arch" in the compiler driver and the Python build system (configure, Makefile, setup.py, distutils, et al) supports that for macOS without using PLATFORM_TRIPLET.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Sat Oct  9 20:32:37 2021
From: report at bugs.python.org (debohman)
Date: Sun, 10 Oct 2021 00:32:37 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1633825957.26.0.868504748466.issue45405@roundup.psfhosted.org>


debohman <debohman at gmail.com> added the comment:

Okay. Should the branch for the PR be off the main branch, or 3.10?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Sat Oct  9 20:34:07 2021
From: report at bugs.python.org (Ned Deily)
Date: Sun, 10 Oct 2021 00:34:07 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1633826047.15.0.852897143164.issue45405@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

"A PR against configure.ac in main would be welcome, we can auto-backport to other active branches as necessary."

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Sat Oct  9 20:38:15 2021
From: report at bugs.python.org (Gregory Beauregard)
Date: Sun, 10 Oct 2021 00:38:15 +0000
Subject: [issue45384] Accept Final as indicating ClassVar for dataclass
In-Reply-To: <1633474802.74.0.28935369268.issue45384@roundup.psfhosted.org>
Message-ID: <1633826295.72.0.14685293837.issue45384@roundup.psfhosted.org>


Gregory Beauregard <greg at greg.red> added the comment:

Yeah, I was just discussing this with someone in IRC, and I appreciate an example of it in the wild.

I agree there's some wiggle room with what "initialized in a class body" means when it comes to dataclasses.

I see several interpretations there, and I would strongly prefer feedback from typing folks, particularly since they would be responsible for implementing any Final default_factory exceptions.

On the implementation side this does complicate things a bit depending on specifics. Are Final default_factory fields real fields or pseudo-fields? (i.e. are they returned by dataclasses.fields()?) Depending on how this works dataclasses might need a bit more refactoring than I'd be the right person for, but I'm still willing to give it a shot.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45384>
_______________________________________

From report at bugs.python.org  Sat Oct  9 20:38:04 2021
From: report at bugs.python.org (Jason R. Coombs)
Date: Sun, 10 Oct 2021 00:38:04 +0000
Subject: [issue45419] DegenerateFiles.Path mismatch to Traversable interface
Message-ID: <1633826284.05.0.820363562312.issue45419@roundup.psfhosted.org>


New submission from Jason R. Coombs <jaraco at jaraco.com>:

In [pytest-dev/pytest#9174](https://github.com/pytest-dev/pytest/issues/9174), it became clear that the DegenerateFiles object has a couple of interface mismatches to Traversable:

- name is a property
- open accepts a 'mode' and arbitrary args and kwargs.

Because DegenerateFiles is an intentionally broken handle (when a resource provider is unavailable), there's little harm in the interface being broken, and the interface is already gone in Python 3.11, so the urgency of fixing this is small.

----------
messages: 403564
nosy: jaraco
priority: low
severity: normal
status: open
title: DegenerateFiles.Path mismatch to Traversable interface
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45419>
_______________________________________

From report at bugs.python.org  Sat Oct  9 20:57:29 2021
From: report at bugs.python.org (Jason R. Coombs)
Date: Sun, 10 Oct 2021 00:57:29 +0000
Subject: [issue45419] DegenerateFiles.Path mismatch to Traversable interface
In-Reply-To: <1633826284.05.0.820363562312.issue45419@roundup.psfhosted.org>
Message-ID: <1633827449.87.0.41969828949.issue45419@roundup.psfhosted.org>


Change by Jason R. Coombs <jaraco at jaraco.com>:


----------
keywords: +patch
pull_requests: +27156
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28844

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45419>
_______________________________________

From report at bugs.python.org  Sat Oct  9 21:08:28 2021
From: report at bugs.python.org (wyz23x2)
Date: Sun, 10 Oct 2021 01:08:28 +0000
Subject: [issue45420] Python 3.10 final installation failure
Message-ID: <1633828108.74.0.92443333438.issue45420@roundup.psfhosted.org>


New submission from wyz23x2 <wyz23x2 at 163.com>:

Hi, I've downloaded Python 3.10 final (64-bit) from python.org on October 6. But when I run the installer with administrator permission, it says "No Python 3.10 installation was detected". Error code: 0x80070643. The stranger thing is when I run "repair" from the 3.10rc2 installer, it's the same message & code; but, if "modify" is run, the window is "A newer version of Python 3.10 is already installed", error code same. Thanks for help.

----------
components: Installation, Windows
files: new_install_log.log
messages: 403566
nosy: paul.moore, steve.dower, tim.golden, wyz23x2, zach.ware
priority: normal
severity: normal
status: open
title: Python 3.10 final installation failure
type: crash
versions: Python 3.10
Added file: https://bugs.python.org/file50335/new_install_log.log

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45420>
_______________________________________

From report at bugs.python.org  Sat Oct  9 21:10:30 2021
From: report at bugs.python.org (wyz23x2)
Date: Sun, 10 Oct 2021 01:10:30 +0000
Subject: [issue45420] Python 3.10 final installation failure
In-Reply-To: <1633828108.74.0.92443333438.issue45420@roundup.psfhosted.org>
Message-ID: <1633828230.07.0.395673014598.issue45420@roundup.psfhosted.org>


wyz23x2 <wyz23x2 at 163.com> added the comment:

Note: I'm trying to move the installation path from Local\Programs\Python\Python310 under user dir to C:\Program Files\Python310.

----------
Added file: https://bugs.python.org/file50336/old_modify_log.log

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45420>
_______________________________________

From report at bugs.python.org  Sat Oct  9 21:10:32 2021
From: report at bugs.python.org (jack1142)
Date: Sun, 10 Oct 2021 01:10:32 +0000
Subject: [issue42174] shutil.get_terminal_size() returns 0 when run in a pty
In-Reply-To: <1603816351.29.0.440046743483.issue42174@roundup.psfhosted.org>
Message-ID: <1633828232.45.0.800699044656.issue42174@roundup.psfhosted.org>


Change by jack1142 <kuba.kuczys at gmail.com>:


----------
nosy: +jack1142

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42174>
_______________________________________

From report at bugs.python.org  Sat Oct  9 21:14:26 2021
From: report at bugs.python.org (=?utf-8?q?Benjamin_Sz=C5=91ke?=)
Date: Sun, 10 Oct 2021 01:14:26 +0000
Subject: [issue21302] time.sleep (floatsleep()) should use clock_nanosleep()
 on Linux
In-Reply-To: <1397851923.06.0.0550198760464.issue21302@psf.upfronthosting.co.za>
Message-ID: <1633828466.74.0.909772534665.issue21302@roundup.psfhosted.org>


Benjamin Sz?ke <egyszeregy at freemail.hu> added the comment:

Absolute timeout implementation via SetWaitableTimer() and GetSystemTimePreciseAsFileTime() is always better because it can reduce the "waste time" or "overhead time" what is always exist in any simple interval sleep implementation. Moreover, it is the only one which is eqvivalent with clock_nanosleep() implementation of Linux which is now the most state of the art implementation for precise sleeping.

So, my opinion is that absolute timeout implementation could be the most modern and sustainable for future python.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21302>
_______________________________________

From report at bugs.python.org  Sat Oct  9 21:36:58 2021
From: report at bugs.python.org (debohman)
Date: Sun, 10 Oct 2021 01:36:58 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1633829818.14.0.58233109727.issue45405@roundup.psfhosted.org>


Change by debohman <debohman at gmail.com>:


----------
keywords: +patch
pull_requests: +27157
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/28845

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Sat Oct  9 21:55:52 2021
From: report at bugs.python.org (Eryk Sun)
Date: Sun, 10 Oct 2021 01:55:52 +0000
Subject: [issue21302] time.sleep (floatsleep()) should use clock_nanosleep()
 on Linux
In-Reply-To: <1397851923.06.0.0550198760464.issue21302@psf.upfronthosting.co.za>
Message-ID: <1633830952.87.0.479099316101.issue21302@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

> Is there any benefit of calling SetWaitableTimer() with an 
> absolute timeout

No, the due time of a timer object is stored in absolute interrupt time, not absolute system time. This has to be calculated either way, and it's actually more work for the kernel if an absolute system time is passed.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21302>
_______________________________________

From report at bugs.python.org  Sun Oct 10 00:13:19 2021
From: report at bugs.python.org (Chris Jerdonek)
Date: Sun, 10 Oct 2021 04:13:19 +0000
Subject: [issue45390] asyncio.Task doesn't propagate CancelledError()
 exception correctly.
In-Reply-To: <1633519842.27.0.396754460358.issue45390@roundup.psfhosted.org>
Message-ID: <1633839199.28.0.84122106287.issue45390@roundup.psfhosted.org>


Chris Jerdonek <chris.jerdonek at gmail.com> added the comment:

Here's a simplification of Marco's snippet to focus the discussion.

import asyncio

async def job():
    # raise RuntimeError('error!')
    await asyncio.sleep(5)

async def main():
    task = asyncio.create_task(job())
    await asyncio.sleep(1)
    task.cancel('cancel job')
    await task

if __name__=="__main__":
    asyncio.run(main())

----
Running this pre-Python 3.9 gives something like this--

Traceback (most recent call last):
  File "test.py", line 15, in <module>
    asyncio.run(main())
  File "/.../python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/.../python3.7/asyncio/base_events.py", line 579, in run_until_complete
    return future.result()
concurrent.futures._base.CancelledError

----
Running this with Python 3.9+ gives something like the following. The difference is that the traceback now starts at the sleep() call:

Traceback (most recent call last):
  File "/.../test.py", line 6, in job
    await asyncio.sleep(5)
  File "/.../python3.9/asyncio/tasks.py", line 654, in sleep
    return await future
asyncio.exceptions.CancelledError: cancel job

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/.../test.py", line 12, in main
    await task
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/.../test.py", line 15, in <module>
    asyncio.run(main())
  File "/.../python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/.../python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
asyncio.exceptions.CancelledError

----
Uncommenting the RuntimeError turns it into this--

Traceback (most recent call last):
  File "/.../test.py", line 15, in <module>
    asyncio.run(main())
  File "/.../python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/.../python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/.../test.py", line 12, in main
    await task
  File "/.../test.py", line 5, in job
    raise RuntimeError('error!')
RuntimeError: error!

----
I agree it would be a lot nicer if the original CancelledError('cancel job') could bubble up just like the RuntimeError does, instead of creating a new CancelledError at each await and chaining it to the previous CancelledError. asyncio's creation of a new CancelledError at each stage predates the PR that added the chaining, so this could be viewed as an evolution of the change that added the chaining.

I haven't checked to be sure, but the difference in behavior between CancelledError and other exceptions might be explained by the following lines:
https://github.com/python/cpython/blob/3d1ca867ed0e3ae343166806f8ddd9739e568ab4/Lib/asyncio/tasks.py#L242-L250
You can see that for exceptions other than CancelledError, the exception is propagated by calling super().set_exception(exc), whereas with CancelledError, it is propagated by calling super().cancel() again.

Maybe this would even be an easy change to make. Instead of asyncio creating a new CancelledError and chaining it to the previous, asyncio can just raise the existing one. For the pure Python implementation at least, it may be as simple as making a change here, inside _make_cancelled_error():
https://github.com/python/cpython/blob/3d1ca867ed0e3ae343166806f8ddd9739e568ab4/Lib/asyncio/futures.py#L135-L142

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45390>
_______________________________________

From report at bugs.python.org  Sun Oct 10 01:45:37 2021
From: report at bugs.python.org (Alberto Mardegan)
Date: Sun, 10 Oct 2021 05:45:37 +0000
Subject: [issue45421] Remove dead code from html.parser
Message-ID: <1633844737.55.0.569517591306.issue45421@roundup.psfhosted.org>


New submission from Alberto Mardegan <mardy at users.sourceforge.net>:

There appears to be some dead code in the html.parser module:

https://github.com/python/cpython/blob/main/Lib/html/parser.py#L331-L337

Support for parser errors (with line and offset information) was removed long ago, so this code is useless now. The updatepos() and getpos() methods should also be removed.

----------
components: Library (Lib)
messages: 403571
nosy: mardy
priority: normal
severity: normal
status: open
title: Remove dead code from html.parser
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45421>
_______________________________________

From report at bugs.python.org  Sun Oct 10 01:47:09 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Sun, 10 Oct 2021 05:47:09 +0000
Subject: [issue45361] Provide a more convenient way to set an exception as
 "active", from Python code
In-Reply-To: <1633329776.11.0.630918001556.issue45361@roundup.psfhosted.org>
Message-ID: <1633844829.82.0.905794065959.issue45361@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

In a brief off-line chat we concluded that the desired API would be closer to PyErr_Restore().

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45361>
_______________________________________

From report at bugs.python.org  Sun Oct 10 01:59:28 2021
From: report at bugs.python.org (Ken Jin)
Date: Sun, 10 Oct 2021 05:59:28 +0000
Subject: [issue45418] types.UnionType is not subscriptable
In-Reply-To: <1633815476.2.0.253081799183.issue45418@roundup.psfhosted.org>
Message-ID: <1633845568.2.0.105055482972.issue45418@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

I don't understand your example, T | None doesn't return a types.Union object, it returns typing.Union/typing.Optional. (I'm assuming this T is the TypeVar in typing). Which *is* subscriptable.

>>> (T | None)[int].__origin__
typing.Union

If you meant to say: why is typing.Union[] allowed, but not types.UnionType[]? That is intentional. types.UnionType is only meant for builtin types. Once you union with *any* type from typing, it will convert to a typing.Union.

>>> type(int | str)
<class 'types.UnionType'>

>>> int | str | T
typing.Union[int, str, ~T]

If you intend to reconstruct a types.Union from another types.Union, you can do:

args = get_args(int | str)
import operator, functools
functools.reduce(operator.or_, args)

And guard this code with an isinstance(tp, types.UnionType) check.

----------
nosy: +gvanrossum, kj, serhiy.storchaka
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45418>
_______________________________________

From report at bugs.python.org  Sun Oct 10 02:51:30 2021
From: report at bugs.python.org (Syaifulnizam Shamsudin)
Date: Sun, 10 Oct 2021 06:51:30 +0000
Subject: [issue23262] webbrowser module broken with Firefox 36+
In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za>
Message-ID: <1633848690.79.0.908054682302.issue23262@roundup.psfhosted.org>


Syaifulnizam Shamsudin <syaifulnizamshamsudin at gmail.com> added the comment:

Processo webbrowser.3.5-2.patch

----------
nosy: +Syaifulnizam

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23262>
_______________________________________

From report at bugs.python.org  Sun Oct 10 02:52:32 2021
From: report at bugs.python.org (Roundup Robot)
Date: Sun, 10 Oct 2021 06:52:32 +0000
Subject: [issue45421] Remove dead code from html.parser
In-Reply-To: <1633844737.55.0.569517591306.issue45421@roundup.psfhosted.org>
Message-ID: <1633848752.01.0.938114794101.issue45421@roundup.psfhosted.org>


Change by Roundup Robot <devnull at psf.upfronthosting.co.za>:


----------
keywords: +patch
nosy: +python-dev
nosy_count: 1.0 -> 2.0
pull_requests: +27159
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28847

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45421>
_______________________________________

From report at bugs.python.org  Sun Oct 10 03:24:44 2021
From: report at bugs.python.org (Joseph Perez)
Date: Sun, 10 Oct 2021 07:24:44 +0000
Subject: [issue45418] types.UnionType is not subscriptable
In-Reply-To: <1633815476.2.0.253081799183.issue45418@roundup.psfhosted.org>
Message-ID: <1633850684.31.0.776019239867.issue45418@roundup.psfhosted.org>


Joseph Perez <joperez at hotmail.fr> added the comment:

Indeed, sorry, my example was bad. My library was raising at several place, and I've extrapolated about generic substitution.

I've indeed other substitutions (without `TypeVar`), and because they were failing, I've assumed that all of my substitutions were failing; I was wrong about generic one.

For example, if I want to substitute `int | Collection[int]` to `int | list[int]`, I will have to replace `types.UnionType` by `typing.Union` or use `reduce`, while it was not necessary in 3.9 where I could just write `get_origin(tp)[new_args]`.

So I'll have to add some `if` in my code.

----------
stage:  -> resolved
status: pending -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45418>
_______________________________________

From report at bugs.python.org  Sun Oct 10 03:50:23 2021
From: report at bugs.python.org (Ken Jin)
Date: Sun, 10 Oct 2021 07:50:23 +0000
Subject: [issue45418] types.UnionType is not subscriptable
In-Reply-To: <1633815476.2.0.253081799183.issue45418@roundup.psfhosted.org>
Message-ID: <1633852223.45.0.0312685952185.issue45418@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

No worries!

> So I'll have to add some `if` in my code.

Yeah, we had to do that in the typing module too. Hope you manage to fix your library without much trouble.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45418>
_______________________________________

From report at bugs.python.org  Sun Oct 10 04:12:38 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sun, 10 Oct 2021 08:12:38 +0000
Subject: [issue45416] "loop argument must agree with lock" instantiating
 asyncio.Condition
In-Reply-To: <1633725058.57.0.682695156248.issue45416@roundup.psfhosted.org>
Message-ID: <1633853558.17.0.735780065663.issue45416@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45416>
_______________________________________

From report at bugs.python.org  Sun Oct 10 04:29:50 2021
From: report at bugs.python.org (Inada Naoki)
Date: Sun, 10 Oct 2021 08:29:50 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633854590.07.0.533567218753.issue29410@roundup.psfhosted.org>


Inada Naoki <songofacandy at gmail.com> added the comment:


New changeset ad970e8623523a8656e8c1ff4e1dff3423498a5a by Inada Naoki in branch 'main':
bpo-29410: Change the default hash algorithm to SipHash13. (GH-28752)
https://github.com/python/cpython/commit/ad970e8623523a8656e8c1ff4e1dff3423498a5a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Sun Oct 10 04:29:57 2021
From: report at bugs.python.org (Inada Naoki)
Date: Sun, 10 Oct 2021 08:29:57 +0000
Subject: [issue29410] Moving to SipHash-1-3
In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za>
Message-ID: <1633854597.98.0.908846825624.issue29410@roundup.psfhosted.org>


Change by Inada Naoki <songofacandy at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29410>
_______________________________________

From report at bugs.python.org  Sun Oct 10 05:26:07 2021
From: report at bugs.python.org (Joongi Kim)
Date: Sun, 10 Oct 2021 09:26:07 +0000
Subject: [issue45416] "loop argument must agree with lock" instantiating
 asyncio.Condition
In-Reply-To: <1633725058.57.0.682695156248.issue45416@roundup.psfhosted.org>
Message-ID: <1633857967.33.0.271125952768.issue45416@roundup.psfhosted.org>


Change by Joongi Kim <daybreaker12 at gmail.com>:


----------
keywords: +patch
nosy: +Joongi Kim
nosy_count: 6.0 -> 7.0
pull_requests: +27160
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28850

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45416>
_______________________________________

From report at bugs.python.org  Sun Oct 10 05:39:26 2021
From: report at bugs.python.org (Neil Booth)
Date: Sun, 10 Oct 2021 09:39:26 +0000
Subject: [issue44036] asyncio SSL server can be DOSed,
 event loop gets blocked: busy loops and uses 100% CPU
In-Reply-To: <1620148744.77.0.874589771286.issue44036@roundup.psfhosted.org>
Message-ID: <1633858766.64.0.457402323686.issue44036@roundup.psfhosted.org>


Change by Neil Booth <kyuupichan at gmail.com>:


----------
nosy: +kyuupichan

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44036>
_______________________________________

From report at bugs.python.org  Sun Oct 10 05:57:52 2021
From: report at bugs.python.org (Randolf Scholz)
Date: Sun, 10 Oct 2021 09:57:52 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1633859872.79.0.769974352526.issue45356@roundup.psfhosted.org>


Randolf Scholz <randolf.scholz at gmail.com> added the comment:

@Terry I think the problem boils down to the fact that `@classmethod @property` decorated methods end up not being real properties.

Calling `MyBaseClass.__dict__` reveals:

```python
mappingproxy({'__module__': '__main__',
              'expensive_class_property': <classmethod at 0x7f893e95dd60>,
              'expensive_instance_property': <property at 0x7f893e8a5860>,
              '__dict__': <attribute '__dict__' of 'MyBaseClass' objects>,
              '__weakref__': <attribute '__weakref__' of 'MyBaseClass' objects>,
              '__doc__': None,
              '__abstractmethods__': frozenset(),
              '_abc_impl': <_abc._abc_data at 0x7f893fb98740>})
```

Two main issues:

1. Any analytics or documentation tool that has special treatment for properties may not identify 'expensive_class_property' as a property if they simply check via `isinstance(func, property)`. Of course, this could be fixed by the tool-makers by doing a conditional check:

```python
isinstance(func, property) or (`isinstance(func, classmethod)` and `isinstance(func.__func__, property)`
```

2. `expensive_class_property` does not implement `getter`, `setter`, `deleter`. This seems to be the real dealbreaker, for example, if we do

```python
MyBaseClass.expensive_class_property = 2
MyBaseClass().expensive_instance_property = 2
```

Then the first line erroneously executes, such that MyBaseClass.__dict__['expensive_class_property'] is now `int` instead of `classmethod`, while the second line correctly raises `AttributeError: can't set attribute` since the setter method is not implemented.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Sun Oct 10 06:19:58 2021
From: report at bugs.python.org (=?utf-8?b?Smlhbmtl44CAU0hJ?=)
Date: Sun, 10 Oct 2021 10:19:58 +0000
Subject: [issue45422] Data 0 cannot be plotted by matplotlib.pyplot just
 because some data is less than 0. (ContourSet._get_lowers_and_uppers)
Message-ID: <1633861198.87.0.716585299031.issue45422@roundup.psfhosted.org>


New submission from Jianke?SHI <shi.jianke.xhdre at showadenko.com>:

Data 0 cannot be plotted by matplotlib.pyplot(3.3.4) just because some data is less than 0 (python 3.8.8).

The following is a sample program to confirm the problem.
the left-bottom area in the right figure is not colored and remains transparent just because the data z[2,2] is changed from 0 to -1.7E-13.
(see attached png file.)


I tried to trace the problem and find that the reason seems to be a bug in ContourSet._get_lowers_and_uppers.(Line 1065 in contour.py(3.3.4))

        if self.zmin == lowers[0]:
            # Include minimum values in lowest interval
            lowers = lowers.copy()  # so we don't change self._levels
            if self.logscale:
                lowers[0] = 0.99 * self.zmin
            else:
                lowers[0] -= 1

while lowers[0] is the same as self.zmin, it will be reduced a little before using. However, while lowers[0] is greater than self.zmin ( = -1.7E-13 ), it will not be reduced and remains as it is.
I think the condition should be revised to self.zmin <= lowers[0]
 from self.zmin == lowers[0]. 

(sample program)

import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

z0 = np.array([[0., 0., 2.], [0., 0., 1.], [2., 1., 0.]])
z1 = np.array([[0., 0., 2.], [0., 0., 1.], [2., 1., -1.7E-13]])

fig = plt.figure(figsize=(2, 4))

ax0 = fig.add_subplot(121)
ax0.contourf(z0, cmap='jet')
ax0.set_aspect('equal')

ax1 = fig.add_subplot(122)
ax1.contourf(z1, cmap='jet')
ax1.set_aspect('equal')

plt.show()

----------
components: Library (Lib)
files: test_contourf_jet4r.png
messages: 403579
nosy: Klam
priority: normal
severity: normal
status: open
title: Data 0 cannot be plotted by matplotlib.pyplot just because some data is less than 0. (ContourSet._get_lowers_and_uppers)
type: behavior
versions: Python 3.7, Python 3.8
Added file: https://bugs.python.org/file50337/test_contourf_jet4r.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45422>
_______________________________________

From report at bugs.python.org  Sun Oct 10 06:26:42 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 10 Oct 2021 10:26:42 +0000
Subject: [issue45422] Data 0 cannot be plotted by matplotlib.pyplot just
 because some data is less than 0. (ContourSet._get_lowers_and_uppers)
In-Reply-To: <1633861198.87.0.716585299031.issue45422@roundup.psfhosted.org>
Message-ID: <1633861602.05.0.0515148277929.issue45422@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

matplotlib is not a part of the standard Python library. Use the corresponding bug tracker to report issues with matplotlib.

----------
nosy: +serhiy.storchaka
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45422>
_______________________________________

From report at bugs.python.org  Sun Oct 10 06:30:30 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 10 Oct 2021 10:30:30 +0000
Subject: [issue45419] DegenerateFiles.Path mismatch to Traversable interface
In-Reply-To: <1633826284.05.0.820363562312.issue45419@roundup.psfhosted.org>
Message-ID: <1633861830.58.0.0414804226104.issue45419@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
components: +Library (Lib)
nosy: +brett.cannon, eric.snow, ncoghlan
type:  -> behavior
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45419>
_______________________________________

From report at bugs.python.org  Sun Oct 10 06:32:15 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 10 Oct 2021 10:32:15 +0000
Subject: [issue45419] DegenerateFiles.Path mismatch to Traversable interface
In-Reply-To: <1633826284.05.0.820363562312.issue45419@roundup.psfhosted.org>
Message-ID: <1633861935.81.0.627954263004.issue45419@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
versions:  -Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45419>
_______________________________________

From report at bugs.python.org  Sun Oct 10 06:37:16 2021
From: report at bugs.python.org (=?utf-8?q?Benjamin_Sz=C5=91ke?=)
Date: Sun, 10 Oct 2021 10:37:16 +0000
Subject: [issue21302] time.sleep (floatsleep()) should use clock_nanosleep()
 on Linux
In-Reply-To: <1397851923.06.0.0550198760464.issue21302@psf.upfronthosting.co.za>
Message-ID: <1633862236.17.0.885183224854.issue21302@roundup.psfhosted.org>


Benjamin Sz?ke <egyszeregy at freemail.hu> added the comment:

It is not true that there are no benefits. Absolute timeout using can reduce the overhead time of any variable and object intialization cost before the WaitForMultipleObjects() which will perform the real sleeping via blocking wait in pysleep(). GetSystemTimePreciseAsFileTime() must be call at the first line as much as it can in pysleep(). This is the same implementation in Linux via clock_nanosleep().

So, to using absolute timeout and GetSystemTimePreciseAsFileTime() can improves the accuracy of the desired sleep time. For example if sleep = 2.0 sec then real relative sleep time = 2.001234 sec, but absolute sleep time = 2.000012 sec.

Benefits are in not the technicaly backgorund, rather it is in the usecase.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21302>
_______________________________________

From report at bugs.python.org  Sun Oct 10 06:37:36 2021
From: report at bugs.python.org (Randolf Scholz)
Date: Sun, 10 Oct 2021 10:37:36 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1633862256.9.0.00436901792346.issue45356@roundup.psfhosted.org>


Randolf Scholz <randolf.scholz at gmail.com> added the comment:

If fact, in the current state it seem that it is impossible to implement real class-properties, for a simple reason: 

descriptor.__set__ is only called when setting the attribute of an instance, but not of a class!!



```python
import math

class TrigConst: 
    const = math.pi
    def __get__(self, obj, objtype=None):
        print("__get__ called")
        return self.const
    
    def __set__(self, obj, value):
        print("__set__ called")
        self.const = value
        

class Trig:
    const = TrigConst()              # Descriptor instance
```

```python
Trig().const             # calls TrigConst.__get__
Trig().const = math.tau  # calls TrigConst.__set__
Trig.const               # calls TrigConst.__get__
Trig.const = math.pi     # overwrites TrigConst attribute with float.
```

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Sun Oct 10 06:45:53 2021
From: report at bugs.python.org (=?utf-8?q?Benjamin_Sz=C5=91ke?=)
Date: Sun, 10 Oct 2021 10:45:53 +0000
Subject: [issue21302] time.sleep (floatsleep()) should use clock_nanosleep()
 on Linux
In-Reply-To: <1397851923.06.0.0550198760464.issue21302@psf.upfronthosting.co.za>
Message-ID: <1633862753.44.0.12881896899.issue21302@roundup.psfhosted.org>


Benjamin Sz?ke <egyszeregy at freemail.hu> added the comment:

In other words, using absolute timeout can eliminate the systematic error of desired sleep time.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21302>
_______________________________________

From report at bugs.python.org  Sun Oct 10 09:06:05 2021
From: report at bugs.python.org (Nir Soffer)
Date: Sun, 10 Oct 2021 13:06:05 +0000
Subject: [issue27879] add os.syncfs()
In-Reply-To: <1472321832.99.0.609872620029.issue27879@psf.upfronthosting.co.za>
Message-ID: <1633871165.7.0.746598211124.issue27879@roundup.psfhosted.org>


Nir Soffer <nirsof at gmail.com> added the comment:

Updating python version, this is not relevant to 3.6 now.

On linux users can use "sync --file-system /path" but it would be nice if we have something that works on multiple platforms.

----------
nosy: +nirs
versions: +Python 3.11 -Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27879>
_______________________________________

From report at bugs.python.org  Sun Oct 10 09:12:47 2021
From: report at bugs.python.org (Armin Rigo)
Date: Sun, 10 Oct 2021 13:12:47 +0000
Subject: [issue45417] Enum creation non-linear in the number of values
In-Reply-To: <1633737153.71.0.819400116811.issue45417@roundup.psfhosted.org>
Message-ID: <1633871567.99.0.929474398518.issue45417@roundup.psfhosted.org>


Armin Rigo <arigo at users.sourceforge.net> added the comment:

The timing is clearly quadratic:

number of attributes     time
1500                     0.24s
3000                     0.94s
6000                     3.74s
12000                    15.57s

Pressing Ctrl-C in the middle of the execution of the largest examples points directly to the cause: when we consider the next attribute, we loop over all previous ones at enum.py:238.

----------
nosy: +arigo

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45417>
_______________________________________

From report at bugs.python.org  Sun Oct 10 09:41:48 2021
From: report at bugs.python.org (Thomas Hobson)
Date: Sun, 10 Oct 2021 13:41:48 +0000
Subject: [issue45423] SSL SNI varies when host contains port number
Message-ID: <1633873308.53.0.464980119434.issue45423@roundup.psfhosted.org>


New submission from Thomas Hobson <thomas at hexf.me>:

Not entirely sure if this is intended.

When using urllib.request.urlopen, with a hostname and a varying port the SNI information sent differs.
To my undersnding, the SNI info shouldn't include the port and should only include the actual host.

Attached is an example script demonstrating the issue, where the only difference between the URLs is adding a port number.
The server it points to is configured to only match "ci.hexf.me".

----------
assignee: christian.heimes
components: SSL
files: test.py
messages: 403586
nosy: christian.heimes, hexf
priority: normal
severity: normal
status: open
title: SSL SNI varies when host contains port number
type: behavior
versions: Python 3.10, Python 3.9
Added file: https://bugs.python.org/file50338/test.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45423>
_______________________________________

From report at bugs.python.org  Sun Oct 10 10:04:40 2021
From: report at bugs.python.org (neonene)
Date: Sun, 10 Oct 2021 14:04:40 +0000
Subject: [issue45116] Performance regression 3.10b1 and later on Windows:
 Py_DECREF() not inlined in PGO build
In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org>
Message-ID: <1633874680.91.0.511300349549.issue45116@roundup.psfhosted.org>


neonene <nicesalmon at gmail.com> added the comment:

3.10.0 official binary is as slow as rc2.

Many files are not updated in the source archive or b494f5935c92951e75597bfe1c8b1f3112fec270, so I'm not sure if the delay is intentional or not.

We have no choice except waiting for 3.10.1.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45116>
_______________________________________

From report at bugs.python.org  Sun Oct 10 10:22:42 2021
From: report at bugs.python.org (daniel hahler)
Date: Sun, 10 Oct 2021 14:22:42 +0000
Subject: [issue45249] Update doctect SyntaxErrors for location range
In-Reply-To: <1632155458.61.0.570546761746.issue45249@roundup.psfhosted.org>
Message-ID: <1633875762.29.0.351281010029.issue45249@roundup.psfhosted.org>


daniel hahler <python-bugs at thequod.de> added the comment:

I've noticed a regression/change with the code change for this issue.

When not catching the exception from `compile("invalid(", "<stdin>", "single")` it has a caret below the opening parenthesis:

```
Traceback (most recent call last):
  File "?/t-syntaxerror-chained.py", line 2, in <module>
    compile("invalid(", "<stdin>", "single")
  File "<stdin>", line 1
    invalid(
           ^
SyntaxError: '(' was never closed
```

When using `traceback.print_exc` however this is missing:
```
Traceback (most recent call last):
  File "?/t-syntaxerror-chained.py", line 2, in <module>
    compile("invalid(", "<stdin>", "single")
  File "<stdin>", line 1
    invalid(

SyntaxError: '(' was never closed
```

The file used for testing:
```
try:
    compile("invalid(", "<stdin>", "single")
except Exception:
    # raise
    __import__("traceback").print_exc()
```

(this change was noticed between 3.10.0rc2 and the final release with pdbpp's test suite)

I've not investigated further (yet), and also feel free to ask for creating a new issue, but I've figured it would be good to notify you here first (where the code was changed).

----------
nosy: +blueyed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45249>
_______________________________________

From report at bugs.python.org  Sun Oct 10 10:23:16 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 10 Oct 2021 14:23:16 +0000
Subject: [issue45419] DegenerateFiles.Path mismatch to Traversable interface
In-Reply-To: <1633826284.05.0.820363562312.issue45419@roundup.psfhosted.org>
Message-ID: <1633875796.45.0.185697802525.issue45419@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 14a483aa400dda8346ac474ce22e2ba8d8126dff by Jason R. Coombs in branch '3.10':
[3.10] bpo-45419: Fix interfaces on DegenerateFiles.Path (GH-28844)
https://github.com/python/cpython/commit/14a483aa400dda8346ac474ce22e2ba8d8126dff


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45419>
_______________________________________

From report at bugs.python.org  Sun Oct 10 10:24:01 2021
From: report at bugs.python.org (Jason R. Coombs)
Date: Sun, 10 Oct 2021 14:24:01 +0000
Subject: [issue45419] DegenerateFiles.Path mismatch to Traversable interface
In-Reply-To: <1633826284.05.0.820363562312.issue45419@roundup.psfhosted.org>
Message-ID: <1633875841.53.0.0377752073992.issue45419@roundup.psfhosted.org>


Change by Jason R. Coombs <jaraco at jaraco.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type: behavior -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45419>
_______________________________________

From report at bugs.python.org  Sun Oct 10 10:23:32 2021
From: report at bugs.python.org (daniel hahler)
Date: Sun, 10 Oct 2021 14:23:32 +0000
Subject: [issue45249] Update doctect SyntaxErrors for location range
In-Reply-To: <1632155458.61.0.570546761746.issue45249@roundup.psfhosted.org>
Message-ID: <1633875812.52.0.962931860199.issue45249@roundup.psfhosted.org>


Change by daniel hahler <python-bugs at thequod.de>:


----------
versions: +Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45249>
_______________________________________

From report at bugs.python.org  Sun Oct 10 10:40:07 2021
From: report at bugs.python.org (Ken Jin)
Date: Sun, 10 Oct 2021 14:40:07 +0000
Subject: [issue45203] Improve specialization stats for LOAD_METHOD and
 BINARY_SUBSCR
In-Reply-To: <1631708660.87.0.151822641223.issue45203@roundup.psfhosted.org>
Message-ID: <1633876807.84.0.571722786371.issue45203@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

I'm closing this as there doesn't seem to be anything left to do. Please do reopen this issue if you feel that isn't the case.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45203>
_______________________________________

From report at bugs.python.org  Sun Oct 10 10:42:14 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sun, 10 Oct 2021 14:42:14 +0000
Subject: [issue45423] SSL SNI varies when host contains port number
In-Reply-To: <1633873308.53.0.464980119434.issue45423@roundup.psfhosted.org>
Message-ID: <1633876934.74.0.9987480552.issue45423@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


Added file: https://bugs.python.org/file50340/keylog

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45423>
_______________________________________

From report at bugs.python.org  Sun Oct 10 10:42:06 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sun, 10 Oct 2021 14:42:06 +0000
Subject: [issue45423] SSL SNI varies when host contains port number
In-Reply-To: <1633873308.53.0.464980119434.issue45423@roundup.psfhosted.org>
Message-ID: <1633876926.19.0.61447296862.issue45423@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

I have tested your assumption with wireshark. It's not the TLS SNI extension. In both cases ssl module sends SNI "ci.hexf.me". The issue is likely caused by HTTP Host header. The host header contains the port.

I'm attaching the capture and keylog file.

----------
assignee: christian.heimes -> 
components: +Library (Lib) -SSL
Added file: https://bugs.python.org/file50339/bpo45423.pcapng

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45423>
_______________________________________

From report at bugs.python.org  Sun Oct 10 10:56:55 2021
From: report at bugs.python.org (mattip)
Date: Sun, 10 Oct 2021 14:56:55 +0000
Subject: [issue45417] Enum creation non-linear in the number of values
In-Reply-To: <1633737153.71.0.819400116811.issue45417@roundup.psfhosted.org>
Message-ID: <1633877815.27.0.814336071143.issue45417@roundup.psfhosted.org>


mattip <matti.picus at gmail.com> added the comment:

Over at PyPy arigo authored and we applied this fix to the as-yet unreleased pypy3.8. Note that it cannot be applied directly to CPython as sets are not ordered. Does the fix break anything? Tests in Lib/test/test_enum.py passed after applying it.

----------
keywords: +patch
nosy: +mattip
Added file: https://bugs.python.org/file50341/quadratic-fix-2.diff

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45417>
_______________________________________

From report at bugs.python.org  Sun Oct 10 11:04:07 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sun, 10 Oct 2021 15:04:07 +0000
Subject: [issue44036] asyncio SSL server can be DOSed,
 event loop gets blocked: busy loops and uses 100% CPU
In-Reply-To: <1620148744.77.0.874589771286.issue44036@roundup.psfhosted.org>
Message-ID: <1633878247.68.0.732825609181.issue44036@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
assignee: christian.heimes -> 
components:  -SSL

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44036>
_______________________________________

From report at bugs.python.org  Sun Oct 10 11:08:06 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sun, 10 Oct 2021 15:08:06 +0000
Subject: [issue45249] Update doctect SyntaxErrors for location range
In-Reply-To: <1632155458.61.0.570546761746.issue45249@roundup.psfhosted.org>
Message-ID: <1633878486.55.0.445206715136.issue45249@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45249>
_______________________________________

From report at bugs.python.org  Sun Oct 10 11:13:21 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sun, 10 Oct 2021 15:13:21 +0000
Subject: [issue45249] Update doctect SyntaxErrors for location range
In-Reply-To: <1632155458.61.0.570546761746.issue45249@roundup.psfhosted.org>
Message-ID: <1633878801.49.0.145595461803.issue45249@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
pull_requests: +27161
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/28854

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45249>
_______________________________________

From report at bugs.python.org  Sun Oct 10 11:15:28 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 10 Oct 2021 15:15:28 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633878928.08.0.877613435505.issue45401@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 62a667784ba7b84611ebd50fa8a1a464cde32235 by Vinay Sajip in branch 'main':
bpo-45401: Change shouldRollover() methods to only rollover regular f? (GH-28822)
https://github.com/python/cpython/commit/62a667784ba7b84611ebd50fa8a1a464cde32235


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Sun Oct 10 11:15:39 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sun, 10 Oct 2021 15:15:39 +0000
Subject: [issue45249] Update doctect SyntaxErrors for location range
In-Reply-To: <1632155458.61.0.570546761746.issue45249@roundup.psfhosted.org>
Message-ID: <1633878939.65.0.772750117522.issue45249@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
pull_requests: +27162
pull_request: https://github.com/python/cpython/pull/28855

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45249>
_______________________________________

From report at bugs.python.org  Sun Oct 10 11:16:50 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Sun, 10 Oct 2021 15:16:50 +0000
Subject: [issue45418] types.UnionType is not subscriptable
In-Reply-To: <1633852223.45.0.0312685952185.issue45418@roundup.psfhosted.org>
Message-ID: <CAP7+vJKkOTeh=mEaPbOdC6smG+HOxmDpywVQU-egxP5fjKee1Q@mail.gmail.com>


Guido van Rossum <guido at python.org> added the comment:

> If you meant to say: why is typing.Union[] allowed, but not
types.UnionType[]? That is intentional. types.UnionType is only meant for
builtin types. Once you union with *any* type from typing, it will convert
to a typing.Union.

But why? Just so types.UnionType (if it has a typevar) doesn?t have to
support subscriptions? Even if this saves us now, I agree with OP that it
ought to allow it, so we can deprecate typing.Union properly. And e.g.
dict[str, T] works.
-- 
--Guido (mobile)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45418>
_______________________________________

From report at bugs.python.org  Sun Oct 10 11:23:47 2021
From: report at bugs.python.org (Vinay Sajip)
Date: Sun, 10 Oct 2021 15:23:47 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633879427.35.0.372167172205.issue45401@roundup.psfhosted.org>


Change by Vinay Sajip <vinay_sajip at yahoo.co.uk>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Sun Oct 10 11:26:02 2021
From: report at bugs.python.org (Rahul Lakshmanan)
Date: Sun, 10 Oct 2021 15:26:02 +0000
Subject: [issue45424] ssl.SSLError: unknown error (_ssl.c:4034)
Message-ID: <1633879562.83.0.398124301666.issue45424@roundup.psfhosted.org>


New submission from Rahul Lakshmanan <rahullak at gmail.com>:

I face this error when trying to use a package called streamlit.

Streamlit calls Tornado which calls SSL.

 File "C:\Users\<username>\.conda\envs\stockprediction\lib\ssl.py", line 589, in create_default_context
    context.load_default_certs(purpose)
  File "C:\Users\<username>\.conda\envs\stockprediction\lib\ssl.py", line 490, in load_default_certs
    self._load_windows_store_certs(storename, purpose)
  File "C:\Users\<username>\.conda\envs\stockprediction\lib\ssl.py", line 482, in _load_windows_store_certs
    self.load_verify_locations(cadata=certs)
ssl.SSLError: unknown error (_ssl.c:4034)

This is using Python 3.7.10 (Anaconda) on Windows 10.

Would be really grateful if you could help resolve this issue. 

Note: I am unable to find this specific issue anywhere on Python.org or on OpenSSL github issues page.

----------
assignee: christian.heimes
components: SSL
messages: 403595
nosy: christian.heimes, rahullak, vstinner
priority: normal
severity: normal
status: open
title: ssl.SSLError: unknown error (_ssl.c:4034)
type: crash
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45424>
_______________________________________

From report at bugs.python.org  Sun Oct 10 11:38:27 2021
From: report at bugs.python.org (Ken Jin)
Date: Sun, 10 Oct 2021 15:38:27 +0000
Subject: [issue45418] types.UnionType is not subscriptable
In-Reply-To: <1633815476.2.0.253081799183.issue45418@roundup.psfhosted.org>
Message-ID: <1633880307.4.0.863094968996.issue45418@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

@Guido,

I hope I didn't misunderstand you, but to clarify, what OP is asking is an alternative way to construct types.UnionType objects and write:

types.UnionType[int, str]

like how we used to write before 3.10:

typing.Union[int, str]

I don't know why we need this. We can write `int | str`. The reason for PEP 604 in the first place was to avoid the subscript syntax and use `|` since it's cleaner. OP's use case is for reconstructing types.UnionType objects easily, but `functools.reduce(operator.or_, args)` works.

Re: TypeVar subscription; PEP 604 syntax already supports that. We used to implement that in C. After Serhiy's Great Cleanup, a bitwise OR with a TypeVar automatically converts types.UnionType to typing.Union. So all the TypeVar support is now done in Python.

>>> type(int | str)
<class 'types.UnionType'>

>>> (int | str | T)[dict]
typing.Union[int, str, dict]

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45418>
_______________________________________

From report at bugs.python.org  Sun Oct 10 11:53:01 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Sun, 10 Oct 2021 15:53:01 +0000
Subject: [issue45418] types.UnionType is not subscriptable
In-Reply-To: <1633880307.4.0.863094968996.issue45418@roundup.psfhosted.org>
Message-ID: <CAP7+vJ+VFvyvgDbv-VP_TBUjBrmxaMNytY7WsgwjUYaF_8XE1A@mail.gmail.com>


Guido van Rossum <guido at python.org> added the comment:

Oh, I see. No, they must make another special case, like for Annotated.--
--Guido (mobile)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45418>
_______________________________________

From report at bugs.python.org  Sun Oct 10 11:56:18 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sun, 10 Oct 2021 15:56:18 +0000
Subject: [issue45424] ssl.SSLError: unknown error (_ssl.c:4034)
In-Reply-To: <1633879562.83.0.398124301666.issue45424@roundup.psfhosted.org>
Message-ID: <1633881378.73.0.810886188689.issue45424@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

The error means that something went wrong while loading certificates, but OpenSSL didn't give us more information about what went wrong.

Can you reproduce the issue with more recent Python version? 3.7 and 3.8 are in security fix-only mode and no longer receive bug fixes.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45424>
_______________________________________

From report at bugs.python.org  Sun Oct 10 11:57:11 2021
From: report at bugs.python.org (Ken Jin)
Date: Sun, 10 Oct 2021 15:57:11 +0000
Subject: [issue45417] Enum creation non-linear in the number of values
In-Reply-To: <1633737153.71.0.819400116811.issue45417@roundup.psfhosted.org>
Message-ID: <1633881431.89.0.882970215555.issue45417@roundup.psfhosted.org>


Change by Ken Jin <kenjin4096 at gmail.com>:


----------
nosy: +barry, eli.bendersky, ethan.furman
versions: +Python 3.9 -Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45417>
_______________________________________

From report at bugs.python.org  Sun Oct 10 12:01:48 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 10 Oct 2021 16:01:48 +0000
Subject: [issue45416] "loop argument must agree with lock" instantiating
 asyncio.Condition
In-Reply-To: <1633725058.57.0.682695156248.issue45416@roundup.psfhosted.org>
Message-ID: <1633881708.78.0.108533607775.issue45416@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 1a7892414e654aa5c99efa31db767baba7f4a424 by Joongi Kim in branch 'main':
bpo-45416: Fix use of asyncio.Condition() with explicit Lock objects (GH-28850)
https://github.com/python/cpython/commit/1a7892414e654aa5c99efa31db767baba7f4a424


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45416>
_______________________________________

From report at bugs.python.org  Sun Oct 10 12:01:49 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 10 Oct 2021 16:01:49 +0000
Subject: [issue45416] "loop argument must agree with lock" instantiating
 asyncio.Condition
In-Reply-To: <1633725058.57.0.682695156248.issue45416@roundup.psfhosted.org>
Message-ID: <1633881709.3.0.00160512694702.issue45416@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +27163
pull_request: https://github.com/python/cpython/pull/28856

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45416>
_______________________________________

From report at bugs.python.org  Sun Oct 10 12:04:23 2021
From: report at bugs.python.org (Brandt Bucher)
Date: Sun, 10 Oct 2021 16:04:23 +0000
Subject: [issue45116] Performance regression 3.10b1 and later on Windows:
 Py_DECREF() not inlined in PGO build
In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org>
Message-ID: <1633881863.59.0.433076769961.issue45116@roundup.psfhosted.org>


Change by Brandt Bucher <brandt at python.org>:


----------
nosy: +brandtbucher2

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45116>
_______________________________________

From report at bugs.python.org  Sun Oct 10 12:06:35 2021
From: report at bugs.python.org (Marc Culler)
Date: Sun, 10 Oct 2021 16:06:35 +0000
Subject: [issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6
In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org>
Message-ID: <1633881995.88.0.0595436452821.issue44828@roundup.psfhosted.org>


Marc Culler <marc.culler at gmail.com> added the comment:

Unfortunately, I am still seeing this failure in Monterey beta 9.  However, we are no longer alone.  Here is a report of the same issue in Android Studio:

https://stackoverflow.com/questions/69068842/android-studio-open-file-operation-failed-the-open-file-operation-failed-to-co

This is reportedly fixed in the Adroid Studio beta, so maybe someone will be able to figure out what Google did to workaround the problem.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Sun Oct 10 12:25:21 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 10 Oct 2021 16:25:21 +0000
Subject: [issue45416] "loop argument must agree with lock" instantiating
 asyncio.Condition
In-Reply-To: <1633725058.57.0.682695156248.issue45416@roundup.psfhosted.org>
Message-ID: <1633883121.97.0.00832345690432.issue45416@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 164dddf5f8c9c6b93f32c9f79b4301fc804576e9 by Miss Islington (bot) in branch '3.10':
bpo-45416: Fix use of asyncio.Condition() with explicit Lock objects (GH-28850)
https://github.com/python/cpython/commit/164dddf5f8c9c6b93f32c9f79b4301fc804576e9


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45416>
_______________________________________

From report at bugs.python.org  Sun Oct 10 12:25:40 2021
From: report at bugs.python.org (Brandt Bucher)
Date: Sun, 10 Oct 2021 16:25:40 +0000
Subject: [issue45116] Performance regression 3.10b1 and later on Windows:
 Py_DECREF() not inlined in PGO build
In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org>
Message-ID: <1633883140.7.0.181490062699.issue45116@roundup.psfhosted.org>


Change by Brandt Bucher <brandt at python.org>:


----------
nosy: +brandtbucher -brandtbucher2

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45116>
_______________________________________

From report at bugs.python.org  Sun Oct 10 12:40:20 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sun, 10 Oct 2021 16:40:20 +0000
Subject: [issue45380] help() appears confused about the module of
 typing.Annotated
In-Reply-To: <1633458543.21.0.19270161871.issue45380@roundup.psfhosted.org>
Message-ID: <1633884020.65.0.925212925133.issue45380@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

It actually appears as though there is no documented way to retrieve the metadata from an annotated alias. Is this intentional?

The metadata is stored in a `__metadata__` attribute of a `typing._AnnotatedAlias` instance. But the `__metadata__` attribute is undocumented -- there is no mention of it in the docstring for `_AnnotatedAlias`, in the documentation for `typing.Annotated` (https://docs.python.org/3.11/library/typing.html#typing.Annotated), or PEP 593, which introduced `typing.Annotated` (https://www.python.org/dev/peps/pep-0593/).

The documentation says: "Passing include_extras=True to get_type_hints() lets one access the extra annotations at runtime." However, this is misleading. Calling `get_type_hints` on a function/class where an argument/attribute is annotated with an `_AnnotatedAlias` instance is a way of retrieving the type hints for the function/class with the `_AnnotatedAlias` instance unresolved. However, if you call `get_type_hints` on the `_AnnotatedAlias` instance directly, this fails.

----------
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45380>
_______________________________________

From report at bugs.python.org  Sun Oct 10 12:52:07 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sun, 10 Oct 2021 16:52:07 +0000
Subject: [issue45380] help() appears confused about the module of
 typing.Annotated
In-Reply-To: <1633458543.21.0.19270161871.issue45380@roundup.psfhosted.org>
Message-ID: <1633884727.72.0.888832161815.issue45380@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
nosy: +gvanrossum, kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45380>
_______________________________________

From report at bugs.python.org  Sun Oct 10 13:05:34 2021
From: report at bugs.python.org (Marc Culler)
Date: Sun, 10 Oct 2021 17:05:34 +0000
Subject: [issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6
In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org>
Message-ID: <1633885534.52.0.982219847829.issue44828@roundup.psfhosted.org>


Marc Culler <marc.culler at gmail.com> added the comment:

I was able to fix this problem for Tk on Monterey beta [21A5543b].
The fix has been committed to the tip of the core-8-6-branch in the
Tk fossil repository.

Here is a synopsis.  Tk used to open the file dialog by calling
[NSApp runModalForWindow:panel].  Starting with the release of 10.14
this call would produce a warning message on stderr saying that
[NSOpenPanel runModal] should be used instead.  But on systems older
than 10.14, the runModal method would fail because the completion handler
would not get called.  Now, with 12.0 (at least in the beta) calling
[NSOpenPanel runModal] produces an error dialog saying "The open file
operation failed to connect to the open and save panel service" and
this would be accompanied by a traceback printed on stderr for an
assertion error.  (It was not a "crash" but the file selection would
fail.)  However, it turns out that calling [NSApp runModalForWindow:panel]
no longer produces the warning in 12.0, and it works correctly.

So my workaround was to add conditional code that only calls the runModal
method on 10.14 and 10.15 and calls runModalForWindow on other versions
of macOS.  I tested on 10.15 and it works there as well.

Needless to say, none of these changes are documented by Apple.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Sun Oct 10 13:50:55 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 10 Oct 2021 17:50:55 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633888255.59.0.469154041018.issue45401@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Seems it introduced a resource warning in tests.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Sun Oct 10 14:36:04 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 10 Oct 2021 18:36:04 +0000
Subject: [issue45418] types.UnionType is not subscriptable
In-Reply-To: <1633815476.2.0.253081799183.issue45418@roundup.psfhosted.org>
Message-ID: <1633890964.25.0.252682399558.issue45418@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

types.UnionType corresponds to typing._UnionGenericAlias, not typing.Union.

We can make (int | str | T)[dict] returning an instance of types.UnionType instead of an instance of typing._UnionGenericAlias. But it will be a breaking change, because typing._UnionGenericAlias and types.UnionType are different and not completely compatible types. We should wait some time before making such changes, so all user code will be made supporting both typing._UnionGenericAlias and types.UnionType.

If the user code does something special like substituting `int | Collection[int]` to `int | list[int]`, it should have some additional ifs in any case, otherwise it will not recognize new typing types including types.UnionTypes. And subscription does not work in all typing types, we have copy_with() for some types and special cases for others in the code of the typing module. I am going to unify it finally, but it takes time, my time and user's time to migrate to new idioms.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45418>
_______________________________________

From report at bugs.python.org  Sun Oct 10 15:08:12 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 10 Oct 2021 19:08:12 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1633892892.64.0.259667183802.issue45356@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Sun Oct 10 15:30:14 2021
From: report at bugs.python.org (MagzoB Mall)
Date: Sun, 10 Oct 2021 19:30:14 +0000
Subject: [issue45116] Performance regression 3.10b1 and later on Windows:
 Py_DECREF() not inlined in PGO build
In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org>
Message-ID: <1633894214.38.0.885232259312.issue45116@roundup.psfhosted.org>


Change by MagzoB Mall <magzobmall at gmail.com>:


----------
type: performance -> crash

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45116>
_______________________________________

From report at bugs.python.org  Sun Oct 10 16:16:29 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 10 Oct 2021 20:16:29 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633896989.56.0.100304437569.issue45401@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Sun Oct 10 16:21:24 2021
From: report at bugs.python.org (Vinay Sajip)
Date: Sun, 10 Oct 2021 20:21:24 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633897284.8.0.235592404226.issue45401@roundup.psfhosted.org>


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

Where did you see the warnings? I didn't spot anything in the GitHub Actions logs.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Sun Oct 10 16:28:15 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 10 Oct 2021 20:28:15 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633897695.33.0.850185505938.issue45401@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

test_should_not_rollover (test.test_logging.TimedRotatingFileHandlerTest) ... /home/serhiy/py/cpython/Lib/unittest/case.py:547: ResourceWarning: unclosed file <_io.TextIOWrapper name='/dev/null' mode='a' encoding='utf-8'>
  if method() is not None:
ResourceWarning: Enable tracemalloc to get the object allocation traceback
ok

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Sun Oct 10 16:30:20 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 10 Oct 2021 20:30:20 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633897820.45.0.275267388808.issue45401@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

With tracemalloc enabled:

$ ./python -X tracemalloc -m test -v test_logging -m test_should_not_rollover
...
test_should_not_rollover (test.test_logging.TimedRotatingFileHandlerTest) ... /home/serhiy/py/cpython/Lib/unittest/case.py:547: ResourceWarning: unclosed file <_io.TextIOWrapper name='/dev/null' mode='a' encoding='utf-8'>
  if method() is not None:
Object allocated at (most recent call last):
  File "/home/serhiy/py/cpython/Lib/logging/__init__.py", lineno 1205
    return open_func(self.baseFilename, self.mode,
ok

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Sun Oct 10 16:42:46 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Sun, 10 Oct 2021 20:42:46 +0000
Subject: [issue45116] Performance regression 3.10b1 and later on Windows:
 Py_DECREF() not inlined in PGO build
In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org>
Message-ID: <1633898566.18.0.797502053846.issue45116@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

Someone whose name I don't recognize (MagzoB Mall) just changed the issue type to "crash" without explaining why. That user was created today, and has no triage permissions. Mind if I change it back? It feels like vandalism.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45116>
_______________________________________

From report at bugs.python.org  Sun Oct 10 17:44:53 2021
From: report at bugs.python.org (Eryk Sun)
Date: Sun, 10 Oct 2021 21:44:53 +0000
Subject: [issue21302] time.sleep (floatsleep()) should use clock_nanosleep()
 on Linux
In-Reply-To: <1397851923.06.0.0550198760464.issue21302@psf.upfronthosting.co.za>
Message-ID: <1633902293.72.0.636351773483.issue21302@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

> Absolute timeout using can reduce the overhead time of any variable 
> and object intialization cost before the WaitForMultipleObjects() 

Again, timer objects store the due time in interrupt time, not system time (i.e. InterruptTime vs SystemTime in the KUSER_SHARED_DATA record). The due time gets set as the current interrupt time plus a relative due time. If the due time is passed as absolute system time, the kernel just computes the delta from the current system time.

The timer object does record whether the requested due time is an absolute system time. This allows the kernel to recompute all absolute due times when the system time is changed manually. This is also the primary reason one wouldn't implement time.sleep() with absolute system time.

> using absolute timeout and GetSystemTimePreciseAsFileTime() can 
> improves the accuracy of the desired sleep time.

It would not improve the resolution. Timer objects are signaled when their due time is at or before the current interrupt time. The latter gets updated by the timer interrupt service routine, by default every 15.625 ms -- or at least that used to be the case.

The undocumented flag CREATE_WAITABLE_TIMER_HIGH_RESOLUTION creates a different timer type, called an "IRTimer" (implemented in Windows 8.1, but back then only accessible in the NT API). This timer type is based on precise interrupt time, which is interpolated using the performance counter. I don't know how the implementation of the timer interrupt has changed to support this increased resolution. It could be that the default 15.625 ms interrupt period is being simulated for compatibility with classic timers and Sleep(). I'd love for the CREATE_WAITABLE_TIMER_HIGH_RESOLUTION flag and the behavior of IRTimer objects to be documented.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21302>
_______________________________________

From report at bugs.python.org  Sun Oct 10 18:17:30 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 10 Oct 2021 22:17:30 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1633904250.05.0.40014365569.issue45356@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

I'm merging issue 44904 into this one because they are related.

----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Sun Oct 10 18:18:34 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 10 Oct 2021 22:18:34 +0000
Subject: [issue44904] Classmethod properties are erroneously "called" in
 multiple modules
In-Reply-To: <1628803001.12.0.882298478545.issue44904@roundup.psfhosted.org>
Message-ID: <1633904314.46.0.152263677551.issue44904@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Moving this discussion to issue 45356 because some of the discussion would need to be duplicated.

----------
nosy: +rhettinger
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Calling `help` executes @classmethod @property decorated methods

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44904>
_______________________________________

From report at bugs.python.org  Sun Oct 10 18:38:26 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 10 Oct 2021 22:38:26 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1633905506.34.0.0979400734499.issue45356@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

It may have been a mistake to allow this kind of decorator chaining.  

* As Randolf and Alex have noticed, it invalidates assumptions made elsewhere in the standard library and presumably in third-party code as well.  

* And as Randolf noted in his last post, the current descriptor logic doesn't make it possible to implement classmethod properties with setter logic. 

* In issue 44973, we found that staticmethod and property also don't compose well, nor does abstract method.

We either need to undo the Python 3.9 feature from issue 19072, or we need to put serious thought into making all these descriptors composable in a way that would match people's expectations.

----------
assignee:  -> rhettinger
nosy: +berker.peksag

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Sun Oct 10 21:13:57 2021
From: report at bugs.python.org (Zhong Liu)
Date: Mon, 11 Oct 2021 01:13:57 +0000
Subject: [issue45425] There is an error in the Chinese documentation of
 contextlib.AbstractContextManager
Message-ID: <1633914837.36.0.697960733933.issue45425@roundup.psfhosted.org>


New submission from Zhong Liu <laxtiz at live.com>:

The documentation of contextlib.AbstractContextManager is incorrectly described as the documentation of contextlib.AbstractAsyncContextManager

from 3.6 to 3.10, all is.

https://docs.python.org/zh-cn/3.6/library/contextlib.html#contextlib.AbstractContextManager
https://docs.python.org/zh-cn/3.10/library/contextlib.html#contextlib.AbstractContextManager

----------
assignee: docs at python
components: Documentation
messages: 403614
nosy: docs at python, laxtiz
priority: normal
severity: normal
status: open
title: There is an error in the Chinese documentation of contextlib.AbstractContextManager
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45425>
_______________________________________

From report at bugs.python.org  Sun Oct 10 22:55:00 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Mon, 11 Oct 2021 02:55:00 +0000
Subject: [issue45116] Performance regression 3.10b1 and later on Windows:
 Py_DECREF() not inlined in PGO build
In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org>
Message-ID: <1633920900.68.0.617123491162.issue45116@roundup.psfhosted.org>


Change by Guido van Rossum <guido at python.org>:


----------
type: crash -> performance

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45116>
_______________________________________

From report at bugs.python.org  Mon Oct 11 00:19:28 2021
From: report at bugs.python.org (Carl Meyer)
Date: Mon, 11 Oct 2021 04:19:28 +0000
Subject: [issue45384] Accept Final as indicating ClassVar for dataclass
In-Reply-To: <1633474802.74.0.28935369268.issue45384@roundup.psfhosted.org>
Message-ID: <1633925968.34.0.172537776248.issue45384@roundup.psfhosted.org>


Carl Meyer <carl at oddbird.net> added the comment:

> Are Final default_factory fields real fields or pseudo-fields? (i.e. are they returned by dataclasses.fields()?)

They are real fields, returned by `dataclasses.fields()`.

In my opinion, the behavior change proposed in this bug is a bad idea all around, and should not be made, and the inconsistency with PEP 591 should rather be resolved by explicitly specifying the interaction with dataclasses in a modification to the PEP.

Currently the meaning of:

```
@dataclass
class C:
    x: Final[int] = 3
```

is well-defined, intuitive, and implemented consistently both in the runtime and in type checkers. It specifies a dataclass field of type `int`, with a default value of `3` for new instances, which can be overridden with an init arg, but cannot be modified (per type checker; runtime doesn't enforce Final) after the instance is initialized.

Changing the meaning of the above code to be "a dataclass with no fields, but one final class attribute of value 3" is a backwards-incompatible change to a less useful and less intuitive behavior.

I argue the current behavior is intuitive because in general the type annotation on a dataclass attribute applies to the eventual instance attribute, not to the immediate RHS -- this is made very clear by the fact that typecheckers happily accept `x: int = dataclasses.field(...)` which in a non-dataclass context would be a type error. Therefore the Final should similarly be taken to apply to the eventual instance attribute, not to the immediate assignment. And therefore it should not (in the case of dataclasses) imply ClassVar.

I realize that this means that if we want to allow final class attributes on dataclasses, it would require wrapping an explicit ClassVar around Final, which violates the current text of PEP 591. I would suggest this is simply because that PEP did not consider the specific case of dataclasses, and the PEP should be amended to carve out dataclasses specifically.

----------
nosy: +carljm

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45384>
_______________________________________

From report at bugs.python.org  Mon Oct 11 00:48:31 2021
From: report at bugs.python.org (Gregory Beauregard)
Date: Mon, 11 Oct 2021 04:48:31 +0000
Subject: [issue45384] Accept Final as indicating ClassVar for dataclass
In-Reply-To: <1633474802.74.0.28935369268.issue45384@roundup.psfhosted.org>
Message-ID: <1633927711.3.0.691300552042.issue45384@roundup.psfhosted.org>


Gregory Beauregard <greg at greg.red> added the comment:

Thanks for the feedback Carl.

Your proposed nesting PEP change is not possible: ClassVar[Final[int]] isn't valid because Final[int] isn't a type. As far as I know this would need type intersections to be possible.

I'm going to try sending a one-off email to the PEP authors since probably whatever happens the PEP needs a clarification anyway.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45384>
_______________________________________

From report at bugs.python.org  Mon Oct 11 01:06:23 2021
From: report at bugs.python.org (Carl Meyer)
Date: Mon, 11 Oct 2021 05:06:23 +0000
Subject: [issue45384] Accept Final as indicating ClassVar for dataclass
In-Reply-To: <1633474802.74.0.28935369268.issue45384@roundup.psfhosted.org>
Message-ID: <1633928783.1.0.683096130485.issue45384@roundup.psfhosted.org>


Carl Meyer <carl at oddbird.net> added the comment:

Good idea to check with the PEP authors. 

I don?t think allowing both ClassVar and Final in dataclasses requires general intersection types. Neither ClassVar nor Final are real types; they aren?t part of the type of the value.  They are more like special annotations on a name, which are wrapped around a type as syntactic convenience. You?re right that it would require more than just amendment to the PEP text, though; it might require changes to type checkers, and it would also require changes to the runtime behavior of the `typing` module to special-case allowing `ClassVar[Final[?]]`. And the downside of this change is that it couldn?t be context sensitive to only be allowed in dataclasses. But I think this isn?t a big problem; type checkers could still error on that wrapping in non dataclass contexts if they want to. 

But even if that change can?t be made, I think backwards compatibility still precludes changing the interpretation of `x: Final[int] = 3` on a dataclass, and it is more valuable to be able to specify Final instance attributes (fields) than final class attributes on dataclasses.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45384>
_______________________________________

From report at bugs.python.org  Mon Oct 11 01:08:45 2021
From: report at bugs.python.org (Jimmy Alexander)
Date: Mon, 11 Oct 2021 05:08:45 +0000
Subject: [issue45426] PANDAS INSTALLATION PIP FAILED ON WINDOWS 11
Message-ID: <1633928925.31.0.00114589869577.issue45426@roundup.psfhosted.org>


New submission from Jimmy Alexander <jagonzalezx at gmail.com>:

Generating code
  Finished generating code
  building 'pandas._libs.parsers' extension
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DNPY_NO_DEPRECATED_API=0 -I.\pandas\_libs -Ipandas/_libs/src/klib -Ipandas/_libs/src -IC:\Users\ufx\AppData\Local\Temp\pip-build-env-e6frjkyc\overlay\Lib\site-packages\numpy\core\include -IC:\Users\ufx\AppData\Local\Programs\Python\Python310\include -IC:\Users\ufx\AppData\Local\Programs\Python\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tcpandas/_libs/src/parser/io.c /Fobuild\temp.win-amd64-3.10\Release\pandas/_libs/src/parser/io.obj
  io.c
  pandas/_libs/src/klib\khash.h(705): warning C4090: 'function': different 'const' qualifiers
  pandas/_libs/src/parser/io.c(139): error C2065: 'ssize_t': undeclared identifier
  pandas/_libs/src/parser/io.c(139): error C2146: syntax error: missing ';' before identifier 'rv'
  pandas/_libs/src/parser/io.c(139): error C2065: 'rv': undeclared identifier
  pandas/_libs/src/parser/io.c(145): error C2065: 'rv': undeclared identifier
  pandas/_libs/src/parser/io.c(145): warning C4267: 'function': conversion from 'size_t' to 'unsigned int', possible loss of data
  pandas/_libs/src/parser/io.c(146): error C2065: 'rv': undeclared identifier
  pandas/_libs/src/parser/io.c(157): error C2065: 'rv': undeclared identifier
  pandas/_libs/src/parser/io.c(158): error C2065: 'rv': undeclared identifier
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for pandas
Failed to build pandas
ERROR: Could not build wheels for pandas which use PEP 517 and cannot be installed directly

----------
components: Windows
messages: 403618
nosy: jdfoxito, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: PANDAS INSTALLATION PIP FAILED ON WINDOWS 11
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45426>
_______________________________________

From report at bugs.python.org  Mon Oct 11 01:09:54 2021
From: report at bugs.python.org (Jimmy Alexander)
Date: Mon, 11 Oct 2021 05:09:54 +0000
Subject: [issue45426] PANDAS INSTALLATION PIP FAILED ON WINDOWS 11
In-Reply-To: <1633928925.31.0.00114589869577.issue45426@roundup.psfhosted.org>
Message-ID: <1633928994.66.0.325145911371.issue45426@roundup.psfhosted.org>


Jimmy Alexander <jagonzalezx at gmail.com> added the comment:

C:\Users\ufx>pip install pandas
Collecting pandas
  Using cached pandas-1.3.3.tar.gz (4.7 MB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\ufx\AppData\Local\Programs\Python\Python310\python.exe' 'C:\Users\ufx\AppData\Local\Temp\pip-standalone-pip-hwkn7bp9\__env_pip__.zip\pip' install --ignore-installed --no-user --prefix 'C:\Users\ufx\AppData\Local\Temp\pip-build-env-q28f4203\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=51.0.0' wheel 'Cython>=0.29.21,<3' 'numpy==1.17.3; python_version=='"'"'3.7'"'"' and (platform_machine!='"'"'arm64'"'"' or platform_system!='"'"'Darwin'"'"') and platform_machine!='"'"'aarch64'"'"'' 'numpy==1.18.3; python_version=='"'"'3.8'"'"' and (platform_machine!='"'"'arm64'"'"' or platform_system!='"'"'Darwin'"'"') and platform_machine!='"'"'aarch64'"'"'' 'numpy==1.19.3; python_version>='"'"'3.9'"'"' and (platform_machine!='"'"'arm64'"'"' or platform_system!='"'"'Darwin'"'"') and platform_machine!='"'"'aarch64'"'"'' 'numpy==1.19.2; python_version=='"'"'3.7'"'"' and platform_machine=='"'"'aarch64'"'"'' 'numpy==1.19.2; python_version=='"'"'3.8'"'"' and platform_machine=='"'"'aarch64'"'"'' 'numpy>=1.20.0; python_version=='"'"'3.8'"'"' and platform_machine=='"'"'arm64'"'"' and platform_system=='"'"'Darwin'"'"'' 'numpy>=1.20.0; python_version=='"'"'3.9'"'"' and platform_machine=='"'"'arm64'"'"' and platform_system=='"'"'Darwin'"'"''
       cwd: None
  Complete output (839 lines):
  Ignoring numpy: markers 'python_version == "3.7" and (platform_machine != "arm64" or platform_system != "Darwin") and platform_machine != "aarch64"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.8" and (platform_machine != "arm64" or platform_system != "Darwin") and platform_machine != "aarch64"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.7" and platform_machine == "aarch64"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.8" and platform_machine == "aarch64"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.8" and platform_machine == "arm64" and platform_system == "Darwin"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.9" and platform_machine == "arm64" and platform_system == "Darwin"' don't match your environment
  Collecting setuptools>=51.0.0
    Using cached setuptools-58.2.0-py3-none-any.whl (946 kB)
  Collecting wheel
    Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45426>
_______________________________________

From report at bugs.python.org  Mon Oct 11 01:21:44 2021
From: report at bugs.python.org (Jimmy Alexander)
Date: Mon, 11 Oct 2021 05:21:44 +0000
Subject: [issue45426] PANDAS INSTALLATION PIP FAILED ON WINDOWS 11
In-Reply-To: <1633928925.31.0.00114589869577.issue45426@roundup.psfhosted.org>
Message-ID: <1633929704.88.0.806798838469.issue45426@roundup.psfhosted.org>


Jimmy Alexander <jagonzalezx at gmail.com> added the comment:

descarga la version 3.10 se supone es estable

pero al momento de instalar PANDAS usando PIP en el CMD de windows 11

FALLA

y empieza a buscar otras vesiones de menores de pandas para intentar instalar via pip

pero todas fallan!

----------
type:  -> compile error

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45426>
_______________________________________

From report at bugs.python.org  Mon Oct 11 02:06:02 2021
From: report at bugs.python.org (David Rajaratnam)
Date: Mon, 11 Oct 2021 06:06:02 +0000
Subject: [issue45427] importlib.readers.MultiplexedPath
Message-ID: <1633932362.03.0.000713660770349.issue45427@roundup.psfhosted.org>


New submission from David Rajaratnam <daver at gemarex.com.au>:

I'm trying to use `importlib.resources.files()`. However, I cannot work out how to properly use the `importlib.readers.MultiplexedPath()` object that is returned.

As I expect and want, the returned object is referring to a directory, but I cannot seem to simply access the value of that path. 

For a normal `pathlib.Path` object you can get a OS specific path by simply converting to the string representation (eg., 'str(pathlib.Path('/somepath') == '/somepath'). However, for the MutiplexedPath object the __str__() value is the same as the __repr__() (e.g., "MultiplexedPath('/somepath')").

It seems that this is a bug since I would expect MultiplexedPath to behave the same as pathlib.Path in this regard. In the meantime is there a way to actually access this data without stripping the prefix and suffix of this string?

----------
components: Library (Lib)
messages: 403621
nosy: daveraja
priority: normal
severity: normal
status: open
title: importlib.readers.MultiplexedPath
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45427>
_______________________________________

From report at bugs.python.org  Mon Oct 11 02:31:29 2021
From: report at bugs.python.org (Vadym Stupakov)
Date: Mon, 11 Oct 2021 06:31:29 +0000
Subject: [issue36054] On Linux,
 os.count() should read cgroup cpu.shares and cpu.cfs (CPU count
 inside docker container)
In-Reply-To: <1550681782.39.0.211832814896.issue36054@roundup.psfhosted.org>
Message-ID: <1633933889.14.0.113290402652.issue36054@roundup.psfhosted.org>


Vadym Stupakov <vadim.stupakov at gmail.com> added the comment:

> Do we have any news about this?

There is IBM effort to do this in container level, so that os.cpu_count() will return right result in container

https://www.phoronix.com/scan.php?page=news_item&px=Linux-CPU-Namespace

----------
nosy: +RedEyed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36054>
_______________________________________

From report at bugs.python.org  Mon Oct 11 03:09:53 2021
From: report at bugs.python.org (paul rubin)
Date: Mon, 11 Oct 2021 07:09:53 +0000
Subject: [issue44571] itertools: takedowhile()
In-Reply-To: <1625524408.64.0.445781965255.issue44571@roundup.psfhosted.org>
Message-ID: <1633936193.16.0.405800849008.issue44571@roundup.psfhosted.org>


paul rubin <phr-pythonbugs at nightsong.com> added the comment:

Oh wow, before_and_after will go into the itertools module per that patch?  I found this issue while looking for a way to this, but had written the following implementation:

def span(pred, xs):
    # split xs into two iterators a,b where a() is the prefix of xs             
    # that satisfies the predicate, and b() is the rest of xs.                  
    # Similar to Data.List.Span in Haskell.                                     

    ixs = iter(xs)
    t = None
    def a():
        nonlocal t
        for x in ixs:
            if pred(x): yield x
            else: break
        t = x
    def b():
        return itertools.chain([t], ixs)
    return a, b

def tspan():  # test
    xs = [1,3,5,2,4,6,8]
    def odd(x): return x%2==1
    # This should print [1,3,5] then [2,4,6,8]                                  
    for p in span(odd, xs):
        print(list(p()))

----------
nosy: +phr

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44571>
_______________________________________

From report at bugs.python.org  Mon Oct 11 03:30:08 2021
From: report at bugs.python.org (Graham Inggs)
Date: Mon, 11 Oct 2021 07:30:08 +0000
Subject: [issue45428] py_compile fails to read filenames from stdin
Message-ID: <1633937408.55.0.373736391126.issue45428@roundup.psfhosted.org>


New submission from Graham Inggs <ginggs at debian.org>:

py_compile fails to read a list of filenames to be compiled from standard input.  This is a regression in 3.10.

example

files-to-compile.txt is a text file containing hello.py and goodbye.py on separate lines.  hello.py and goodbye.py must exist.

python3.10 -m py_compile - <files-to-compile.txt
[Errno 2] No such file or directory: 'hello.py\n'

python3.9 -m py_compile - <files-to-compile.txt

python3.9 produces no output, but a __pycache__ directory is created and contains the byte-code files.

----------
components: Library (Lib)
messages: 403624
nosy: ginggs
priority: normal
pull_requests: 27164
severity: normal
status: open
title: py_compile fails to read filenames from stdin
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45428>
_______________________________________

From report at bugs.python.org  Mon Oct 11 03:45:25 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 07:45:25 +0000
Subject: [issue45415] Assert oparg < INSTR_OFFSET()
In-Reply-To: <1633721594.06.0.212064470222.issue45415@roundup.psfhosted.org>
Message-ID: <1633938325.81.0.454910327181.issue45415@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Steve:
> Also +Victor, because I think we should switch back to debug builds in CI in order to catch failed assertions before they get merged.

Ken Jin:
> So I don't see why Windows is special.

The Python test suite is way slower on Windows when Python is built in debug mode: 19 min 41 sec (debug) instead of 12 min 19 sec (release) on Windows x64: 1.6x slower.

* https://bugs.python.org/issue45115#msg401141
* https://github.com/python/cpython/pull/28181

I would prefer to not make our workflow slower. IMO it's ok to miss a few bugs in pre-commit checks, and only catch them on Windows debug buildbots. In my experience, it happens less than once per months. It's more like 2 or 3 times per year.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45415>
_______________________________________

From report at bugs.python.org  Mon Oct 11 03:46:28 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 07:46:28 +0000
Subject: [issue45415] Assert oparg < INSTR_OFFSET()
In-Reply-To: <1633721594.06.0.212064470222.issue45415@roundup.psfhosted.org>
Message-ID: <1633938388.01.0.340913345651.issue45415@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> *facepalm* on myself, for not even thinking of that. Indeed, clearing all my .pyc files fixes it.

This issue has been fixed, no? Can it be closed?

commit 5e173f5db17cbb2e3f2139a3c5ccb6b81ac59785
Author: Mark Shannon <mark at hotpy.org>
Date:   Sat Oct 9 14:17:22 2021 +0100

    Bump MAGIC_NUMBER to reflect change in JUMP_ABSOLUTE semantics. (GH-28829)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45415>
_______________________________________

From report at bugs.python.org  Mon Oct 11 03:49:54 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 07:49:54 +0000
Subject: [issue45424] ssl.SSLError: unknown error (_ssl.c:4034)
In-Reply-To: <1633879562.83.0.398124301666.issue45424@roundup.psfhosted.org>
Message-ID: <1633938594.65.0.797182717775.issue45424@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
nosy:  -vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45424>
_______________________________________

From report at bugs.python.org  Mon Oct 11 03:58:11 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 11 Oct 2021 07:58:11 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633939091.5.0.156799374553.issue45401@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27165
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/28864

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Mon Oct 11 03:58:40 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 07:58:40 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633939120.79.0.25218477324.issue45401@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27166
pull_request: https://github.com/python/cpython/pull/28865

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Mon Oct 11 03:58:59 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 07:58:59 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633939139.6.0.514292944817.issue45401@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Vinay: Oh, thanks for the fix! Using os.path.isfile() is a reasonable fix to detect if the file is a device.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Mon Oct 11 03:59:29 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Mon, 11 Oct 2021 07:59:29 +0000
Subject: [issue45426] PANDAS INSTALLATION PIP FAILED ON WINDOWS 11
In-Reply-To: <1633928925.31.0.00114589869577.issue45426@roundup.psfhosted.org>
Message-ID: <1633939169.75.0.0513219477838.issue45426@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

Please report this on the pandas bug tracker: https://github.com/pandas-dev/pandas/issues

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45426>
_______________________________________

From report at bugs.python.org  Mon Oct 11 04:00:24 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Mon, 11 Oct 2021 08:00:24 +0000
Subject: [issue45426] PANDAS INSTALLATION PIP FAILED ON WINDOWS 11
In-Reply-To: <1633928925.31.0.00114589869577.issue45426@roundup.psfhosted.org>
Message-ID: <1633939224.08.0.10359315131.issue45426@roundup.psfhosted.org>


Change by Eric V. Smith <eric at trueblade.com>:


----------
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45426>
_______________________________________

From report at bugs.python.org  Mon Oct 11 04:02:39 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 08:02:39 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633939359.73.0.496165337138.issue45401@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> $ ./python -X tracemalloc -m test -v test_logging -m test_should_not_rollover

FYI you can use -X tracemalloc=10 to get a more complete traceback.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Mon Oct 11 04:04:09 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Mon, 11 Oct 2021 08:04:09 +0000
Subject: [issue45427] importlib.readers.MultiplexedPath
In-Reply-To: <1633932362.03.0.000713660770349.issue45427@roundup.psfhosted.org>
Message-ID: <1633939449.46.0.555430139127.issue45427@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

Can you provide a short code snippet that we can run that demonstrates the problem?

Looking at the code, and not knowing much about it, maybe iterating over the paths with .iterdir() is what you want?

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45427>
_______________________________________

From report at bugs.python.org  Mon Oct 11 04:28:27 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 08:28:27 +0000
Subject: [issue45429] [Windows] time.sleep() should use
 CREATE_WAITABLE_TIMER_HIGH_RESOLUTION
Message-ID: <1633940907.8.0.793399065339.issue45429@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

In bpo-21302, the Windows implementation of time.sleep() was modified to use a waitable timer:

New changeset 58f8adfda3c2b42f654a55500e8e3a6433cb95f2 by Victor Stinner in branch 'main':
bpo-21302: time.sleep() uses waitable timer on Windows (GH-28483)
https://github.com/python/cpython/commit/58f8adfda3c2b42f654a55500e8e3a6433cb95f2

It now calls the functions:

* CreateWaitableTimerW()
* SetWaitableTimer()
* WaitForMultipleObjects()

While SetWaitableTimer() has a resolution of 100 ns, the timer has a resolution of 15.6 ms in practice.

We could use the undocumented CREATE_WAITABLE_TIMER_HIGH_RESOLUTION flag with CreateWaitableTimerEx(). See: https://bugs.python.org/issue21302#msg403550

See also:

* https://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
* https://vstinner.readthedocs.io/windows.html#time

----------
components: Library (Lib)
messages: 403631
nosy: vstinner
priority: normal
severity: normal
status: open
title: [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45429>
_______________________________________

From report at bugs.python.org  Mon Oct 11 04:29:00 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 08:29:00 +0000
Subject: [issue21302] time.sleep (floatsleep()) should use clock_nanosleep()
 on Linux
In-Reply-To: <1397851923.06.0.0550198760464.issue21302@psf.upfronthosting.co.za>
Message-ID: <1633940940.04.0.613566522737.issue21302@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> That said, using a waitable timer leaves the door open for improvement in future versions of Python. In particular, it's possible to get higher resolution in newer versions of Windows 10 and Windows 11 with CreateWaitableTimerExW() and the undocumented flag CREATE_WAITABLE_TIMER_HIGH_RESOLUTION (2).

I created bpo-45429 "[Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION".

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21302>
_______________________________________

From report at bugs.python.org  Mon Oct 11 04:29:09 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 08:29: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: <1633940949.48.0.832837752529.issue45429@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45429>
_______________________________________

From report at bugs.python.org  Mon Oct 11 04:30:28 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 08:30:28 +0000
Subject: [issue21302] time.sleep (floatsleep()) should use clock_nanosleep()
 on Linux
In-Reply-To: <1397851923.06.0.0550198760464.issue21302@psf.upfronthosting.co.za>
Message-ID: <1633941028.79.0.466624272602.issue21302@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

This issue is closed. If you consider that time.sleep() has a bug or could be enhanced, please open a new issue.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21302>
_______________________________________

From report at bugs.python.org  Mon Oct 11 04:32:14 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 08:32:14 +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: <1633941134.51.0.312747502747.issue45429@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

See also: https://groups.google.com/a/chromium.org/g/scheduler-dev/c/0GlSPYreJeY

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45429>
_______________________________________

From report at bugs.python.org  Mon Oct 11 04:38:54 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 08:38:54 +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: <1633941534.22.0.992920861995.issue45429@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

The Go programming language called timeBeginPeriod(1) to get more accurate timers. With the following change, it can now use a high resolution timer (CREATE_WAITABLE_TIMER_HIGH_RESOLUTION) to sleep:
https://go-review.googlesource.com/c/go/+/248699/

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45429>
_______________________________________

From report at bugs.python.org  Mon Oct 11 04:54:48 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 11 Oct 2021 08:54:48 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633942488.19.0.525810133399.issue45401@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 15188b115a2da815556053372c912a81a74be43b by Serhiy Storchaka in branch 'main':
bpo-45401: Fix a resource warning in test_logging (GH-28864)
https://github.com/python/cpython/commit/15188b115a2da815556053372c912a81a74be43b


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Mon Oct 11 04:56:09 2021
From: report at bugs.python.org (miss-islington)
Date: Mon, 11 Oct 2021 08:56:09 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633942569.05.0.018280269487.issue45401@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27168
pull_request: https://github.com/python/cpython/pull/28867

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Mon Oct 11 04:56:04 2021
From: report at bugs.python.org (miss-islington)
Date: Mon, 11 Oct 2021 08:56:04 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633942564.57.0.385908904182.issue45401@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27167
pull_request: https://github.com/python/cpython/pull/28866

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Mon Oct 11 05:11:00 2021
From: report at bugs.python.org (Mark Shannon)
Date: Mon, 11 Oct 2021 09:11:00 +0000
Subject: [issue45430] PEP 523 no longer works
Message-ID: <1633943460.16.0.196975597767.issue45430@roundup.psfhosted.org>


New submission from Mark Shannon <mark at hotpy.org>:

https://github.com/python/cpython/pull/28488 breaks PEP 523 as it bypasses _PyEval_EvalFrame.

The fix is simple, we need to check tstate->interp->eval_frame.

----------
assignee: Mark.Shannon
components: Interpreter Core
messages: 403637
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: PEP 523 no longer works
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45430>
_______________________________________

From report at bugs.python.org  Mon Oct 11 05:15:19 2021
From: report at bugs.python.org (paul rubin)
Date: Mon, 11 Oct 2021 09:15:19 +0000
Subject: [issue44571] itertools: takedowhile()
In-Reply-To: <1625524408.64.0.445781965255.issue44571@roundup.psfhosted.org>
Message-ID: <1633943719.78.0.127001017371.issue44571@roundup.psfhosted.org>


paul rubin <phr-pythonbugs at nightsong.com> added the comment:

Bah, the above doesn't work in the cases where the iterator is empty or (different symptom) where the tail part is empty.  Rather than posting a corrected version (unless someone wants it) I'll just say not to use that code fragment, but that the intended API still looks reasonable.  I do support having some kind of solution but don't want to keep stretching out an already closed discussion unless people think there is more to say.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44571>
_______________________________________

From report at bugs.python.org  Mon Oct 11 05:26:07 2021
From: report at bugs.python.org (Mark Shannon)
Date: Mon, 11 Oct 2021 09:26:07 +0000
Subject: [issue45430] PEP 523 no longer works
In-Reply-To: <1633943460.16.0.196975597767.issue45430@roundup.psfhosted.org>
Message-ID: <1633944367.66.0.923731998271.issue45430@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
keywords: +patch
pull_requests: +27169
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28871

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45430>
_______________________________________

From report at bugs.python.org  Mon Oct 11 05:50:03 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 09:50:03 +0000
Subject: [issue45431] [C API] Rename CFrame or hide it to only export names
 starting with Py
Message-ID: <1633945803.57.0.940910379519.issue45431@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

#include <Python.h> should only define names which start with "Py" (Py, _Py, PY, _PY), but it now defines a structure called "CFrame" in Include/cpython/pystate.h.

We should either make the whole PyThreadState structure private (move it to the internal C API), or rename CFrame (to PyCFrame?).

----------
components: C API
messages: 403639
nosy: Mark.Shannon, vstinner
priority: normal
severity: normal
status: open
title: [C API] Rename CFrame or hide it to only export names starting with Py
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45431>
_______________________________________

From report at bugs.python.org  Mon Oct 11 05:50:27 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 09:50:27 +0000
Subject: [issue45431] [C API] Rename CFrame or hide it to only export names
 starting with Py
In-Reply-To: <1633945803.57.0.940910379519.issue45431@roundup.psfhosted.org>
Message-ID: <1633945827.09.0.207678900539.issue45431@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

See also bpo-45316: [C API] Functions not exported with PyAPI_FUNC().

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45431>
_______________________________________

From report at bugs.python.org  Mon Oct 11 05:50:40 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 09:50:40 +0000
Subject: [issue45316] [C API] Functions not exported with PyAPI_FUNC()
In-Reply-To: <1632903484.87.0.875373224779.issue45316@roundup.psfhosted.org>
Message-ID: <1633945840.48.0.373601399027.issue45316@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

See also bpo-45431: [C API] Rename CFrame or hide it to only export names starting with Py.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45316>
_______________________________________

From report at bugs.python.org  Mon Oct 11 05:52:37 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 09:52:37 +0000
Subject: [issue45431] [C API] Rename CFrame or hide it to only export names
 starting with Py
In-Reply-To: <1633945803.57.0.940910379519.issue45431@roundup.psfhosted.org>
Message-ID: <1633945957.18.0.98424981445.issue45431@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

See also the old isssue with "READONLY": bpo-2897 "PyMemberDef missing in limited API / Deprecate structmember.h".

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45431>
_______________________________________

From report at bugs.python.org  Mon Oct 11 06:01:17 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 10:01:17 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633946477.05.0.642216734084.issue45401@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset ac421c348bf422f9a0d85fe0a1de3fa3f4886650 by Miss Islington (bot) in branch '3.9':
bpo-45401: Change shouldRollover() methods to only rollover regular f? (GH-28822) (#28866)
https://github.com/python/cpython/commit/ac421c348bf422f9a0d85fe0a1de3fa3f4886650


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Mon Oct 11 06:01:17 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 10:01:17 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633946477.89.0.374749356841.issue45401@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 5aca34f17c4baf8e4882a7e8a827cff06ac6ef25 by Miss Islington (bot) in branch '3.10':
bpo-45401: Change shouldRollover() methods to only rollover regular f? (GH-28822) (#28867)
https://github.com/python/cpython/commit/5aca34f17c4baf8e4882a7e8a827cff06ac6ef25


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Mon Oct 11 06:01:51 2021
From: report at bugs.python.org (miss-islington)
Date: Mon, 11 Oct 2021 10:01:51 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633946511.01.0.729921853494.issue45401@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27170
pull_request: https://github.com/python/cpython/pull/28872

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Mon Oct 11 06:02:06 2021
From: report at bugs.python.org (miss-islington)
Date: Mon, 11 Oct 2021 10:02:06 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1633946526.3.0.625284787303.issue45401@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27171
pull_request: https://github.com/python/cpython/pull/28873

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Mon Oct 11 06:03:23 2021
From: report at bugs.python.org (David Rajaratnam)
Date: Mon, 11 Oct 2021 10:03:23 +0000
Subject: [issue45427] importlib.readers.MultiplexedPath
In-Reply-To: <1633932362.03.0.000713660770349.issue45427@roundup.psfhosted.org>
Message-ID: <1633946603.15.0.078947601516.issue45427@roundup.psfhosted.org>


David Rajaratnam <daver at gemarex.com.au> added the comment:

Thanks for the quick response. I think the attached file shows the issue. 

In the directory where you download and run this file create a sub-directory 'data'. Then running the file creates the output (note: I've truncated the path name):

> Traverse data: MultiplexedPath('<<abspath-deleted>>/data') (<class 'importlib.readers.MultiplexedPath'>)

I think the idea behind MultiplexedPath() is that it merges together multiple base/root directories so even though in this case it is a single path it wouldn't necessarily be the case in general. So while it makes sense that for some MultiplexedPath object X that str(X) isn't itself a proper directory path, however, there seems to be no method/property to access these root paths.

Note: Traverable.iterdir() iterates over the files/sub-directories in the root(s) so doesn't return the root path(s) themselves.

A further note. If you add a file `data/__init__.py` then data is now a package and running the code this time returns a PosixPath object (on a posix system): 

> Traverse data: <<abspath-deleted>>/data (<class 'pathlib.PosixPath'>)
> X: <<abspath-deleted>>/data/__init__.py (<class 'pathlib.PosixPath'>)
> X: <<abspath-deleted>>/data/__pycache__ (<class 'pathlib.PosixPath'>)

----------
Added file: https://bugs.python.org/file50342/navigate.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45427>
_______________________________________

From report at bugs.python.org  Mon Oct 11 06:42:09 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 11 Oct 2021 10:42:09 +0000
Subject: [issue42253] xml.dom.minidom.rst missing standalone documentation
In-Reply-To: <1604412182.71.0.862314326589.issue42253@roundup.psfhosted.org>
Message-ID: <1633948929.25.0.770687220553.issue42253@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset c7e81fcf9548ab6a0a4828d6f2db9ece9d204826 by Jens Diemer in branch 'main':
bpo-42253: Update xml.dom.minidom.rst (GH-23126)
https://github.com/python/cpython/commit/c7e81fcf9548ab6a0a4828d6f2db9ece9d204826


----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42253>
_______________________________________

From report at bugs.python.org  Mon Oct 11 06:42:18 2021
From: report at bugs.python.org (miss-islington)
Date: Mon, 11 Oct 2021 10:42:18 +0000
Subject: [issue42253] xml.dom.minidom.rst missing standalone documentation
In-Reply-To: <1604412182.71.0.862314326589.issue42253@roundup.psfhosted.org>
Message-ID: <1633948938.62.0.163052034062.issue42253@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27173
pull_request: https://github.com/python/cpython/pull/28875

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42253>
_______________________________________

From report at bugs.python.org  Mon Oct 11 06:42:13 2021
From: report at bugs.python.org (miss-islington)
Date: Mon, 11 Oct 2021 10:42:13 +0000
Subject: [issue42253] xml.dom.minidom.rst missing standalone documentation
In-Reply-To: <1604412182.71.0.862314326589.issue42253@roundup.psfhosted.org>
Message-ID: <1633948933.82.0.229593266364.issue42253@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
keywords: +patch
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27172
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28874

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42253>
_______________________________________

From report at bugs.python.org  Mon Oct 11 06:46:26 2021
From: report at bugs.python.org (Ronald Oussoren)
Date: Mon, 11 Oct 2021 10:46:26 +0000
Subject: [issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6
In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org>
Message-ID: <1633949186.79.0.00948936227342.issue44828@roundup.psfhosted.org>


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

Marc, thanks for the update.

Will there be a Tcl/Tk release soonish that includes this fix? 

Alternatively, is there patch that we can apply to the latest release when building the copy of Tk included with the installers?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Mon Oct 11 06:50:26 2021
From: report at bugs.python.org (Mark Shannon)
Date: Mon, 11 Oct 2021 10:50:26 +0000
Subject: [issue45431] [C API] Rename CFrame or hide it to only export names
 starting with Py
In-Reply-To: <1633945803.57.0.940910379519.issue45431@roundup.psfhosted.org>
Message-ID: <1633949426.53.0.809500045436.issue45431@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:

Struct names aren't exported as symbols.

$ nm ./python | grep CFrame

So, I assume that are worried about name clashes for code that has
#include "Python.h".


Isn't the threadstate struct supposed to be opaque?
If so, then shouldn't it be moved to an internal header?


I don't want to add a "Py" prefix to the name of the CFrame struct.
The names of the various frames are confusing enough, without adding a "Py" prefix to something that isn't a Python frame.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45431>
_______________________________________

From report at bugs.python.org  Mon Oct 11 06:51:00 2021
From: report at bugs.python.org (Mark Shannon)
Date: Mon, 11 Oct 2021 10:51:00 +0000
Subject: [issue45430] PEP 523 no longer works
In-Reply-To: <1633943460.16.0.196975597767.issue45430@roundup.psfhosted.org>
Message-ID: <1633949460.62.0.117057512275.issue45430@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45430>
_______________________________________

From report at bugs.python.org  Mon Oct 11 07:02:09 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 11:02:09 +0000
Subject: [issue45431] [C API] Rename CFrame or hide it to only export names
 starting with Py
In-Reply-To: <1633945803.57.0.940910379519.issue45431@roundup.psfhosted.org>
Message-ID: <1633950129.65.0.628319065764.issue45431@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Mark Shannon:
> Struct names aren't exported as symbols.

Right.

> So, I assume that are worried about name clashes for code that has
> #include "Python.h".

Right :-)

> Isn't the threadstate struct supposed to be opaque?

Technically, it's public. I'm working on making it opaque in bpo-39947.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45431>
_______________________________________

From report at bugs.python.org  Mon Oct 11 07:05:42 2021
From: report at bugs.python.org (Julien Palard)
Date: Mon, 11 Oct 2021 11:05:42 +0000
Subject: [issue45411] Add Mimetypes for Subtitle Files
In-Reply-To: <1633692340.99.0.107401828025.issue45411@roundup.psfhosted.org>
Message-ID: <1633950342.29.0.860664241846.issue45411@roundup.psfhosted.org>


Julien Palard <julien+python at palard.fr> added the comment:


New changeset d74da9e140441135a4eddaef9a37f00f32579038 by Josephine-Marie in branch 'main':
bpo-45411: Update mimetypes.py (GH-28792)
https://github.com/python/cpython/commit/d74da9e140441135a4eddaef9a37f00f32579038


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45411>
_______________________________________

From report at bugs.python.org  Mon Oct 11 07:08:19 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Mon, 11 Oct 2021 11:08:19 +0000
Subject: [issue20028] csv: Confusing error message when giving invalid
 quotechar in initializing dialect
In-Reply-To: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
Message-ID: <1633950499.89.0.142746634211.issue20028@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset ab62051152cb24470056ffaeb9107c8b4311375e by Dong-hee Na in branch 'main':
bpo-20028: Empty escapechar/quotechar is not allowed for csv.Dialect (GH-28833)
https://github.com/python/cpython/commit/ab62051152cb24470056ffaeb9107c8b4311375e


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20028>
_______________________________________

From report at bugs.python.org  Mon Oct 11 07:09:03 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Mon, 11 Oct 2021 11:09:03 +0000
Subject: [issue20028] csv: Confusing error message when giving invalid
 quotechar in initializing dialect
In-Reply-To: <1387514294.66.0.0650917642902.issue20028@psf.upfronthosting.co.za>
Message-ID: <1633950543.17.0.623204405457.issue20028@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20028>
_______________________________________

From report at bugs.python.org  Mon Oct 11 08:37:05 2021
From: report at bugs.python.org (Marc Culler)
Date: Mon, 11 Oct 2021 12:37:05 +0000
Subject: [issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6
In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org>
Message-ID: <1633955825.77.0.203312004187.issue44828@roundup.psfhosted.org>


Marc Culler <marc.culler at gmail.com> added the comment:

Hi Ronald,
There is no calendar scheduling for Tk releases.  Don Porter decides when they happen.  But I think we are due for another one soonish.  In case it doesn't happen before the next Python release I will attach the patch file for commit a32262e9.  (Note that this is subject to change - I still need to test on 10.14.) I believe that this patch is completely self-contained and can be applied to the 8.6.11 release.

(Hint: Tk uses fossil as its SCM system.  On a fossil timeline, clicking any two nodes generates their diff.  The Tk timeline is at https://core.tcl-lang.org/tk/timeline)

----------
keywords: +patch
Added file: https://bugs.python.org/file50343/openfile.patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Mon Oct 11 08:55:14 2021
From: report at bugs.python.org (Randolf Scholz)
Date: Mon, 11 Oct 2021 12:55:14 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1633956914.04.0.414158594898.issue45356@roundup.psfhosted.org>


Randolf Scholz <randolf.scholz at gmail.com> added the comment:

Dear Raymond,

I think decorator chaining is a very useful concept. At the very least, if all decorators are functional (following the `functools.wraps` recipe), things work out great -- we even get associativity of function composition if things are done properly!

The question is: can we get similar behaviour when allowing decoration with stateful objects, i.e. classes? This seems a lot more difficult. At the very least, in the case of `@classmethod` I think one can formulate a straightforward desiderata:

### Expectation

- `classmethod(property)` should still be a `property`!
- More generally: `classmethod(decorated)` should always be a subclass of `decorated`!

Using your pure-python versions of property / classmethod from <https://docs.python.org/3.9/howto/descriptor.html>, I was able to write down a variant of `classmethod` that works mostly as expected in conjunction with `property`. The main idea is rewrite the `classmethod` to dynamically be a subclass of whatever it wrapped; roughly:

```python
def ClassMethod(func):
  class Wrapped(type(func)):
      def __get__(self, obj, cls=None):
          if cls is None:
              cls = type(obj)
          if hasattr(type(self.__func__), '__get__'):
              return self.__func__.__get__(cls)
          return MethodType(self.__func__, cls)
  return Wrapped(func)
```

I attached a full MWE. Unfortunately, this doesn't fix the `help` bug, though it is kind of weird because the decorated class-property now correctly shows up under the "Readonly properties" section. Maybe `help` internally checks `isinstance(cls.func, property)` at some point instead of `isinstance(cls.__dict__["func"], property)`?

### Some further Proposals / Ideas

1. Decorators could always have an attribute that points to whatever object they wrapped. For the sake of argument, let's take `__func__`.
   ? raise Error when typing `@decorator` if `not hasattr(decorated, "__func__")`
   ? Regular functions/methods should probably by default have `__func__` as a pointer to themselves?
   ? This could hae several subsidiary benefits, for example, currently, how would you implement a pair of decorators `@print_args_and_kwargs` and `@time_execution` such that both of them only apply to the base function, no matter the order in which they are decorating it? The proposed `__func__` convention would make this very easy, almost trivial.
2. `type.__setattr__` could support checking if `attr` already exists and has `__set__` implemented.
  ? This would allow true class-properties with `getter`, `setter` and `deleter`. I provide a MWE here: <https://mail.google.com/mail/u/0/#label/Python+Ideas/FMfcgzGlkPRbJVRkHHtkRPhMCxNsFHpl>
3. I think an argument can be made that it would be really, really cool if `@` could become a general purpose function composition operator?
  ? This is already kind of what it is doing with decorators
  ? This is already exacltly what it is doing in numpy -- matrix multiplication \*is\* the composition of linear functions.
  ? In fact this is a frequently requested feature on python-ideas!
  ? But here is probably the wrong place to discuss this.

----------
Added file: https://bugs.python.org/file50344/ClassPropertyIdea.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Mon Oct 11 10:03:09 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Mon, 11 Oct 2021 14:03: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: <1633960989.89.0.393107246855.issue45429@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45429>
_______________________________________

From report at bugs.python.org  Mon Oct 11 10:25:34 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Mon, 11 Oct 2021 14:25:34 +0000
Subject: [issue36054] On Linux,
 os.count() should read cgroup cpu.shares and cpu.cfs (CPU count
 inside docker container)
In-Reply-To: <1550681782.39.0.211832814896.issue36054@roundup.psfhosted.org>
Message-ID: <1633962334.77.0.772343770176.issue36054@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

> There is IBM effort to do this in container level, so that os.cpu_count() will return right result in container

Good news!

----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36054>
_______________________________________

From report at bugs.python.org  Mon Oct 11 10:32:35 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Mon, 11 Oct 2021 14:32:35 +0000
Subject: [issue45373] ./configure --enable-optimizations should enable LTO
In-Reply-To: <1633426345.9.0.0201314807782.issue45373@roundup.psfhosted.org>
Message-ID: <1633962755.29.0.541961364552.issue45373@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45373>
_______________________________________

From report at bugs.python.org  Mon Oct 11 10:57:52 2021
From: report at bugs.python.org (Rahul Lakshmanan)
Date: Mon, 11 Oct 2021 14:57:52 +0000
Subject: [issue45424] ssl.SSLError: unknown error (_ssl.c:4034)
In-Reply-To: <1633879562.83.0.398124301666.issue45424@roundup.psfhosted.org>
Message-ID: <1633964272.67.0.287153815038.issue45424@roundup.psfhosted.org>


Rahul Lakshmanan <rahullak at gmail.com> added the comment:

Thanks for the answer!

When I upgraded Python to 3.8.12, the issue went away.

Can be closed.

----------
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45424>
_______________________________________

From report at bugs.python.org  Mon Oct 11 11:38:52 2021
From: report at bugs.python.org (Paul)
Date: Mon, 11 Oct 2021 15:38:52 +0000
Subject: [issue45432] sys.argv is processed strangely under Windows
Message-ID: <1633966732.25.0.191303680489.issue45432@roundup.psfhosted.org>


New submission from Paul <paulhippler21 at gmail.com>:

here is my test file:
'''
import sys
print(sys.argv)
'''

when I then try 'python test.py ^test' the ^ character is stripped away, this doesn't happen on Linux. This also doesn't happen if I put ^test in quotes (only ") the ' quotes don't work

----------
components: Windows
messages: 403656
nosy: paul.moore, paulhippler21, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: sys.argv is processed strangely under Windows
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45432>
_______________________________________

From report at bugs.python.org  Mon Oct 11 11:49:15 2021
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 11 Oct 2021 15:49:15 +0000
Subject: [issue45432] sys.argv is processed strangely under Windows
In-Reply-To: <1633966732.25.0.191303680489.issue45432@roundup.psfhosted.org>
Message-ID: <1633967355.75.0.667388853338.issue45432@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:

This is Windows behavior, not Python; ^ is an escape character in cmd.exe.  Try for example `echo test ^| python -c "print('hello world')"` with and without the ^ character.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45432>
_______________________________________

From report at bugs.python.org  Mon Oct 11 11:57:24 2021
From: report at bugs.python.org (Paul)
Date: Mon, 11 Oct 2021 15:57:24 +0000
Subject: [issue45432] sys.argv is processed strangely under Windows
In-Reply-To: <1633966732.25.0.191303680489.issue45432@roundup.psfhosted.org>
Message-ID: <1633967844.51.0.337909829589.issue45432@roundup.psfhosted.org>


Paul <paulhippler21 at gmail.com> added the comment:

oh ok. thx

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45432>
_______________________________________

From report at bugs.python.org  Mon Oct 11 11:59:48 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 15:59:48 +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: <1633967988.89.0.793668947634.issue45429@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

See also bpo-19007: "precise time.time() under Windows 8: use GetSystemTimePreciseAsFileTime".

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45429>
_______________________________________

From report at bugs.python.org  Mon Oct 11 12:18:42 2021
From: report at bugs.python.org (Mark Dickinson)
Date: Mon, 11 Oct 2021 16:18:42 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633969122.47.0.301048506347.issue45412@roundup.psfhosted.org>


Mark Dickinson <dickinsm at gmail.com> added the comment:

+1 for the removals. (We should fix #44970 too, but as you say that's a separate issue. And I suspect that the Py_ADJUST_ERANGE1() use for float pow should be replaced, too.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Mon Oct 11 13:49:47 2021
From: report at bugs.python.org (Guy DeStefano)
Date: Mon, 11 Oct 2021 17:49:47 +0000
Subject: [issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6
In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org>
Message-ID: <1633974587.24.0.366678609236.issue44828@roundup.psfhosted.org>


Guy DeStefano <guydestefano at gmail.com> added the comment:

Please help me.  Am new to Python, and don't know enough to post here, but I will try.  Have written a couple of programs that use tkinter, especially tkinter.filedialog.askopenfilenames, and as everyone else mine has quit working since Monterey. I have a macOS Monterey version beta        ( 21A5543b ).  Am using Python3 v3.10.0.  Have tried using v3.11.0a1, but could not even compile, says that import ( PIL ) does not exist.  Put back v 3.10.0 and am back to no filedialog.  Is Apple attempting to do away with the file API.  Just asking. Thank you.

----------
nosy: +guydestefano
versions:  -Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Mon Oct 11 14:10:12 2021
From: report at bugs.python.org (Marc Culler)
Date: Mon, 11 Oct 2021 18:10:12 +0000
Subject: [issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6
In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org>
Message-ID: <1633975812.03.0.5638054957.issue44828@roundup.psfhosted.org>


Marc Culler <marc.culler at gmail.com> added the comment:

No, Apple is not going to do away with their NSOpenPanel.  There is always some churn when they release a new OS.  Subtle changes to APIs can occur with no warning and no documentation.  Sometimes they are bugs. Sometimes they disappear when the OS is released.  Sometimes they are permanent.  I would not recommend using a beta version of the OS to develop your tkinter app.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Mon Oct 11 14:11:14 2021
From: report at bugs.python.org (Mike Gilbert)
Date: Mon, 11 Oct 2021 18:11:14 +0000
Subject: [issue45433] libpython should not be linked with libcrypt
Message-ID: <1633975874.59.0.522297770504.issue45433@roundup.psfhosted.org>


New submission from Mike Gilbert <floppymaster at gmail.com>:

In https://bugs.python.org/issue44751, crypt.h was removed from Python.h. This would imply that libpython is not meant to expose any crypt-related symbols.

In fact, it looks like libpython does not use crypt() or crypt_r() at all. These are only used by cryptmodule.

In configure.ac, we have this this logic to determine if crypt_r() is available:

```
# We search for both crypt and crypt_r as one or the other may be defined
# This gets us our -lcrypt in LIBS when required on the target platform.
AC_SEARCH_LIBS(crypt, crypt)
AC_SEARCH_LIBS(crypt_r, crypt)

AC_CHECK_FUNC(crypt_r,
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE  /* Required for crypt_r()'s prototype in glibc. */
#include <crypt.h>
]], [[
struct crypt_data d;
char *r = crypt_r("", "", &d);
]])],
    [AC_DEFINE(HAVE_CRYPT_R, 1, [Define if you have the crypt_r() function.])],
    [])
)
```

The AC_SEARCH_LIBS macro adds "-lcrypt" to LIBS, and this gets passed down to the link command for libpython. This is probably not intentional.

The HAVE_CRYPT_R value is used in _cryptmodule.c. setup.py performs its own check for libcrypt when building the module.

I think the value of LIBS should be saved before the AC_SEARCH_LIBS calls and restored after the AC_CHECK_FUNC call. I have tested this locally on Gentoo Linux, and it seems to work fine.

I will work on a pull request.

----------
components: C API
messages: 403663
nosy: floppymaster
priority: normal
severity: normal
status: open
title: libpython should not be linked with libcrypt
type: compile error
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45433>
_______________________________________

From report at bugs.python.org  Mon Oct 11 14:14:16 2021
From: report at bugs.python.org (Guy DeStefano)
Date: Mon, 11 Oct 2021 18:14:16 +0000
Subject: [issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6
In-Reply-To: <1633975812.03.0.5638054957.issue44828@roundup.psfhosted.org>
Message-ID: <CAOAaxSoDsq93eEAoSGZgJ0ctGgoQXnWst2YzJHo0fufb17pfCA@mail.gmail.com>


Guy DeStefano <guydestefano at gmail.com> added the comment:

Thank you very
Guy DeStefano

On Mon, Oct 11, 2021 at 2:10 PM Marc Culler <report at bugs.python.org> wrote:

>
> Marc Culler <marc.culler at gmail.com> added the comment:
>
> No, Apple is not going to do away with their NSOpenPanel.  There is always
> some churn when they release a new OS.  Subtle changes to APIs can occur
> with no warning and no documentation.  Sometimes they are bugs. Sometimes
> they disappear when the OS is released.  Sometimes they are permanent.  I
> would not recommend using a beta version of the OS to develop your tkinter
> app.
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue44828>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Mon Oct 11 14:15:48 2021
From: report at bugs.python.org (Guy DeStefano)
Date: Mon, 11 Oct 2021 18:15:48 +0000
Subject: [issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6
In-Reply-To: <1633975812.03.0.5638054957.issue44828@roundup.psfhosted.org>
Message-ID: <CAOAaxSpHpodqNOxe=nzYN_q+MGCTarj7VT=XrTWoKmKO0uurCg@mail.gmail.com>


Guy DeStefano <guydestefano at gmail.com> added the comment:

Thank you very much for the reply. Sorry for previous text.
Guy DeStefano

On Mon, Oct 11, 2021 at 2:10 PM Marc Culler <report at bugs.python.org> wrote:

>
> Marc Culler <marc.culler at gmail.com> added the comment:
>
> No, Apple is not going to do away with their NSOpenPanel.  There is always
> some churn when they release a new OS.  Subtle changes to APIs can occur
> with no warning and no documentation.  Sometimes they are bugs. Sometimes
> they disappear when the OS is released.  Sometimes they are permanent.  I
> would not recommend using a beta version of the OS to develop your tkinter
> app.
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue44828>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Mon Oct 11 14:22:48 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Mon, 11 Oct 2021 18:22:48 +0000
Subject: [issue45253] mimetypes cannot detect mime of mka files
In-Reply-To: <1632210548.56.0.352982458661.issue45253@roundup.psfhosted.org>
Message-ID: <1633976568.42.0.602608697055.issue45253@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

mkv (matroska) is not registered with IANA here: http://www.iana.org/assignments/media-types/media-types.xhtml

Therefore according to the comment in mimetypes.py, it should not be added.

Also note that .mkv is also not in mimetypes.py, so it's being loaded from your system's mime types, so if you want .mka to work as well, make sure it's registered on your system rather than in Python's mimetypes.py .

I will close this as not a bug, please comment here if you think it should stay open.

----------
nosy: +andrei.avk

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45253>
_______________________________________

From report at bugs.python.org  Mon Oct 11 14:23:07 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Mon, 11 Oct 2021 18:23:07 +0000
Subject: [issue45253] mimetypes cannot detect mime of mka files
In-Reply-To: <1632210548.56.0.352982458661.issue45253@roundup.psfhosted.org>
Message-ID: <1633976587.1.0.465218174217.issue45253@roundup.psfhosted.org>


Change by Andrei Kulakov <andrei.avk at gmail.com>:


----------
nosy: +kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45253>
_______________________________________

From report at bugs.python.org  Mon Oct 11 14:23:24 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Mon, 11 Oct 2021 18:23:24 +0000
Subject: [issue45253] mimetypes cannot detect mime of mka files
In-Reply-To: <1632210548.56.0.352982458661.issue45253@roundup.psfhosted.org>
Message-ID: <1633976604.58.0.882511317739.issue45253@roundup.psfhosted.org>


Change by Andrei Kulakov <andrei.avk at gmail.com>:


----------
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45253>
_______________________________________

From report at bugs.python.org  Mon Oct 11 14:24:11 2021
From: report at bugs.python.org (Ned Deily)
Date: Mon, 11 Oct 2021 18:24:11 +0000
Subject: [issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6
In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org>
Message-ID: <1633976651.36.0.298671055353.issue44828@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

@Guy, thanks for your interest but in the future please don't use the issue tracker as a help forum. There are lots of places to ask about such matters; https://www.python.org/about/help/ has a good list of resources and, among the Python-specific mailing lists at https://www.python.org/about/help/, there are ones specifically for Python usage on macOS (https://mail.python.org/mailman/listinfo/pythonmac-sig) and Tkinter usage (https://mail.python.org/mailman/listinfo/tkinter-discuss).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Mon Oct 11 14:31:07 2021
From: report at bugs.python.org (Guy DeStefano)
Date: Mon, 11 Oct 2021 18:31:07 +0000
Subject: [issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6
In-Reply-To: <1633976651.36.0.298671055353.issue44828@roundup.psfhosted.org>
Message-ID: <CAOAaxSr0ZGDNqPgtHLhqjfRPLzug3w=YJSbOW1iMPwN4NEphUg@mail.gmail.com>


Guy DeStefano <guydestefano at gmail.com> added the comment:

I appreciate the information, In the future I will do as is stated.  Thanks
for the reply.
Guy DeStefano

On Mon, Oct 11, 2021 at 2:24 PM Ned Deily <report at bugs.python.org> wrote:

>
> Ned Deily <nad at python.org> added the comment:
>
> @Guy, thanks for your interest but in the future please don't use the
> issue tracker as a help forum. There are lots of places to ask about such
> matters; https://www.python.org/about/help/ has a good list of resources
> and, among the Python-specific mailing lists at
> https://www.python.org/about/help/, there are ones specifically for
> Python usage on macOS (
> https://mail.python.org/mailman/listinfo/pythonmac-sig) and Tkinter usage
> (https://mail.python.org/mailman/listinfo/tkinter-discuss).
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue44828>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Mon Oct 11 14:54:52 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 18:54:52 +0000
Subject: [issue45351] asyncio doc: List all sockets in TCP echo server using
 streams
In-Reply-To: <1633262301.08.0.953751090869.issue45351@roundup.psfhosted.org>
Message-ID: <1633978492.33.0.353552476349.issue45351@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 659812b451aefe1f0e5f83540296519a5fb8f313 by Olaf van der Spek in branch 'main':
bpo-45351, asyncio: Enhance echo server example, print all addresses (GH-28828)
https://github.com/python/cpython/commit/659812b451aefe1f0e5f83540296519a5fb8f313


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45351>
_______________________________________

From report at bugs.python.org  Mon Oct 11 14:56:06 2021
From: report at bugs.python.org (miss-islington)
Date: Mon, 11 Oct 2021 18:56:06 +0000
Subject: [issue45351] asyncio doc: List all sockets in TCP echo server using
 streams
In-Reply-To: <1633262301.08.0.953751090869.issue45351@roundup.psfhosted.org>
Message-ID: <1633978566.62.0.413690725069.issue45351@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27175
pull_request: https://github.com/python/cpython/pull/28880

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45351>
_______________________________________

From report at bugs.python.org  Mon Oct 11 14:56:01 2021
From: report at bugs.python.org (miss-islington)
Date: Mon, 11 Oct 2021 18:56:01 +0000
Subject: [issue45351] asyncio doc: List all sockets in TCP echo server using
 streams
In-Reply-To: <1633262301.08.0.953751090869.issue45351@roundup.psfhosted.org>
Message-ID: <1633978561.08.0.73928456409.issue45351@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +27174
pull_request: https://github.com/python/cpython/pull/28879

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45351>
_______________________________________

From report at bugs.python.org  Mon Oct 11 15:00:29 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 19:00:29 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633978829.44.0.155359648868.issue45412@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 2f92e2a590f0e5d2d3093549f5af9a4a1889eb5a by Victor Stinner in branch 'main':
bpo-45412: Remove Py_SET_ERRNO_ON_MATH_ERROR() macro (GH-28820)
https://github.com/python/cpython/commit/2f92e2a590f0e5d2d3093549f5af9a4a1889eb5a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Mon Oct 11 15:02:14 2021
From: report at bugs.python.org (Mike Gilbert)
Date: Mon, 11 Oct 2021 19:02:14 +0000
Subject: [issue45433] libpython should not be linked with libcrypt
In-Reply-To: <1633975874.59.0.522297770504.issue45433@roundup.psfhosted.org>
Message-ID: <1633978934.27.0.724480865656.issue45433@roundup.psfhosted.org>


Change by Mike Gilbert <floppymaster at gmail.com>:


----------
keywords: +patch
pull_requests: +27176
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28881

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45433>
_______________________________________

From report at bugs.python.org  Mon Oct 11 15:13:30 2021
From: report at bugs.python.org (Stefano Rivera)
Date: Mon, 11 Oct 2021 19:13:30 +0000
Subject: [issue45428] py_compile fails to read filenames from stdin
In-Reply-To: <1633937408.55.0.373736391126.issue45428@roundup.psfhosted.org>
Message-ID: <1633979610.34.0.829681665122.issue45428@roundup.psfhosted.org>


Change by Stefano Rivera <python at rivera.za.net>:


----------
nosy: +stefanor

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45428>
_______________________________________

From report at bugs.python.org  Mon Oct 11 15:34:57 2021
From: report at bugs.python.org (miss-islington)
Date: Mon, 11 Oct 2021 19:34:57 +0000
Subject: [issue45351] asyncio doc: List all sockets in TCP echo server using
 streams
In-Reply-To: <1633262301.08.0.953751090869.issue45351@roundup.psfhosted.org>
Message-ID: <1633980897.67.0.160564277753.issue45351@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 320084fe7de90319928d8f3e597d5bca04db13f3 by Miss Islington (bot) in branch '3.9':
bpo-45351, asyncio: Enhance echo server example, print all addresses (GH-28828)
https://github.com/python/cpython/commit/320084fe7de90319928d8f3e597d5bca04db13f3


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45351>
_______________________________________

From report at bugs.python.org  Mon Oct 11 15:34:57 2021
From: report at bugs.python.org (miss-islington)
Date: Mon, 11 Oct 2021 19:34:57 +0000
Subject: [issue45351] asyncio doc: List all sockets in TCP echo server using
 streams
In-Reply-To: <1633262301.08.0.953751090869.issue45351@roundup.psfhosted.org>
Message-ID: <1633980897.44.0.057918058685.issue45351@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset bb4f885892be0c337db3a81ef2936be0b3855de3 by Miss Islington (bot) in branch '3.10':
bpo-45351, asyncio: Enhance echo server example, print all addresses (GH-28828)
https://github.com/python/cpython/commit/bb4f885892be0c337db3a81ef2936be0b3855de3


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45351>
_______________________________________

From report at bugs.python.org  Mon Oct 11 15:35:21 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 19:35:21 +0000
Subject: [issue45351] asyncio doc: List all sockets in TCP echo server using
 streams
In-Reply-To: <1633262301.08.0.953751090869.issue45351@roundup.psfhosted.org>
Message-ID: <1633980921.03.0.0165084459073.issue45351@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Thanks Olaf van der Spek, I merged your PR and backported it to 3.9 and 3.10 branches.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45351>
_______________________________________

From report at bugs.python.org  Mon Oct 11 15:36:50 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 19:36:50 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633981010.82.0.681140302471.issue45412@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27177
pull_request: https://github.com/python/cpython/pull/28882

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:04:50 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 20:04:50 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633982690.72.0.511170308812.issue45412@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> +1 for the removals. (We should fix #44970 too, but as you say that's a separate issue. And I suspect that the Py_ADJUST_ERANGE1() use for float pow should be replaced, too.)

Well, it's scary of use functions which are documented as:

 * Caution:
 *    This isn't reliable.  See Py_OVERFLOWED comments.
 *    X and Y may be evaluated more than once.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:07:13 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 20:07:13 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633982833.49.0.628158991308.issue45412@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27178
pull_request: https://github.com/python/cpython/pull/28884

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:08:05 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 20:08:05 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
Message-ID: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

I would like to remove #include <stdlib.h> from Python.h, and make Python.h smaller.

----------
components: C API
messages: 403675
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Clean-up the Python.h header file
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:08:56 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 20:08:56 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633982936.72.0.899521803002.issue45412@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

>  *    This isn't reliable.  See Py_OVERFLOWED comments.

Oops, Py_OVERFLOWED() has been removed: I created PR 28884 to fix the comment.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:11:15 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 20:11:15 +0000
Subject: [issue45410] python -m test -jN: write stderr in stdout to get
 messages in order
In-Reply-To: <1633691736.44.0.338544053782.issue45410@roundup.psfhosted.org>
Message-ID: <1633983075.58.0.653436293995.issue45410@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Sadly, a recent build failure (at commit 560a79f94e94de66a18f2a5e4194c2fe51e2adf1) still write "Uncaught thread exception" at the top of logs:
---
0:00:11 load avg: 6.07 [315/427/1] test_ftplib failed (env changed)
Warning -- Uncaught thread exception: Exception
Exception in thread Thread-67:
(...)
Exception
test__all__ (test.test_ftplib.MiscTestCase) ... ok
test_abort (test.test_ftplib.TestFTPClass) ... ok
(...)
Ran 94 tests in 3.234s
OK (skipped=1)
---

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45410>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:21:48 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 20:21:48 +0000
Subject: [issue45410] python -m test -jN: write stderr in stdout to get
 messages in order
In-Reply-To: <1633691736.44.0.338544053782.issue45410@roundup.psfhosted.org>
Message-ID: <1633983708.81.0.456138426901.issue45410@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27179
pull_request: https://github.com/python/cpython/pull/28885

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45410>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:22:29 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 20:22:29 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1633983749.32.0.170200231381.issue45434@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
keywords: +patch
pull_requests: +27180
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28883

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:25:32 2021
From: report at bugs.python.org (Thomas Grainger)
Date: Mon, 11 Oct 2021 20:25:32 +0000
Subject: [issue45435] delete misleading faq entry about atomic operations
Message-ID: <1633983932.32.0.221950529783.issue45435@roundup.psfhosted.org>


Change by Thomas Grainger <tagrain at gmail.com>:


----------
assignee: docs at python
components: Documentation
nosy: docs at python, graingert
priority: normal
severity: normal
status: open
title: delete misleading faq entry about atomic operations

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45435>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:27:07 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 20:27:07 +0000
Subject: [issue45436] test_configure_type() failed on
Message-ID: <1633984027.59.0.32532195896.issue45436@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

x86 Gentoo Non-Debug with X 3.x:
https://buildbot.python.org/all/#/builders/58/builds/891

test.pythoninfo:

tkinter.TCL_VERSION: 8.6
tkinter.TK_VERSION: 8.6
tkinter.info_patchlevel: 8.6.11

2 tests failed:
    test_tk test_ttk_guionly

======================================================================
FAIL: test_configure_type (tkinter.test.test_tkinter.test_widgets.MenuTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_tkinter/test_widgets.py", line 1244, in test_configure_type
    self.checkEnumParam(widget, 'type',
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 151, in checkEnumParam
    self.checkInvalidParam(widget, name, '',
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 73, in checkInvalidParam
    with self.assertRaises(tkinter.TclError) as cm:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: TclError not raised

======================================================================
FAIL: test_configure_compound (tkinter.test.test_ttk.test_widgets.ButtonTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py", line 173, in test_configure_compound
    self.checkEnumParam(widget, 'compound',
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 151, in checkEnumParam
    self.checkInvalidParam(widget, name, '',
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 73, in checkInvalidParam
    with self.assertRaises(tkinter.TclError) as cm:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: TclError not raised

======================================================================
FAIL: test_configure_compound (tkinter.test.test_ttk.test_widgets.CheckbuttonTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py", line 173, in test_configure_compound
    self.checkEnumParam(widget, 'compound',
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 151, in checkEnumParam
    self.checkInvalidParam(widget, name, '',
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 73, in checkInvalidParam
    with self.assertRaises(tkinter.TclError) as cm:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: TclError not raised

======================================================================
FAIL: test_configure_compound (tkinter.test.test_ttk.test_widgets.LabelTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py", line 173, in test_configure_compound
    self.checkEnumParam(widget, 'compound',
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 151, in checkEnumParam
    self.checkInvalidParam(widget, name, '',
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 73, in checkInvalidParam
    with self.assertRaises(tkinter.TclError) as cm:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: TclError not raised

======================================================================
FAIL: test_configure_compound (tkinter.test.test_ttk.test_widgets.MenubuttonTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py", line 173, in test_configure_compound
    self.checkEnumParam(widget, 'compound',
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 151, in checkEnumParam
    self.checkInvalidParam(widget, name, '',
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 73, in checkInvalidParam
    with self.assertRaises(tkinter.TclError) as cm:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: TclError not raised

======================================================================
FAIL: test_configure_compound (tkinter.test.test_ttk.test_widgets.RadiobuttonTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py", line 173, in test_configure_compound
    self.checkEnumParam(widget, 'compound',
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 151, in checkEnumParam
    self.checkInvalidParam(widget, name, '',
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 73, in checkInvalidParam
    with self.assertRaises(tkinter.TclError) as cm:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: TclError not raised

----------
components: Tests, Tkinter
messages: 403678
nosy: gpolo, serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: test_configure_type() failed on
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:27:20 2021
From: report at bugs.python.org (Xin Sheng Zhou)
Date: Mon, 11 Oct 2021 20:27:20 +0000
Subject: [issue45437] Assignment to a list of dictionary wrong
Message-ID: <1633984040.92.0.743378226513.issue45437@roundup.psfhosted.org>


New submission from Xin Sheng Zhou <xinshengzhou at gmail.com>:

>>> details = [{}]*4
>>> details
[{}, {}, {}, {}]
>>> details[1]['A']=5
>>> details
[{'A': 5}, {'A': 5}, {'A': 5}, {'A': 5}]
>>>

----------
messages: 403679
nosy: xinshengzhou
priority: normal
severity: normal
status: open
title: Assignment to a list of dictionary wrong
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45437>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:27:35 2021
From: report at bugs.python.org (Thomas Grainger)
Date: Mon, 11 Oct 2021 20:27:35 +0000
Subject: [issue45435] delete misleading faq entry about atomic operations
Message-ID: <1633984055.52.0.799087129357.issue45435@roundup.psfhosted.org>


Change by Thomas Grainger <tagrain at gmail.com>:


----------
keywords: +patch
pull_requests: +27181
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28886

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45435>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:27:32 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 20:27:32 +0000
Subject: [issue45436] test_tk.test_configure_type() failed on x86 Gentoo
 Non-Debug with X 3.x
In-Reply-To: <1633984027.59.0.32532195896.issue45436@roundup.psfhosted.org>
Message-ID: <1633984052.63.0.630078109171.issue45436@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
title: test_configure_type() failed on -> test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:28:10 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 20:28:10 +0000
Subject: [issue45436] test_tk.test_configure_type() failed on x86 Gentoo
 Non-Debug with X 3.x
In-Reply-To: <1633984027.59.0.32532195896.issue45436@roundup.psfhosted.org>
Message-ID: <1633984090.91.0.0146547791579.issue45436@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

See also bpo-43139: test_ttk test_compound and test_tk test_type fails with Tk 8.6.11.1.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:28:20 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 20:28:20 +0000
Subject: [issue43139] test_ttk test_compound and test_tk test_type fails with
 Tk 8.6.11.1
In-Reply-To: <1612552092.14.0.798552929042.issue43139@roundup.psfhosted.org>
Message-ID: <1633984100.7.0.419202643428.issue43139@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

See also bpo-45436: test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x.

----------
nosy: +vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43139>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:35:40 2021
From: report at bugs.python.org (Gregory Szorc)
Date: Mon, 11 Oct 2021 20:35:40 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1633984540.05.0.12234111352.issue45405@roundup.psfhosted.org>


Gregory Szorc <gregory.szorc at gmail.com> added the comment:

Note that this issue isn't macOS specific: you will get the same failure when cross-compiling targeting Linux. e.g. --build=x86_64-unknown-linux-gnu --host=i686-unknown-linux-gnu.

----------
nosy: +indygreg

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:45:34 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 20:45:34 +0000
Subject: [issue45436] test_tk.test_configure_type() failed on x86 Gentoo
 Non-Debug with X 3.x
In-Reply-To: <1633984027.59.0.32532195896.issue45436@roundup.psfhosted.org>
Message-ID: <1633985134.93.0.298655175501.issue45436@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> 2 tests failed:test_tk test_ttk_guionly

They also failed on:

* x86 Gentoo Non-Debug with X 3.9
* x86 Gentoo Non-Debug with X 3.10

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:50:24 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Mon, 11 Oct 2021 20:50:24 +0000
Subject: [issue43139] test_ttk test_compound,
 test_tk test_type fail with Tk 8.6.11.1
In-Reply-To: <1612552092.14.0.798552929042.issue43139@roundup.psfhosted.org>
Message-ID: <1633985424.82.0.830944969926.issue43139@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
title: test_ttk test_compound and test_tk test_type fails with Tk 8.6.11.1 -> test_ttk test_compound, test_tk test_type fail with Tk 8.6.11.1

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43139>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:51:40 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 20:51:40 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1633985500.16.0.575794145934.issue45434@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 47717d1186563695e798b40350d15b00d04a5237 by Victor Stinner in branch 'main':
bpo-45434: Cleanup Python.h header file (GH-28883)
https://github.com/python/cpython/commit/47717d1186563695e798b40350d15b00d04a5237


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:56:48 2021
From: report at bugs.python.org (Ned Deily)
Date: Mon, 11 Oct 2021 20:56:48 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1633985808.23.0.0872664034071.issue45405@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

> Note that this issue isn't macOS specific: you will get the same failure when cross-compiling targeting Linux. e.g. --build=x86_64-unknown-linux-gnu --host=i686-unknown-linux-gnu.

Can you be more specific? This particular issue isn't about cross-compiling. It's just about building for macOS on macOS. Under what circumstances is there a problem when trying to build one of the supported cross-compilation targets and does this proposed change fix that problem or create a new problem?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Mon Oct 11 16:59:56 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 20:59:56 +0000
Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623
In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org>
Message-ID: <1633985996.96.0.728652517305.issue41123@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
nosy: +vstinner
nosy_count: 2.0 -> 3.0
pull_requests: +27182
pull_request: https://github.com/python/cpython/pull/28887

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41123>
_______________________________________

From report at bugs.python.org  Mon Oct 11 17:04:11 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 21:04:11 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1633986251.51.0.911294807841.issue45434@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27183
pull_request: https://github.com/python/cpython/pull/28888

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Mon Oct 11 17:07:28 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 21:07:28 +0000
Subject: [issue45410] python -m test -jN: write stderr in stdout to get
 messages in order
In-Reply-To: <1633691736.44.0.338544053782.issue45410@roundup.psfhosted.org>
Message-ID: <1633986448.71.0.167181885695.issue45410@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 1ebd798fddef51e1f6fd40a4860278a1851ac268 by Victor Stinner in branch 'main':
bpo-45410: Add test.support.flush_std_streams() (GH-28885)
https://github.com/python/cpython/commit/1ebd798fddef51e1f6fd40a4860278a1851ac268


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45410>
_______________________________________

From report at bugs.python.org  Mon Oct 11 17:07:44 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 21:07:44 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633986464.83.0.848824483077.issue45412@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset a9fe1a8e5b4698937e06c2c419da92e6f78f2ee7 by Victor Stinner in branch 'main':
bpo-45412: Update _Py_ADJUST_ERANGE1() comment (GH-28884)
https://github.com/python/cpython/commit/a9fe1a8e5b4698937e06c2c419da92e6f78f2ee7


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Mon Oct 11 17:09:44 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 21:09:44 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633986584.38.0.416085401908.issue45412@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 7103356455c8b0c2ba3523929327756413337a31 by Victor Stinner in branch 'main':
bpo-45412: Move _Py_SET_53BIT_PRECISION_START to pycore_pymath.h (GH-28882)
https://github.com/python/cpython/commit/7103356455c8b0c2ba3523929327756413337a31


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Mon Oct 11 17:22:10 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 21:22:10 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633987330.42.0.254623327335.issue45412@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27184
pull_request: https://github.com/python/cpython/pull/28889

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Mon Oct 11 17:30:09 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 21:30:09 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1633987809.32.0.28009718634.issue45434@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 03ea862b8a8234176761240ba122254e9eb11663 by Victor Stinner in branch 'main':
bpo-45434: Python.h no longer includes <stdlib.h> (GH-28888)
https://github.com/python/cpython/commit/03ea862b8a8234176761240ba122254e9eb11663


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Mon Oct 11 17:36:45 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 21:36:45 +0000
Subject: [issue41123] Remove Py_UNICODE APIs except PEP 623
In-Reply-To: <1593143601.8.0.862502731431.issue41123@roundup.psfhosted.org>
Message-ID: <1633988205.05.0.0436759448712.issue41123@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 1f316ea3b4fa319eec4f375fb683467b424c964e by Victor Stinner in branch 'main':
bpo-41123: Remove Py_UNICODE_COPY() and Py_UNICODE_FILL() (GH-28887)
https://github.com/python/cpython/commit/1f316ea3b4fa319eec4f375fb683467b424c964e


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41123>
_______________________________________

From report at bugs.python.org  Mon Oct 11 17:45:39 2021
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 11 Oct 2021 21:45:39 +0000
Subject: [issue45437] Assignment to a list of dictionary wrong
In-Reply-To: <1633984040.92.0.743378226513.issue45437@roundup.psfhosted.org>
Message-ID: <1633988739.45.0.358188305246.issue45437@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:

See https://docs.python.org/3/faq/programming.html#how-do-i-create-a-multidimensional-list

Not quite the same example, but the underlying reason for what you're seeing is the same: each of the `dict` objects in `[{}] * 4` is actually the *same* dict object:

>>> inner = {}
>>> details = [inner] * 4
>>> details
[{}, {}, {}, {}]
>>> assert all(d is inner for d in details)
>>> # Instead, do:
>>> details = [{} for each in range(4)]
>>> details
[{}, {}, {}, {}]
>>> details[1]['A'] = 5
>>> details
[{}, {'A': 5}, {}, {}]

----------
nosy: +zach.ware
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45437>
_______________________________________

From report at bugs.python.org  Mon Oct 11 18:05:54 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Mon, 11 Oct 2021 22:05:54 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
Message-ID: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>


New submission from Raymond Hettinger <raymond.hettinger at gmail.com>:

In the example below, __annotations__ is correct but not the corresponding Signature object.

-----------------------------------------------------------------------

from typing import List

def f(s: List[float]) -> None: pass

def g(s: list[float]) -> None: pass

>>> inspect.signature(f)
<Signature (s: List[float]) -> None>

>>> inspect.signature(g)
<Signature (s: list) -> None>

g.__annotations__
{'s': list[float], 'return': None}

----------
components: Library (Lib)
messages: 403692
nosy: gvanrossum, levkivskyi, rhettinger
priority: normal
severity: normal
status: open
title: inspect not capturing type annotations created by __class_getitem__
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Mon Oct 11 18:12:08 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 22:12:08 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633990328.36.0.991669984931.issue45412@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 61190e092b8258ede92ac543bb39bad0f7168104 by Victor Stinner in branch 'main':
bpo-45412: Move copysign() define to pycore_pymath.h (GH-28889)
https://github.com/python/cpython/commit/61190e092b8258ede92ac543bb39bad0f7168104


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Mon Oct 11 18:12:30 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 22:12:30 +0000
Subject: [issue45412] [C API] Remove Py_OVERFLOWED(),
 Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()
In-Reply-To: <1633700351.81.0.101355063932.issue45412@roundup.psfhosted.org>
Message-ID: <1633990350.27.0.474412959083.issue45412@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Include/pymath.h is now better, I close the issue ;-)

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45412>
_______________________________________

From report at bugs.python.org  Mon Oct 11 18:18:05 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 22:18:05 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
Message-ID: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

The public C API should avoid accessing directly PyTypeObject members: see bpo-40170.

I propose to move static inline functions to the internal C API, and only expose opaque function calls to the public C API.

----------
components: C API
messages: 403695
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Mon Oct 11 18:18:36 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 22:18:36 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1633990716.39.0.552297293554.issue45439@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
keywords: +patch
pull_requests: +27185
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28890

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Mon Oct 11 18:18:33 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 22:18:33 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1633990713.51.0.0678569855926.issue45439@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset fb8f208a4ddb38eedee71f9ecd0f22058802dab1 by Victor Stinner in branch 'main':
bpo-45439: _PyObject_Call() only checks tp_vectorcall_offset once (GH-28890)
https://github.com/python/cpython/commit/fb8f208a4ddb38eedee71f9ecd0f22058802dab1


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Mon Oct 11 18:19:46 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 22:19:46 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1633990786.1.0.203990998355.issue45439@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27186
pull_request: https://github.com/python/cpython/pull/28891

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Mon Oct 11 18:21:18 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Mon, 11 Oct 2021 22:21:18 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1633990878.04.0.223522011328.issue45438@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

Raymond, the bug must be in the Python code in inspect.py. Could you dig a little deeper there? I don't know much about it. Specifically I think the problem may just be in the repr() of class Parameter:

>>> inspect.signature(g).parameters['s']             
<Parameter "s: list">
>>> inspect.signature(g).parameters['s'].annotation
list[float]
>>>

----------
nosy: +kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Mon Oct 11 18:25:05 2021
From: report at bugs.python.org (Joshua Bronson)
Date: Mon, 11 Oct 2021 22:25:05 +0000
Subject: [issue40890] Dict views should be introspectable
In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org>
Message-ID: <1633991105.03.0.777466494021.issue40890@roundup.psfhosted.org>


Change by Joshua Bronson <jabronson at gmail.com>:


----------
nosy: +jab
nosy_count: 6.0 -> 7.0
pull_requests: +27187
pull_request: https://github.com/python/cpython/pull/28892

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40890>
_______________________________________

From report at bugs.python.org  Mon Oct 11 18:42:26 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 22:42:26 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1633992146.76.0.785148625784.issue45439@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset ce3489cfdb9f0e050bdc45ce5d3902c2577ea683 by Victor Stinner in branch 'main':
bpo-45439: Rename _PyObject_CallNoArg() to _PyObject_CallNoArgs() (GH-28891)
https://github.com/python/cpython/commit/ce3489cfdb9f0e050bdc45ce5d3902c2577ea683


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Mon Oct 11 18:43:14 2021
From: report at bugs.python.org (Alex Waygood)
Date: Mon, 11 Oct 2021 22:43:14 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1633992194.85.0.611012456713.issue45356@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

Some thoughts from me, as an unqualified but interested party:

Like Randolph, I very much like having class properties in the language, and have used them in several projects since their introduction in 3.9. I find they're especially useful with Enums. However, while the bug in doctest, for example, is relatively trivial to fix (see my PR in #44904), it seems to me plausible that bugs might crop up in other standard library modules as well. As such, leaving class properties in the language might mean that several more bugfixes relating to this feature would have to be made in the future. So, I can see the argument for removing them.

It seems to me that Randolph's idea of changing `classmethod` from a class into a function would break a lot of existing code. As an alternative, one small adjustment that could be made would be to special-case `isinstance()` when it comes to class properties. In pure Python, you could achieve this like this:

```
oldproperty = property

class propertymeta(type):
    def __instancecheck__(cls, obj):
        return super().__instancecheck__(obj) or (
            isinstance(obj, classmethod)
            and super().__instancecheck__(obj.__func__)
            )


class property(oldproperty, metaclass=propertymeta): pass
```

This would at least mean that `isinstance(classmethod(property(lambda cls: 42)), property)` and `isinstance(classmethod(property(lambda cls: 42)), classmethod)` would both evaluate to `True`. This would be a bit of a lie (an instance of `classmethod` isn't an instance of `property`), but would at least warn the caller that the object they were dealing with had some propertylike qualities to it.

Note that this change wouldn't fix the bugs in abc and doctest, nor does it fix the issue with class-property setter logic that Randolph identified.

With regards to the point that `@staticmethod` cannot be stacked on top of `@property`: it strikes me that this feature isn't really needed. You can achieve the same effect just by stacking `@classmethod` on top of `@property` and not using the `cls` parameter.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Mon Oct 11 19:04:51 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 23:04:51 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1633993491.04.0.822952191495.issue45439@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27188
pull_request: https://github.com/python/cpython/pull/28893

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Mon Oct 11 19:12:36 2021
From: report at bugs.python.org (Steven D'Aprano)
Date: Mon, 11 Oct 2021 23:12:36 +0000
Subject: [issue45435] delete misleading faq entry about atomic operations
Message-ID: <1633993956.72.0.321894468898.issue45435@roundup.psfhosted.org>


New submission from Steven D'Aprano <steve+python at pearwood.info>:

Why do you say that the FAQ is misleading?

If it is misleading, it should be replaced with a more correct answer, not just deleted.

----------
nosy: +steven.daprano

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45435>
_______________________________________

From report at bugs.python.org  Mon Oct 11 19:24:11 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 23:24:11 +0000
Subject: [issue45433] libpython should not be linked with libcrypt
In-Reply-To: <1633975874.59.0.522297770504.issue45433@roundup.psfhosted.org>
Message-ID: <1633994651.03.0.508773190374.issue45433@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset be21706f3760bec8bd11f85ce02ed6792b07f51f by Mike Gilbert in branch 'main':
bpo-45433: Do not link libpython against libcrypt (GH-28881)
https://github.com/python/cpython/commit/be21706f3760bec8bd11f85ce02ed6792b07f51f


----------
nosy: +vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45433>
_______________________________________

From report at bugs.python.org  Mon Oct 11 19:24:50 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 23:24:50 +0000
Subject: [issue45433] libpython should not be linked with libcrypt
In-Reply-To: <1633975874.59.0.522297770504.issue45433@roundup.psfhosted.org>
Message-ID: <1633994690.38.0.950334117022.issue45433@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Nicely spotted, thanks for the fix!

I prefer to not backport to avoid any risk of regression. In my experience, the build system is fragile.

----------
components: +Build -C API
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.10, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45433>
_______________________________________

From report at bugs.python.org  Mon Oct 11 19:25:28 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Mon, 11 Oct 2021 23:25:28 +0000
Subject: [issue40890] Dict views should be introspectable
In-Reply-To: <1591464079.86.0.471509652953.issue40890@roundup.psfhosted.org>
Message-ID: <1633994728.23.0.55822917654.issue40890@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
nosy:  -pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40890>
_______________________________________

From report at bugs.python.org  Mon Oct 11 19:26:20 2021
From: report at bugs.python.org (Eryk Sun)
Date: Mon, 11 Oct 2021 23:26:20 +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: <1633994780.22.0.3439432049.issue45429@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

It's up to the core devs whether or not Python should try to use a high-resolution timer, which is currently undocumented in the Windows API and implemented only in recent releases of Windows 10 and 11. But if this does get supported, the code should fall back on creating a normal timer if CREATE_WAITABLE_TIMER_HIGH_RESOLUTION makes the call fail. For example:

    #ifndef CREATE_WAITABLE_TIMER_HIGH_RESOLUTION
    #define CREATE_WAITABLE_TIMER_HIGH_RESOLUTION 0x00000002
    #endif

        LARGE_INTEGER relative_timeout;
        // No need to check for integer overflow, both types are signed
        assert(sizeof(relative_timeout) == sizeof(timeout_100ns));
        // SetWaitableTimerEx(): a negative due time is relative
        relative_timeout.QuadPart = -timeout_100ns;
        DWORD flags = CREATE_WAITABLE_TIMER_HIGH_RESOLUTION;

    create_timer:

        HANDLE timer = CreateWaitableTimerExW(NULL, NULL, flags, TIMER_ALL_ACCESS);
        if (timer == NULL)
        {
            if (flags && GetLastError() == ERROR_INVALID_PARAMETER) {
                // CREATE_WAITABLE_TIMER_HIGH_RESOLUTION is not supported.
                flags = 0;
                goto create_timer;
            }
            PyErr_SetFromWindowsErr(0);
            return -1;
        }

        if (!SetWaitableTimerEx(timer, &relative_timeout,
              0,          // no period; the timer is signaled once
              NULL, NULL, // no completion routine
              NULL,       // no wake context; do not resume from suspend
              0))         // no tolerable delay for timer coalescing
        {
            PyErr_SetFromWindowsErr(0);
            goto error;
        }

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45429>
_______________________________________

From report at bugs.python.org  Mon Oct 11 19:51:20 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 11 Oct 2021 23:51:20 +0000
Subject: [issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the
 limited C API if isinf() is not defined
Message-ID: <1633996280.11.0.993737910951.issue45440@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

If the HAVE_DECL_ISINF macro is not defined in pyconfig.h, the Py_IS_INFINITY macro is defined as:

#define Py_IS_INFINITY(X) \
    ((X) && (Py_FORCE_DOUBLE(X)*0.5 == Py_FORCE_DOUBLE(X)))

Problem: Py_FORCE_DOUBLE() is excluded from the limited C API (and the stable ABI).

I see different options:

* Implement Py_IS_INFINITY() as an opaque function if the HAVE_DECL_ISINF macro is not defined. I did something similar in Py_INCREF() to support the limited C API with a debug build of Python: call _Py_IncRef() opaque function.

* Make Py_FORCE_DOUBLE() private and add it to the limited C API as an implementation detail.

* Add Py_FORCE_DOUBLE() macro to the limited C API: the current implementation is fragile, it depends on how Python.h is included. Also, I dislike macros in the limited C API.

I would prefer to *remove* Py_FORCE_DOUBLE() to all APIs, than adding it to the limited C API.

----------
components: C API
messages: 403704
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Py_IS_INFINITY() macro doesn't work in the limited C API if isinf() is not defined
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45440>
_______________________________________

From report at bugs.python.org  Mon Oct 11 20:01:17 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Tue, 12 Oct 2021 00:01:17 +0000
Subject: [issue45396] Custom frozen modules get ignored.
In-Reply-To: <1633551734.9.0.785349509784.issue45396@roundup.psfhosted.org>
Message-ID: <1633996877.6.0.796389799491.issue45396@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

I'm not convinced by the comment you linked to.

It seems Brett is referring to the case where at the C level someone overrides `PyImport_FrozenModules` (a global in frozen.c) -- though it is never explicitly named in the thread. And that variable *is* ignored when the -X flag is set to off (at least, it is ignored when use_frozen() is false and we're not talking about an "essensial" frozen module; and I think use_frozen() corresponds to whether the -X flag is on or off, or its default). So I think the -X flag is named correctly.

----------
nosy: +gvanrossum

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45396>
_______________________________________

From report at bugs.python.org  Mon Oct 11 20:15:12 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 12 Oct 2021 00:15:12 +0000
Subject: [issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the
 limited C API if isinf() is not defined
In-Reply-To: <1633996280.11.0.993737910951.issue45440@roundup.psfhosted.org>
Message-ID: <1633997712.55.0.0137060471544.issue45440@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

The Py_FORCE_DOUBLE() macro was added in bpo-5724 by the change:

commit e05e8409e1b47a2c018ad8a67016546217165c60
Author: Mark Dickinson <dickinsm at gmail.com>
Date:   Mon May 4 13:30:43 2009 +0000

    Issue #5724: Fix cmath failures on Solaris 10.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45440>
_______________________________________

From report at bugs.python.org  Mon Oct 11 20:22:16 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 12 Oct 2021 00:22:16 +0000
Subject: [issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the
 limited C API if isinf() is not defined
In-Reply-To: <1633996280.11.0.993737910951.issue45440@roundup.psfhosted.org>
Message-ID: <1633998136.28.0.401343787218.issue45440@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
keywords: +patch
pull_requests: +27189
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28894

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45440>
_______________________________________

From report at bugs.python.org  Mon Oct 11 20:58:49 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 12 Oct 2021 00:58:49 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634000329.59.0.00357994430617.issue45439@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27190
pull_request: https://github.com/python/cpython/pull/28895

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Mon Oct 11 21:02:55 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 12 Oct 2021 01:02:55 +0000
Subject: [issue45410] python -m test -jN: write stderr in stdout to get
 messages in order
In-Reply-To: <1633691736.44.0.338544053782.issue45410@roundup.psfhosted.org>
Message-ID: <1634000575.54.0.143112897731.issue45410@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Calling sys.stdout doesn't help :-(

Fail at commit ce3489cfdb9f0e050bdc45ce5d3902c2577ea683:
https://buildbot.python.org/all/#/builders/73/builds/788
---
0:00:10 load avg: 7.59 [306/427/1] test_ftplib failed (env changed)
Warning -- Uncaught thread exception: Exception
Exception in thread Thread-67:
(...)
Exception
test__all__ (test.test_ftplib.MiscTestCase) ... ok
test_abort (test.test_ftplib.TestFTPClass) ... ok
test_acct (test.test_ftplib.TestFTPClass) ... ok
(...)
---

The warning cannot come from MiscTestCase.test__all__(), so the warning is still logged at the wrong place.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45410>
_______________________________________

From report at bugs.python.org  Mon Oct 11 22:58:00 2021
From: report at bugs.python.org (Sam James)
Date: Tue, 12 Oct 2021 02:58:00 +0000
Subject: [issue45433] libpython should not be linked with libcrypt
In-Reply-To: <1633975874.59.0.522297770504.issue45433@roundup.psfhosted.org>
Message-ID: <1634007480.25.0.86070714508.issue45433@roundup.psfhosted.org>


Change by Sam James <sam at cmpct.info>:


----------
nosy: +thesamesam

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45433>
_______________________________________

From report at bugs.python.org  Tue Oct 12 02:38:27 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 12 Oct 2021 06:38:27 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634020707.37.0.486586557085.issue45439@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset d943d19172aa93ce88bade15b9f23a0ce3bc72ff by Victor Stinner in branch 'main':
bpo-45439: Move _PyObject_CallNoArgs() to pycore_call.h (GH-28895)
https://github.com/python/cpython/commit/d943d19172aa93ce88bade15b9f23a0ce3bc72ff


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Tue Oct 12 02:58:51 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 12 Oct 2021 06:58:51 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634021931.87.0.0721308357539.issue45439@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


Added file: https://bugs.python.org/file50345/test_bench.patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Tue Oct 12 02:59:00 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 12 Oct 2021 06:59:00 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634021940.57.0.175341993356.issue45439@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


Added file: https://bugs.python.org/file50346/bench.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Tue Oct 12 03:01:15 2021
From: report at bugs.python.org (jiahua wang)
Date: Tue, 12 Oct 2021 07:01:15 +0000
Subject: [issue45441] Some links in the document is changed
Message-ID: <1634022075.47.0.874322884428.issue45441@roundup.psfhosted.org>


Change by jiahua wang <wjh180909 at gmail.com>:


----------
assignee: docs at python
components: Documentation
nosy: 180909, docs at python
priority: normal
pull_requests: 27191
severity: normal
status: open
title: Some links in the document is changed
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45441>
_______________________________________

From report at bugs.python.org  Tue Oct 12 03:17:57 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 12 Oct 2021 07:17:57 +0000
Subject: [issue42253] xml.dom.minidom.rst missing standalone documentation
In-Reply-To: <1604412182.71.0.862314326589.issue42253@roundup.psfhosted.org>
Message-ID: <1634023077.5.0.94359415481.issue42253@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 3d7009e88e0ae516b10d8d3d402cc66e86fb631e by Miss Islington (bot) in branch '3.10':
bpo-42253: Update xml.dom.minidom.rst (GH-23126) (GH-28874)
https://github.com/python/cpython/commit/3d7009e88e0ae516b10d8d3d402cc66e86fb631e


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42253>
_______________________________________

From report at bugs.python.org  Tue Oct 12 03:18:19 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 12 Oct 2021 07:18:19 +0000
Subject: [issue42253] xml.dom.minidom.rst missing standalone documentation
In-Reply-To: <1604412182.71.0.862314326589.issue42253@roundup.psfhosted.org>
Message-ID: <1634023099.78.0.460323198631.issue42253@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 23528905d48ddfe74a75af2152e96c04b77bf314 by Miss Islington (bot) in branch '3.9':
bpo-42253: Update xml.dom.minidom.rst (GH-23126) (GH-28875)
https://github.com/python/cpython/commit/23528905d48ddfe74a75af2152e96c04b77bf314


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42253>
_______________________________________

From report at bugs.python.org  Tue Oct 12 03:18:46 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 12 Oct 2021 07:18:46 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1634023126.97.0.329005274448.issue45401@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset faa87f7f3b60f79b9018aaef0efa5e00d82b817b by Miss Islington (bot) in branch '3.9':
bpo-45401: Fix a resource warning in test_logging (GH-28864) (GH-28873)
https://github.com/python/cpython/commit/faa87f7f3b60f79b9018aaef0efa5e00d82b817b


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Tue Oct 12 03:19:13 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 12 Oct 2021 07:19:13 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1634023153.47.0.0158366783715.issue45401@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 47a50fe16f9f074daaaa3e6aa85e76502955ed40 by Miss Islington (bot) in branch '3.10':
bpo-45401: Fix a resource warning in test_logging (GH-28864) (GH-28872)
https://github.com/python/cpython/commit/47a50fe16f9f074daaaa3e6aa85e76502955ed40


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Tue Oct 12 03:32:22 2021
From: report at bugs.python.org (Randolf Scholz)
Date: Tue, 12 Oct 2021 07:32:22 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1634023942.76.0.787879038597.issue45356@roundup.psfhosted.org>


Randolf Scholz <randolf.scholz at gmail.com> added the comment:

@Alex Regarding my proposal, the crucial part is the desiderata, not the hacked up implementation I presented.

And I really believe that at least that part I got hopefully right. After all, what does `@classmethod` functionally do? It makes the first argument of the function receive the class type instead of the object instance and makes it possible to call it directly from the class without instantiating it. I would still expect `MyClass.__dict__["themethod"]` to behave, as an object, much the same, regardless if it was decorated with `@classmethod` or not.

Regarding code breakage - yes that is a problem, but code is already broken and imo Python needs to make a big decision going forward: 

1. Embrace decorator chaining and try hard to make it work universally (which afaik was never intended originally when decorators were first introduced). As a mathematician I would love this, also adding `@` as a general purpose function composition operator would add quite some useful functional programming aspects to python.
2. Revert changes from 3.9 and generally discourage decorator chaining.

At this point however I want to emphasize that I am neither a CS major nor a python expert (I only started working with the language 3 years ago), so take everything I say as what it is - the opinion of some random stranger from the internet (:

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Tue Oct 12 03:38:10 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 12 Oct 2021 07:38:10 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634024290.05.0.608343578373.issue45439@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


Added file: https://bugs.python.org/file50348/bench_no_args_inline.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Tue Oct 12 03:38:04 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 12 Oct 2021 07:38:04 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634024284.62.0.380060042121.issue45439@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


Added file: https://bugs.python.org/file50347/bench_no_args.patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Tue Oct 12 03:38:16 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 12 Oct 2021 07:38:16 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634024296.55.0.435323311277.issue45439@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


Added file: https://bugs.python.org/file50349/bench_no_args_public.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Tue Oct 12 03:42:07 2021
From: report at bugs.python.org (Jeff Allen)
Date: Tue, 12 Oct 2021 07:42:07 +0000
Subject: [issue45435] delete misleading faq entry about atomic operations
In-Reply-To: <1633993956.72.0.321894468898.issue45435@roundup.psfhosted.org>
Message-ID: <1634024527.01.0.0254961095934.issue45435@roundup.psfhosted.org>


Jeff Allen <ja.py at farowl.co.uk> added the comment:

I'm interested in Thomas' reasons, but here are some of mine (as far as I understand things):

1. It is specific to one interpreter implemented in C, equipped with a GIL, and on certain assumptions about the byte code interpreter and the implementation of built-ins, that may not hold long-term. 

2. In x = L[i], the index and assignment are distinct actions (in today's byte code), allowing L or i to change before x is assigned. This applies to multiple other of the examples.

3. A compiler (even a CPU) is free to re-order operations and cache values in unguessable ways, on the assumption of a single thread.

4. Code written on these principals is fragile. It only takes the replacement of a built-in with sub-class redefining __getitem__ (to support some worthy aim elsewhere in the code) to invalidate it.

5. sort() is not atomic if an element is of a type that overrides comparison in Python. (Nor is modifying a dictionary if __hash__ or __eq__ are redefined.)
 

If you want retain the question, with a better answer, the last sentence is good: "When in doubt, use a mutex!", accompanied by "Always be in doubt."

----------
nosy: +jeff.allen

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45435>
_______________________________________

From report at bugs.python.org  Tue Oct 12 04:07:48 2021
From: report at bugs.python.org (Thomas Grainger)
Date: Tue, 12 Oct 2021 08:07:48 +0000
Subject: [issue45435] delete misleading faq entry about atomic operations
In-Reply-To: <1633993956.72.0.321894468898.issue45435@roundup.psfhosted.org>
Message-ID: <1634026068.05.0.274859943095.issue45435@roundup.psfhosted.org>


Thomas Grainger <tagrain at gmail.com> added the comment:

it's as part of this discussion in https://mail.python.org/archives/list/python-dev at python.org/thread/ABR2L6BENNA6UPSPKV474HCS4LWT26GY/#IAOCDDCJ653NBED3G2J2YBWD7HHPFHT6 and others in #python-dev 

specifically https://github.com/python/cpython/blob/2f92e2a590f0e5d2d3093549f5af9a4a1889eb5a/Objects/dictobject.c#L2582-L2586

regarding if any of the items are builtins or not: the faq entry lists (L, L1, L2 are lists, D, D1, D2 are dicts, x, y are objects, i, j are ints) so I read that to mean x and y are user defined objects with user defined comparison and equality methods

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45435>
_______________________________________

From report at bugs.python.org  Tue Oct 12 04:35:49 2021
From: report at bugs.python.org (Antoine Pitrou)
Date: Tue, 12 Oct 2021 08:35:49 +0000
Subject: [issue45435] delete misleading faq entry about atomic operations
In-Reply-To: <1633993956.72.0.321894468898.issue45435@roundup.psfhosted.org>
Message-ID: <1634027749.77.0.656059935614.issue45435@roundup.psfhosted.org>


Antoine Pitrou <pitrou at free.fr> added the comment:

I'm also surprised to learn that `L.sort()` and `D1.update(D2)` are supposed to be atomic. They certainly are not in the general case.

Remember, any Python code can release the GIL (because the GIL is released periodically in the interpreter loop). Any DECREF can also release the GIL (because it may trigger the execution of arbitrary destructors). This restricts a lot which operations can be safely considered atomic.

----------
nosy: +pablogsal, pitrou, serhiy.storchaka
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45435>
_______________________________________

From report at bugs.python.org  Tue Oct 12 04:42:08 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 12 Oct 2021 08:42:08 +0000
Subject: [issue45401] logging TimedRotatingFileHandler must not rename devices
 like /dev/null
In-Reply-To: <1633600054.24.0.602209276715.issue45401@roundup.psfhosted.org>
Message-ID: <1634028128.65.0.201596087527.issue45401@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Thanks for the fixes Vinay and Serhiy!

----------
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45401>
_______________________________________

From report at bugs.python.org  Tue Oct 12 04:52:13 2021
From: report at bugs.python.org (za)
Date: Tue, 12 Oct 2021 08:52:13 +0000
Subject: [issue20692] Tutorial and  FAQ: how to call a method on an int
In-Reply-To: <1392850224.09.0.571764135364.issue20692@psf.upfronthosting.co.za>
Message-ID: <1634028733.1.0.58771090488.issue20692@roundup.psfhosted.org>


za <zakiakhmad at gmail.com> added the comment:

I've included `doc1.patch` in the github PR https://github.com/python/cpython/pull/28818

Should I add the other patch as well to make this move forward?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20692>
_______________________________________

From report at bugs.python.org  Tue Oct 12 05:03:39 2021
From: report at bugs.python.org (Andrew Svetlov)
Date: Tue, 12 Oct 2021 09:03:39 +0000
Subject: [issue45416] "loop argument must agree with lock" instantiating
 asyncio.Condition
In-Reply-To: <1633725058.57.0.682695156248.issue45416@roundup.psfhosted.org>
Message-ID: <1634029419.2.0.986925576362.issue45416@roundup.psfhosted.org>


Andrew Svetlov <andrew.svetlov at gmail.com> added the comment:

Thanks, guys!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45416>
_______________________________________

From report at bugs.python.org  Tue Oct 12 05:03:49 2021
From: report at bugs.python.org (Andrew Svetlov)
Date: Tue, 12 Oct 2021 09:03:49 +0000
Subject: [issue45416] "loop argument must agree with lock" instantiating
 asyncio.Condition
In-Reply-To: <1633725058.57.0.682695156248.issue45416@roundup.psfhosted.org>
Message-ID: <1634029429.46.0.18115109845.issue45416@roundup.psfhosted.org>


Change by Andrew Svetlov <andrew.svetlov at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45416>
_______________________________________

From report at bugs.python.org  Tue Oct 12 05:36:12 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 12 Oct 2021 09:36:12 +0000
Subject: [issue27928] Add hashlib.scrypt
In-Reply-To: <1472732959.81.0.0491310720646.issue27928@psf.upfronthosting.co.za>
Message-ID: <1634031372.98.0.402364186737.issue27928@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27928>
_______________________________________

From report at bugs.python.org  Tue Oct 12 05:36:25 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 12 Oct 2021 09:36:25 +0000
Subject: [issue27744] Add AF_ALG (Linux Kernel crypto) to socket module
In-Reply-To: <1470997290.77.0.995104201782.issue27744@psf.upfronthosting.co.za>
Message-ID: <1634031385.71.0.651351772755.issue27744@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27744>
_______________________________________

From report at bugs.python.org  Tue Oct 12 05:44:03 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 12 Oct 2021 09:44:03 +0000
Subject: [issue42253] xml.dom.minidom.rst missing standalone documentation
In-Reply-To: <1604412182.71.0.862314326589.issue42253@roundup.psfhosted.org>
Message-ID: <1634031843.71.0.928503216377.issue42253@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement
versions: +Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42253>
_______________________________________

From report at bugs.python.org  Tue Oct 12 06:22:49 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Tue, 12 Oct 2021 10:22:49 +0000
Subject: [issue45413] Add install scheme for virtual environments
In-Reply-To: <1633715402.49.0.434363843275.issue45413@roundup.psfhosted.org>
Message-ID: <1634034169.78.0.954333196343.issue45413@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

Starting out with just "venv" doesn't mean we can't add "posix_venv"/"nt_venv" later (if e.g. someone needs to install into a filesystem for another platform).

----------
nosy: +petr.viktorin

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45413>
_______________________________________

From report at bugs.python.org  Tue Oct 12 06:36:22 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 12 Oct 2021 10:36:22 +0000
Subject: [issue45441] Some links in the document is changed
In-Reply-To: <1634034982.37.0.351206010941.issue45441@roundup.psfhosted.org>
Message-ID: <1634034982.56.0.868968914549.issue45441@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
keywords: +patch
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27192
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28901

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45441>
_______________________________________

From report at bugs.python.org  Tue Oct 12 06:36:27 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 12 Oct 2021 10:36:27 +0000
Subject: [issue45441] Some links in the document is changed
In-Reply-To: <1634034982.37.0.351206010941.issue45441@roundup.psfhosted.org>
Message-ID: <1634034987.53.0.535048532977.issue45441@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27193
pull_request: https://github.com/python/cpython/pull/28902

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45441>
_______________________________________

From report at bugs.python.org  Tue Oct 12 06:36:22 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 12 Oct 2021 10:36:22 +0000
Subject: [issue45441] Some links in the document is changed
Message-ID: <1634034982.37.0.351206010941.issue45441@roundup.psfhosted.org>


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:


New changeset b37dc9b3bc9575adc039c6093c643b7ae5e917e1 by 180909 in branch 'main':
bpo-45441: Update some moved URLs in documentation (GH-28861)
https://github.com/python/cpython/commit/b37dc9b3bc9575adc039c6093c643b7ae5e917e1


----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45441>
_______________________________________

From report at bugs.python.org  Tue Oct 12 06:39:52 2021
From: report at bugs.python.org (Shivnaren Srinivasan)
Date: Tue, 12 Oct 2021 10:39:52 +0000
Subject: [issue45442] Update `Virtual Environment` tutorial
Message-ID: <1634035192.74.0.26138584631.issue45442@roundup.psfhosted.org>


New submission from Shivnaren Srinivasan <shivnaren at gmail.com>:

Priority: Low

The Virtual Environment tutorial page (https://docs.python.org/3/tutorial/venv.html) doesn't specify how we can revert, or deactivate the `venv`.

This is quite a popular question on SO:
https://stackoverflow.com/questions/990754/how-to-leave-exit-deactivate-a-python-virtualenv

``deactivate`` worked for me?this could be added to the docs?

Happy to submit a PR.

----------
assignee: docs at python
components: Documentation
messages: 403722
nosy: docs at python, shivnaren
priority: normal
severity: normal
status: open
title: Update `Virtual Environment` tutorial
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45442>
_______________________________________

From report at bugs.python.org  Tue Oct 12 06:48:59 2021
From: report at bugs.python.org (Zohim Chandani)
Date: Tue, 12 Oct 2021 10:48:59 +0000
Subject: [issue45443] 'ThreadPoolExecutor' object has no attribute 'map'
Message-ID: <1634035739.42.0.184025452389.issue45443@roundup.psfhosted.org>


New submission from Zohim Chandani <zohim.chandani at gmail.com>:

import concurrent.futures 
import time 


start = time.perf_counter()

def do_something(seconds):
    print(f'sleeping for {seconds}s ... ')
    time.sleep(seconds)
    return f'done sleeping {seconds} '


with concurrent.futures.ThreadPoolExecutor() as executor: 

    secs = [5,4,3,2,1]
    
    results = executor.map(do_something, secs)

    for result in results: 
        print(result)




finish = time.perf_counter()

print(f'finished in {round(finish-start, 2)} seconds')



The above code yields an attribute error whereas it used to execute perfectly before. Did the method get removed?

----------
messages: 403723
nosy: zohim
priority: normal
severity: normal
status: open
title: 'ThreadPoolExecutor' object has no attribute 'map'
type: crash
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45443>
_______________________________________

From report at bugs.python.org  Tue Oct 12 06:49:33 2021
From: report at bugs.python.org (Shivnaren Srinivasan)
Date: Tue, 12 Oct 2021 10:49:33 +0000
Subject: [issue45442] Update `Virtual Environment` tutorial
In-Reply-To: <1634035192.74.0.26138584631.issue45442@roundup.psfhosted.org>
Message-ID: <1634035773.63.0.534629207375.issue45442@roundup.psfhosted.org>


Shivnaren Srinivasan <shivnaren at gmail.com> added the comment:

In the same vein, the specified script for windows is the old .bat file, though PowerShell is now the preferred shell (and for which a .ps1 script is generated in the venv directory).

We could make the .ps1 the default, and specify the .bat as an alternative?

----------
type: enhancement -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45442>
_______________________________________

From report at bugs.python.org  Tue Oct 12 07:03:31 2021
From: report at bugs.python.org (Steven D'Aprano)
Date: Tue, 12 Oct 2021 11:03:31 +0000
Subject: [issue45435] delete misleading faq entry about atomic operations
In-Reply-To: <1634024527.01.0.0254961095934.issue45435@roundup.psfhosted.org>
Message-ID: <20211012110105.GD9984@ando.pearwood.info>


Steven D'Aprano <steve+python at pearwood.info> added the comment:

Jeff makes an excellent point about the docs failing to distinguish 
between language guarantees, implementation guarantees, and things which 
are merely true sometimes.

On the other hand, we only need document what is true *now*, not what 
may be true in some long distant future.

On Tue, Oct 12, 2021 at 07:42:07AM +0000, Jeff Allen wrote:

> 2. In x = L[i], the index and assignment are distinct actions (in 
> today's byte code), allowing L or i to change before x is assigned.

Does that matter though? I think that's a distinction that makes no 
difference.

We know that another thread could change the L or the i before the 
assignment, if they are global. But once the L[i] lookup has occurred, 
it doesn't matter if they change. It's not going to affect what value 
gets bound to the x.

So in a practical sense, we can say that once the lookup L[i] has 
occurred, the binding might as well be atomic. I think that's what the 
entry is trying to say. Have I missed something?

> 3. A compiler (even a CPU) is free to re-order operations and cache 
> values in unguessable ways, on the assumption of a single thread.

The CPU doesn't operate at the level of Python byte code though, and 
there are limits to what the compiler will do. It's not going to reorder 
things in ways that change the semantics of the code (that would be a 
compiler bug). Its not going to reorder this code:

    x = 1
    print(x)
    x = 2

so that "2" gets printed. So I don't see that this objection is 
relevant.

> 4. Code written on these principals is fragile. It only takes the 
> replacement of a built-in with sub-class redefining __getitem__ (to 
> support some worthy aim elsewhere in the code) to invalidate it.

The FAQ entry could be more forceful that it is only talking about 
certain built-in types, and once you change things to another type, the 
promises may no longer hold.

But we should not hold it against the FAQs that the promises made about 
one type don't apply to other types.

> 5. sort() is not atomic if an element is of a type that overrides 
> comparison in Python. (Nor is modifying a dictionary if __hash__ or 
> __eq__ are redefined.)

Indeed, and the FAQ should be more forceful about that proviso.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45435>
_______________________________________

From report at bugs.python.org  Tue Oct 12 07:39:20 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Tue, 12 Oct 2021 11:39:20 +0000
Subject: [issue44991] [sqlite3] cleanup callbacks (GIL handling, naming, ...)
In-Reply-To: <1629810432.44.0.0891439205465.issue44991@roundup.psfhosted.org>
Message-ID: <1634038760.18.0.0584166107097.issue44991@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:


New changeset cfb1df3b71501a80ed57739181ec2ed30012c491 by Erlend Egeberg Aasland in branch 'main':
bpo-44991: Normalise function and collation callback naming (GH-28209)
https://github.com/python/cpython/commit/cfb1df3b71501a80ed57739181ec2ed30012c491


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44991>
_______________________________________

From report at bugs.python.org  Tue Oct 12 08:05:15 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Tue, 12 Oct 2021 12:05:15 +0000
Subject: [issue40512] [subinterpreters] Meta issue: per-interpreter GIL
In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org>
Message-ID: <1634040315.18.0.131011983961.issue40512@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

PyStructSequence_NewType exists, and is the same as the proposed PyStructSequence_FromModuleAndDesc except it doesn't take the module (which isn't necessary: PyStructSequence_Desc has no way to define functionality that would need the module state).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40512>
_______________________________________

From report at bugs.python.org  Tue Oct 12 08:05:30 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Tue, 12 Oct 2021 12:05:30 +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: <1634040330.96.0.164921812874.issue45113@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

Oh! I assumed this bug wasn't resolved, but it is -- in bpo-34784. Sorry, I should have checked!

The only thing the proposed PR adds is a way to set ht_module, which actually isn't very useful (it's used for module state access, but PyStructSequence_Desc doesn't allow you to add custom methods or anything else that would need the module state).

I'd close this bpo as duplicate. And close the PR -- it's well done, but unfortunately, solves the wrong problem :(

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Tue Oct 12 08:36:26 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 12 Oct 2021 12:36:26 +0000
Subject: [issue45435] delete misleading faq entry about atomic operations
In-Reply-To: <1633993956.72.0.321894468898.issue45435@roundup.psfhosted.org>
Message-ID: <1634042186.45.0.727577679094.issue45435@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

sort() is atomic, even if GIL is released during executing custom __lt__. It is guaranteed that no operations on the list in other threads can affect the result of sort().

I do not understand what non-atomic you see in x = L[i]. The value of x is determined by values of L and i at the start of the operation. GIL is not released during indexing L, and if it is released between indexing and assignment, it does not affect the result.

The FAQ answer is specially about built-in types, it is not related to types with overwritten __getitem__ etc.

The most questionable examples are dict operations. But even they provide some kind of atomacity. But you perhaps need to know internals to understand limitations.

We perhaps should explicitly document what non-trivial operations are atomical (for example list and dict copying is atomic) and whether atomacity is the part of the language specification or CPython implementation detail. In many places in the stdlib the code relies on GIL for atomacity.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45435>
_______________________________________

From report at bugs.python.org  Tue Oct 12 09:28:38 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Tue, 12 Oct 2021 13:28:38 +0000
Subject: [issue15870] PyType_FromSpec should take metaclass as an argument
In-Reply-To: <1346946566.36.0.583610018294.issue15870@psf.upfronthosting.co.za>
Message-ID: <1634045318.48.0.477168141585.issue15870@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

The new issue is bpo-45383.

There's a sprint newt week; I'll probably get to it then.


> But, I am trying to understand the preference for static better.  There is probably something to learn or even important I am missing.

The original motivating use case is not "create types dynamically on demand", but "create types without details of the C structure being compiled into the extension". That is, make it possible for modules to be compatible with several versions of Python.
The spec is designed to be extensible; the type struct is designed to be fast at runtime.


> And I have some plans to make static specs useful in type checking

This is quickly getting out of scope here, but if you're interested, I put down some notes here: https://github.com/encukou/abi3/issues/19

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15870>
_______________________________________

From report at bugs.python.org  Tue Oct 12 09:37:37 2021
From: report at bugs.python.org (wyz23x2)
Date: Tue, 12 Oct 2021 13:37:37 +0000
Subject: [issue23262] webbrowser module broken with Firefox 36+
In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za>
Message-ID: <1634045857.65.0.0915945505981.issue23262@roundup.psfhosted.org>


wyz23x2 <wyz23x2 at 163.com> added the comment:

I think this six year old issue can be closed. All patches for 3.x are committed, and Python 2.7 is EOL.

----------
nosy: +wyz23x2

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23262>
_______________________________________

From report at bugs.python.org  Tue Oct 12 09:39:46 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Tue, 12 Oct 2021 13:39:46 +0000
Subject: [issue45445] Fail if an invalid -X option is provided
Message-ID: <1634045986.72.0.556620578821.issue45445@roundup.psfhosted.org>


New submission from Pablo Galindo Salgado <pablogsal at gmail.com>:

We found that using -X ---- can be very confusing and annoying when you make typos, so I think having errors if you pass some unknown stuff will be outweighing any downside of making this more strict.

----------
messages: 403733
nosy: pablogsal
priority: normal
severity: normal
status: open
title: Fail if an invalid -X option is provided

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45445>
_______________________________________

From report at bugs.python.org  Tue Oct 12 09:40:02 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Tue, 12 Oct 2021 13:40:02 +0000
Subject: [issue45445] Fail if an invalid -X option is provided
In-Reply-To: <1634045986.72.0.556620578821.issue45445@roundup.psfhosted.org>
Message-ID: <1634046002.35.0.678688740589.issue45445@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
keywords: +patch
pull_requests: +27194
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28823

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45445>
_______________________________________

From report at bugs.python.org  Tue Oct 12 09:49:36 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Tue, 12 Oct 2021 13:49:36 +0000
Subject: [issue45315] `PyType_FromSpec` does not copy the name
In-Reply-To: <1632861906.82.0.496996210358.issue45315@roundup.psfhosted.org>
Message-ID: <1634046576.21.0.735810918659.issue45315@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

> Hm, I haven't find any case who use dynamical tp_name of Type_Spec temporarily.


The use case is creating types entirely on demand, with dynamically created specs.
This is useful e.g. for wrapping objects of a different object system, like C++ classes or Qt/GTK widgets.

But this issue is not about adding new API to enable a new use case. The *current* API can reasonably be used with a dynamic name string. So we shouldn't wait until someone tells us they need this fixed :)

So this should either be fixed or the requirement should be documented. (And the documentation would IMO sound like we're acknowledging a design bug, so it's better to fix.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45315>
_______________________________________

From report at bugs.python.org  Tue Oct 12 10:20:03 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 12 Oct 2021 14:20:03 +0000
Subject: [issue23262] webbrowser module broken with Firefox 36+
In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za>
Message-ID: <1634048403.2.0.0276639696625.issue23262@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23262>
_______________________________________

From report at bugs.python.org  Tue Oct 12 10:20:54 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 12 Oct 2021 14:20:54 +0000
Subject: [issue45441] Some links in the document is changed
In-Reply-To: <1634034982.37.0.351206010941.issue45441@roundup.psfhosted.org>
Message-ID: <1634048454.78.0.730001852035.issue45441@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 38e3ada75a7b5d911d81e8e4b70a99e181093866 by Miss Islington (bot) in branch '3.9':
bpo-45441: Update some moved URLs in documentation (GH-28861)
https://github.com/python/cpython/commit/38e3ada75a7b5d911d81e8e4b70a99e181093866


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45441>
_______________________________________

From report at bugs.python.org  Tue Oct 12 10:20:51 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 12 Oct 2021 14:20:51 +0000
Subject: [issue45441] Some links in the document is changed
In-Reply-To: <1634034982.37.0.351206010941.issue45441@roundup.psfhosted.org>
Message-ID: <1634048451.08.0.986696843428.issue45441@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 32866dd471709dd7f3bd63ce762dec72198483d2 by Miss Islington (bot) in branch '3.10':
bpo-45441: Update some moved URLs in documentation (GH-28861)
https://github.com/python/cpython/commit/32866dd471709dd7f3bd63ce762dec72198483d2


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45441>
_______________________________________

From report at bugs.python.org  Tue Oct 12 10:22:40 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 12 Oct 2021 14:22:40 +0000
Subject: [issue45441] Some links in the document is changed
In-Reply-To: <1634034982.37.0.351206010941.issue45441@roundup.psfhosted.org>
Message-ID: <1634048560.55.0.121181956454.issue45441@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
nosy:  -180909
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45441>
_______________________________________

From report at bugs.python.org  Tue Oct 12 10:35:58 2021
From: report at bugs.python.org (Mark Shannon)
Date: Tue, 12 Oct 2021 14:35:58 +0000
Subject: [issue45340] Lazily create dictionaries for plain Python objects
In-Reply-To: <1633087277.57.0.188806648124.issue45340@roundup.psfhosted.org>
Message-ID: <1634049358.2.0.028984333966.issue45340@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:

Josh,

I'm not really following the details of what you are saying.

You claim "Key-sharing dictionaries were accepted largely without question because they didn't harm code that broke them".
Is that true? I don't remember it that way. They were accepted because they saved memory and didn't slow things down.

This issue, proposes the same thing: less memory used, no slower or a bit faster.

If you are curious about how the first few instances of a class are handled, it is described here: 
https://github.com/faster-cpython/ideas/issues/72#issuecomment-920117600

Lazy attribute is not an issue here. How well keys are shared across instances depends on the dictionary implementation and was improved by https://github.com/python/cpython/pull/28520


It would be helpful if you could give specific examples where you think this change would use more memory or be slower.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45340>
_______________________________________

From report at bugs.python.org  Tue Oct 12 11:23:21 2021
From: report at bugs.python.org (Nium)
Date: Tue, 12 Oct 2021 15:23:21 +0000
Subject: [issue45446] Add a way to hide fields in dataclasses
Message-ID: <1634052201.09.0.291070468305.issue45446@roundup.psfhosted.org>


Change by Nium <formigacomcaimbra at gmail.com>:


----------
nosy: formigacomcaimbra
priority: normal
severity: normal
status: open
title: Add a way to hide fields in dataclasses
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45446>
_______________________________________

From report at bugs.python.org  Tue Oct 12 11:24:54 2021
From: report at bugs.python.org (Alex Waygood)
Date: Tue, 12 Oct 2021 15:24:54 +0000
Subject: [issue45447] IDLE: Support syntax highlighting for .pyi stub files
In-Reply-To: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>
Message-ID: <1634052294.68.0.67090516723.issue45447@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
title: Support syntax highlighting for .pyi stub files -> IDLE: Support syntax highlighting for .pyi stub files

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Tue Oct 12 11:25:01 2021
From: report at bugs.python.org (Roundup Robot)
Date: Tue, 12 Oct 2021 15:25:01 +0000
Subject: [issue45446] Add a way to hide fields in dataclasses
Message-ID: <1634052301.1.0.565715106185.issue45446@roundup.psfhosted.org>


Change by Roundup Robot <devnull at psf.upfronthosting.co.za>:


----------
keywords: +patch
nosy: +python-dev
nosy_count: 1.0 -> 2.0
pull_requests: +27195
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28904

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45446>
_______________________________________

From report at bugs.python.org  Tue Oct 12 11:24:36 2021
From: report at bugs.python.org (Alex Waygood)
Date: Tue, 12 Oct 2021 15:24:36 +0000
Subject: [issue45447] Support syntax highlighting for .pyi stub files
Message-ID: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>


New submission from Alex Waygood <Alex.Waygood at Gmail.com>:

IDLE currently does not do any syntax highlighting if you use it to open a .pyi stub file, even though everything in a .pyi file is a valid Python expression. It would be great if syntax highlighting for .pyi files could be supported.

----------
assignee: terry.reedy
components: IDLE
messages: 403738
nosy: AlexWaygood, terry.reedy
priority: normal
severity: normal
status: open
title: Support syntax highlighting for .pyi stub files
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Tue Oct 12 11:36:05 2021
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Tue, 12 Oct 2021 15:36:05 +0000
Subject: [issue45411] Add Mimetypes for Subtitle Files
In-Reply-To: <1633692340.99.0.107401828025.issue45411@roundup.psfhosted.org>
Message-ID: <1634052965.76.0.101914362709.issue45411@roundup.psfhosted.org>


?ric Araujo <merwok at netwok.org> added the comment:

Additions to mimetypes have been backported in the past, with the thought that these are not new behaviour added but only entries in a registry (and bringing the python module in line with external data sources) so there?s value and no risk in releasing these additions in point releases.

I don?t have a link to the discussion about that, and looking at 4 or 5 recent PRs to mimetype I see that backports haven?t been consistent.  So maybe another ticket would be to synchronize the dicts in active branches + record the backport policy somewhere (not sure a comment would be enough, easy to miss at the top of a long dict).

----------
nosy: +eric.araujo
versions:  -Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45411>
_______________________________________

From report at bugs.python.org  Tue Oct 12 11:38:42 2021
From: report at bugs.python.org (Zayden Micheal James)
Date: Tue, 12 Oct 2021 15:38:42 +0000
Subject: [issue45448] PIP package installation failure for multiple packages
Message-ID: <1634053122.93.0.794234678092.issue45448@roundup.psfhosted.org>


New submission from Zayden Micheal James <zayvelleman at gmail.com>:

When I try to install numpy using python version 3.10, pip version 21.2.4
it gives me a PEP517 error, with a bunch of other exceptions.

When I try to install tensorflow using python version 3.10, pip version 21.2.4 it gives me an error saying that there is no such package.

I've tried multiple pip and python combo's for installation... Aswell as inside and outside a virtual enviroment.

----------
components: Installation
messages: 403740
nosy: zayvelleman
priority: normal
severity: normal
status: open
title: PIP package installation failure for multiple packages
type: compile error
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45448>
_______________________________________

From report at bugs.python.org  Tue Oct 12 11:51:22 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Tue, 12 Oct 2021 15:51:22 +0000
Subject: [issue45447] IDLE: Support syntax highlighting for .pyi stub files
In-Reply-To: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>
Message-ID: <1634053882.92.0.499435115108.issue45447@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

It should be fairly easy to recognize x.pyi as a python file.  Just have to find the place.  Something like
  def f(i:int) -> int: ...
would have 'def' and 'int' highlighted.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Tue Oct 12 11:52:55 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Tue, 12 Oct 2021 15:52:55 +0000
Subject: [issue20692] Tutorial and  FAQ: how to call a method on an int
In-Reply-To: <1392850224.09.0.571764135364.issue20692@psf.upfronthosting.co.za>
Message-ID: <1634053975.07.0.931853512761.issue20692@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

No. The last version did not properly incorporate my suggestion, so I will make a PR that I am willing to merge.

----------
assignee: docs at python -> terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20692>
_______________________________________

From report at bugs.python.org  Tue Oct 12 12:23:10 2021
From: report at bugs.python.org (E. Paine)
Date: Tue, 12 Oct 2021 16:23:10 +0000
Subject: [issue43139] test_ttk test_compound,
 test_tk test_type fail with Tk 8.6.11.1
In-Reply-To: <1612552092.14.0.798552929042.issue43139@roundup.psfhosted.org>
Message-ID: <1634055790.62.0.16123591594.issue43139@roundup.psfhosted.org>


E. Paine <xepaine13 at gmail.com> added the comment:

Felix, are these still the exact errors you're experiencing? Both in my normal Arch install and in a chroot environment I get the following errors instead:

======================================================================
FAIL: test_winfo_rgb (tkinter.test.test_tkinter.test_misc.MiscTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/cpython/Lib/tkinter/test/test_tkinter/test_misc.py", line 213, in test_winfo_rgb
    self.assertEqual(rgb('#4a3c8c'), (0x4a4a, 0x3c3c, 0x8c8c))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (19016, 15399, 35985) != (19018, 15420, 35980)

First differing element 0:
19016
19018

- (19016, 15399, 35985)
?      ^    ^^^      ^

+ (19018, 15420, 35980)
?      ^    ^^^      ^


======================================================================
FAIL: test_configure_type (tkinter.test.test_tkinter.test_widgets.MenuTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/cpython/Lib/tkinter/test/test_tkinter/test_widgets.py", line 1244, in test_configure_type
    self.checkEnumParam(widget, 'type',
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cpython/Lib/tkinter/test/widget_tests.py", line 151, in checkEnumParam
    self.checkInvalidParam(widget, name, '',
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cpython/Lib/tkinter/test/widget_tests.py", line 73, in checkInvalidParam
    with self.assertRaises(tkinter.TclError) as cm:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: TclError not raised

----------------------------------------------------------------------


In case I'm doing something stupid, here are the commands I used to set-up the chroot environment:

$ CHROOT=chroot
$ mkdir $CHROOT
$ mkarchroot $CHROOT/root base-devel tk git gnu-free-fonts
$ xhost + local:
$ sudo mount --bind $CHROOT/root $CHROOT/root
$ sudo arch-chroot $CHROOT/root
> git clone https://github.com/python/cpython.git
> cd cpython
> ./configure && make -j24
> ./python -m test -v -u gui test_tk

I'll start looking into these errors, since I'm able to reproduce them.

----------
nosy: +epaine

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43139>
_______________________________________

From report at bugs.python.org  Tue Oct 12 12:43:59 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Tue, 12 Oct 2021 16:43:59 +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: <1634057039.01.0.411467341042.issue45256@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
pull_requests: +27196
pull_request: https://github.com/python/cpython/pull/28905

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45256>
_______________________________________

From report at bugs.python.org  Tue Oct 12 13:11:41 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Tue, 12 Oct 2021 17:11:41 +0000
Subject: [issue45449] Document that collections.abc types are subscriptable
Message-ID: <1634058701.61.0.841344967504.issue45449@roundup.psfhosted.org>


New submission from Filipe La?ns <lains at riseup.net>:

Since 3.9, the types in collections.abc are subscriptable and can be used as type hints, but this is not documented.
We should write something similar to what's on the typing module documentation for the deprecated types.

----------
assignee: docs at python
components: Documentation
messages: 403744
nosy: FFY00, docs at python, gvanrossum, kj
priority: normal
severity: normal
status: open
title: Document that collections.abc types are subscriptable
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45449>
_______________________________________

From report at bugs.python.org  Tue Oct 12 13:12:26 2021
From: report at bugs.python.org (Mariatta)
Date: Tue, 12 Oct 2021 17:12:26 +0000
Subject: [issue45421] Remove dead code from html.parser
In-Reply-To: <1633844737.55.0.569517591306.issue45421@roundup.psfhosted.org>
Message-ID: <1634058746.79.0.391281660979.issue45421@roundup.psfhosted.org>


Mariatta <mariatta at python.org> added the comment:


New changeset 562c0d7398b9f34ff63a1dc77113dad96a93ce4e by Alberto Mardegan in branch 'main':
bpo-45421: Remove dead code from html.parser (GH-28847)
https://github.com/python/cpython/commit/562c0d7398b9f34ff63a1dc77113dad96a93ce4e


----------
nosy: +Mariatta

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45421>
_______________________________________

From report at bugs.python.org  Tue Oct 12 13:17:23 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Tue, 12 Oct 2021 17:17:23 +0000
Subject: [issue45449] Document that collections.abc types are subscriptable
In-Reply-To: <1634058701.61.0.841344967504.issue45449@roundup.psfhosted.org>
Message-ID: <1634059043.36.0.674314299569.issue45449@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

Just to clarify: some type checkers will still allow using them as type hints in Python versions before 3.9, but `from __future__ import annotations` needs to be used so that we don't error out at ruuntime.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45449>
_______________________________________

From report at bugs.python.org  Tue Oct 12 13:20:57 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Tue, 12 Oct 2021 17:20:57 +0000
Subject: [issue45450] Improve syntax error for parenthesized arguments
Message-ID: <1634059257.61.0.643840687035.issue45450@roundup.psfhosted.org>


New submission from Pablo Galindo Salgado <pablogsal at gmail.com>:

There is a non-trivial ammount of users that try to parenthesize lambda parameters:

>>> lambda (x,y,z): x+y+z
  File "<stdin>", line 1
    lambda (x,y,z): x+y+z
           ^
SyntaxError: invalid syntax

We should improve the error message in this case

----------
messages: 403747
nosy: pablogsal
priority: normal
severity: normal
status: open
title: Improve syntax error for parenthesized arguments

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45450>
_______________________________________

From report at bugs.python.org  Tue Oct 12 13:21:19 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Tue, 12 Oct 2021 17:21:19 +0000
Subject: [issue45450] Improve syntax error for parenthesized arguments
In-Reply-To: <1634059257.61.0.643840687035.issue45450@roundup.psfhosted.org>
Message-ID: <1634059279.78.0.648114532607.issue45450@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Example:

>>> lambda (x,y,z): x+y+z
  File "<stdin>", line 1
    lambda (x,y,z): x+y+z
           ^^^^^^^
SyntaxError: Function parameters cannot be parenthesized

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45450>
_______________________________________

From report at bugs.python.org  Tue Oct 12 13:23:01 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Tue, 12 Oct 2021 17:23:01 +0000
Subject: [issue45450] Improve syntax error for parenthesized arguments
In-Reply-To: <1634059257.61.0.643840687035.issue45450@roundup.psfhosted.org>
Message-ID: <1634059381.37.0.735824185287.issue45450@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
keywords: +patch
pull_requests: +27197
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28906

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45450>
_______________________________________

From report at bugs.python.org  Tue Oct 12 09:37:47 2021
From: report at bugs.python.org (tongxiaoge)
Date: Tue, 12 Oct 2021 13:37:47 +0000
Subject: [issue45444] test.test_concurrent_futures fail in x86_ 64 architecture
Message-ID: <1634045867.87.0.955416673386.issue45444@roundup.psfhosted.org>


New submission from tongxiaoge <shixuantong at huawei.com>:

When I was building Python3,the test case test. Test_ concurrent_ Futures.threadpoolwaittests always fails. The error message is as follows:

[ 1680s] test_zero_timeout (test.test_concurrent_futures.ProcessPoolForkAsCompletedTest) ... 2.12s ok
[ 1680s] test_crash_at_task_unpickle (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest) ... 83.82s FAIL
[ 1680s] test_crash_during_func_exec_on_worker (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest) ... 80.08s FAIL
[ 1680s] test_crash_during_result_pickle_on_worker (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest) ... 77.34s FAIL
[ 1680s] test_error_at_task_pickle (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest) ... 0.12s ok



[ 1680s] ======================================================================
[ 1680s] FAIL: test_crash_at_task_unpickle (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest)
[ 1680s] ----------------------------------------------------------------------
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 1680s]     res.result(timeout=self.TIMEOUT)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 1680s]     raise TimeoutError()
[ 1680s] concurrent.futures._base.TimeoutError
[ 1680s]
[ 1680s] During handling of the above exception, another exception occurred:
[ 1680s]
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1155, in test_crash_at_task_unpickle
[ 1680s]     self._check_crash(BrokenProcessPool, id, CrashAtUnpickle())
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 1680s]     self._fail_on_deadlock(executor)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 1680s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 1680s] AssertionError: Executor deadlock:
[ 1680s]
[ 1680s] Thread 0x00007f6389d6f700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Thread 0x00007f638a570700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Current thread 0x00007f63982a1740 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1155 in test_crash_at_task_unpickle
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 202 in _runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest_mp.py", line 83 in run_tests_worker
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 678 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 1680s]
[ 1680s]
[ 1680s] ======================================================================
[ 1680s] FAIL: test_crash_during_func_exec_on_worker (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest)
[ 1680s] ----------------------------------------------------------------------
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 1680s]     res.result(timeout=self.TIMEOUT)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 1680s]     raise TimeoutError()
[ 1680s] concurrent.futures._base.TimeoutError
[ 1680s]
[ 1680s] During handling of the above exception, another exception occurred:
[ 1680s]
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1159, in test_crash_during_func_exec_on_worker
[ 1680s]     self._check_crash(BrokenProcessPool, _crash)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 1680s]     self._fail_on_deadlock(executor)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 1680s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 1680s] AssertionError: Executor deadlock:
[ 1680s]
[ 1680s] Thread 0x00007f6389d6f700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Thread 0x00007f638a570700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Current thread 0x00007f63982a1740 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1159 in test_crash_during_func_exec_on_worker
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 202 in _runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest_mp.py", line 83 in run_tests_worker
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 678 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 1680s]
[ 1680s]
[ 1680s] ======================================================================
[ 1680s] FAIL: test_crash_during_result_pickle_on_worker (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest)
[ 1680s] ----------------------------------------------------------------------
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 1680s]     res.result(timeout=self.TIMEOUT)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 1680s]     raise TimeoutError()
[ 1680s] concurrent.futures._base.TimeoutError
[ 1680s]
[ 1680s] During handling of the above exception, another exception occurred:
[ 1680s]
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1172, in test_crash_during_result_pickle_on_worker
[ 1680s]     self._check_crash(BrokenProcessPool, _return_instance, CrashAtPickle)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 1680s]     self._fail_on_deadlock(executor)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 1680s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 1680s] AssertionError: Executor deadlock:
[ 1680s]
[ 1680s] Thread 0x00007f6389d6f700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Thread 0x00007f638a570700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Current thread 0x00007f63982a1740 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1172 in test_crash_during_result_pickle_on_worker
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 202 in _runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest_mp.py", line 83 in run_tests_worker
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 678 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 1680s]
[ 1680s]
[ 1680s] ======================================================================
[ 1680s] FAIL: test_crash_at_task_unpickle (test.test_concurrent_futures.ProcessPoolForkserverExecutorDeadlockTest)
[ 1680s] ----------------------------------------------------------------------
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 1680s]     res.result(timeout=self.TIMEOUT)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 1680s]     raise TimeoutError()
[ 1680s] concurrent.futures._base.TimeoutError
[ 1680s]
[ 1680s] During handling of the above exception, another exception occurred:
[ 1680s]
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1155, in test_crash_at_task_unpickle
[ 1680s]     self._check_crash(BrokenProcessPool, id, CrashAtUnpickle())
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 1680s]     self._fail_on_deadlock(executor)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 1680s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 1680s] AssertionError: Executor deadlock:
[ 1680s]
[ 1680s] Thread 0x00007f6389d6f700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Thread 0x00007f638a570700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Current thread 0x00007f63982a1740 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1155 in test_crash_at_task_unpickle
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 202 in _runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest_mp.py", line 83 in run_tests_worker
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 678 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 1680s]
[ 1680s]
[ 1680s] ======================================================================
[ 1680s] FAIL: test_crash_during_func_exec_on_worker (test.test_concurrent_futures.ProcessPoolForkserverExecutorDeadlockTest)
[ 1680s] ----------------------------------------------------------------------
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 1680s]     res.result(timeout=self.TIMEOUT)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 1680s]     raise TimeoutError()
[ 1680s] concurrent.futures._base.TimeoutError
[ 1680s]
[ 1680s] During handling of the above exception, another exception occurred:
[ 1680s]
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1159, in test_crash_during_func_exec_on_worker
[ 1680s]     self._check_crash(BrokenProcessPool, _crash)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 1680s]     self._fail_on_deadlock(executor)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 1680s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 1680s] AssertionError: Executor deadlock:
[ 1680s]
[ 1680s] Thread 0x00007f6389d6f700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Thread 0x00007f638a570700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Current thread 0x00007f63982a1740 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1159 in test_crash_during_func_exec_on_worker
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 202 in _runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest_mp.py", line 83 in run_tests_worker
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 678 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 1680s]
[ 1680s]
[ 1680s] ======================================================================
[ 1680s] FAIL: test_crash_during_result_pickle_on_worker (test.test_concurrent_futures.ProcessPoolForkserverExecutorDeadlockTest)
[ 1680s] ----------------------------------------------------------------------
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 1680s]     res.result(timeout=self.TIMEOUT)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 1680s]     raise TimeoutError()
[ 1680s] concurrent.futures._base.TimeoutError
[ 1680s]
[ 1680s] During handling of the above exception, another exception occurred:
[ 1680s]
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1172, in test_crash_during_result_pickle_on_worker
[ 1680s]     self._check_crash(BrokenProcessPool, _return_instance, CrashAtPickle)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 1680s]     self._fail_on_deadlock(executor)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 1680s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 1680s] AssertionError: Executor deadlock:
[ 1680s]
[ 1680s] Thread 0x00007f6389d6f700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Thread 0x00007f638a570700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Current thread 0x00007f63982a1740 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1172 in test_crash_during_result_pickle_on_worker
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 202 in _runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest_mp.py", line 83 in run_tests_worker
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 678 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 1680s]
[ 1680s]
[ 1680s] ======================================================================
[ 1680s] FAIL: test_crash_at_task_unpickle (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest)
[ 1680s] ----------------------------------------------------------------------
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 1680s]     res.result(timeout=self.TIMEOUT)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 1680s]     raise TimeoutError()
[ 1680s] concurrent.futures._base.TimeoutError
[ 1680s]
[ 1680s] During handling of the above exception, another exception occurred:
[ 1680s]
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1155, in test_crash_at_task_unpickle
[ 1680s]     self._check_crash(BrokenProcessPool, id, CrashAtUnpickle())
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 1680s]     self._fail_on_deadlock(executor)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 1680s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 1680s] AssertionError: Executor deadlock:
[ 1680s]
[ 1680s] Thread 0x00007f6389d6f700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Thread 0x00007f638a570700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Current thread 0x00007f63982a1740 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1155 in test_crash_at_task_unpickle
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 202 in _runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest_mp.py", line 83 in run_tests_worker
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 678 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 1680s]
[ 1680s]
[ 1680s] ======================================================================
[ 1680s] FAIL: test_crash_during_func_exec_on_worker (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest)
[ 1680s] ----------------------------------------------------------------------
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 1680s]     res.result(timeout=self.TIMEOUT)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 1680s]     raise TimeoutError()
[ 1680s] concurrent.futures._base.TimeoutError
[ 1680s]
[ 1680s] During handling of the above exception, another exception occurred:
[ 1680s]
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1159, in test_crash_during_func_exec_on_worker
[ 1680s]     self._check_crash(BrokenProcessPool, _crash)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 1680s]     self._fail_on_deadlock(executor)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 1680s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 1680s] AssertionError: Executor deadlock:
[ 1680s]
[ 1680s] Thread 0x00007f6389d6f700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Thread 0x00007f638a570700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Current thread 0x00007f63982a1740 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1159 in test_crash_during_func_exec_on_worker
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 202 in _runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest_mp.py", line 83 in run_tests_worker
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 678 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 1680s]
[ 1680s]
[ 1680s] ======================================================================
[ 1680s] FAIL: test_crash_during_result_pickle_on_worker (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest)
[ 1680s] ----------------------------------------------------------------------
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 1680s]     res.result(timeout=self.TIMEOUT)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 1680s]     raise TimeoutError()
[ 1680s] concurrent.futures._base.TimeoutError
[ 1680s]
[ 1680s] During handling of the above exception, another exception occurred:
[ 1680s]
[ 1680s] Traceback (most recent call last):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1172, in test_crash_during_result_pickle_on_worker
[ 1680s]     self._check_crash(BrokenProcessPool, _return_instance, CrashAtPickle)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 1680s]     self._fail_on_deadlock(executor)
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 1680s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 1680s] AssertionError: Executor deadlock:
[ 1680s]
[ 1680s] Thread 0x00007f6389d6f700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Thread 0x00007f638a570700 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 1680s]
[ 1680s] Current thread 0x00007f63982a1740 (most recent call first):
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1172 in test_crash_during_result_pickle_on_worker
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 202 in _runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest_mp.py", line 83 in run_tests_worker
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 678 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 1680s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 1680s]
[ 1680s]
[ 1680s] ----------------------------------------------------------------------
[ 1680s] Ran 226 tests in 1091.207s
[ 1680s]
[ 1680s] FAILED (failures=9, skipped=6)
[ 1680s] test test_concurrent_futures failed
[ 1710s] 0:18:48 load avg: 4.43 running: test_capi (18 min 45 sec), test_faulthandler (18 min 35 sec)
[ 1740s] 0:19:18 load avg: 4.34 running: test_capi (19 min 15 sec), test_faulthandler (19 min 5 sec)
[ 1770s] 0:19:48 load avg: 4.44 running: test_capi (19 min 45 sec), test_faulthandler (19 min 35 sec)
[ 1800s] 0:20:18 load avg: 4.38 running: test_capi (20 min 15 sec), test_faulthandler (20 min 5 sec)
[ 1830s] 0:20:48 load avg: 4.33 running: test_capi (20 min 45 sec), test_faulthandler (20 min 35 sec)
[ 1830s] 0:20:48 load avg: 4.33 [422/423/1] test_faulthandler passed (20 min 34 sec) -- running: test_capi (20 min 45 sec)
[ 1860s] 0:21:18 load avg: 3.86 running: test_capi (21 min 15 sec)
[ 1890s] 0:21:48 load avg: 3.51 running: test_capi (21 min 45 sec)
[ 1920s] 0:22:18 load avg: 3.33 running: test_capi (22 min 15 sec)
[ 1950s] 0:22:48 load avg: 3.66 running: test_capi (22 min 45 sec)
[ 1980s] 0:23:18 load avg: 3.44 running: test_capi (23 min 15 sec)
[ 2010s] 0:23:48 load avg: 3.42 running: test_capi (23 min 45 sec)
[ 2040s] 0:24:18 load avg: 3.45 running: test_capi (24 min 15 sec)
[ 2070s] 0:24:48 load avg: 3.43 running: test_capi (24 min 45 sec)
[ 2100s] 0:25:18 load avg: 3.85 running: test_capi (25 min 15 sec)
[ 2130s] 0:25:48 load avg: 4.27 running: test_capi (25 min 45 sec)
[ 2160s] 0:26:18 load avg: 4.32 running: test_capi (26 min 15 sec)
[ 2190s] 0:26:48 load avg: 4.17 running: test_capi (26 min 45 sec)
[ 2220s] 0:27:18 load avg: 4.10 running: test_capi (27 min 15 sec)
[ 2238s] 0:27:36 load avg: 3.72 [423/423/1] test_capi passed (27 min 32 sec)
[ 2238s]
[ 2238s] == Tests result: FAILURE ==
[ 2238s]
[ 2238s] 402 tests OK.
[ 2238s]
[ 2238s] 10 slowest tests:
[ 2238s] - test_capi: 27 min 32 sec
[ 2238s] - test_faulthandler: 20 min 34 sec
[ 2238s] - test_concurrent_futures: 18 min 11 sec
[ 2238s] - test_io: 3 min 11 sec
[ 2238s] - test_subprocess: 2 min 26 sec
[ 2238s] - test_peg_generator: 2 min 19 sec
[ 2238s] - test_audit: 2 min 16 sec
[ 2238s] - test_multiprocessing_spawn: 2 min 9 sec
[ 2238s] - test_regrtest: 1 min 33 sec
[ 2238s] - test_threading: 1 min 26 sec
[ 2238s]
[ 2238s] 1 test failed:
[ 2238s]     test_concurrent_futures
[ 2238s]
[ 2238s] 20 tests skipped:
[ 2238s]     test_curses test_devpoll test_ioctl test_kqueue test_msilib
[ 2238s]     test_ossaudiodev test_smtpnet test_socketserver test_startfile
[ 2238s]     test_timeout test_tix test_tk test_ttk_guionly test_urllib2net
[ 2238s]     test_urllibnet test_winconsoleio test_winreg test_winsound
[ 2238s]     test_xmlrpc_net test_zipfile64
[ 2238s] 0:27:36 load avg: 3.72
[ 2238s] 0:27:36 load avg: 3.72 Re-running failed tests in verbose mode
[ 2238s] 0:27:36 load avg: 3.72 Re-running test_concurrent_futures in verbose mode (matching: test_crash_at_task_unpickle, test_crash_during_func_exec_on_worker, test_crash_during_result_pickle_on_worker, test_crash_at_task_unpickle, test_crash_during_func_exec_on_worker, test_crash_during_result_pickle_on_worker, test_crash_at_task_unpickle, test_crash_during_func_exec_on_worker, test_crash_during_result_pickle_on_worker)
[ 2318s] test_crash_at_task_unpickle (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest) ...
[ 2318s] Traceback:
[ 2318s]  Thread 0x00007fbd57fff700 (most recent call first):
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2318s]
[ 2318s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2318s]
[ 2318s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1155 in test_crash_at_task_unpickle
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2318s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2318s]
[ 2318s] 79.95s FAIL
[ 2398s] test_crash_during_func_exec_on_worker (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest) ...
[ 2398s] Traceback:
[ 2398s]  Thread 0x00007fbd57fff700 (most recent call first):
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2398s]
[ 2398s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2398s]
[ 2398s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1159 in test_crash_during_func_exec_on_worker
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2398s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2398s]
[ 2398s] 80.54s FAIL
[ 2477s] test_crash_during_result_pickle_on_worker (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest) ...
[ 2477s] Traceback:
[ 2477s]  Thread 0x00007fbd57fff700 (most recent call first):
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2477s]
[ 2477s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2477s]
[ 2477s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1172 in test_crash_during_result_pickle_on_worker
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2477s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2477s]
[ 2477s] 78.53s FAIL
[ 2554s] test_crash_at_task_unpickle (test.test_concurrent_futures.ProcessPoolForkserverExecutorDeadlockTest) ...
[ 2554s] Traceback:
[ 2554s]  Thread 0x00007fbd57fff700 (most recent call first):
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2554s]
[ 2554s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2554s]
[ 2554s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1155 in test_crash_at_task_unpickle
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2554s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2554s]
[ 2554s] 76.82s FAIL
[ 2631s] test_crash_during_func_exec_on_worker (test.test_concurrent_futures.ProcessPoolForkserverExecutorDeadlockTest) ...
[ 2631s] Traceback:
[ 2631s]  Thread 0x00007fbd57fff700 (most recent call first):
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2631s]
[ 2631s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2631s]
[ 2631s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1159 in test_crash_during_func_exec_on_worker
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2631s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2631s]
[ 2631s] 77.49s FAIL
[ 2706s] test_crash_during_result_pickle_on_worker (test.test_concurrent_futures.ProcessPoolForkserverExecutorDeadlockTest) ...
[ 2706s] Traceback:
[ 2706s]  Thread 0x00007fbd57fff700 (most recent call first):
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2706s]
[ 2706s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2706s]
[ 2706s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1172 in test_crash_during_result_pickle_on_worker
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2706s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2706s]
[ 2706s] 75.22s FAIL
[ 2782s] test_crash_at_task_unpickle (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) ...
[ 2782s] Traceback:
[ 2782s]  Thread 0x00007fbd57fff700 (most recent call first):
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2782s]
[ 2782s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2782s]
[ 2782s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1155 in test_crash_at_task_unpickle
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2782s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2782s]
[ 2782s] 75.96s FAIL
[ 2858s] test_crash_during_func_exec_on_worker (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) ...
[ 2858s] Traceback:
[ 2858s]  Thread 0x00007fbd57fff700 (most recent call first):
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2858s]
[ 2858s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2858s]
[ 2858s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1159 in test_crash_during_func_exec_on_worker
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2858s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2858s]
[ 2858s] 76.14s FAIL
[ 2935s] test_crash_during_result_pickle_on_worker (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) ...
[ 2935s] Traceback:
[ 2935s]  Thread 0x00007fbd57fff700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1172 in test_crash_during_result_pickle_on_worker
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2935s]
[ 2935s] 76.73s FAIL
[ 2935s]
[ 2935s] ======================================================================
[ 2935s] FAIL: test_crash_at_task_unpickle (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest)
[ 2935s] ----------------------------------------------------------------------
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 2935s]     res.result(timeout=self.TIMEOUT)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 2935s]     raise TimeoutError()
[ 2935s] concurrent.futures._base.TimeoutError
[ 2935s]
[ 2935s] During handling of the above exception, another exception occurred:
[ 2935s]
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1155, in test_crash_at_task_unpickle
[ 2935s]     self._check_crash(BrokenProcessPool, id, CrashAtUnpickle())
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 2935s]     self._fail_on_deadlock(executor)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 2935s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2935s] AssertionError: Executor deadlock:
[ 2935s]
[ 2935s] Thread 0x00007fbd57fff700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1155 in test_crash_at_task_unpickle
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2935s]
[ 2935s]
[ 2935s] ======================================================================
[ 2935s] FAIL: test_crash_during_func_exec_on_worker (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest)
[ 2935s] ----------------------------------------------------------------------
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 2935s]     res.result(timeout=self.TIMEOUT)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 2935s]     raise TimeoutError()
[ 2935s] concurrent.futures._base.TimeoutError
[ 2935s]
[ 2935s] During handling of the above exception, another exception occurred:
[ 2935s]
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1159, in test_crash_during_func_exec_on_worker
[ 2935s]     self._check_crash(BrokenProcessPool, _crash)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 2935s]     self._fail_on_deadlock(executor)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 2935s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2935s] AssertionError: Executor deadlock:
[ 2935s]
[ 2935s] Thread 0x00007fbd57fff700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1159 in test_crash_during_func_exec_on_worker
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2935s]
[ 2935s]
[ 2935s] ======================================================================
[ 2935s] FAIL: test_crash_during_result_pickle_on_worker (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest)
[ 2935s] ----------------------------------------------------------------------
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 2935s]     res.result(timeout=self.TIMEOUT)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 2935s]     raise TimeoutError()
[ 2935s] concurrent.futures._base.TimeoutError
[ 2935s]
[ 2935s] During handling of the above exception, another exception occurred:
[ 2935s]
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1172, in test_crash_during_result_pickle_on_worker
[ 2935s]     self._check_crash(BrokenProcessPool, _return_instance, CrashAtPickle)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 2935s]     self._fail_on_deadlock(executor)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 2935s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2935s] AssertionError: Executor deadlock:
[ 2935s]
[ 2935s] Thread 0x00007fbd57fff700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1172 in test_crash_during_result_pickle_on_worker
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2935s]
[ 2935s]
[ 2935s] ======================================================================
[ 2935s] FAIL: test_crash_at_task_unpickle (test.test_concurrent_futures.ProcessPoolForkserverExecutorDeadlockTest)
[ 2935s] ----------------------------------------------------------------------
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 2935s]     res.result(timeout=self.TIMEOUT)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 2935s]     raise TimeoutError()
[ 2935s] concurrent.futures._base.TimeoutError
[ 2935s]
[ 2935s] During handling of the above exception, another exception occurred:
[ 2935s]
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1155, in test_crash_at_task_unpickle
[ 2935s]     self._check_crash(BrokenProcessPool, id, CrashAtUnpickle())
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 2935s]     self._fail_on_deadlock(executor)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 2935s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2935s] AssertionError: Executor deadlock:
[ 2935s]
[ 2935s] Thread 0x00007fbd57fff700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1155 in test_crash_at_task_unpickle
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2935s]
[ 2935s]
[ 2935s] ======================================================================
[ 2935s] FAIL: test_crash_during_func_exec_on_worker (test.test_concurrent_futures.ProcessPoolForkserverExecutorDeadlockTest)
[ 2935s] ----------------------------------------------------------------------
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 2935s]     res.result(timeout=self.TIMEOUT)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 2935s]     raise TimeoutError()
[ 2935s] concurrent.futures._base.TimeoutError
[ 2935s]
[ 2935s] During handling of the above exception, another exception occurred:
[ 2935s]
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1159, in test_crash_during_func_exec_on_worker
[ 2935s]     self._check_crash(BrokenProcessPool, _crash)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 2935s]     self._fail_on_deadlock(executor)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 2935s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2935s] AssertionError: Executor deadlock:
[ 2935s]
[ 2935s] Thread 0x00007fbd57fff700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1159 in test_crash_during_func_exec_on_worker
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2935s]
[ 2935s]
[ 2935s] ======================================================================
[ 2935s] FAIL: test_crash_during_result_pickle_on_worker (test.test_concurrent_futures.ProcessPoolForkserverExecutorDeadlockTest)
[ 2935s] ----------------------------------------------------------------------
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 2935s]     res.result(timeout=self.TIMEOUT)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 2935s]     raise TimeoutError()
[ 2935s] concurrent.futures._base.TimeoutError
[ 2935s]
[ 2935s] During handling of the above exception, another exception occurred:
[ 2935s]
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1172, in test_crash_during_result_pickle_on_worker
[ 2935s]     self._check_crash(BrokenProcessPool, _return_instance, CrashAtPickle)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 2935s]     self._fail_on_deadlock(executor)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 2935s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2935s] AssertionError: Executor deadlock:
[ 2935s]
[ 2935s] Thread 0x00007fbd57fff700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1172 in test_crash_during_result_pickle_on_worker
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2935s]
[ 2935s]
[ 2935s] ======================================================================
[ 2935s] FAIL: test_crash_at_task_unpickle (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest)
[ 2935s] ----------------------------------------------------------------------
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 2935s]     res.result(timeout=self.TIMEOUT)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 2935s]     raise TimeoutError()
[ 2935s] concurrent.futures._base.TimeoutError
[ 2935s]
[ 2935s] During handling of the above exception, another exception occurred:
[ 2935s]
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1155, in test_crash_at_task_unpickle
[ 2935s]     self._check_crash(BrokenProcessPool, id, CrashAtUnpickle())
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 2935s]     self._fail_on_deadlock(executor)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 2935s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2935s] AssertionError: Executor deadlock:
[ 2935s]
[ 2935s] Thread 0x00007fbd57fff700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1155 in test_crash_at_task_unpickle
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2935s]
[ 2935s]
[ 2935s] ======================================================================
[ 2935s] FAIL: test_crash_during_func_exec_on_worker (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest)
[ 2935s] ----------------------------------------------------------------------
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 2935s]     res.result(timeout=self.TIMEOUT)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 2935s]     raise TimeoutError()
[ 2935s] concurrent.futures._base.TimeoutError
[ 2935s]
[ 2935s] During handling of the above exception, another exception occurred:
[ 2935s]
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1159, in test_crash_during_func_exec_on_worker
[ 2935s]     self._check_crash(BrokenProcessPool, _crash)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 2935s]     self._fail_on_deadlock(executor)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 2935s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2935s] AssertionError: Executor deadlock:
[ 2935s]
[ 2935s] Thread 0x00007fbd57fff700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1159 in test_crash_during_func_exec_on_worker
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2935s]
[ 2935s]
[ 2935s] ======================================================================
[ 2935s] FAIL: test_crash_during_result_pickle_on_worker (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest)
[ 2935s] ----------------------------------------------------------------------
[ 2935s] test test_concurrent_futures failed
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1133, in _check_crash
[ 2935s]     res.result(timeout=self.TIMEOUT)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/_base.py", line 447, in result
[ 2935s]     raise TimeoutError()
[ 2935s] concurrent.futures._base.TimeoutError
[ 2935s]
[ 2935s] During handling of the above exception, another exception occurred:
[ 2935s]
[ 2935s] Traceback (most recent call last):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1172, in test_crash_during_result_pickle_on_worker
[ 2935s]     self._check_crash(BrokenProcessPool, _return_instance, CrashAtPickle)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137, in _check_crash
[ 2935s]     self._fail_on_deadlock(executor)
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1114, in _fail_on_deadlock
[ 2935s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2935s] AssertionError: Executor deadlock:
[ 2935s]
[ 2935s] Thread 0x00007fbd57fff700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 320 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 946 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Thread 0x00007fbd74ff9700 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/selectors.py", line 416 in select
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/multiprocessing/connection.py", line 936 in wait
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 377 in wait_result_broken_or_wakeup
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/concurrent/futures/process.py", line 317 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 1009 in _bootstrap_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/threading.py", line 966 in _bootstrap
[ 2935s]
[ 2935s] Current thread 0x00007fbdae8ec740 (most recent call first):
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1105 in _fail_on_deadlock
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1137 in _check_crash
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/test_concurrent_futures.py", line 1172 in test_crash_during_result_pickle_on_worker
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 549 in _callTestMethod
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 591 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/case.py", line 650 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 122 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/suite.py", line 84 in __call__
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/unittest/runner.py", line 176 in run
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 990 in _run_suite
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/support/__init__.py", line 1115 in run_unittest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 335 in _runtest_inner
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 715 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 658 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/libregrtest/main.py", line 736 in main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 43 in _main
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/test/regrtest.py", line 47 in <module>
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 86 in _run_code
[ 2935s]   File "/home/abuild/rpmbuild/BUILD/Python-3.10.0/Lib/runpy.py", line 196 in _run_module_as_main
[ 2935s]
[ 2935s]
[ 2935s] ----------------------------------------------------------------------
[ 2935s] Ran 9 tests in 697.425s
[ 2935s]
[ 2935s] FAILED (failures=9)
[ 2935s] 1 test failed again:
[ 2935s]     test_concurrent_futures


This test case is successful on the aarch64 architecture. What might cause this?

(I'm very sorry. I don't know who to copy to. I choose  these developers who  recently submitted code modified file Lib/test/test_concurrent_futures.py.)

----------
components: Library (Lib), Tests
messages: 403732
nosy: Asheesh.Laroia, serhiy.storchaka, shihai1991, sxt1001
priority: normal
severity: normal
status: open
title: test.test_concurrent_futures fail in x86_ 64 architecture
type: crash
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45444>
_______________________________________

From report at bugs.python.org  Tue Oct 12 13:30:37 2021
From: report at bugs.python.org (Andre Roberge)
Date: Tue, 12 Oct 2021 17:30:37 +0000
Subject: [issue45450] Improve syntax error for parenthesized arguments
In-Reply-To: <1634059257.61.0.643840687035.issue45450@roundup.psfhosted.org>
Message-ID: <1634059837.58.0.864621698535.issue45450@roundup.psfhosted.org>


Change by Andre Roberge <andre.roberge at gmail.com>:


----------
nosy: +aroberge

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45450>
_______________________________________

From report at bugs.python.org  Tue Oct 12 14:46:53 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Tue, 12 Oct 2021 18:46:53 +0000
Subject: [issue45446] Add a way to hide fields in dataclasses
Message-ID: <1634064413.57.0.706886797987.issue45446@roundup.psfhosted.org>


New submission from Eric V. Smith <eric at trueblade.com>:

Please explain what "hiding" does.

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45446>
_______________________________________

From report at bugs.python.org  Tue Oct 12 14:47:05 2021
From: report at bugs.python.org (Carl Friedrich Bolz-Tereick)
Date: Tue, 12 Oct 2021 18:47:05 +0000
Subject: [issue45417] Enum creation non-linear in the number of values
In-Reply-To: <1633737153.71.0.819400116811.issue45417@roundup.psfhosted.org>
Message-ID: <1634064425.55.0.65839779787.issue45417@roundup.psfhosted.org>


Change by Carl Friedrich Bolz-Tereick <cfbolz at gmx.de>:


----------
nosy: +Carl.Friedrich.Bolz
nosy_count: 6.0 -> 7.0
pull_requests: +27198
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28907

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45417>
_______________________________________

From report at bugs.python.org  Tue Oct 12 14:48:25 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Tue, 12 Oct 2021 18:48:25 +0000
Subject: [issue45448] PIP package installation failure for multiple packages
In-Reply-To: <1634053122.93.0.794234678092.issue45448@roundup.psfhosted.org>
Message-ID: <1634064505.69.0.474116937541.issue45448@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

You should report these problems to the numpy and tensorflow projects. I'm assuming they don't support 3.10 yet.

----------
nosy: +eric.smith
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45448>
_______________________________________

From report at bugs.python.org  Tue Oct 12 14:48:35 2021
From: report at bugs.python.org (Carl Friedrich Bolz-Tereick)
Date: Tue, 12 Oct 2021 18:48:35 +0000
Subject: [issue45417] Enum creation non-linear in the number of values
In-Reply-To: <1633737153.71.0.819400116811.issue45417@roundup.psfhosted.org>
Message-ID: <1634064515.56.0.500428732688.issue45417@roundup.psfhosted.org>


Carl Friedrich Bolz-Tereick <cfbolz at gmx.de> added the comment:

I fixed the reliance of set being insertion ordered in pypy and opened a pull request.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45417>
_______________________________________

From report at bugs.python.org  Tue Oct 12 14:54:48 2021
From: report at bugs.python.org (Alick Zhao)
Date: Tue, 12 Oct 2021 18:54:48 +0000
Subject: [issue42345] Equality of typing.Literal depends on the order of
 arguments
In-Reply-To: <1605276715.65.0.853257843244.issue42345@roundup.psfhosted.org>
Message-ID: <1634064888.64.0.935152970713.issue42345@roundup.psfhosted.org>


Alick Zhao <alick9188 at gmail.com> added the comment:

Mainly to clarify, this is fixed in Python 3.9 and above, but won't be fixed in Python 3.8, right?

```
~$ python3.8
Python 3.8.11 (default, Jul 24 2021, 13:24:12)
[Clang 12.0.5 (clang-1205.0.22.11)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Could not open PYTHONSTARTUP
FileNotFoundError: [Errno 2] No such file or directory: '/Users/taoz/.pythonstartup'
>>> from typing import Literal
>>> Literal[1,2]==Literal[2,1]
False
>>>
```

----------
nosy: +alick

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42345>
_______________________________________

From report at bugs.python.org  Tue Oct 12 15:31:41 2021
From: report at bugs.python.org (Ethan Furman)
Date: Tue, 12 Oct 2021 19:31:41 +0000
Subject: [issue38659] enum classes cause slow startup time
In-Reply-To: <1572570768.69.0.355804772721.issue38659@roundup.psfhosted.org>
Message-ID: <1634067101.83.0.644423398396.issue38659@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:

The reason for that quadratic behavior is that for each new member (aka attribute), all the previous members must be checked to see if the new member is a duplicate.

In practice I wouldn't expect this to be a problem as most enums should be fairly small -- are there any real-world examples where there are more than, say, a hundred?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38659>
_______________________________________

From report at bugs.python.org  Tue Oct 12 15:34:36 2021
From: report at bugs.python.org (Jeff Allen)
Date: Tue, 12 Oct 2021 19:34:36 +0000
Subject: [issue45435] delete misleading faq entry about atomic operations
In-Reply-To: <1633993956.72.0.321894468898.issue45435@roundup.psfhosted.org>
Message-ID: <1634067276.62.0.990719087256.issue45435@roundup.psfhosted.org>


Jeff Allen <ja.py at farowl.co.uk> added the comment:

Thomas wrote:
> it's as part of this discussion in https://mail.python.org/archives/list/python-dev at python.org/thread/ABR2L6BENNA6UPSPKV474HCS4LWT26GY/#IAOCDDCJ653NBED3G2J2YBWD7HHPFHT6 and others in #python-dev 

That's where I noticed it, but it seemed the wrong place to explore this way.

Steven is right, I'm over-stating the case. And although valid that this is CPython specific, it's well sign-posted and I'm just being thin-skinned.

Serhiy writes:
> sort() is atomic, even if GIL is released during executing custom __lt__. It is guaranteed that no operations on the list in other threads can affect the result of sort().

The strategy noted here: https://github.com/python/cpython/blob/2d21612f0dd84bf6d0ce35bcfcc9f0e1a41c202d/Objects/listobject.c#L2261-L2265
does guarantee that, which I hadn't noticed. What if during the release of the GIL, another thread appends to L? In my simple experiment I get a ValueError and the modifications are lost. I think that is not thread-safe.

Serhiy also writes:

> I do not understand what non-atomic you see in x = L[i]. The value of x is determined by values of L and i at the start of the operation. GIL is not released during indexing L, and if it is released between indexing and assignment, it does not affect the result.

and Steven:

> Does that matter though? I think that's a distinction that makes no 
difference.

> We know that another thread could change the L or the i before the 
assignment, if they are global. But once the L[i] lookup has occurred, 
it doesn't matter if they change. It's not going to affect what value 
gets bound to the x.

Fair enough. Atomicity is a bit slippery, I find. It depends where the critical region starts. Thinking again, it's not the assignment that's the issue ...

L is pushed
i is pushed
__getitem__ is called
x is popped

It is possible, if i and L are accessible to another thread and change after L is pushed, that x is given a value composed from an i and an L that never existed concurrently in the view of the other thread. Straining at gnats here, but atomicity is a strong claim.

And on the point about re-ordering and CPUs, I can't imagine re-ordering that effectively changes the order of byte codes. But do CPython threads run in separate CPUs, or is that only when we have multiple interpreters? If so, and L were in a hot memory location (either the variable or its content), this could be inconsistent between threads. Sorry, I don't know the memory coherence CPython has: I know I couldn't rely on it in Java.

I'm just arguing that the section gives advice that is *nearly* always right, which is a horrible thing to debug. I'll stop stirring.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45435>
_______________________________________

From report at bugs.python.org  Tue Oct 12 15:36:00 2021
From: report at bugs.python.org (Alex Waygood)
Date: Tue, 12 Oct 2021 19:36:00 +0000
Subject: [issue45447] IDLE: Support syntax highlighting for .pyi stub files
In-Reply-To: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>
Message-ID: <1634067360.09.0.49075370058.issue45447@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

It looks like support for .py files is hardcoded into IDLE's source code in the following places:


* browser.ModuleBrowserTreeItem.OnDoubleClick
* browser.ModuleBrowserTreeItem.IsExpandable
* browser.ModuleBrowserTreeItem.listchildren
* editor.ispythonsource  << This is the one that controls syntax highlighting
* iomenu.IOBinding.filetypes


If I were to file a PR adding support for .pyi files, would you prefer that I hardcoded ".pyi" in, or would it be better to add a SUPPORTED_FILES constant somewhere?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Tue Oct 12 15:53:00 2021
From: report at bugs.python.org (Nium)
Date: Tue, 12 Oct 2021 19:53:00 +0000
Subject: [issue45446] Add a way to hide fields in dataclasses
In-Reply-To: <1634064413.57.0.706886797987.issue45446@roundup.psfhosted.org>
Message-ID: <1634068380.97.0.117718217892.issue45446@roundup.psfhosted.org>


Nium <formigacomcaimbra at gmail.com> added the comment:

The objective of this feature is to add a way to omit fields of a dataclass when `asdict` or `astuple` is used.

The main propuse is to add the `hide` parameter in `field` and add it as an attribute in the `Field` class.
```py
@dataclass
class User:
    name: str
    ws: WebSocket = field(hide=True)


user = User("NiumXp", None)
assert asdict(user) == {"name": "NiumXp"}
```
`asdict` will ignore all fields that have the `hide` attribute set as `True`.

---

Actually a possible solution to do it is doing this:
```py
from dataclasses import *

_asdict = asdict


class WebSocket:
    pass


def asdict(obj):
    def factory(it):
        fields = []

        for raw_field in it:
            name, _ = raw_field

            field = obj.__dataclass_fields__[name]
            if not field.metadata.get("hide"):
                fields.append(raw_field)

        return dict(fields)
    return _asdict(obj, dict_factory=factory)


@dataclass
class User:
    name: str
    ws: WebSocket = field(metadata={"hide": True})


user = User("NiumXp", None)
assert asdict(user) == {"name": "NiumXp"}
```
We need to make the same in `astuple` and to avoid writing `field(metadata={"hide": True)` multiple times we can use

```py
from functools import partial
from dataclasses import field as _field

field = _field(metadata={"hide": True})
```

But, this means that we can't reuse the `metadata` parameter.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45446>
_______________________________________

From report at bugs.python.org  Tue Oct 12 16:18:41 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 12 Oct 2021 20:18:41 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634069921.5.0.930164776396.issue45439@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


Added file: https://bugs.python.org/file50350/test_bench2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Tue Oct 12 16:18:48 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 12 Oct 2021 20:18:48 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634069928.76.0.783700615588.issue45439@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


Added file: https://bugs.python.org/file50351/bench2.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Tue Oct 12 17:01:49 2021
From: report at bugs.python.org (Josh Rosenberg)
Date: Tue, 12 Oct 2021 21:01:49 +0000
Subject: [issue45450] Improve syntax error for parenthesized arguments
In-Reply-To: <1634059257.61.0.643840687035.issue45450@roundup.psfhosted.org>
Message-ID: <1634072509.9.0.289922245119.issue45450@roundup.psfhosted.org>


Josh Rosenberg <shadowranger+python at gmail.com> added the comment:

Why not "lambda parameters cannot be parenthesized" (optionally "lambda function")? def-ed function parameters are parenthesized, so just saying "Function parameters cannot be parenthesized" seems very weird.

----------
nosy: +josh.r

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45450>
_______________________________________

From report at bugs.python.org  Tue Oct 12 17:40:19 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 12 Oct 2021 21:40:19 +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: <1634074819.14.0.569702683726.issue44359@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I reproduced manually the issue. test_makeport() can trigger the "Uncaught thread exception: Exception".

test_makeport (test.test_ftplib.TestTLS_FTPClassMixin) ...

Warning -- Uncaught thread exception: Exception
Exception in thread Thread-67:
Traceback (most recent call last):
  File "/home/vstinner/python/main/Lib/asyncore.py", line 90, in read
    obj.handle_read_event()
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/python/main/Lib/test/test_ftplib.py", line 384, in handle_read_event
    self._do_ssl_handshake()
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/python/main/Lib/test/test_ftplib.py", line 345, in _do_ssl_handshake
    self.socket.do_handshake()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/python/main/Lib/ssl.py", line 1346, in do_handshake
    self._sslobj.do_handshake()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:998)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vstinner/python/main/Lib/threading.py", line 1031, in _bootstrap_inner
    self.run()
    ^^^^^^^^^^
  File "/home/vstinner/python/main/Lib/test/test_ftplib.py", line 298, in run
    asyncore.loop(timeout=0.1, count=1)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/python/main/Lib/asyncore.py", line 214, in loop
    poll_fun(timeout, map)
    ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/python/main/Lib/asyncore.py", line 157, in poll
    read(obj)
    ^^^^^^^^^
  File "/home/vstinner/python/main/Lib/asyncore.py", line 94, in read
    obj.handle_error()
    ^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/python/main/Lib/test/test_ftplib.py", line 421, in handle_error
    raise Exception
    ^^^^^^^^^^^^^^^
Exception

ok

----------
title: test_ftplib fails as "env changes" if a socket operation times out in a thread: TimeoutError is not catched -> test_ftplib.test_makeport() fails as "env changes" if a socket operation times out in a thread: TimeoutError is not catched

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44359>
_______________________________________

From report at bugs.python.org  Tue Oct 12 17:40:49 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Tue, 12 Oct 2021 21:40:49 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1634074849.62.0.110656317403.issue45438@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

It looks like the error is in inspect.formatannotation().

For instances of type, that function incorrectly returns only annotation.__qualname__.

Instead, it should return repr(annotation) which would include the args.

=================================================================


def formatannotation(annotation, base_module=None):
    if getattr(annotation, '__module__', None) == 'typing':
        return repr(annotation).replace('typing.', '')
    if isinstance(annotation, type):                # <== Erroneous case
        if annotation.__module__ in ('builtins', base_module):
            return annotation.__qualname__
        return annotation.__module__+'.'+annotation.__qualname__
    return repr(annotation)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Tue Oct 12 17:50:11 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Tue, 12 Oct 2021 21:50:11 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1634075411.66.0.801969098076.issue45438@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

Sure. Waiting for your PR. :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Tue Oct 12 17:51:11 2021
From: report at bugs.python.org (Gregory Beauregard)
Date: Tue, 12 Oct 2021 21:51:11 +0000
Subject: [issue45443] 'ThreadPoolExecutor' object has no attribute 'map'
In-Reply-To: <1634035739.42.0.184025452389.issue45443@roundup.psfhosted.org>
Message-ID: <1634075471.5.0.506070011367.issue45443@roundup.psfhosted.org>


Gregory Beauregard <greg at greg.red> added the comment:

I get no attribute error with this code in 3.9 or 3.10.

----------
nosy: +GBeauregard

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45443>
_______________________________________

From report at bugs.python.org  Tue Oct 12 18:14:55 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Tue, 12 Oct 2021 22:14:55 +0000
Subject: [issue45450] Improve syntax error for parenthesized arguments
In-Reply-To: <1634059257.61.0.643840687035.issue45450@roundup.psfhosted.org>
Message-ID: <1634076895.36.0.253464949001.issue45450@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

> so just saying "Function parameters cannot be parenthesized" seems very weird.

I agree that the wording can be improved, but is not weird, it has the same problem in functions:

>>> def foo(x,y,(z,w),k):
  File "<stdin>", line 1
    def foo(x,y,(z,w),k):
                ^
SyntaxError: invalid syntax

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45450>
_______________________________________

From report at bugs.python.org  Tue Oct 12 18:15:25 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Tue, 12 Oct 2021 22:15:25 +0000
Subject: [issue45450] Improve syntax error for parenthesized arguments
In-Reply-To: <1634059257.61.0.643840687035.issue45450@roundup.psfhosted.org>
Message-ID: <1634076925.16.0.572988984949.issue45450@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

With PR 28906 it will show:

>>> def foo(x,y,(z,w),k):
  File "<stdin>", line 1
    def foo(x,y,(z,w),k):
                ^^^^^
SyntaxError: Function parameters cannot be parenthesized

I am happy to take suggestions for the wording

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45450>
_______________________________________

From report at bugs.python.org  Tue Oct 12 18:28:28 2021
From: report at bugs.python.org (Andre Roberge)
Date: Tue, 12 Oct 2021 22:28:28 +0000
Subject: [issue45450] Improve syntax error for parenthesized arguments
In-Reply-To: <1634059257.61.0.643840687035.issue45450@roundup.psfhosted.org>
Message-ID: <1634077708.67.0.676459437853.issue45450@roundup.psfhosted.org>


Andre Roberge <andre.roberge at gmail.com> added the comment:

+1 on adding better error messages for these cases. I also agree with having different explanations with lambda and def.

Below is what I have with friendly-traceback: perhaps the first line of both of these might be suitable?   (I will likely change the first line in each case to be as similar to what you end up with.)

>>> set_include("why")
>>> lambda (x, y): x + y

    `lambda` does not allow parentheses around its arguments.
    This was allowed in Python 2 but it not allowed in Python 3.

>>> def foo(x, (y, z), w):

    You cannot have explicit tuples as function arguments.
    You can only use identifiers (variable names) as function arguments.
    Assign any tuple to a parameter and unpack it
    within the body of the function.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45450>
_______________________________________

From report at bugs.python.org  Tue Oct 12 19:09:38 2021
From: report at bugs.python.org (Ben)
Date: Tue, 12 Oct 2021 23:09:38 +0000
Subject: [issue45435] delete misleading faq entry about atomic operations
In-Reply-To: <1633993956.72.0.321894468898.issue45435@roundup.psfhosted.org>
Message-ID: <1634080178.95.0.554086559469.issue45435@roundup.psfhosted.org>


Ben <benjsimner at gmail.com> added the comment:

The problem with the FAQs is that it's over-simplifying things to the point where it can sometimes mislead.

Notably, it says the GIL protects these operations; but as Antoine points out,  many operations on datatypes drop back into Python (including potential decrefs)

Concerns about non-atomic evaluation of the composition of operations in these statements is mostly due to the way the FAQ is presented,  it should be made clearer *which* operations it's describing to be atomic.
(Otherwise you get questions like "is x = L[x] atomic?")

graingert said the following might be useful, so:
Going through each of the points of the FAQ...

The following seem relatively straight-forward and non-controversial(?):
x = L[i]
x = L.pop()
x = y
L.append(x)
L1.extend(L2)

I'm not even sure what it *means* when it says the following:
D.keys()

The following probably have some caveats:
D[x] = y

These appear to be the suspect ones:
D1.update(D2)
L.sort()
L[i:j] = L2
x.field = y

Exploring each in more detail...

dict.keys is just a mystery to me, maybe this mattered in Python 2 but these are view objects now, or maybe I am missing something?

dict.__setitem__ needs clarification really, surely the actual setting of the item is "atomic" in that other threads will either see the dict with or without the item and not halfway through some resizing operation or something, but in doing the setting it may trigger many __eq__ calls on the other keys
(either during the resize itself, or just during probing).

The dict.update case seems like it should hold if both dicts have keys made of only other builtin types so that the GIL can continue to protect.  If the keys of either are custom objects with their own __eq__ then the "atomicity" of the operation is in question
as the __eq__ can happen "during" the update.
Imagine two update()s to the same dict,  if the keys have custom __eq__'s then the (concurrent) composition of the two may give some mix of the two dictionaries overlapping keys.
(Note that the __hash__ doesn't matter as it is not recomputed on an update)

For list.sort it's more subtle,
there is built-in protection to make it somewhat atomic
which means that append()s and extend()s shouldn't be lost
but concurrent threads might suddenly see the list be emptied and concurrent len()/L.pop() see sequentially inconsistent results.

For list.__setitem__ it's clear it's non-atomic in the case that the elements of the list are custom objects with their own __del__, and the FAQ does infact mention this case (at the bottom).

Attribute assignment is odd,  I can't see how that can be described as "atomic" for arbitrary objects. There is no way the FAQ really means that x and y are instances of `object`.

There are questions about operations that are potentially missing(?) from the list:
len(L)
D1.copy()
L1 += L2  (or does "extend" cover this too?)
... etc,  and other datatypes (tuples are an obvious question here)

It's not clear why the FAQ picked these exact operations out specifically.

Fundamentally this FAQ tries to be both a language definition ("You can rely on these operations being atomic") but also somewhat of an implementation-dependent description ("this is what is true in CPython").
Perhaps the best long-term solution would be to remove this "FAQ" and either move more detailed discussion about atomicity guarantees for various operations to the actual docs for the built-in data structures or to relax the guarantees the language gives -- asking people to use mutexes/async libraries more and only guaranteeing enough to make those cases work.

----------
nosy: +bjs

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45435>
_______________________________________

From report at bugs.python.org  Tue Oct 12 19:25:50 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 12 Oct 2021 23:25:50 +0000
Subject: [issue45410] python -m test -jN: write stderr in stdout to get
 messages in order
In-Reply-To: <1633691736.44.0.338544053782.issue45410@roundup.psfhosted.org>
Message-ID: <1634081150.57.0.907488004333.issue45410@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27199
pull_request: https://github.com/python/cpython/pull/28908

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45410>
_______________________________________

From report at bugs.python.org  Tue Oct 12 19:52:29 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 12 Oct 2021 23:52:29 +0000
Subject: [issue45410] python -m test -jN: write stderr in stdout to get
 messages in order
In-Reply-To: <1633691736.44.0.338544053782.issue45410@roundup.psfhosted.org>
Message-ID: <1634082749.85.0.809938208362.issue45410@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset dbe213de7ef28712bbfdb9d94a33abb9c33ef0c2 by Victor Stinner in branch 'main':
bpo-45410: Enhance libregrtest -W/--verbose3 option (GH-28908)
https://github.com/python/cpython/commit/dbe213de7ef28712bbfdb9d94a33abb9c33ef0c2


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45410>
_______________________________________

From report at bugs.python.org  Tue Oct 12 20:10:33 2021
From: report at bugs.python.org (Ned Deily)
Date: Wed, 13 Oct 2021 00:10:33 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1634083833.64.0.574739706775.issue45405@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:


New changeset 9c4766772cda67648184f8ddba546a5fc0167f91 by David Bohman in branch 'main':
bpo-45405: Prevent ``internal configure error`` when running ``configure``  with recent versions of non-Apple clang. (#28845)
https://github.com/python/cpython/commit/9c4766772cda67648184f8ddba546a5fc0167f91


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Tue Oct 12 20:11:16 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 13 Oct 2021 00:11:16 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1634083876.87.0.439249830588.issue45405@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27200
pull_request: https://github.com/python/cpython/pull/28910

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Tue Oct 12 20:11:20 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 13 Oct 2021 00:11:20 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1634083880.49.0.377010274353.issue45405@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27201
pull_request: https://github.com/python/cpython/pull/28911

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Tue Oct 12 20:22:38 2021
From: report at bugs.python.org (Inada Naoki)
Date: Wed, 13 Oct 2021 00:22:38 +0000
Subject: [issue45421] Remove dead code from html.parser
In-Reply-To: <1633844737.55.0.569517591306.issue45421@roundup.psfhosted.org>
Message-ID: <1634084558.08.0.239445015433.issue45421@roundup.psfhosted.org>


Change by Inada Naoki <songofacandy at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45421>
_______________________________________

From report at bugs.python.org  Tue Oct 12 20:28:53 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 00:28:53 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634084933.66.0.236747001334.issue45439@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I should also check again the stack consumption. Old issues:

* bpo-29465: Modify _PyObject_FastCall() to reduce stack consumption
* bpo-29234: Disable inlining of _PyStack_AsTuple() to reduce the stack consumption
* bpo-29227: Reduce C stack consumption in function calls
* bpo-28858: Fastcall uses more C stack

See also: "Stack consumption" of https://vstinner.github.io/contrib-cpython-2017q1.html

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Tue Oct 12 20:31:56 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 00:31:56 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634085116.27.0.77129229613.issue45439@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

5 years ago, I added _PyObject_CallArg1() (similar to PyObject_CallOneArg()) and then I removed it since it consumed more stack memory than existing function, whereas I added _PyObject_CallArg1() to reduce the stack consumption.

commit 7bfb42d5b7721ca26e33050d025fec5c43c00058
Author: Victor Stinner <victor.stinner at gmail.com>
Date:   Mon Dec 5 17:04:32 2016 +0100

    Issue #28858: Remove _PyObject_CallArg1() macro
    
    Replace
       _PyObject_CallArg1(func, arg)
    with
       PyObject_CallFunctionObjArgs(func, arg, NULL)
    
    Using the _PyObject_CallArg1() macro increases the usage of the C stack, which
    was unexpected and unwanted. PyObject_CallFunctionObjArgs() doesn't have this
    issue.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Tue Oct 12 20:31:39 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 13 Oct 2021 00:31:39 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1634085099.08.0.0729976677094.issue45405@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset edae3e2ac73151217b4b4e096dd9f17cc0a50c11 by Miss Islington (bot) in branch '3.10':
[3.10] bpo-45405: Prevent ``internal configure error`` when running ``configure``  with recent versions of non-Apple clang. (GH-28845) (GH-28911)
https://github.com/python/cpython/commit/edae3e2ac73151217b4b4e096dd9f17cc0a50c11


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Tue Oct 12 20:36:06 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 13 Oct 2021 00:36:06 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1634085366.95.0.224957450666.issue45405@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 9901d153c201d852d27dc9d3074e283c26468f6d by Miss Islington (bot) in branch '3.9':
[3.9] bpo-45405: Prevent ``internal configure error`` when running ``configure``  with recent versions of non-Apple clang. (GH-28845) (GH-28910)
https://github.com/python/cpython/commit/9901d153c201d852d27dc9d3074e283c26468f6d


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Tue Oct 12 20:49:08 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 13 Oct 2021 00:49:08 +0000
Subject: [issue45447] IDLE: Support syntax highlighting for .pyi stub files
In-Reply-To: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>
Message-ID: <1634086148.01.0.993103971284.issue45447@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Thank you for doing the research.

I have been thinking about adding a file containing idlelib 'leaf' objects, those with no idlelib dependencies, which are needed in more than one file. would be to reduce the complexity of the idlelib dependency graph, which has enough cyclic dependencies to make startup tricky.  Time to do it.  idlelib/common.py?, leaves.py?, or ???  Draft:
---
"""Idlelib objects with no external idlelib dependencies and which are needed in more than one idlelib module.  They are included here because a) they don't particularly belong elsewhere or b) because inclusion here simplifies the idlelib dependency graph.

TODO: Python versions (editor and help_about), tk version and patchlevel (pyshell, help_about, maxos?, editor?), std streams (pyshell, run), warning stuff (ditto).
"""

# python_extensions is used in editor, browser, and iomenu.
# .pyw is for Windows; .pyi is for stub files.
python_extensions = ('.py', '.pyw', '.pyi')  
extension_string = "*" + " *".join(python_extensions)
---

editor.EditorWindow.ispythonsource could be moved into the new file if a 'firstline=None' argument were added.

OnDoubleClick should use IsExpandable.  IsExpandable should use the logic in ispythonsource so Linux no-extension python source can be browsed as well as edited.

After manual testing, add a new test_common.py file in idlelib.idle_test. After imports, it could start with one test:

class ExtensionTest(TestCase):
    def test_stub(self):
        self.assertIn('.pyi', common.python_extensions)
        self.assertIn('.pyi', common.extension_string)

For IDLE, I can and will backport.

----------
stage:  -> test needed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Tue Oct 12 20:52:47 2021
From: report at bugs.python.org (Ned Deily)
Date: Wed, 13 Oct 2021 00:52:47 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1634086367.45.0.951285991564.issue45405@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

Merged for release in 3.10.1 and 3.9.8. Thanks for the issue and PR, David!

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Tue Oct 12 21:04:56 2021
From: report at bugs.python.org (primexx)
Date: Wed, 13 Oct 2021 01:04:56 +0000
Subject: [issue45451] IDLE Shell GUI - remove window border
Message-ID: <1634087096.76.0.0471723883661.issue45451@roundup.psfhosted.org>


New submission from primexx <primexx at gmail.com>:

Python 3.10 bundled IDLE with a small change in the interactive interpreter shell.

Previously, the line indicators ">>>" were in-line with the command line, and a long/multi line command would have the same indentation as the indicator which was not ideal.

that has been changed in 3.10 so that the line indicators are in a separate area as the actual commands so actual commands are always indented consistently. this is good.

however, there is now a thick window border separating the line indicator and the main window. this is jarring and creates a visual separation that disassociates the line indicator from the line itself.

i have on several occasions sat there waiting for something to finish only to notice that it has already finished but i missed seeing the next line indicator to the left.

the window border creates two separate spaces and is distracting.

an improvement would be to instead of the window border, eliminate it and shade the left side with a very light colour (probably even lighter than my photoshop in the attached image).

actually, I suggest that the best solution is to remove the window border and leave the entire thing contiguously white, with no shading, similar to what it looked like previously. except that it now has correct indentation. I think this is the most visually cohesive and easy to use.

Attached is an image to illustrate. Again, I suggest the "not shaded" version is the best.

----------
assignee: terry.reedy
components: IDLE
files: idle310.PNG
messages: 403774
nosy: primexx, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE Shell GUI - remove window border
type: enhancement
versions: Python 3.10
Added file: https://bugs.python.org/file50352/idle310.PNG

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45451>
_______________________________________

From report at bugs.python.org  Tue Oct 12 21:13:39 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 01:13:39 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634087619.08.0.489421712206.issue45434@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27202
pull_request: https://github.com/python/cpython/pull/28912

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Tue Oct 12 21:27:19 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 01:27:19 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634088439.65.0.947801371824.issue45434@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27203
pull_request: https://github.com/python/cpython/pull/28913

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Tue Oct 12 21:39:57 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 01:39:57 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634089197.75.0.815026124897.issue45434@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 489176e4285314f9ea87b8bd91fe1d55d9af2c42 by Victor Stinner in branch 'main':
bpo-45434: Convert Py_GETENV() macro to a function (GH-28912)
https://github.com/python/cpython/commit/489176e4285314f9ea87b8bd91fe1d55d9af2c42


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Tue Oct 12 21:43:01 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 01:43:01 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634089381.53.0.932703575997.issue45434@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27204
pull_request: https://github.com/python/cpython/pull/28914

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Tue Oct 12 21:45:22 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 13 Oct 2021 01:45:22 +0000
Subject: [issue45452] Support crash tolerance for gdbm module
Message-ID: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>


New submission from Dong-hee Na <donghee.na at python.org>:

>From gdbm 1.21, gdbm supports the crash tolerance feature.
We may need to provide APIs for those versions.

https://www.gnu.org.ua/software/gdbm/manual/Crash-Tolerance.html

Following features will be provided if the user using gdbm >= 1.21
- Need to provide `GDBM_NUMSYNC` as `s`.
- Need to provide API for gdbm_failure_atomic()
- Need to provide API for gdbm_latest_snapshot()

----------
assignee: corona10
components: Extension Modules
messages: 403776
nosy: corona10, vstinner
priority: normal
severity: normal
status: open
title: Support crash tolerance for gdbm module
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Tue Oct 12 21:45:43 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 13 Oct 2021 01:45:43 +0000
Subject: [issue45452] Support crash tolerance for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634089543.68.0.539767947838.issue45452@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

I am going to work on this issue :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Tue Oct 12 21:51:44 2021
From: report at bugs.python.org (Inada Naoki)
Date: Wed, 13 Oct 2021 01:51:44 +0000
Subject: [issue36521] Consider removing docstrings from co_consts in code
 objects
In-Reply-To: <1554339855.64.0.463077014069.issue36521@roundup.psfhosted.org>
Message-ID: <1634089904.31.0.636202659715.issue36521@roundup.psfhosted.org>


Inada Naoki <songofacandy at gmail.com> added the comment:

Although I still feel reducing 16% tuples is attractive, no one support the idea.

I leave this as-is for now, and will go to lazy-loading docstring (maybe, co_linetable too) later.

----------
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36521>
_______________________________________

From report at bugs.python.org  Tue Oct 12 21:52:14 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 13 Oct 2021 01:52:14 +0000
Subject: [issue45452] Support crash tolerance for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634089934.09.0.782552898597.issue45452@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Tue Oct 12 21:52:32 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 13 Oct 2021 01:52:32 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634089952.94.0.248056221476.issue45452@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
title: Support crash tolerance for gdbm module -> Support crash tolerance feature for gdbm module

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Tue Oct 12 21:52:49 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 01:52:49 +0000
Subject: [issue45453] test_embed: random crash on AMD64 Fedora Rawhide Clang
 3.x
Message-ID: <1634089969.63.0.707166222279.issue45453@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

test_embed does crash randomly on AMD64 Fedora Rawhide Clang 3.x:

* https://buildbot.python.org/all/#/builders/188/builds/880
* https://buildbot.python.org/all/#/builders/188/builds/879

So far, I failed to reproduce the issue.

----------
components: Tests
messages: 403779
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_embed: random crash on AMD64 Fedora Rawhide Clang 3.x
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45453>
_______________________________________

From report at bugs.python.org  Tue Oct 12 21:54:31 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 13 Oct 2021 01:54:31 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634090071.22.0.473482750567.issue45452@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

FYI, I got a mail about this feature from Terence Kelly who design these amazing things :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Tue Oct 12 22:05:20 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 02:05:20 +0000
Subject: [issue45410] python -m test -jN: write stderr in stdout to get
 messages in order
In-Reply-To: <1633691736.44.0.338544053782.issue45410@roundup.psfhosted.org>
Message-ID: <1634090720.9.0.77278440683.issue45410@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> bpo-45410: Enhance libregrtest -W/--verbose3 option (GH-28908)

Oh. Sadly, with this change, faulthandler is no longer able to dump a traceback on a crash :-(

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45410>
_______________________________________

From report at bugs.python.org  Tue Oct 12 22:09:30 2021
From: report at bugs.python.org (Chris Meyer)
Date: Wed, 13 Oct 2021 02:09:30 +0000
Subject: [issue45454] Unable to explicitly subclass protocol when subclass has
 mixin requiring init
Message-ID: <1634090970.26.0.320360946482.issue45454@roundup.psfhosted.org>


New submission from Chris Meyer <cmeyer1969 at gmail.com>:

If I make a explicit subclass of a protocol that also inherits from a mixin and calls super() in order to initialize the mixin, I get the "Protocols cannot be instantiated" exception.

This case arises when having a hierarchy of both protocols and concrete classes that implement the protocols.

A simple example is:

import typing


class P(typing.Protocol):
    def m1(self) -> None: ...

class M:
    def __init__(self) -> None:
        super().__init__()
        self.o = True

class C(M, P):
    def __init__(self) -> None:
        super().__init__()
        self.op = True

    def m1(self) -> None:
        pass

c = C()

I can resolve this in particular cases by not invoking super in the mixin or putting a special no-super class in the hierarchy. However, that is not a general solution and once the class hierarchy gets more complicated, it fails to work.

Am I missing any known solution to this issue?

----------
components: Library (Lib)
messages: 403782
nosy: cmeyer
priority: normal
severity: normal
status: open
title: Unable to explicitly subclass protocol when subclass has mixin requiring init
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45454>
_______________________________________

From report at bugs.python.org  Tue Oct 12 22:29:02 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 02:29:02 +0000
Subject: [issue45410] python -m test -jN: write stderr in stdout to get
 messages in order
In-Reply-To: <1633691736.44.0.338544053782.issue45410@roundup.psfhosted.org>
Message-ID: <1634092142.47.0.297807896733.issue45410@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27205
pull_request: https://github.com/python/cpython/pull/28915

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45410>
_______________________________________

From report at bugs.python.org  Tue Oct 12 22:31:28 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 02:31:28 +0000
Subject: [issue45453] test_embed: random crash on AMD64 Fedora Rawhide Clang
 3.x
In-Reply-To: <1634089969.63.0.707166222279.issue45453@roundup.psfhosted.org>
Message-ID: <1634092288.28.0.812992870041.issue45453@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

It also crashed on the Address Sanitizer job of GitHub Action:
https://github.com/python/cpython/runs/3877327574

0:09:15 load avg: 4.46 [267/413/1] test_embed crashed (Exit code -11) -- running: test_gdb (1 min 2 sec), test_peg_generator (57.4 sec)

== Tests result: FAILURE then SUCCESS ==

1 re-run test:
    test_embed

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45453>
_______________________________________

From report at bugs.python.org  Tue Oct 12 22:32:17 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 02:32:17 +0000
Subject: [issue45453] test_embed: random crash on AMD64 Fedora Rawhide Clang
 3.x
In-Reply-To: <1634089969.63.0.707166222279.issue45453@roundup.psfhosted.org>
Message-ID: <1634092337.6.0.782628414792.issue45453@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Oh, maybe this is no traceback on a crash because of my recent libregrtest changes in bpo-45410.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45453>
_______________________________________

From report at bugs.python.org  Tue Oct 12 22:38:03 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 02:38:03 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634092683.47.0.549337499807.issue45434@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset c63623a0a6892ce8683dbf8c769793ea897e6ba8 by Victor Stinner in branch 'main':
bpo-45434: bytearrayobject.h no longer includes <stdarg.h> (GH-28913)
https://github.com/python/cpython/commit/c63623a0a6892ce8683dbf8c769793ea897e6ba8


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Tue Oct 12 22:49:58 2021
From: report at bugs.python.org (Inada Naoki)
Date: Wed, 13 Oct 2021 02:49:58 +0000
Subject: [issue45455] Fill func.__doc__ lazily
Message-ID: <1634093398.63.0.682415750411.issue45455@roundup.psfhosted.org>


New submission from Inada Naoki <songofacandy at gmail.com>:

Move setting `func.__doc__` from PyFunction_New() to __doc__ descriptor, for faster function creation.

This issue is spin-off of bpo-36521.

----------
components: Interpreter Core
messages: 403786
nosy: methane
priority: normal
severity: normal
status: open
title: Fill func.__doc__ lazily
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45455>
_______________________________________

From report at bugs.python.org  Tue Oct 12 22:50:15 2021
From: report at bugs.python.org (Inada Naoki)
Date: Wed, 13 Oct 2021 02:50:15 +0000
Subject: [issue45455] Fill func.__doc__ lazily
In-Reply-To: <1634093398.63.0.682415750411.issue45455@roundup.psfhosted.org>
Message-ID: <1634093415.69.0.514978043862.issue45455@roundup.psfhosted.org>


Change by Inada Naoki <songofacandy at gmail.com>:


----------
keywords: +patch
pull_requests: +27206
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28704

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45455>
_______________________________________

From report at bugs.python.org  Tue Oct 12 22:54:10 2021
From: report at bugs.python.org (Inada Naoki)
Date: Wed, 13 Oct 2021 02:54:10 +0000
Subject: [issue45455] Fill func.__doc__ lazily
In-Reply-To: <1634093398.63.0.682415750411.issue45455@roundup.psfhosted.org>
Message-ID: <1634093650.28.0.628544730358.issue45455@roundup.psfhosted.org>


Inada Naoki <songofacandy at gmail.com> added the comment:

Pros:

Faster (about 3~5%) faster function creation, when function don't have annotations.
When function has annotation, function creation is much slower so performance gain become tiny.

Cons:

Somewhat backward incompatible:

```
>>> def foo(): "foo"
...
>>> def bar(): "bar"
...
>>> bar.__code__ = foo.__code__
>>> bar.__doc__
'foo'  # was 'bar'
```

----------
stage: patch review -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45455>
_______________________________________

From report at bugs.python.org  Tue Oct 12 22:59:24 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 02:59:24 +0000
Subject: [issue45453] test_embed: random crash on AMD64 Fedora Rawhide Clang
 3.x
In-Reply-To: <1634089969.63.0.707166222279.issue45453@roundup.psfhosted.org>
Message-ID: <1634093964.69.0.604842560262.issue45453@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Ah, I reproduced a crash locally:

0:00:19 load avg: 2.00 [3/3/1] test_embed crashed (Exit code -11)
Fatal Python error: Segmentation fault

Current thread 0x00007fef0ea9f2c0 (most recent call first):
  File "/home/vstinner/python/main/Lib/test/test_embed.py", line 1560 in create_printer
  File "/home/vstinner/python/main/Lib/test/test_embed.py", line 1595 in test_disallow_instantiation

The crash happens when sys.__stdout__.fileno() is not 1 or 2. It happens with my recents changes in bpo-45410.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45453>
_______________________________________

From report at bugs.python.org  Tue Oct 12 22:59:47 2021
From: report at bugs.python.org (Chris Meyer)
Date: Wed, 13 Oct 2021 02:59:47 +0000
Subject: [issue45454] Unable to explicitly subclass protocol when subclass has
 mixin requiring init
In-Reply-To: <1634090970.26.0.320360946482.issue45454@roundup.psfhosted.org>
Message-ID: <1634093987.48.0.2968588246.issue45454@roundup.psfhosted.org>


Chris Meyer <cmeyer1969 at gmail.com> added the comment:

This looks like it a regression specific to Python 3.9.7 and has been fixed.

https://bugs.python.org/issue45081
https://github.com/python/cpython/pull/28132.

----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45454>
_______________________________________

From report at bugs.python.org  Tue Oct 12 23:04:01 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 03:04:01 +0000
Subject: [issue45453] test_embed: random crash on AMD64 Fedora Rawhide Clang
 3.x
In-Reply-To: <1634089969.63.0.707166222279.issue45453@roundup.psfhosted.org>
Message-ID: <1634094241.42.0.96210706198.issue45453@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
keywords: +patch
pull_requests: +27207
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28916

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45453>
_______________________________________

From report at bugs.python.org  Tue Oct 12 23:06:57 2021
From: report at bugs.python.org (za)
Date: Wed, 13 Oct 2021 03:06:57 +0000
Subject: [issue18376] show the effective count of process when running the
 testsuite
In-Reply-To: <1373107337.89.0.95411987573.issue18376@psf.upfronthosting.co.za>
Message-ID: <1634094417.4.0.150987675037.issue18376@roundup.psfhosted.org>


za <zakiakhmad at gmail.com> added the comment:

The patch seems outdated. Is the ticket still relevant?

----------
nosy: +za

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18376>
_______________________________________

From report at bugs.python.org  Tue Oct 12 23:24:41 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 13 Oct 2021 03:24:41 +0000
Subject: [issue45453] test_embed: random crash on AMD64 Fedora Rawhide Clang
 3.x
In-Reply-To: <1634089969.63.0.707166222279.issue45453@roundup.psfhosted.org>
Message-ID: <1634095481.89.0.0846571287314.issue45453@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +27208
pull_request: https://github.com/python/cpython/pull/28917

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45453>
_______________________________________

From report at bugs.python.org  Tue Oct 12 23:24:42 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 03:24:42 +0000
Subject: [issue45453] test_embed: random crash on AMD64 Fedora Rawhide Clang
 3.x
In-Reply-To: <1634089969.63.0.707166222279.issue45453@roundup.psfhosted.org>
Message-ID: <1634095482.7.0.337507978008.issue45453@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 678433f25e0d08dad7edf72be8f0cf9420e4ed2c by Victor Stinner in branch 'main':
bpo-45453: Fix test_embed.StdPrinterTests (GH-28916)
https://github.com/python/cpython/commit/678433f25e0d08dad7edf72be8f0cf9420e4ed2c


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45453>
_______________________________________

From report at bugs.python.org  Tue Oct 12 23:37:42 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Wed, 13 Oct 2021 03:37:42 +0000
Subject: [issue36521] Consider removing docstrings from co_consts in code
 objects
In-Reply-To: <1554339855.64.0.463077014069.issue36521@roundup.psfhosted.org>
Message-ID: <1634096262.45.0.561865766718.issue36521@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

Okay, thanks. We may do one of the other ideas (maybe co_flags & CO_DOCSTRING).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36521>
_______________________________________

From report at bugs.python.org  Tue Oct 12 23:55:39 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 13 Oct 2021 03:55:39 +0000
Subject: [issue45451] IDLE Shell GUI - remove window border
In-Reply-To: <1634087096.76.0.0471723883661.issue45451@roundup.psfhosted.org>
Message-ID: <1634097339.79.0.112562988999.issue45451@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
nosy: +taleinat

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45451>
_______________________________________

From report at bugs.python.org  Tue Oct 12 23:58:17 2021
From: report at bugs.python.org (Evgeniy Ivanov)
Date: Wed, 13 Oct 2021 03:58:17 +0000
Subject: [issue45456] operator 'pass' in 'if-else' linear expression
Message-ID: <1634097497.58.0.0510721088772.issue45456@roundup.psfhosted.org>


New submission from Evgeniy Ivanov <atxn at yandex.ru>:

Why operator 'pass' not implement to 'if-else' linear expression?
Construction '<func/operation> if <expression> else pass' throws SyntaxError in Python 3.9

----------
messages: 403793
nosy: evgnor86
priority: normal
severity: normal
status: open
title: operator 'pass' in 'if-else' linear expression
type: compile error
versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45456>
_______________________________________

From report at bugs.python.org  Wed Oct 13 00:12:42 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 13 Oct 2021 04:12:42 +0000
Subject: [issue45451] IDLE Shell GUI - remove window border
In-Reply-To: <1634087096.76.0.0471723883661.issue45451@roundup.psfhosted.org>
Message-ID: <1634098362.32.0.114807568556.issue45451@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Whereas to me, 'not shaded' is easily the worst.  Users can customize the sidebar colors, but since the default is the same at the text, I would not want to deliver IDLE with a scheme that I think is awful.

On Windows, I agree that the light theme border is too heavy.  The dark  theme light border is barely noticeable.  On mac, its the opposite: light theme ok, dark theme white border is too prominent.  I would be willing to look at a change.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45451>
_______________________________________

From report at bugs.python.org  Wed Oct 13 00:21:52 2021
From: report at bugs.python.org (Steven D'Aprano)
Date: Wed, 13 Oct 2021 04:21:52 +0000
Subject: [issue45456] operator 'pass' in 'if-else' linear expression
In-Reply-To: <1634097497.58.0.0510721088772.issue45456@roundup.psfhosted.org>
Message-ID: <1634098912.14.0.349510733876.issue45456@roundup.psfhosted.org>


Steven D'Aprano <steve+python at pearwood.info> added the comment:

This is not a bug, "pass" is not an operator, it is not an expression, it is a statement and is only allowed in places where statements are allowed.

The if expression requires all three operands to be expressions.

Even if "pass" was permitted, what would it do? What would be the value of x after this assignment?

    x = 1 if False else pass

If you need x to be undefined, use an if statement:


    if False:
        # this block is not run
        x = 1

    # x is undefined here

----------
nosy: +steven.daprano
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45456>
_______________________________________

From report at bugs.python.org  Wed Oct 13 00:57:41 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 13 Oct 2021 04:57:41 +0000
Subject: [issue20692] Tutorial and  FAQ: how to call a method on an int
In-Reply-To: <1392850224.09.0.571764135364.issue20692@psf.upfronthosting.co.za>
Message-ID: <1634101061.44.0.262601583907.issue20692@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
pull_requests: +27209
pull_request: https://github.com/python/cpython/pull/28918

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20692>
_______________________________________

From report at bugs.python.org  Wed Oct 13 01:15:10 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 13 Oct 2021 05:15:10 +0000
Subject: [issue20692] Tutorial and  FAQ: how to call a method on an int
In-Reply-To: <1392850224.09.0.571764135364.issue20692@psf.upfronthosting.co.za>
Message-ID: <1634102110.63.0.521900241101.issue20692@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 11.0 -> 12.0
pull_requests: +27210
pull_request: https://github.com/python/cpython/pull/28919

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20692>
_______________________________________

From report at bugs.python.org  Wed Oct 13 01:15:14 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 13 Oct 2021 05:15:14 +0000
Subject: [issue20692] Tutorial and  FAQ: how to call a method on an int
In-Reply-To: <1392850224.09.0.571764135364.issue20692@psf.upfronthosting.co.za>
Message-ID: <1634102114.72.0.261184235607.issue20692@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27211
pull_request: https://github.com/python/cpython/pull/28920

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20692>
_______________________________________

From report at bugs.python.org  Wed Oct 13 01:15:06 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 13 Oct 2021 05:15:06 +0000
Subject: [issue20692] Tutorial and  FAQ: how to call a method on an int
In-Reply-To: <1392850224.09.0.571764135364.issue20692@psf.upfronthosting.co.za>
Message-ID: <1634102106.54.0.138835676169.issue20692@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:


New changeset 380c44087505d0d560f97e325028f27393551164 by Terry Jan Reedy in branch 'main':
bpo-20692: Add Programming FAQ entry for 1.__class__ error. (GH-28918)
https://github.com/python/cpython/commit/380c44087505d0d560f97e325028f27393551164


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20692>
_______________________________________

From report at bugs.python.org  Wed Oct 13 01:17:18 2021
From: report at bugs.python.org (Evgeniy Ivanov)
Date: Wed, 13 Oct 2021 05:17:18 +0000
Subject: [issue45456] operator 'pass' in 'if-else' linear expression
In-Reply-To: <1634097497.58.0.0510721088772.issue45456@roundup.psfhosted.org>
Message-ID: <1634102238.96.0.838917039286.issue45456@roundup.psfhosted.org>


Change by Evgeniy Ivanov <atxn at yandex.ru>:


----------
resolution: not a bug -> 
status: closed -> open
type: compile error -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45456>
_______________________________________

From report at bugs.python.org  Wed Oct 13 01:20:51 2021
From: report at bugs.python.org (Evgeniy Ivanov)
Date: Wed, 13 Oct 2021 05:20:51 +0000
Subject: [issue45456] operator 'pass' in 'if-else' linear expression
In-Reply-To: <1634097497.58.0.0510721088772.issue45456@roundup.psfhosted.org>
Message-ID: <1634102451.78.0.183082871612.issue45456@roundup.psfhosted.org>


Evgeniy Ivanov <atxn at yandex.ru> added the comment:

ok, but what you say for this?

x += x*2 if math.pow(x) > 386 else pass

and 

if math.pow(x) > 386:
 x += x*2

1 line vs 2 line

now i'm use this

x += x*2 if math.pow(x) > 386 else ''

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45456>
_______________________________________

From report at bugs.python.org  Wed Oct 13 01:22:21 2021
From: report at bugs.python.org (Evgeniy Ivanov)
Date: Wed, 13 Oct 2021 05:22:21 +0000
Subject: [issue45456] operator 'pass' in 'if-else' linear expression
In-Reply-To: <1634097497.58.0.0510721088772.issue45456@roundup.psfhosted.org>
Message-ID: <1634102541.17.0.605228551575.issue45456@roundup.psfhosted.org>


Evgeniy Ivanov <atxn at yandex.ru> added the comment:

it is more readable

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45456>
_______________________________________

From report at bugs.python.org  Wed Oct 13 01:25:14 2021
From: report at bugs.python.org (Evgeniy Ivanov)
Date: Wed, 13 Oct 2021 05:25:14 +0000
Subject: [issue45456] operator 'pass' in 'if-else' linear expression
In-Reply-To: <1634097497.58.0.0510721088772.issue45456@roundup.psfhosted.org>
Message-ID: <1634102714.16.0.281315382122.issue45456@roundup.psfhosted.org>


Evgeniy Ivanov <atxn at yandex.ru> added the comment:

or another example:

def my_func(x):
 something_do....


my_func(x) if x > 100 else <no call this function>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45456>
_______________________________________

From report at bugs.python.org  Wed Oct 13 01:29:17 2021
From: report at bugs.python.org (Evgeniy Ivanov)
Date: Wed, 13 Oct 2021 05:29:17 +0000
Subject: [issue45456] operator 'pass' in 'if-else' linear expression
In-Reply-To: <1634097497.58.0.0510721088772.issue45456@roundup.psfhosted.org>
Message-ID: <1634102957.28.0.713169154962.issue45456@roundup.psfhosted.org>


Evgeniy Ivanov <atxn at yandex.ru> added the comment:

this wrong example

now i'm use this
x += x*2 if math.pow(x) > 386 else ''

wanted to say that doing this now

my_func(x) if x > 100 else ''

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45456>
_______________________________________

From report at bugs.python.org  Wed Oct 13 01:38:00 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 13 Oct 2021 05:38:00 +0000
Subject: [issue20692] Tutorial and  FAQ: how to call a method on an int
In-Reply-To: <1392850224.09.0.571764135364.issue20692@psf.upfronthosting.co.za>
Message-ID: <1634103480.83.0.230343182898.issue20692@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 47673c47db352916384e4f35fa520e48475e2601 by Miss Islington (bot) in branch '3.10':
bpo-20692: Add Programming FAQ entry for 1.__class__ error. (GH-28918)
https://github.com/python/cpython/commit/47673c47db352916384e4f35fa520e48475e2601


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20692>
_______________________________________

From report at bugs.python.org  Wed Oct 13 01:40:05 2021
From: report at bugs.python.org (Evgeniy Ivanov)
Date: Wed, 13 Oct 2021 05:40:05 +0000
Subject: [issue45456] operator 'pass' in 'if-else' linear expression
In-Reply-To: <1634097497.58.0.0510721088772.issue45456@roundup.psfhosted.org>
Message-ID: <1634103605.49.0.135009247229.issue45456@roundup.psfhosted.org>


Evgeniy Ivanov <atxn at yandex.ru> added the comment:

formaly it's not bug, this is future request ok?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45456>
_______________________________________

From report at bugs.python.org  Wed Oct 13 01:40:23 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 13 Oct 2021 05:40:23 +0000
Subject: [issue20692] Tutorial and  FAQ: how to call a method on an int
In-Reply-To: <1392850224.09.0.571764135364.issue20692@psf.upfronthosting.co.za>
Message-ID: <1634103623.0.0.454967775179.issue20692@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset cc90732d15b267feb4cb75ec4c448a3c66e6c520 by Miss Islington (bot) in branch '3.9':
bpo-20692: Add Programming FAQ entry for 1.__class__ error. (GH-28918)
https://github.com/python/cpython/commit/cc90732d15b267feb4cb75ec4c448a3c66e6c520


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20692>
_______________________________________

From report at bugs.python.org  Wed Oct 13 01:41:47 2021
From: report at bugs.python.org (Evgeniy Ivanov)
Date: Wed, 13 Oct 2021 05:41:47 +0000
Subject: [issue45456] 'pass' in 'if-else' linear expression
In-Reply-To: <1634097497.58.0.0510721088772.issue45456@roundup.psfhosted.org>
Message-ID: <1634103707.59.0.152613176073.issue45456@roundup.psfhosted.org>


Change by Evgeniy Ivanov <atxn at yandex.ru>:


----------
title: operator 'pass' in 'if-else' linear expression -> 'pass' in 'if-else' linear expression

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45456>
_______________________________________

From report at bugs.python.org  Wed Oct 13 01:47:38 2021
From: report at bugs.python.org (wyz23x2)
Date: Wed, 13 Oct 2021 05:47:38 +0000
Subject: [issue45456] 'pass' in 'if-else' linear expression
In-Reply-To: <1634097497.58.0.0510721088772.issue45456@roundup.psfhosted.org>
Message-ID: <1634104058.74.0.402301096551.issue45456@roundup.psfhosted.org>


wyz23x2 <wyz23x2 at 163.com> added the comment:

Well,
x = 1 if False else pass
and
if False: x = 1

1 line vs 1 line :) It's just not needed.

----------
nosy: +wyz23x2

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45456>
_______________________________________

From report at bugs.python.org  Wed Oct 13 01:54:57 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 13 Oct 2021 05:54:57 +0000
Subject: [issue20692] Tutorial and  FAQ: how to call a method on an int
In-Reply-To: <1392850224.09.0.571764135364.issue20692@psf.upfronthosting.co.za>
Message-ID: <1634104497.51.0.69357247884.issue20692@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20692>
_______________________________________

From report at bugs.python.org  Wed Oct 13 01:58:40 2021
From: report at bugs.python.org (Steven D'Aprano)
Date: Wed, 13 Oct 2021 05:58:40 +0000
Subject: [issue45456] operator 'pass' in 'if-else' linear expression
In-Reply-To: <1634103605.49.0.135009247229.issue45456@roundup.psfhosted.org>
Message-ID: <20211013055620.GE7456@ando.pearwood.info>


Steven D'Aprano <steve+python at pearwood.info> added the comment:

If you want pass to become an expression, what should these do?

    x = pass

    print(pass)

    mydict[pass] = 1

    type(pass)

There is nothing special about the ternary if operator. It is just an 
operator like plus, minus and more. The only difference is that plus 
takes two arguments, and if...else takes three:

    expression + expression

    expression if expression else expression

If pass becomes legal in the if...else ternary operatory, it must be an 
expression, so it must have a value. What is that value?

----------
title: 'pass' in 'if-else' linear expression -> operator 'pass' in 'if-else' linear expression

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45456>
_______________________________________

From report at bugs.python.org  Wed Oct 13 02:19:39 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 13 Oct 2021 06:19:39 +0000
Subject: [issue45455] Fill func.__doc__ lazily
In-Reply-To: <1634093398.63.0.682415750411.issue45455@roundup.psfhosted.org>
Message-ID: <1634105979.7.0.636727624556.issue45455@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45455>
_______________________________________

From report at bugs.python.org  Wed Oct 13 03:01:17 2021
From: report at bugs.python.org (Lincoln Puzey)
Date: Wed, 13 Oct 2021 07:01:17 +0000
Subject: [issue45457] Documentation for ssl.load_default_certs is outdated
Message-ID: <1634108477.44.0.93503538382.issue45457@roundup.psfhosted.org>


New submission from Lincoln Puzey <lincolnp at lastyard.com>:

The behavior of `ssl.load_default_certs()` was changed in https://bugs.python.org/issue22449

The new behavior is that `ssl.set_default_verify_paths()` is now called on all systems.

The documentation still says that `ssl.set_default_verify_paths()` is only called on systems OTHER than Windows.

----------
assignee: christian.heimes
components: SSL
messages: 403806
nosy: LincolnPuzeyLastYard, christian.heimes
priority: normal
severity: normal
status: open
title: Documentation for ssl.load_default_certs is outdated

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45457>
_______________________________________

From report at bugs.python.org  Wed Oct 13 03:12:22 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 13 Oct 2021 07:12:22 +0000
Subject: [issue45457] Documentation for ssl.load_default_certs is outdated
In-Reply-To: <1634108477.44.0.93503538382.issue45457@roundup.psfhosted.org>
Message-ID: <1634109142.89.0.0255310541992.issue45457@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
components: +Documentation
stage:  -> needs patch
type:  -> enhancement
versions: +Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45457>
_______________________________________

From report at bugs.python.org  Wed Oct 13 04:27:36 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 13 Oct 2021 08:27:36 +0000
Subject: [issue45456] operator 'pass' in 'if-else' linear expression
In-Reply-To: <1634097497.58.0.0510721088772.issue45456@roundup.psfhosted.org>
Message-ID: <1634113656.74.0.980594208373.issue45456@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
resolution:  -> not a bug
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45456>
_______________________________________

From report at bugs.python.org  Wed Oct 13 04:31:58 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 13 Oct 2021 08:31:58 +0000
Subject: [issue45455] Fill func.__doc__ lazily
In-Reply-To: <1634093398.63.0.682415750411.issue45455@roundup.psfhosted.org>
Message-ID: <1634113918.26.0.541757108277.issue45455@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

The behavior difference can be eliminated if make func_set_code() calling func_get_doc().

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45455>
_______________________________________

From report at bugs.python.org  Wed Oct 13 04:40:24 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 13 Oct 2021 08:40:24 +0000
Subject: [issue45455] Fill func.__doc__ lazily
In-Reply-To: <1634093398.63.0.682415750411.issue45455@roundup.psfhosted.org>
Message-ID: <1634114424.76.0.0206432838557.issue45455@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

BTW, I think that we spent on issue36521 much more time (especially your time, Inada-san) than it deserved. In normal case 3~5% would look not impressive. But I do not see any immediate drawbacks of making this change, and I afraid that if we do not make it now we will spend more time on discussing issue36521 and related ideas.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45455>
_______________________________________

From report at bugs.python.org  Wed Oct 13 04:47:12 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 13 Oct 2021 08:47:12 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634114832.18.0.0826067940059.issue45452@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

See also issue22035.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Wed Oct 13 04:51:20 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 13 Oct 2021 08:51:20 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1634115080.08.0.266130277093.issue45438@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Wed Oct 13 05:10:37 2021
From: report at bugs.python.org (Owen)
Date: Wed, 13 Oct 2021 09:10:37 +0000
Subject: [issue45458] "\W" pattern with re.ASCII flag is not equivalent to
 "[^a-zA-Z0-9_]"
Message-ID: <1634116237.24.0.751734837982.issue45458@roundup.psfhosted.org>


New submission from Owen <owentrigueros at gmail.com>:

"\W" regex pattern, when used with `re.ASCII`, is expected to have the same behavior as "[^a-zA-Z0-9_]" (see [1]).

For example, the following `sub()` call

```
>>> re.sub('\W', '', '? a', re.ASCII)
'?a'
```

should return the same as this one:

```
>>> re.sub('[^a-zA-Z0-9_]', '', '? a', re.ASCII)
'a'
```

But it does not.

[1] https://docs.python.org/3/library/re.html#regular-expression-syntax

----------
components: Regular Expressions
messages: 403810
nosy: ezio.melotti, mrabarnett, owentrigueros
priority: normal
severity: normal
status: open
title: "\W" pattern with re.ASCII flag is not equivalent to "[^a-zA-Z0-9_]"
type: behavior
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45458>
_______________________________________

From report at bugs.python.org  Wed Oct 13 05:28:14 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 13 Oct 2021 09:28:14 +0000
Subject: [issue45458] "\W" pattern with re.ASCII flag is not equivalent to
 "[^a-zA-Z0-9_]"
In-Reply-To: <1634116237.24.0.751734837982.issue45458@roundup.psfhosted.org>
Message-ID: <1634117294.96.0.566814143735.issue45458@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

It works as expected:

>>> re.sub(r'\W', '', '? a', 0, re.ASCII)
'a'

You just passed re.ASCII as the count argument, not as the flags argument.

>>> help(re.sub)
Help on function sub in module re:

sub(pattern, repl, string, count=0, flags=0)
    Return the string obtained by replacing the leftmost
    non-overlapping occurrences of the pattern in string by the
    replacement repl.  repl can be either a string or a callable;
    if a string, backslash escapes in it are processed.  If it is
    a callable, it's passed the Match object and must return
    a replacement string to be used.

----------
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45458>
_______________________________________

From report at bugs.python.org  Wed Oct 13 05:38:46 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 09:38:46 +0000
Subject: [issue45247] Add explicit support for Cython to the C API.
In-Reply-To: <1632135587.14.0.29634943523.issue45247@roundup.psfhosted.org>
Message-ID: <1634117926.24.0.247239073827.issue45247@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

We need to add C API to abstract access to structures used by Cython:

* bpo-39947: PyThreadState
* bpo-40421: PyFrameObject

----------
nosy: +vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45247>
_______________________________________

From report at bugs.python.org  Wed Oct 13 05:55:13 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 13 Oct 2021 09:55:13 +0000
Subject: [issue45459] Limited API support for Py_buffer
Message-ID: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>


New submission from Christian Heimes <lists at cheimes.de>:

Currently all APIs related to Py_buffer are excluded from the limited API. It's neither possible to use Py_buffer from a C extension with limited API nor is it possible to define heap types with buffer support using the stable ABI.

The lack of Py_buffer support prevents prominent projects like NumPy or Pillow to use the limited API and produce abi3 binary wheel. To be fair it's not the only reason why these projects have not adopted the stable abi3 yet. Still Py_buffer is a necessary but not sufficient condition. Stable abi3 support would enable NumPy stack to build binary wheels that work with any Python version >= 3.11, < 4.0.

The limited API excludes any C API that references Py_buffer:

- 8 PyBuffer_*() functions
- 21 PyBUF_* constants
- PyMemoryView_FromBuffer()
- PyObject_GetBuffer
- Py_bf_getbuffer / Py_bf_releasebuffer type slots for PyBufferProcs

It should not be terribly complicated to add Py_buffer to the stable API. All it takes are an opaque struct definition of Py_buffer, an allocate function, a free function and a bunch of getters and setters. The hard part is to figure out which getters and setters are needed and how many struct members must be exposed by getters and setters. I recommend to get feedback from NumPy, Pillow, and Cython devs first.


Prototype
---------

typedef struct bufferinfo Py_buffer;

/* allocate a new Py_buffer object on the heap and initialize all members to NULL / 0 */
Py_buffer*
PyBuffer_New()
{
    Py_buffer *view = PyMem_Calloc(1, sizeof(Py_buffer));
    if (view == NULL) {
        PyErr_NoMemory();
    }
    return view;
}

/* convenience function */
Py_buffer*
PyBuffer_NewEx(PyObject *obj, void *buf,  Py_ssize_t len, Py_ssize_t itemsize,
               int readonly, int ndim, char *format, Py_ssize_t *shape, Py_ssize_t *strides,
               Py_ssize_t *suboffsets, void *internal)
{
    ...
}

/* release and free buffer */
void
PyBuffer_Free(Py_buffer *view)
{
    if (view != NULL) {
        PyBuffer_Release(view);
        PyMem_Free(view);
    }
}

----------
components: C API
messages: 403813
nosy: christian.heimes, petr.viktorin, vstinner
priority: normal
severity: normal
status: open
title: Limited API support for Py_buffer
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Wed Oct 13 06:04:56 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 10:04:56 +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: <1634119496.34.0.761308006875.issue40421@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

The coverage project has a ctrace C extension which access PyFrameObject.f_lasti which is gone in Python 3.11. It uses MyFrame_lasti() helper to handle Python 3.10 lasti change:
---
// 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.
#if PY_VERSION_HEX >= 0x030A00A7
#define MyFrame_lasti(f)    (f->f_lasti * 2)
#else
#define MyFrame_lasti(f)    f->f_lasti
#endif // 3.10.0a7
---

f_lasti is used for two things in coverage/ctracer/tracer.c:

(1) get the last opcode:
----
            /* Need to distinguish between RETURN_VALUE and YIELD_VALUE. Read
             * the current bytecode to see what it is.  In unusual circumstances
             * (Cython code), co_code can be the empty string, so range-check
             * f_lasti before reading the byte.
             */
            int bytecode = RETURN_VALUE;
            PyObject * pCode = MyFrame_GetCode(frame)->co_code;
            int lasti = MyFrame_lasti(frame);

            if (lasti < PyBytes_GET_SIZE(pCode)) {
                bytecode = PyBytes_AS_STRING(pCode)[lasti];
            }
            if (bytecode != YIELD_VALUE) {
                int first = MyFrame_GetCode(frame)->co_firstlineno;
                if (CTracer_record_pair(self, self->pcur_entry->last_line, -first) < 0) {
                    goto error;
                }
            }
----

(2) get the line number, with a special case for generator which is not started yet (lasti < 0)
---
    /* A call event is really a "start frame" event, and can happen for
     * re-entering a generator also.  f_lasti is -1 for a true call, and a
     * real byte offset for a generator re-entry.
     */
    if (frame->f_lasti < 0) {
        self->pcur_entry->last_line = -MyFrame_GetCode(frame)->co_firstlineno;
    }
    else {
        self->pcur_entry->last_line = PyFrame_GetLineNumber(frame);
    }
---

Since Python 3.10.0a3, PyFrame_GetLineNumber() handles the case of negative f_lasti, thanks to the commit 877df851c3ecdb55306840e247596e7b7805a60a related to the PEP 626 implementation:
---
int
PyCode_Addr2Line(PyCodeObject *co, int addrq)
{
    if (addrq < 0) {
        return co->co_firstlineno;
    }
    ...
}
---


=> coverage would need an abstraction to get the last opcode: use case (1).


I recall that an old version of asyncio also had to get latest opcode, in pure Python, to workaround the CPython bpo-21209 bug:

+# Check for CPython issue #21209
+def has_yield_from_bug():
+    class MyGen:
+        def __init__(self):
+            self.send_args = None
+        def __iter__(self):
+            return self
+        def __next__(self):
+            return 42
+        def send(self, *what):
+            self.send_args = what
+            return None
+    def yield_from_gen(gen):
+        yield from gen
+    value = (1, 2, 3)
+    gen = MyGen()
+    coro = yield_from_gen(gen)
+    next(coro)
+    coro.send(value)
+    return gen.send_args != (value,)
+_YIELD_FROM_BUG = has_yield_from_bug()
+del has_yield_from_bug

(...)

+    if _YIELD_FROM_BUG:
+        # For for CPython issue #21209: using "yield from" and a custom
+        # generator, generator.send(tuple) unpacks the tuple instead of passing
+        # the tuple unchanged. Check if the caller is a generator using "yield
+        # from" to decide if the parameter should be unpacked or not.
+        def send(self, *value):
+            frame = sys._getframe()
+            caller = frame.f_back
+            assert caller.f_lasti >= 0
+            if caller.f_code.co_code[caller.f_lasti] != _YIELD_FROM:
+                value = value[0]
+            return self.gen.send(value)
+    else:
+        def send(self, value):
+            return self.gen.send(value)

Hopefully, this code could be be removed from asyncio, since the bug was fixed (and asyncio is now only maintained in the Python stdlib, it's not longer a third party module).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40421>
_______________________________________

From report at bugs.python.org  Wed Oct 13 06:12:30 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 10:12:30 +0000
Subject: [issue45247] [C API] Add explicit support for Cython to the C API
In-Reply-To: <1632135587.14.0.29634943523.issue45247@roundup.psfhosted.org>
Message-ID: <1634119950.63.0.172706278792.issue45247@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
title: Add explicit support for Cython to the C API. -> [C API] Add explicit support for Cython to the C API

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45247>
_______________________________________

From report at bugs.python.org  Wed Oct 13 06:12:49 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 10:12:49 +0000
Subject: [issue39947] [C API] Make the PyThreadState structure opaque (move it
 to the internal C API)
In-Reply-To: <1584035214.47.0.672795796186.issue39947@roundup.psfhosted.org>
Message-ID: <1634119969.65.0.829698305249.issue39947@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

See also bpo-45247: [C API] Add explicit support for Cython to the C API.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39947>
_______________________________________

From report at bugs.python.org  Wed Oct 13 06:12:39 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 10:12:39 +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: <1634119959.55.0.998115739225.issue40421@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

See also bpo-45247: [C API] Add explicit support for Cython to the C API.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40421>
_______________________________________

From report at bugs.python.org  Wed Oct 13 06:24:57 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 10:24:57 +0000
Subject: [issue45453] test_embed: random crash on AMD64 Fedora Rawhide Clang
 3.x
In-Reply-To: <1634089969.63.0.707166222279.issue45453@roundup.psfhosted.org>
Message-ID: <1634120697.0.0.924956786532.issue45453@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 7e74d99c532f3eb55a86d10d30c068b03f2ad025 by Miss Islington (bot) in branch '3.10':
bpo-45453: Fix test_embed.StdPrinterTests (GH-28916) (GH-28917)
https://github.com/python/cpython/commit/7e74d99c532f3eb55a86d10d30c068b03f2ad025


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45453>
_______________________________________

From report at bugs.python.org  Wed Oct 13 06:25:40 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 10:25:40 +0000
Subject: [issue45453] test_embed.StdPrinterTests() crash if stdout FD is not 1
 or 2
In-Reply-To: <1634089969.63.0.707166222279.issue45453@roundup.psfhosted.org>
Message-ID: <1634120740.56.0.275821629943.issue45453@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
title: test_embed: random crash on AMD64 Fedora Rawhide Clang 3.x -> test_embed.StdPrinterTests() crash if stdout FD is not 1 or 2
versions: +Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45453>
_______________________________________

From report at bugs.python.org  Wed Oct 13 06:26:49 2021
From: report at bugs.python.org (Ken Jin)
Date: Wed, 13 Oct 2021 10:26:49 +0000
Subject: [issue42345] Equality of typing.Literal depends on the order of
 arguments
In-Reply-To: <1634064888.64.0.935152970713.issue42345@roundup.psfhosted.org>
Message-ID: <CAOMZG7gKyRy150ui-YX5kUFUo6AzitxA2wT8C2P=DVNm+XuGWw@mail.gmail.com>


Ken Jin <kenjin4096 at gmail.com> added the comment:

@Alick yes. To be specific, 3.9.1 and above. 3.9.0 still has the old
behavior.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42345>
_______________________________________

From report at bugs.python.org  Wed Oct 13 06:27:05 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 13 Oct 2021 10:27:05 +0000
Subject: [issue45247] [C API] Add explicit support for Cython to the C API
In-Reply-To: <1632135587.14.0.29634943523.issue45247@roundup.psfhosted.org>
Message-ID: <1634120825.12.0.401073205822.issue45247@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:

I disagree. All that is doing is locking in the current poor interface.

We do need to extend the C API for these uses, yes. But we need an API that addresses Cython's needs directly and at a higher level.

For example, Cython often wants to insert a frame into the call stack for debugging and introspection.

Rather than have Cython laboriously create a Python frame with fake code object, etc., it would make much more sense for us to offer an API to insert a "native" frame into the stack and update the line number.

E.g. something like:

int PushNativeFrame(const char *filename);
void PopNativeFrame(void);
int CurrentNativeFrame_SetLineNumber(int lineno);

We might even want to use such an API ourselves in some modules.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45247>
_______________________________________

From report at bugs.python.org  Wed Oct 13 06:28:48 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 10:28:48 +0000
Subject: [issue45459] Limited API support for Py_buffer
In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>
Message-ID: <1634120928.57.0.950875501322.issue45459@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Py_buffer.shape requires a Py_ssize_t* pointer. It's not convenient. For example, the array module uses:

static int
array_buffer_getbuf(arrayobject *self, Py_buffer *view, int flags)
{
    ...
    if ((flags & PyBUF_ND)==PyBUF_ND) {
        view->shape = &((PyVarObject*)self)->ob_size;
    }
    ...
    return 0;
}

This code is not compatible with a fully opaque PyObject structure:
https://bugs.python.org/issue39573#msg401395

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Wed Oct 13 06:30:18 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 10:30:18 +0000
Subject: [issue45247] [C API] Add explicit support for Cython to the C API
In-Reply-To: <1632135587.14.0.29634943523.issue45247@roundup.psfhosted.org>
Message-ID: <1634121018.84.0.703562205081.issue45247@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> Rather than have Cython laboriously create a Python frame with fake code object, etc., it would make much more sense for us to offer an API to insert a "native" frame into the stack and update the line number.

I agree with that.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45247>
_______________________________________

From report at bugs.python.org  Wed Oct 13 07:16:02 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 13 Oct 2021 11:16:02 +0000
Subject: [issue45459] Limited API support for Py_buffer
In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>
Message-ID: <1634123762.63.0.80603103554.issue45459@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

shape is a pointer to array of Py_ssize_t of size ndim. array and memoryview do a trick to avoid memory allocation, but _testbuffer.ndarray allocates it dynamically in the heap. We can add a small static buffer in Py_buffer to avoid additional memory allocation in common cases.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Wed Oct 13 07:21:08 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 13 Oct 2021 11:21:08 +0000
Subject: [issue45247] [C API] Add explicit support for Cython to the C API
In-Reply-To: <1632135587.14.0.29634943523.issue45247@roundup.psfhosted.org>
Message-ID: <1634124068.5.0.556832944781.issue45247@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I agree with Mark. Instead of exposing internal details in low-level API we should add more high-level API to satisfy concrete needs. It will give us more freedom of changing internals in future.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45247>
_______________________________________

From report at bugs.python.org  Wed Oct 13 07:45:37 2021
From: report at bugs.python.org (Zohim Chandani)
Date: Wed, 13 Oct 2021 11:45:37 +0000
Subject: [issue45443] 'ThreadPoolExecutor' object has no attribute 'map'
In-Reply-To: <1634035739.42.0.184025452389.issue45443@roundup.psfhosted.org>
Message-ID: <1634125537.5.0.899053404635.issue45443@roundup.psfhosted.org>


Zohim Chandani <zohim.chandani at gmail.com> added the comment:

Please see attached. I have printed out the python version. Running this on VS code.

----------
Added file: https://bugs.python.org/file50353/Screenshot 2021-10-13 at 12.45.04.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45443>
_______________________________________

From report at bugs.python.org  Wed Oct 13 07:49:14 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 13 Oct 2021 11:49:14 +0000
Subject: [issue45459] Limited API support for Py_buffer
In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>
Message-ID: <1634125754.21.0.178579880616.issue45459@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

IIRC shape, strides, and suboffsets are all arrays of ndims length.

We could optimize allocation if we would require users to specify the value of ndims and don't allow them to change the value afterwards. PyBuffer_New(int ndims) then would allocate view of size sizeof(Py_buffer) + (3 * ndims * sizeof(Py_ssize_t *)). This would give us sufficient space to memcpy() shape, strides, and suboffsets arguments into memory after the Py_buffer struct.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Wed Oct 13 07:54:59 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 13 Oct 2021 11:54:59 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1634126099.57.0.58909911192.issue45438@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

The cause is that isinstance(list[int], type) returns True. It can cause bugs in other parts of the code which test for instance of type. For example:

>>> types.resolve_bases((typing.List[int],))
(<class 'list'>, <class 'typing.Generic'>)
>>> types.resolve_bases((list[int],))
(list[int],)

>>> types.prepare_class('A', (int,), {'metaclass': typing.Type[int]})
(typing.Type[int], {}, {})
>>> types.prepare_class('A', (int,), {'metaclass': type[int]})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/serhiy/py/cpython/Lib/types.py", line 125, in prepare_class
    meta = _calculate_meta(meta, bases)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/serhiy/py/cpython/Lib/types.py", line 139, in _calculate_meta
    if issubclass(base_meta, winner):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: issubclass() argument 2 cannot be a parameterized generic

>>> @functools.singledispatch
... def g(a): pass
... 
>>> @g.register
... def g2(a: typing.List[int]): pass
... 
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/home/serhiy/py/cpython/Lib/functools.py", line 863, in register
    raise TypeError(
    ^^^^^^^^^^^^^^^^
TypeError: Invalid annotation for 'a'. typing.List[int] is not a class.
>>> @g.register(list[int])
... def g2(a): pass
... 
>>> @g.register
... def g3(a: typing.List[int]): pass
... 
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/home/serhiy/py/cpython/Lib/functools.py", line 863, in register
    raise TypeError(
    ^^^^^^^^^^^^^^^^
TypeError: Invalid annotation for 'a'. typing.List[int] is not a class.
>>> @g.register
... def g3(a: list[int]): pass
... 

And many other examples, too many to show here.

Was it mistake to make isinstance(list[int], type) returning True?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Wed Oct 13 08:08:48 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 12:08:48 +0000
Subject: [issue45410] python -m test -jN: write stderr in stdout to get
 messages in order
In-Reply-To: <1633691736.44.0.338544053782.issue45410@roundup.psfhosted.org>
Message-ID: <1634126928.88.0.449162569103.issue45410@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 773330773968f211c77abc7b5b525faa7b3c35a2 by Victor Stinner in branch 'main':
bpo-45410: regrtest -W leaves stdout/err FD unchanged (GH-28915)
https://github.com/python/cpython/commit/773330773968f211c77abc7b5b525faa7b3c35a2


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45410>
_______________________________________

From report at bugs.python.org  Wed Oct 13 08:11:25 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 13 Oct 2021 12:11:25 +0000
Subject: [issue45459] Limited API support for Py_buffer
In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>
Message-ID: <1634127085.87.0.407553248019.issue45459@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

ndim is not known before calling PyObject_GetBuffer(), so we will need a new API which combines PyObject_GetBuffer() and PyBuffer_New().

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Wed Oct 13 08:16:08 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 12:16:08 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634127368.03.0.226418017847.issue45434@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27212
pull_request: https://github.com/python/cpython/pull/28922

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Wed Oct 13 08:48:18 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 12:48:18 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634129298.12.0.193295008038.issue45434@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27213
pull_request: https://github.com/python/cpython/pull/28923

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Wed Oct 13 09:03:43 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 13:03:43 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634130223.19.0.943960930615.issue45434@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 97308dfcdc0696e0b116c37386e2ff4d72e6c3f4 by Victor Stinner in branch 'main':
bpo-45434: Move _Py_BEGIN_SUPPRESS_IPH to pycore_fileutils.h (GH-28922)
https://github.com/python/cpython/commit/97308dfcdc0696e0b116c37386e2ff4d72e6c3f4


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Wed Oct 13 09:19:42 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 13 Oct 2021 13:19:42 +0000
Subject: [issue45340] Lazily create dictionaries for plain Python objects
In-Reply-To: <1633087277.57.0.188806648124.issue45340@roundup.psfhosted.org>
Message-ID: <1634131182.74.0.422967309771.issue45340@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:


New changeset a8b9350964f43cb648c98c179c8037fbf3ff8a7d by Mark Shannon in branch 'main':
bpo-45340: Don't create object dictionaries unless actually needed (GH-28802)
https://github.com/python/cpython/commit/a8b9350964f43cb648c98c179c8037fbf3ff8a7d


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45340>
_______________________________________

From report at bugs.python.org  Wed Oct 13 09:22:43 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 13:22:43 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634131363.01.0.27298029157.issue45434@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset bbe7497c5a44c2b4ec726605cf5a9086ba02daf1 by Victor Stinner in branch 'main':
bpo-45434: Remove pystrhex.h header file (GH-28923)
https://github.com/python/cpython/commit/bbe7497c5a44c2b4ec726605cf5a9086ba02daf1


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Wed Oct 13 09:38:49 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 13 Oct 2021 13:38:49 +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: <1634132329.93.0.613352524118.issue45256@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:


New changeset 3901c081143ef29624f9c1cb49cc70a70321d139 by Pablo Galindo Salgado in branch 'main':
bpo-45256: Fix cleanup of stolen locals for Python-to-Python calls (GH-28905)
https://github.com/python/cpython/commit/3901c081143ef29624f9c1cb49cc70a70321d139


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45256>
_______________________________________

From report at bugs.python.org  Wed Oct 13 09:39:16 2021
From: report at bugs.python.org (David Hagen)
Date: Wed, 13 Oct 2021 13:39:16 +0000
Subject: [issue36424] Pickle fails on frozen dataclass that has slots
In-Reply-To: <1553527088.82.0.636469633332.issue36424@roundup.psfhosted.org>
Message-ID: <1634132356.69.0.892465619325.issue36424@roundup.psfhosted.org>


David Hagen <david at drhagen.com> added the comment:

Because the implementation in GH-25786 relies on the new `dataclass(slots=True)` feature (i.e. it does not work if the slots are specified with `__slots__`), I don't think this can be trivially backported to versions before 3.10.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36424>
_______________________________________

From report at bugs.python.org  Wed Oct 13 09:44:05 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 13:44:05 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634132645.42.0.274668451826.issue45434@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27214
pull_request: https://github.com/python/cpython/pull/28924

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Wed Oct 13 10:02:39 2021
From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=)
Date: Wed, 13 Oct 2021 14:02:39 +0000
Subject: [issue45460] distutils.sysconfig.get_python_lib() does not respect
 sysconfig/distutils install schemes
Message-ID: <1634133759.79.0.719278605469.issue45460@roundup.psfhosted.org>


New submission from Miro Hron?ok <miro at hroncok.cz>:

In https://github.com/python/cpython/pull/24549 (Load install schemes from sysconfig) we have assumed that distutils will simply read all information from sysconfig, so distributors could patch the install schemes in there and distutils (whether the one in the standard library or a third party fork).

However, in https://github.com/pypa/pip/issues/10151#issuecomment-942162384 we have figured out that distutils.sysconfig.get_python_lib() does not respect the schemes from sysconfig at all, instead, it creates the paths from scratch.

This might be too late for Python 3.10, but in Python 3.11 I'd like distutils.sysconfig.get_python_lib() to return paths defined by sysconfig install schemes. That way, we can more easily move that from the standard library to a third-party project with an independent delivery mechanism.

----------
components: Distutils
messages: 403834
nosy: FFY00, dstufft, eric.araujo, frenzy, hroncok, jaraco, petr.viktorin, vstinner
priority: normal
severity: normal
status: open
title: distutils.sysconfig.get_python_lib() does not respect sysconfig/distutils install schemes
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45460>
_______________________________________

From report at bugs.python.org  Wed Oct 13 10:03:04 2021
From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=)
Date: Wed, 13 Oct 2021 14:03:04 +0000
Subject: [issue41282] Deprecate and remove distutils
In-Reply-To: <1594542625.3.0.789939298104.issue41282@roundup.psfhosted.org>
Message-ID: <1634133784.44.0.277423038483.issue41282@roundup.psfhosted.org>


Miro Hron?ok <miro at hroncok.cz> added the comment:

Related: https://bugs.python.org/issue45460

----------
nosy: +hroncok

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41282>
_______________________________________

From report at bugs.python.org  Wed Oct 13 10:04:36 2021
From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=)
Date: Wed, 13 Oct 2021 14:04:36 +0000
Subject: [issue45460] distutils.sysconfig.get_python_lib() does not respect
 sysconfig/distutils install schemes
In-Reply-To: <1634133759.79.0.719278605469.issue45460@roundup.psfhosted.org>
Message-ID: <1634133876.43.0.0536976224741.issue45460@roundup.psfhosted.org>


Miro Hron?ok <miro at hroncok.cz> added the comment:

> so distributors could patch the install schemes in there and distutils (whether the one in the standard library or a third party fork).

Somehow, this sentence is not finished properly.

...so distributors could patch the install schemes in there and distutils (whether the one in the standard library or a third party fork) would respect it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45460>
_______________________________________

From report at bugs.python.org  Wed Oct 13 10:31:37 2021
From: report at bugs.python.org (Anatoly Myachev)
Date: Wed, 13 Oct 2021 14:31:37 +0000
Subject: [issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode
 byte 0x5c in position 8191: \ at end of string
Message-ID: <1634135497.37.0.760320895517.issue45461@roundup.psfhosted.org>


New submission from Anatoly Myachev <anatoliimyachev at mail.ru>:

Expected behavior - if `read()` function works correctly, then `readline()` should also works.

Reproducer in file - just run: `python test.py`.

Traceback (most recent call last):
  File "test.py", line 11, in <module>
    f.readline()
  File "C:\Users\amyachev\Miniconda3\envs\modin\lib\encodings\unicode_escape.py", line 26, in decode
    return codecs.unicode_escape_decode(input, self.errors)[0]
UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

----------
components: Unicode
files: test.py
messages: 403837
nosy: anmyachev, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file50354/test.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45461>
_______________________________________

From report at bugs.python.org  Wed Oct 13 10:41:20 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 14:41:20 +0000
Subject: [issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode
 byte 0x5c in position 8191: \ at end of string
In-Reply-To: <1634135497.37.0.760320895517.issue45461@roundup.psfhosted.org>
Message-ID: <1634136080.07.0.962956951477.issue45461@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Can you please try write a simpler (shorter) reproducer?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45461>
_______________________________________

From report at bugs.python.org  Wed Oct 13 10:49:15 2021
From: report at bugs.python.org (David Bohman)
Date: Wed, 13 Oct 2021 14:49:15 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1634136555.85.0.0058232925661.issue45405@roundup.psfhosted.org>


David Bohman <debohman at gmail.com> added the comment:

Thank you for your help, Ned.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Wed Oct 13 10:55:06 2021
From: report at bugs.python.org (Anatoly Myachev)
Date: Wed, 13 Oct 2021 14:55:06 +0000
Subject: [issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode
 byte 0x5c in position 8191: \ at end of string
In-Reply-To: <1634135497.37.0.760320895517.issue45461@roundup.psfhosted.org>
Message-ID: <1634136906.99.0.869201539666.issue45461@roundup.psfhosted.org>


Anatoly Myachev <anatoliimyachev at mail.ru> added the comment:

Hello!

I can reduce it a little.
The buffer shoudln't be decreased, as it seems there is a some kind relation with the buffer size for IO operations.

buffer = b'col1,col2,col3,col4,col5,col6\\r\\n0,2000-01-01,0,00:00:00,DuBFsyerJU,1809.3924826424557\\r\\n10,2000-01-01,10,01:00:00,AlwGHbVPpB,2853.2392617952996\\r\\n20,2000-01-01,20,02:00:00,TEkGgsYXYz,9933.278931158615\\r\\n30,2000-01-01,30,03:00:00,tfvnynVSfp,8574.917426248916\\r\\n40,2000-01-01,40,04:00:00,YOGjhztMWe,3768.71871233428\\r\\n50,2000-01-01,50,05:00:00,vkTOJSeQmU,6330.252072351792\\r\\n60,2000-01-01,60,06:00:00,LeolDfaGyv,5052.618993456892\\r\\n70,2000-01-01,70,07:00:00,OcyrbYVtyr,4287.371622852719\\r\\n80,2000-01-01,80,08:00:00,VUwDPNhcFV,3589.697826814614\\r\\n90,2000-01-01,90,09:00:00,KOadtzcNyK,4794.158259020925\\r\\n100,2000-01-01,100,10:00:00,rdSOjXJBWC,8826.736894397129\\r\\n110,2000-01-01,110,11:00:00,qzwVBOklhk,8086.105782454443\\r\\n120,2000-01-01,120,12:00:00,UTRlqVfKoD,1012.5061461339624\\r\\n130,2000-01-01,130,13:00:00,wKqEkRhkfw,2511.3137510933934\\r\\n140,2000-01-01,140,14:00:00,LxklWJbgxo,406.7116346419042\\r\\n150,2000-01-01,150,15:00:00,SxmZkdUgHv,8424.978062284761\\r\\n160,2000-01-01,160,16:00:00,nEvzypASGb,9890.252156059063\\r\\n170,2000-01-01,170,17:00:00,xiFkkjoDPB,2728.8359201479675\\r\\n180,2000-01-01,180,18:00:00,boMmgpBXgL,4231.680208002166\\r\\n190,2000-01-01,190,19:00:00,dXLJXWiXZI,7757.44902751916\\r\\n200,2000-01-01,200,20:00:00,PBdjwKoCMD,4915.090357003991\\r\\n210,2000-01-01,210,21:00:00,zGWLALpmoA,359.5243650158153\\r\\n220,2000-01-01,220,22:00:00,CfpZJoOqGZ,704.7990862762942\\r\\n230,2000-01-01,230,23:00:00,DrkxpLhpEN,520.3290677592321\\r\\n240,2000-01-02,240,00:00:00,TDKEBbZAzQ,5218.671660857721\\r\\n250,2000-01-02,250,01:00:00,gULwzvNeWO,4218.66872701774\\r\\n260,2000-01-02,260,02:00:00,ogSyzHWmNY,9026.657391329585\\r\\n270,2000-01-02,270,03:00:00,NetmmthtzN,2027.8312539582244\\r\\n280,2000-01-02,280,04:00:00,PoYiHipTzR,7667.627476518046\\r\\n290,2000-01-02,290,05:00:00,MjHIRGmsoq,4144.001792539834\\r\\n300,2000-01-02,300,06:00:00,qESRSNnNnO,5348.024681284471\\r\\n310,2000-01-02,310,07:00:00,sSIjcXWhLC,3622.4673907599413\\r\\n320,2000-01-02,320,08:00:00,IvjrlljbeB,7500.419388155823\\r\\n330,2000-01-02,330,09:00:00,aVWVRXZjZy,3686.5972529264213\\r\\n340,2000-01-02,340,10:00:00,QKeTjcNlCG,1228.9751449454411\\r\\n350,2000-01-02,350,11:00:00,phEdHCVsbe,4254.15983968718\\r\\n360,2000-01-02,360,12:00:00,ursHJjQxRK,6099.131673115221\\r\\n370,2000-01-02,370,13:00:00,JvjcRlYcYG,1503.3586866746164\\r\\n380,2000-01-02,380,14:00:00,gzCyqHPRRb,7816.898213939008\\r\\n390,2000-01-02,390,15:00:00,lQZmobRwzt,8295.113759829599\\r\\n400,2000-01-02,400,16:00:00,qspiYGfTou,1987.8215069414816\\r\\n410,2000-01-02,410,17:00:00,mcqWMMzomf,15.878728570531964\\r\\n420,2000-01-02,420,18:00:00,fiPsxulpGU,5380.485947841902\\r\\n430,2000-01-02,430,19:00:00,gTAyTkpeez,4720.7159908343565\\r\\n440,2000-01-02,440,20:00:00,hzFbhAPvFX,946.5797295044975\\r\\n450,2000-01-02,450,21:00:00,NYNcYxsyVl,7333.850198973723\\r\\n460,2000-01-02,460,22:00:00,wvgMmIxLzo,7399.341315026157\\r\\n470,2000-01-02,470,23:00:00,bZoyzAGgEC,5464.053510955946\\r\\n480,2000-01-03,480,00:00:00,jZNaceUYyr,1390.8829937709977\\r\\n490,2000-01-03,490,01:00:00,sbfLgcCpru,9626.900131786555\\r\\n500,2000-01-03,500,02:00:00,MHpAkHfnmV,9406.471079089133\\r\\n510,2000-01-03,510,03:00:00,ENdFBGtRCq,3740.8773019724517\\r\\n520,2000-01-03,520,04:00:00,FzqXhMLHLY,4270.3585910905\\r\\n530,2000-01-03,530,05:00:00,wWinjEGhAj,8548.152649813675\\r\\n540,2000-01-03,540,06:00:00,LcxAImCvxt,4097.693176523874\\r\\n550,2000-01-03,550,07:00:00,sDhzGBYKpt,1673.7466277500146\\r\\n560,2000-01-03,560,08:00:00,jhagjcZhGU,4103.702089490347\\r\\n570,2000-01-03,570,09:00:00,ZIkRwPWyWP,9368.662605679918\\r\\n580,2000-01-03,580,10:00:00,uphgoCQwZY,3321.0096306747137\\r\\n590,2000-01-03,590,11:00:00,jEKaqqScLF,8442.084614664149\\r\\n600,2000-01-03,600,12:00:00,kSIJFBHVnL,4065.19226287942\\r\\n610,2000-01-03,610,13:00:00,YRhoANskYn,5089.668482943252\\r\\n620,2000-01-03,620,14:00:00,SnlwCSdkWf,5738.46737129545\\r\\n630,2000-01-03,630,15:00:00,ANfpLOiJTV,393.77545256928823\\r\\n640,2000-01-03,640,16:00:00,DUxigzNtLz,6798.725575133883\\r\\n650,2000-01-03,650,17:00:00,jaJECwmWTY,5178.597327486391\\r\\n660,2000-01-03,660,18:00:00,tzrWZLSELo,7467.995039288831\\r\\n670,2000-01-03,670,19:00:00,rbUWLCKjeV,4013.698847016407\\r\\n680,2000-01-03,680,20:00:00,JKFAZgEkja,1538.6412971598695\\r\\n690,2000-01-03,690,21:00:00,uEomQhtneK,2849.6558284053976\\r\\n700,2000-01-03,700,22:00:00,VNqwqzfgXT,6756.852702484582\\r\\n710,2000-01-03,710,23:00:00,YzYqAlWMKn,9250.2543956494\\r\\n720,2000-01-04,720,00:00:00,VBrvxVqNpT,7430.930594705144\\r\\n730,2000-01-04,730,01:00:00,KxgdYwiVtl,1190.2548337790097\\r\\n740,2000-01-04,740,02:00:00,oPUENybUiS,247.4663426770396\\r\\n750,2000-01-04,750,03:00:00,bgpLfCsNrU,6472.8593061097\\r\\n760,2000-01-04,760,04:00:00,xmRUnIzNOL,5791.031151521782\\r\\n770,2000-01-04,770,05:00:00,SsYMDEINvO,347.35344936110636\\r\\n780,2000-01-04,780,06:00:00,XuorBLXsEt,9003.971751685769\\r\\n790,2000-01-04,790,07:00:00,jRYnFPYRKE,858.8836157464275\\r\\n800,2000-01-04,800,08:00:00,uRRXIdQDYH,4914.608250347407\\r\\n810,2000-01-04,810,09:00:00,nxkVSEnKXv,3586.0998633311424\\r\\n820,2000-01-04,820,10:00:00,BddLdFLDkg,9392.836980063128\\r\\n830,2000-01-04,830,11:00:00,MNuZvbMDqM,4075.512732895953\\r\\n840,2000-01-04,840,12:00:00,KfiIyqdZJq,4450.624248264806\\r\\n850,2000-01-04,850,13:00:00,ZNzdZZhipO,5155.329570863023\\r\\n860,2000-01-04,860,14:00:00,MmVEuWyJJt,7125.153628136557\\r\\n870,2000-01-04,870,15:00:00,QTVeqONJWF,7459.723393845693\\r\\n880,2000-01-04,880,16:00:00,sVHRlErfHm,5349.520468668593\\r\\n890,2000-01-04,890,17:00:00,OfcunHkqxU,2538.9594014567383\\r\\n900,2000-01-04,900,18:00:00,rXTISMpGvf,6136.26826553925\\r\\n910,2000-01-04,910,19:00:00,YYgIQPrYmN,2828.778965008356\\r\\n920,2000-01-04,920,20:00:00,acLWVYscRm,2135.4492617161204\\r\\n930,2000-01-04,930,21:00:00,ejuIuzrhoE,7853.20277523869\\r\\n940,2000-01-04,940,22:00:00,nEIyUKZvtl,9026.298438227512\\r\\n950,2000-01-04,950,23:00:00,fVrPrRMjgE,1108.9112508806\\r\\n960,2000-01-05,960,00:00:00,aQbeIHZfrq,6779.761579736982\\r\\n970,2000-01-05,970,01:00:00,NSYmULwYsy,4710.484556444787\\r\\n980,2000-01-05,980,02:00:00,OstJdNkpJM,6696.018116272272\\r\\n990,2000-01-05,990,03:00:00,zPdwVSfwsw,1019.0631993852805\\r\\n1000,2000-01-05,1000,04:00:00,PrPiNtxItj,4786.919229745998\\r\\n1010,2000-01-05,1010,05:00:00,iTrMpbwDkd,1082.2792701135043\\r\\n1020,2000-01-05,1020,06:00:00,VIOGBhjuvc,6712.260837571906\\r\\n1030,2000-01-05,1030,07:00:00,vKfivaIyHN,8660.527086155422\\r\\n1040,2000-01-05,1040,08:00:00,bAlxEIEfpN,1415.7747325826188\\r\\n1050,2000-01-05,1050,09:00:00,cJPGJmIKdc,9816.3246377919\\r\\n1060,2000-01-05,1060,10:00:00,AdSXaKQpQX,3536.32709953549\\r\\n1070,2000-01-05,1070,11:00:00,PHntAagAlw,7431.850668273714\\r\\n1080,2000-01-05,1080,12:00:00,ZtQrFBobvY,4224.027690860892\\r\\n1090,2000-01-05,1090,13:00:00,ZuPnbhaSOU,3484.8530656320654\\r\\n1100,2000-01-05,1100,14:00:00,qOSVmejqdo,6847.384220484392\\r\\n1110,2000-01-05,1110,15:00:00,kwckywqRbb,5867.829131220223\\r\\n1120,2000-01-05,1120,16:00:00,JLrzzbUfDi,6991.180870142121\\r\\n1130,2000-01-05,1130,17:00:00,qPuDjhipNE,2544.115558392327\\r\\n1140,2000-01-05,1140,18:00:00,nTuOipVPUZ,3521.350549002792\\r\\n1150,2000-01-05,1150,19:00:00,FxTDpmsUYC,5796.837844528479\\r\\n1160,2000-01-05,1160,20:00:00,IilnnODeoz,9981.446352555968\\r\\n1170,2000-01-05,1170,21:00:00,lJpBtcVSww,8659.609927822496\\r\\n1180,2000-01-05,1180,22:00:00,uefmaifDgk,164.5549179029382\\r\\n1190,2000-01-05,1190,23:00:00,AQsKnkJxOV,455.31829622753816\\r\\n1200,2000-01-06,1200,00:00:00,IUcDyPSHIE,5727.976331105652\\r\\n1210,2000-01-06,1210,01:00:00,nrEdNiWGdi,2015.5167059418156\\r\\n1220,2000-01-06,1220,02:00:00,EflmCojQzg,9514.004760633412\\r\\n1230,2000-01-06,1230,03:00:00,LsAIvtooWr,7898.8225145572\\r\\n1240,2000-01-06,1240,04:00:00,yiDOUysGHw,4219.262059231663\\r\\n1250,2000-01-06,1250,05:00:00,idWAZATxwy,3043.2304072778616\\r\\n1260,2000-01-06,1260,06:00:00,sBedlknKzY,3840.820372936372\\r\\n1270,2000-01-06,1270,07:00:00,ReEmhVRAjb,6966.434389542963\\r\\n1280,2000-01-06,1280,08:00:00,XnFrfzMBKt,6041.8596064524045\\r\\n1290,2000-01-06,1290,09:00:00,MaMMHEWEIf,2569.2675325271707\\r\\n1300,2000-01-06,1300,10:00:00,OUpokSyVfO,7387.813510302333\\r\\n1310,2000-01-06,1310,11:00:00,VgCigxOcbF,7695.008235452545\\r\\n1320,2000-01-06,1320,12:00:00,ouRNYgSzXq,3293.250454887212\\r\\n1330,2000-01-06,1330,13:00:00,iQczJExipS,1892.9945453269115\\r\\n1340,2000-01-06,1340,14:00:00,vVbLlDWFCr,7105.276586964716\\r\\n1350,'

with open("bug_csv.csv", "wb") as f:
    f.write(buffer)

with open("bug_csv.csv", encoding="unicode_escape", newline="") as f:
    f.readline()

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45461>
_______________________________________

From report at bugs.python.org  Wed Oct 13 11:12:07 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 15:12:07 +0000
Subject: [issue45410] python -m test -jN: write stderr in stdout to get
 messages in order
In-Reply-To: <1633691736.44.0.338544053782.issue45410@roundup.psfhosted.org>
Message-ID: <1634137927.11.0.553250910328.issue45410@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27215
pull_request: https://github.com/python/cpython/pull/28926

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45410>
_______________________________________

From report at bugs.python.org  Wed Oct 13 11:21:56 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 15:21:56 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634138516.86.0.692588376796.issue45434@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Oh, Include/errcode.h *is* used by PyRun_InteractiveOneFlags() and its variants. It's mentioned in its documentation:

   Returns ``0`` when the input was
   executed successfully, ``-1`` if there was an exception, or an error code
   from the :file:`errcode.h` include file distributed as part of Python if
   there was a parse error.  (Note that :file:`errcode.h` is not included by
   :file:`Python.h`, so must be included specifically if needed.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Wed Oct 13 11:22:18 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 15:22:18 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634138538.67.0.25831422432.issue45434@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 713bb19356bce9b8f2b95461834fe1dae505f889 by Victor Stinner in branch 'main':
bpo-45434: Mark the PyTokenizer C API as private (GH-28924)
https://github.com/python/cpython/commit/713bb19356bce9b8f2b95461834fe1dae505f889


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Wed Oct 13 11:24:19 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 15:24:19 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634138659.63.0.843474742934.issue45434@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

PyRun_InteractiveOneObjectEx() returns a single error code of errcode.h: E_EOF (11):

    if (mod == NULL) {
        _PyArena_Free(arena);
        if (errcode == E_EOF) {
            PyErr_Clear();
            return E_EOF;
        }
        return -1;
    }

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Wed Oct 13 11:35:28 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 15:35:28 +0000
Subject: [issue45410] python -m test -jN: write stderr in stdout to get
 messages in order
In-Reply-To: <1633691736.44.0.338544053782.issue45410@roundup.psfhosted.org>
Message-ID: <1634139328.67.0.584742120514.issue45410@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 676201a59f90caace606d11d4172aa74c1cd4992 by Victor Stinner in branch 'main':
bpo-45410: regrtest replaces print_warning.orig_stderr (GH-28926)
https://github.com/python/cpython/commit/676201a59f90caace606d11d4172aa74c1cd4992


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45410>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:12:44 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Wed, 13 Oct 2021 16:12:44 +0000
Subject: [issue45446] Add a way to hide fields in dataclasses
In-Reply-To: <1634064413.57.0.706886797987.issue45446@roundup.psfhosted.org>
Message-ID: <1634141564.25.0.51374402407.issue45446@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

"hide" is not a good name for this.

Does attrs have anything equivalent? This seems like a pretty niche usage, so I'm not inclined to include it without evidence of a wide-spread need for it.

----------
assignee:  -> eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45446>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:12:52 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 16:12:52 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634141572.71.0.279563749985.issue45229@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset f59ed3c310a7ceebf2a56a84ea969a7f75d95b64 by Serhiy Storchaka in branch 'main':
bpo-45229: Make tkinter tests discoverable (GH-28637)
https://github.com/python/cpython/commit/f59ed3c310a7ceebf2a56a84ea969a7f75d95b64


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:12:58 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 13 Oct 2021 16:12:58 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634141578.56.0.0817534663055.issue45229@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27216
pull_request: https://github.com/python/cpython/pull/28927

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:21:31 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 16:21:31 +0000
Subject: [issue45239] email.utils.parsedate_tz raises UnboundLocalError if
 time has more than 2 dots in it
In-Reply-To: <1632004553.3.0.0473045390855.issue45239@roundup.psfhosted.org>
Message-ID: <1634142091.85.0.356009420809.issue45239@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset b9e687618d3489944f29adbd2be50b46940c9e70 by Ben Hoyt in branch 'main':
bpo-45239: Fix parsedate_tz when time has more than 2 dots in it (GH-28452)
https://github.com/python/cpython/commit/b9e687618d3489944f29adbd2be50b46940c9e70


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45239>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:21:38 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 13 Oct 2021 16:21:38 +0000
Subject: [issue45239] email.utils.parsedate_tz raises UnboundLocalError if
 time has more than 2 dots in it
In-Reply-To: <1632004553.3.0.0473045390855.issue45239@roundup.psfhosted.org>
Message-ID: <1634142098.36.0.0705366087719.issue45239@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27217
pull_request: https://github.com/python/cpython/pull/28928

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45239>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:25:23 2021
From: report at bugs.python.org (Matthew Barnett)
Date: Wed, 13 Oct 2021 16:25:23 +0000
Subject: [issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode
 byte 0x5c in position 8191: \ at end of string
In-Reply-To: <1634135497.37.0.760320895517.issue45461@roundup.psfhosted.org>
Message-ID: <1634142323.87.0.368813972922.issue45461@roundup.psfhosted.org>


Matthew Barnett <python at mrabarnett.plus.com> added the comment:

It can be shortened to this:

buffer = b"a" * 8191 + b"\\r\\n"

with open("bug_csv.csv", "wb") as f:
    f.write(buffer)

with open("bug_csv.csv", encoding="unicode_escape", newline="") as f:
    f.readline()

To me it looks like it's reading in blocks of 8K and then decoding them,  but it isn't correctly handling an escape sequence that happens to cross a block boundary.

----------
nosy: +mrabarnett

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45461>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:26:07 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 16:26:07 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634142367.54.0.319847590504.issue45229@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
pull_requests: +27218
pull_request: https://github.com/python/cpython/pull/28929

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:27:22 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 16:27:22 +0000
Subject: [issue45239] email.utils.parsedate_tz raises UnboundLocalError if
 time has more than 2 dots in it
In-Reply-To: <1632004553.3.0.0473045390855.issue45239@roundup.psfhosted.org>
Message-ID: <1634142442.83.0.778837513989.issue45239@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
pull_requests: +27219
pull_request: https://github.com/python/cpython/pull/28930

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45239>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:32:05 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 16:32:05 +0000
Subject: [issue24444] In argparse empty choices cannot be printed in the help
In-Reply-To: <1434178022.79.0.230343884775.issue24444@psf.upfronthosting.co.za>
Message-ID: <1634142725.46.0.333146567689.issue24444@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 6fafc25aea8689048314b5bf7a9bb986bb1ce238 by andrei kulakov in branch 'main':
bpo-24444: fix an error in argparse help when help for an option is blank (GH-28050)
https://github.com/python/cpython/commit/6fafc25aea8689048314b5bf7a9bb986bb1ce238


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24444>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:32:12 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 13 Oct 2021 16:32:12 +0000
Subject: [issue24444] In argparse empty choices cannot be printed in the help
In-Reply-To: <1434178022.79.0.230343884775.issue24444@psf.upfronthosting.co.za>
Message-ID: <1634142732.14.0.899566482492.issue24444@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27221
pull_request: https://github.com/python/cpython/pull/28932

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24444>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:32:04 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 13 Oct 2021 16:32:04 +0000
Subject: [issue24444] In argparse empty choices cannot be printed in the help
In-Reply-To: <1434178022.79.0.230343884775.issue24444@psf.upfronthosting.co.za>
Message-ID: <1634142724.38.0.158866491872.issue24444@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27220
pull_request: https://github.com/python/cpython/pull/28931

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24444>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:38:40 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 16:38:40 +0000
Subject: [issue45386] xmlrpc.client unimportable due to strfmt ValueError
In-Reply-To: <1633503207.0.0.80221316205.issue45386@roundup.psfhosted.org>
Message-ID: <1634143120.58.0.894896930711.issue45386@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 1c831353816ff699b54e804047a7242a09e98f5b by rtobar in branch 'main':
bpo-45386: Handle strftime's ValueError graciously in xmlrpc.client (GH-28765)
https://github.com/python/cpython/commit/1c831353816ff699b54e804047a7242a09e98f5b


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45386>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:38:48 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 13 Oct 2021 16:38:48 +0000
Subject: [issue45386] xmlrpc.client unimportable due to strfmt ValueError
In-Reply-To: <1633503207.0.0.80221316205.issue45386@roundup.psfhosted.org>
Message-ID: <1634143128.92.0.558331775828.issue45386@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27223
pull_request: https://github.com/python/cpython/pull/28935

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45386>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:38:44 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 13 Oct 2021 16:38:44 +0000
Subject: [issue45386] xmlrpc.client unimportable due to strfmt ValueError
In-Reply-To: <1633503207.0.0.80221316205.issue45386@roundup.psfhosted.org>
Message-ID: <1634143124.78.0.95690525712.issue45386@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27222
pull_request: https://github.com/python/cpython/pull/28934

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45386>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:38:53 2021
From: report at bugs.python.org (Jonas H.)
Date: Wed, 13 Oct 2021 16:38:53 +0000
Subject: [issue45462] Speed up re.match with pre-compiled patterns
Message-ID: <1634143133.69.0.265087114017.issue45462@roundup.psfhosted.org>


New submission from Jonas H. <jonas at lophus.org>:

re.match(p, ...) with a pre-compiled pattern p = re.compile(...) can be much slower than calling p.match(...). Probably mostly in cases with "easy" patterns and/or short strings.

The culprit is that re.match -> re._compile can spend a lot of time looking up p its internal _cache, where it will never find p:

def _compile(pattern, flags):
    ...
    try:
        return _cache[type(pattern), pattern, flags]
    except KeyError:
        pass
    if isinstance(pattern, Pattern):
        ...
        return pattern
    ...
        _cache[type(pattern), pattern, flags] = p
    ...

_compile will always return before the _cache is set if given a Pattern object.

By simply reordering the isinstance(..., Pattern) check we can safe a lot of time.

I've seen speedups in the range of 2x-5x on some of my data. As an example:

Raw speed of re.compile(p, ...).match():
    time ./python.exe -c 'import re'\n'pat = re.compile(".").match'\n'for _ in range(1_000_000): pat("asdf")'
    Executed in  190.59 millis

Speed with this optimization:
    time ./python.exe -c 'import re'\n'pat = re.compile(".")'\n'for _ in range(1_000_000): re.match(pat, "asdf")'
    Executed in  291.39 millis

Speed without this optimization:
    time ./python.exe -c 'import re'\n'pat = re.compile(".")'\n'for _ in range(1_000_000): re.match(pat, "asdf")'
    Executed in  554.42 millis

----------
components: Regular Expressions
messages: 403851
nosy: ezio.melotti, jonash, mrabarnett
priority: normal
severity: normal
status: open
title: Speed up re.match with pre-compiled patterns
type: performance
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45462>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:41:21 2021
From: report at bugs.python.org (Jonas H.)
Date: Wed, 13 Oct 2021 16:41:21 +0000
Subject: [issue45462] Speed up re.match with pre-compiled patterns
In-Reply-To: <1634143133.69.0.265087114017.issue45462@roundup.psfhosted.org>
Message-ID: <1634143281.94.0.887967265652.issue45462@roundup.psfhosted.org>


Change by Jonas H. <jonas at lophus.org>:


----------
keywords: +patch
pull_requests: +27224
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28936

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45462>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:48:56 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 13 Oct 2021 16:48:56 +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: <1634143736.59.0.676211731583.issue45256@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
pull_requests: +27226
pull_request: https://github.com/python/cpython/pull/28937

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45256>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:58:41 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 16:58:41 +0000
Subject: [issue45239] email.utils.parsedate_tz raises UnboundLocalError if
 time has more than 2 dots in it
In-Reply-To: <1632004553.3.0.0473045390855.issue45239@roundup.psfhosted.org>
Message-ID: <1634144321.39.0.576516241869.issue45239@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 5638618845752f713c00d69dbe705fed16761948 by Miss Islington (bot) in branch '3.9':
bpo-45239: Fix parsedate_tz when time has more than 2 dots in it (GH-28452) (GH-28928)
https://github.com/python/cpython/commit/5638618845752f713c00d69dbe705fed16761948


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45239>
_______________________________________

From report at bugs.python.org  Wed Oct 13 12:59:07 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 16:59:07 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634144347.68.0.856090530055.issue45229@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 151234f5da4b1922e3d91233a6eddda92d7269b0 by Miss Islington (bot) in branch '3.10':
bpo-45229: Make tkinter tests discoverable (GH-28637) (GH-28927)
https://github.com/python/cpython/commit/151234f5da4b1922e3d91233a6eddda92d7269b0


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Wed Oct 13 13:08:24 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 17:08:24 +0000
Subject: [issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode
 byte 0x5c in position 8191: \ at end of string
In-Reply-To: <1634135497.37.0.760320895517.issue45461@roundup.psfhosted.org>
Message-ID: <1634144904.1.0.948389020675.issue45461@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45461>
_______________________________________

From report at bugs.python.org  Wed Oct 13 13:08:26 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Wed, 13 Oct 2021 17:08:26 +0000
Subject: [issue45445] Fail if an invalid -X option is provided
In-Reply-To: <1634045986.72.0.556620578821.issue45445@roundup.psfhosted.org>
Message-ID: <1634144906.84.0.572463410238.issue45445@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset db2b6a20cd35781b2f5e798e880e57e6cf9b97aa by Pablo Galindo Salgado in branch 'main':
bpo-45445: Fail if an invalid X-option is provided in the command line (GH-28823)
https://github.com/python/cpython/commit/db2b6a20cd35781b2f5e798e880e57e6cf9b97aa


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45445>
_______________________________________

From report at bugs.python.org  Wed Oct 13 13:08:48 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 17:08:48 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634144928.09.0.721818464698.issue45229@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 5d747130933a25a3984f78ae32d2e74a0d2dc5d1 by ?ukasz Langa in branch '3.9':
[3.9] bpo-45229: Make tkinter tests discoverable (GH-28637) (GH-28929)
https://github.com/python/cpython/commit/5d747130933a25a3984f78ae32d2e74a0d2dc5d1


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Wed Oct 13 13:12:26 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 17:12:26 +0000
Subject: [issue45239] email.utils.parsedate_tz raises UnboundLocalError if
 time has more than 2 dots in it
In-Reply-To: <1632004553.3.0.0473045390855.issue45239@roundup.psfhosted.org>
Message-ID: <1634145146.31.0.236812926929.issue45239@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset f8473f6f7603f8cccccc3307d4cb853587be41b3 by ?ukasz Langa in branch '3.10':
[3.10] bpo-45239: Fix parsedate_tz when time has more than 2 dots in it (GH-28452) (GH-28930)
https://github.com/python/cpython/commit/f8473f6f7603f8cccccc3307d4cb853587be41b3


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45239>
_______________________________________

From report at bugs.python.org  Wed Oct 13 13:12:48 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 17:12:48 +0000
Subject: [issue45239] email.utils.parsedate_tz raises UnboundLocalError if
 time has more than 2 dots in it
In-Reply-To: <1632004553.3.0.0473045390855.issue45239@roundup.psfhosted.org>
Message-ID: <1634145168.43.0.614526399896.issue45239@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Ben! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> behavior
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45239>
_______________________________________

From report at bugs.python.org  Wed Oct 13 13:15:47 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 17:15:47 +0000
Subject: [issue24444] In argparse empty choices cannot be printed in the help
In-Reply-To: <1434178022.79.0.230343884775.issue24444@psf.upfronthosting.co.za>
Message-ID: <1634145347.5.0.710209937938.issue24444@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset fd2be6da2ffec2301a58aefa92f17f0c567fbc55 by Miss Islington (bot) in branch '3.10':
bpo-24444: fix an error in argparse help when help for an option is blank (GH-28050) (GH-28931)
https://github.com/python/cpython/commit/fd2be6da2ffec2301a58aefa92f17f0c567fbc55


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24444>
_______________________________________

From report at bugs.python.org  Wed Oct 13 13:26:00 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 17:26:00 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634145960.07.0.363669712234.issue45434@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset aac29af6785712019d34f1a7f15b3c408a4f68ae by Victor Stinner in branch 'main':
bpo-45434: pyport.h no longer includes <stdlib.h> (GH-28914)
https://github.com/python/cpython/commit/aac29af6785712019d34f1a7f15b3c408a4f68ae


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Wed Oct 13 13:38:53 2021
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 13 Oct 2021 17:38:53 +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: <1634146733.15.0.455266059299.issue42248@roundup.psfhosted.org>


Antoine Pitrou <pitrou at free.fr> added the comment:

It appears this is *not* fixed in 3.10.0:

Python 3.10.0 (default, Oct 13 2021, 08:45:17) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import signal, gc
>>> class App: pass
... 
>>> def create_app():
...   app = App()
...   signal.signal(signal.SIGINT, signal.SIG_DFL)
... 
>>> [obj for obj in gc.get_objects() if type(obj) is App]
[]
>>> create_app()
>>> [obj for obj in gc.get_objects() if type(obj) is App]
[<__main__.App object at 0x7f2d3f3f1c30>]

----------
nosy: +pitrou
resolution: fixed -> 
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42248>
_______________________________________

From report at bugs.python.org  Wed Oct 13 13:40:25 2021
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 13 Oct 2021 17:40:25 +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: <1634146825.7.0.842271229941.issue42248@roundup.psfhosted.org>


Antoine Pitrou <pitrou at free.fr> added the comment:

Indeed, changeset  8c14f5a787b21d5a1eae5d5ee981431d1c0e055f is part of git main, but is not on the 3.10 branch AFAICT.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42248>
_______________________________________

From report at bugs.python.org  Wed Oct 13 13:42:40 2021
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 13 Oct 2021 17:42:40 +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: <1634146960.99.0.826626677367.issue42248@roundup.psfhosted.org>


Antoine Pitrou <pitrou at free.fr> added the comment:

It seems the problem is that bpo-44559 reset the enum module to a previous state without the bugfix.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42248>
_______________________________________

From report at bugs.python.org  Wed Oct 13 13:43:54 2021
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 13 Oct 2021 17:43:54 +0000
Subject: [issue44559] Enum: revert to 3.9
In-Reply-To: <1625363304.74.0.624005694289.issue44559@roundup.psfhosted.org>
Message-ID: <1634147034.1.0.99855203979.issue44559@roundup.psfhosted.org>


Antoine Pitrou <pitrou at free.fr> added the comment:

It seems the revert was not done properly: it removed from 3.10 some bugfixes that had been applied to 3.9 (see issue42248 for an example).

----------
nosy: +pitrou
stage: resolved -> 
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44559>
_______________________________________

From report at bugs.python.org  Wed Oct 13 13:54:03 2021
From: report at bugs.python.org (Luca)
Date: Wed, 13 Oct 2021 17:54:03 +0000
Subject: [issue45463] Documentation inconsistency on the number of identifiers
 allowed in global stmt
Message-ID: <1634147643.19.0.48482298028.issue45463@roundup.psfhosted.org>


New submission from Luca <luca at chiodini.org>:

The global statement allows specifying a list of identifiers, as correctly reported in the "Simple statements" chapter: https://docs.python.org/3/reference/simple_stmts.html#the-global-statement.

Inconsistently, however, the "Execution model" chapter describes the global statement as if it only allowed one single name.

This can be addressed by pluralizing the word "name" in the appropriate places in the "Execution model" chapter.

----------
assignee: docs at python
components: Documentation
messages: 403864
nosy: docs at python, lucach
priority: normal
pull_requests: 27227
severity: normal
status: open
title: Documentation inconsistency on the number of identifiers allowed in global stmt

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45463>
_______________________________________

From report at bugs.python.org  Wed Oct 13 13:59:53 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 17:59:53 +0000
Subject: [issue45386] xmlrpc.client unimportable due to strfmt ValueError
In-Reply-To: <1633503207.0.0.80221316205.issue45386@roundup.psfhosted.org>
Message-ID: <1634147993.22.0.754711927623.issue45386@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset f40b230df91f29fa4a84c1d127b4eab56a6eda27 by Miss Islington (bot) in branch '3.10':
bpo-45386: Handle strftime's ValueError graciously in xmlrpc.client (GH-28765) (GH-28934)
https://github.com/python/cpython/commit/f40b230df91f29fa4a84c1d127b4eab56a6eda27


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45386>
_______________________________________

From report at bugs.python.org  Wed Oct 13 14:00:10 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 18:00:10 +0000
Subject: [issue45386] xmlrpc.client unimportable due to strfmt ValueError
In-Reply-To: <1633503207.0.0.80221316205.issue45386@roundup.psfhosted.org>
Message-ID: <1634148010.66.0.307301171902.issue45386@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 9210eff61b75edabbe9263df0c4a303fc2149a22 by Miss Islington (bot) in branch '3.9':
bpo-45386: Handle strftime's ValueError graciously in xmlrpc.client (GH-28765) (GH-28935)
https://github.com/python/cpython/commit/9210eff61b75edabbe9263df0c4a303fc2149a22


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45386>
_______________________________________

From report at bugs.python.org  Wed Oct 13 14:00:49 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 18:00:49 +0000
Subject: [issue45386] xmlrpc.client unimportable due to strfmt ValueError
In-Reply-To: <1633503207.0.0.80221316205.issue45386@roundup.psfhosted.org>
Message-ID: <1634148049.24.0.276177270813.issue45386@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, R! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> behavior
versions: +Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45386>
_______________________________________

From report at bugs.python.org  Wed Oct 13 14:35:22 2021
From: report at bugs.python.org (Stephen Paul Chappell)
Date: Wed, 13 Oct 2021 18:35:22 +0000
Subject: [issue35228] Index search in CHM help crashes viewer
In-Reply-To: <1542107217.87.0.788709270274.issue35228@psf.upfronthosting.co.za>
Message-ID: <1634150122.85.0.149774572859.issue35228@roundup.psfhosted.org>


Change by Stephen Paul Chappell <Noctis.Skytower at gmail.com>:


----------
nosy: +Zero

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35228>
_______________________________________

From report at bugs.python.org  Wed Oct 13 14:45:55 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 13 Oct 2021 18:45:55 +0000
Subject: [issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode
 byte 0x5c in position 8191: \ at end of string
In-Reply-To: <1634135497.37.0.760320895517.issue45461@roundup.psfhosted.org>
Message-ID: <1634150755.28.0.282119882244.issue45461@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
assignee:  -> serhiy.storchaka
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45461>
_______________________________________

From report at bugs.python.org  Wed Oct 13 14:53:53 2021
From: report at bugs.python.org (Zayden Micheal James)
Date: Wed, 13 Oct 2021 18:53:53 +0000
Subject: [issue45448] PIP package installation failure for multiple packages
In-Reply-To: <1634053122.93.0.794234678092.issue45448@roundup.psfhosted.org>
Message-ID: <1634151233.05.0.516501460272.issue45448@roundup.psfhosted.org>


Zayden Micheal James <zayvelleman at gmail.com> added the comment:

This issue is still persisting with other libraries aswell such as matplotlib and the above mentioned.

----------
nosy:  -eric.smith
resolution: third party -> 
status: closed -> open
type: compile error -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45448>
_______________________________________

From report at bugs.python.org  Wed Oct 13 15:06:14 2021
From: report at bugs.python.org (Zayden Micheal James)
Date: Wed, 13 Oct 2021 19:06:14 +0000
Subject: [issue45448] PIP package installation failure for multiple packages
In-Reply-To: <1634053122.93.0.794234678092.issue45448@roundup.psfhosted.org>
Message-ID: <1634151974.27.0.999751938872.issue45448@roundup.psfhosted.org>


Zayden Micheal James <zayvelleman at gmail.com> added the comment:

I am using Python 3.10 and PIP 21.2.4. All installations worked fine with Python 3.9. 

I tried combinations such as:

["pip", "pip3", "python3 -m pip", "python -m pip3", "python -m pip","python3 -m pip3"]

So far documented modules with problems are:

["numpy", "pandas", "tensorflow", "matplotlib"]

It is impossible for all of these libraries to be broken all at once with Python 3.10, PIP 21.2.4 and not be a problem with Python/PIP.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45448>
_______________________________________

From report at bugs.python.org  Wed Oct 13 15:14:15 2021
From: report at bugs.python.org (Diego Ramirez)
Date: Wed, 13 Oct 2021 19:14:15 +0000
Subject: [issue45126] [sqlite3] cleanup and harden Connection and Cursor
 __init__
In-Reply-To: <1631015162.08.0.638095834379.issue45126@roundup.psfhosted.org>
Message-ID: <1634152455.71.0.116655470821.issue45126@roundup.psfhosted.org>


Change by Diego Ramirez <dr01191115 at gmail.com>:


----------
nosy: +DiddiLeija

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45126>
_______________________________________

From report at bugs.python.org  Wed Oct 13 16:05:16 2021
From: report at bugs.python.org (=?utf-8?q?Marek_Marczykowski-G=C3=B3recki?=)
Date: Wed, 13 Oct 2021 20:05:16 +0000
Subject: [issue45464] TypeError when inheriting from both OSError and
 AttributeError
Message-ID: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>


New submission from Marek Marczykowski-G?recki <marmarek at mimuw.edu.pl>:

In Python 3.10 it is no longer possible to create an exception type that inherits from both OSError and AttributeError. This has worked in Python 3.9.
I don't see anything in changelog/release notes that would suggest it being intentional.

Behavior in Python 3.9:

Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> class C(OSError, AttributeError): pass
... 
>>> C
<class '__main__.C'>


Behavior in Python 3.10:

Python 3.10.0 (default, Oct  4 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> class C(OSError, AttributeError): pass
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: multiple bases have instance lay-out conflict


My (very) wild guess is this being related to https://bugs.python.org/issue38530

----------
components: Interpreter Core
messages: 403870
nosy: marmarek
priority: normal
severity: normal
status: open
title: TypeError when inheriting from both OSError and AttributeError
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45464>
_______________________________________

From report at bugs.python.org  Wed Oct 13 16:36:20 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 20:36:20 +0000
Subject: [issue24444] In argparse empty choices cannot be printed in the help
In-Reply-To: <1434178022.79.0.230343884775.issue24444@psf.upfronthosting.co.za>
Message-ID: <1634157380.9.0.687969115739.issue24444@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset fb7203453855a43907048ff2b8f9b890305b3d15 by Miss Islington (bot) in branch '3.9':
[3.9] bpo-24444: fix an error in argparse help when help for an option is blank (GH-28050) (GH-28932)
https://github.com/python/cpython/commit/fb7203453855a43907048ff2b8f9b890305b3d15


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24444>
_______________________________________

From report at bugs.python.org  Wed Oct 13 16:37:35 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 13 Oct 2021 20:37:35 +0000
Subject: [issue24444] In argparse empty choices cannot be printed in the help
In-Reply-To: <1434178022.79.0.230343884775.issue24444@psf.upfronthosting.co.za>
Message-ID: <1634157455.84.0.582115220113.issue24444@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Andrei! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24444>
_______________________________________

From report at bugs.python.org  Wed Oct 13 17:27:57 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 21:27:57 +0000
Subject: [issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the
 limited C API if isinf() is not defined
In-Reply-To: <1633996280.11.0.993737910951.issue45440@roundup.psfhosted.org>
Message-ID: <1634160477.88.0.47072541835.issue45440@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 194a9526d8ee6abbbe58ef48520ec87a7e83f327 by Victor Stinner in branch 'main':
bpo-45440: Require math.h isinf() to build (GH-28894)
https://github.com/python/cpython/commit/194a9526d8ee6abbbe58ef48520ec87a7e83f327


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45440>
_______________________________________

From report at bugs.python.org  Wed Oct 13 17:30:01 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 21:30:01 +0000
Subject: [issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the
 limited C API if isinf() is not defined
In-Reply-To: <1633996280.11.0.993737910951.issue45440@roundup.psfhosted.org>
Message-ID: <1634160601.71.0.561277585197.issue45440@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> [C API] Py_IS_INFINITY() macro doesn't work in the limited C API if isinf() is not defined

Well, the final fix is to remove the code path when isinf() is not available and require it to build Python ;-)

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45440>
_______________________________________

From report at bugs.python.org  Wed Oct 13 17:31:05 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 13 Oct 2021 21:31:05 +0000
Subject: [issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode
 byte 0x5c in position 8191: \ at end of string
In-Reply-To: <1634135497.37.0.760320895517.issue45461@roundup.psfhosted.org>
Message-ID: <1634160665.59.0.501492812304.issue45461@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
keywords: +patch
pull_requests: +27228
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28939

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45461>
_______________________________________

From report at bugs.python.org  Wed Oct 13 17:33:39 2021
From: report at bugs.python.org (Ethan Furman)
Date: Wed, 13 Oct 2021 21:33:39 +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: <1634160819.2.0.474723931596.issue42248@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:

Going back through the various bug fixes that got cut from 3.10 to re-add to 3.10.1.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42248>
_______________________________________

From report at bugs.python.org  Wed Oct 13 17:36:36 2021
From: report at bugs.python.org (Ethan Furman)
Date: Wed, 13 Oct 2021 21:36:36 +0000
Subject: [issue44559] Enum: revert to 3.9
In-Reply-To: <1625363304.74.0.624005694289.issue44559@roundup.psfhosted.org>
Message-ID: <1634160996.81.0.832450129326.issue44559@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:

Going back through the various bug fixes that got cut from 3.10 to re-add to 3.10.1.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44559>
_______________________________________

From report at bugs.python.org  Wed Oct 13 17:47:51 2021
From: report at bugs.python.org (Foster Snowhill)
Date: Wed, 13 Oct 2021 21:47:51 +0000
Subject: [issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken
In-Reply-To: <1496250931.44.0.236459920081.issue30528@psf.upfronthosting.co.za>
Message-ID: <1634161671.87.0.941457669097.issue30528@roundup.psfhosted.org>


Change by Foster Snowhill <python at pen.gy>:


----------
nosy: +forst

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30528>
_______________________________________

From report at bugs.python.org  Wed Oct 13 17:54:14 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 21:54:14 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634162054.85.0.169584682687.issue45439@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


Added file: https://bugs.python.org/file50355/sys_call.patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Wed Oct 13 18:03:50 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 22:03:50 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634162630.74.0.984408752073.issue45439@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I measured the stack consumption using attached sys_call.patch and stack_overflow-4.py.

Using gcc -O3, the stack consumption with PR 28893 is *way better* on the 6 benchmarks (6 ways to call functions), especially:

PyObject_CallOneArg(): 624 bytes/call => 528 bytes/call (-96 bytes)
PyObject_CallNoArg(): 608 bytes/call => 512 bytes/call (-96 bytes)
_PyObject_CallNoArg(): 608 bytes/call => 512 bytes/call (-96 bytes)


Python built in release mode with gcc -O3:

   ./configure && make

=== ref ===

$ ./python stack_overflow-4.py
test_python_call: 10070 calls before crash, stack: 832 bytes/call
test_python_getitem: 16894 calls before crash, stack: 496 bytes/call
test_python_iterator: 12773 calls before crash, stack: 656 bytes/call
test_callonearg: 13428 calls before crash, stack: 624 bytes/call
test_callnoargs: 13779 calls before crash, stack: 608 bytes/call
test_callnoargs_inline: 13782 calls before crash, stack: 608 bytes/call

=> total: 80726 calls, 3824 bytes


=== PR ===

$ ./python stack_overflow-4.py
test_python_call: 11901 calls before crash, stack: 704 bytes/call
test_python_getitem: 18703 calls before crash, stack: 448 bytes/call
test_python_iterator: 14961 calls before crash, stack: 560 bytes/call
test_callonearg: 15868 calls before crash, stack: 528 bytes/call
test_callnoargs: 16366 calls before crash, stack: 512 bytes/call
test_callnoargs_inline: 16365 calls before crash, stack: 512 bytes/call

=> total: 94164 calls, 3264 bytes

----------
Added file: https://bugs.python.org/file50356/stack_overflow-4.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Wed Oct 13 18:30:08 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 13 Oct 2021 22:30:08 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org>
Message-ID: <1634164208.06.0.109326693619.issue45020@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
pull_requests: +27229
pull_request: https://github.com/python/cpython/pull/28940

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Wed Oct 13 18:37:51 2021
From: report at bugs.python.org (STINNER Victor)
Date: Wed, 13 Oct 2021 22:37:51 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634164671.53.0.467583124205.issue45439@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Using LTO, the PR 28893 *increases* the stack memory usage. It's the opposite :-)


PyObject_CallOneArg(): 672 bytes/call => 688 bytes/call (+16 bytes)
PyObject_CallNoArg(): 640 bytes/call => 672 bytes/call (+32 bytes)
_PyObject_CallNoArg(): 640 bytes/call => 672 bytes/call (+32 bytes)


clang with LTO:

    ./configure --with-lto CC=clang LD=lld LDFLAGS="-fuse-ld=lld"
    make

=== ref ===

$ ./python stack_overflow-4.py
test_python_call: 9187 calls before crash, stack: 912 bytes/call
test_python_getitem: 15868 calls before crash, stack: 528 bytes/call
test_python_iterator: 11901 calls before crash, stack: 704 bytes/call
test_callonearg: 12468 calls before crash, stack: 672 bytes/call
test_callnoargs: 13091 calls before crash, stack: 640 bytes/call
test_callnoargs_inline: 13092 calls before crash, stack: 640 bytes/call

=> total: 75607 calls, 4096 bytes

=== PR ===

$ ./python stack_overflow-4.py
test_python_call: 9186 calls before crash, stack: 912 bytes/call
test_python_getitem: 15400 calls before crash, stack: 544 bytes/call
test_python_iterator: 11384 calls before crash, stack: 736 bytes/call
test_callonearg: 12177 calls before crash, stack: 688 bytes/call
test_callnoargs: 12468 calls before crash, stack: 672 bytes/call
test_callnoargs_inline: 12467 calls before crash, stack: 672 bytes/call

=> total: 73082 calls, 4224 bytes

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Wed Oct 13 18:39:47 2021
From: report at bugs.python.org (=?utf-8?b?0KDQvtC80LDQvSDQlNC+0L3Rh9C10L3QutC+?=)
Date: Wed, 13 Oct 2021 22:39:47 +0000
Subject: [issue45465] logging messages are needlessly reformatted for every
 handler
Message-ID: <1634164787.38.0.59547649385.issue45465@roundup.psfhosted.org>


New submission from ????? ???????? <dpb at corrigendum.ru>:

Consider this code:

```
import logging

class MyLogRecord(logging.LogRecord):
    def getMessage(self):
        print("Help! I am being formatted!")
        return super().getMessage()

logging.setLogRecordFactory(MyLogRecord)

logger = logging.getLogger("test")
logger.addHandler(logging.StreamHandler())
logger.addHandler(logging.StreamHandler())

logger.error("%d", 123)
```

Its output is:

```
Help! I am being formatted!
123
Help! I am being formatted!
123
```

In other words, the record's `getMessage` method is called once for every handler. That seems quite unnecessary, especially since the formatted message is saved in the `message` field of the record by `Formatter.format`. `Formatter` could check whether the message has already been formatted, and if so, use the saved message.

----------
components: Library (Lib)
messages: 403879
nosy: SpecLad
priority: normal
severity: normal
status: open
title: logging messages are needlessly reformatted for every handler
type: enhancement
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45465>
_______________________________________

From report at bugs.python.org  Wed Oct 13 18:44:14 2021
From: report at bugs.python.org (Jack Wong)
Date: Wed, 13 Oct 2021 22:44:14 +0000
Subject: [issue30782] Allow limiting the number of concurrent tasks in
 asyncio.as_completed
In-Reply-To: <1498525522.6.0.617023291854.issue30782@psf.upfronthosting.co.za>
Message-ID: <1634165054.88.0.0151408100956.issue30782@roundup.psfhosted.org>


Change by Jack Wong <ajackwong at gmail.com>:


----------
nosy: +iforapsy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30782>
_______________________________________

From report at bugs.python.org  Wed Oct 13 20:03:13 2021
From: report at bugs.python.org (tongxiaoge)
Date: Thu, 14 Oct 2021 00:03:13 +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: <1634169793.16.0.51579562399.issue45444@roundup.psfhosted.org>


tongxiaoge <shixuantong at huawei.com> added the comment:

I reproduced the same problem in Python 3-3.11.0a1 and increased two failure test cases: test_ exceptions and test_ Tools, detailed log is as follows:

[ 1937s] 0:27:53 load avg: 5.11 running: test_capi (27 min 51 sec)
[ 1966s] 0:28:23 load avg: 5.03 [423/423/3] test_capi passed (28 min 19 sec)
[ 1966s]
[ 1966s] == Tests result: FAILURE ==
[ 1966s]
[ 1966s] 401 tests OK.
[ 1966s]
[ 1966s] 10 slowest tests:
[ 1966s] - test_capi: 28 min 19 sec
[ 1966s] - test_faulthandler: 21 min 7 sec
[ 1966s] - test_concurrent_futures: 18 min 53 sec
[ 1966s] - test_io: 3 min 23 sec
[ 1966s] - test_peg_generator: 3 min 5 sec
[ 1966s] - test_subprocess: 2 min 49 sec
[ 1966s] - test_multiprocessing_spawn: 2 min 36 sec
[ 1966s] - test_audit: 2 min 15 sec
[ 1966s] - test_multiprocessing_forkserver: 1 min 43 sec
[ 1966s] - test_regrtest: 1 min 42 sec
[ 1966s]
[ 1966s] 3 tests failed:
[ 1966s]     test_concurrent_futures test_exceptions test_tools
[ 1966s]
[ 1966s] 19 tests skipped:
[ 1966s]     test_curses test_devpoll test_ioctl test_kqueue test_msilib
[ 1966s]     test_ossaudiodev test_smtpnet test_socketserver test_startfile
[ 1966s]     test_tix test_tk test_ttk_guionly test_urllib2net test_urllibnet
[ 1966s]     test_winconsoleio test_winreg test_winsound test_xmlrpc_net
[ 1966s]     test_zipfile64
[ 1966s] 0:28:23 load avg: 5.03
[ 1966s] 0:28:23 load avg: 5.03 Re-running failed tests in verbose mode
[ 1966s] 0:28:23 load avg: 5.03 Re-running test_exceptions in verbose mode (matching: test_name_error_suggestions_do_not_trigger_for_too_many_locals)
[ 1966s] test_name_error_suggestions_do_not_trigger_for_too_many_locals (test.test_exceptions.NameErrorTests) ... test test_exceptions failed
[ 1966s] FAIL
[ 1966s]
[ 1966s] ======================================================================
[ 1966s] FAIL: test_name_error_suggestions_do_not_trigger_for_too_many_locals (test.test_exceptions.NameErrorTests)
[ 1966s] ----------------------------------------------------------------------
[ 1966s] Traceback (most recent call last):
[ 1966s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1843, in test_name_error_suggestions_do_not_trigger_for_too_many_locals
[ 1966s]     self.assertNotIn("a1", err.getvalue())
[ 1966s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 1966s] AssertionError: 'a1' unexpectedly found in 'Traceback (most recent call last):\n  File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1838, in test_name_error_suggestions_do_not_trigger_for_too_many_locals\n    f()\n    ^^^\n  File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1835, in f\n    print(a0)\n          ^^\nNameError: name \'a0\' is not defined\n'
[ 1966s]
[ 1966s] ----------------------------------------------------------------------
[ 1966s] Ran 1 test in 0.004s
[ 1966s]
[ 1966s] FAILED (failures=1)
[ 1966s] 0:28:23 load avg: 5.03 Re-running test_tools in verbose mode (matching: test_sundry)
[ 1966s] test_analyze_dxp_import (test.test_tools.test_sundry.TestSundryScripts) ... ok
[ 1966s] test_sundry (test.test_tools.test_sundry.TestSundryScripts) ... ERROR
[ 1966s] test_sundry_windows (test.test_tools.test_sundry.TestSundryScripts) ... test test_tools failed
[ 1966s] skipped 'Windows-only test'
[ 1966s]
[ 1966s] ======================================================================
[ 1966s] ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts)
[ 1966s] ----------------------------------------------------------------------
[ 1966s] Traceback (most recent call last):
[ 1966s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_tools/test_sundry.py", line 43, in test_sundry
[ 1966s]     import_tool(name)
[ 1966s]     ^^^^^^^^^^^^^^^^^
[ 1966s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_tools/__init__.py", line 35, in import_tool
[ 1966s]     return importlib.import_module(toolname)
[ 1966s]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 1966s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/importlib/__init__.py", line 126, in import_module
[ 1966s]     return _bootstrap._gcd_import(name[level:], package, level)
[ 1966s]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 1966s]   File "<frozen importlib._bootstrap>", line 1072, in _gcd_import
[ 1966s]   File "<frozen importlib._bootstrap>", line 1044, in _find_and_load
[ 1966s]   File "<frozen importlib._bootstrap>", line 1015, in _find_and_load_unlocked
[ 1966s]   File "<frozen importlib._bootstrap>", line 689, in _load_unlocked
[ 1966s]   File "<frozen importlib._bootstrap_external>", line 894, in exec_module
[ 1966s]   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
[ 1966s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Tools/scripts/freeze_modules.py", line 37, in <module>
[ 1966s]     sys.exit("ERROR: missing _freeze_module")
[ 1966s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 1966s] SystemExit: ERROR: missing _freeze_module
[ 1966s]
[ 1966s] ----------------------------------------------------------------------
[ 1966s] Ran 3 tests in 0.013s
[ 1966s]
[ 1966s] FAILED (errors=1, skipped=1)
[ 1966s] 0:28:23 load avg: 5.03 Re-running test_concurrent_futures in verbose mode (matching: test_crash_at_task_unpickle, test_crash_during_func_exec_on_worker, test_crash_during_result_pickle_on_worker, test_crash_at_task_unpickle, test_crash_during_func_exec_on_worker, test_crash_during_result_pickle_on_worker, test_crash_at_task_unpickle, test_crash_during_func_exec_on_worker, test_crash_during_result_pickle_on_worker)
[ 2048s] test_crash_at_task_unpickle (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest) ...
[ 2048s] Traceback:
[ 2048s]  Thread 0x00007fa69effd700 (most recent call first):
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2048s]
[ 2048s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2048s]
[ 2048s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1175 in test_crash_at_task_unpickle
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2048s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2048s]
[ 2048s] FAIL
[ 2132s] 81.93s test_crash_during_func_exec_on_worker (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest) ...
[ 2132s] Traceback:
[ 2132s]  Thread 0x00007fa69effd700 (most recent call first):
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2132s]
[ 2132s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2132s]
[ 2132s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1179 in test_crash_during_func_exec_on_worker
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2132s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2132s]
[ 2132s] FAIL
[ 2216s] 83.91s test_crash_during_result_pickle_on_worker (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest) ...
[ 2216s] Traceback:
[ 2216s]  Thread 0x00007fa69effd700 (most recent call first):
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2216s]
[ 2216s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2216s]
[ 2216s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1192 in test_crash_during_result_pickle_on_worker
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2216s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2216s]
[ 2216s] FAIL
[ 2294s] 84.36s test_crash_at_task_unpickle (test.test_concurrent_futures.ProcessPoolForkserverExecutorDeadlockTest) ...
[ 2294s] Traceback:
[ 2294s]  Thread 0x00007fa69effd700 (most recent call first):
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2294s]
[ 2294s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2294s]
[ 2294s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1175 in test_crash_at_task_unpickle
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2294s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2294s]
[ 2294s] FAIL
[ 2374s] 77.53s test_crash_during_func_exec_on_worker (test.test_concurrent_futures.ProcessPoolForkserverExecutorDeadlockTest) ...
[ 2374s] Traceback:
[ 2374s]  Thread 0x00007fa69effd700 (most recent call first):
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2374s]
[ 2374s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2374s]
[ 2374s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1179 in test_crash_during_func_exec_on_worker
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2374s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2374s]
[ 2374s] FAIL
[ 2453s] 80.34s test_crash_during_result_pickle_on_worker (test.test_concurrent_futures.ProcessPoolForkserverExecutorDeadlockTest) ...
[ 2453s] Traceback:
[ 2453s]  Thread 0x00007fa69effd700 (most recent call first):
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2453s]
[ 2453s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2453s]
[ 2453s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1192 in test_crash_during_result_pickle_on_worker
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2453s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2453s]
[ 2453s] FAIL
[ 2530s] 78.50s test_crash_at_task_unpickle (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) ...
[ 2530s] Traceback:
[ 2530s]  Thread 0x00007fa69effd700 (most recent call first):
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2530s]
[ 2530s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2530s]
[ 2530s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1175 in test_crash_at_task_unpickle
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2530s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2530s]
[ 2530s] FAIL
[ 2610s] 77.23s test_crash_during_func_exec_on_worker (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) ...
[ 2610s] Traceback:
[ 2610s]  Thread 0x00007fa69effd700 (most recent call first):
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2610s]
[ 2610s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2610s]
[ 2610s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1179 in test_crash_during_func_exec_on_worker
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2610s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2610s]
[ 2610s] FAIL
[ 2690s] 80.46s test_crash_during_result_pickle_on_worker (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) ...
[ 2690s] Traceback:
[ 2690s]  Thread 0x00007fa69effd700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1192 in test_crash_during_result_pickle_on_worker
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2690s]
[ 2690s] FAIL
[ 2690s] 79.42s
[ 2690s] ======================================================================
[ 2690s] FAIL: test_crash_at_task_unpickle (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest)
[ 2690s] ----------------------------------------------------------------------
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1153, in _check_crash
[ 2690s]     res.result(timeout=self.TIMEOUT)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/_base.py", line 447, in result
[ 2690s]     raise TimeoutError()
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^
[ 2690s] concurrent.futures._base.TimeoutError
[ 2690s]
[ 2690s] During handling of the above exception, another exception occurred:
[ 2690s]
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1175, in test_crash_at_task_unpickle
[ 2690s]     self._check_crash(BrokenProcessPool, id, CrashAtUnpickle())
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157, in _check_crash
[ 2690s]     self._fail_on_deadlock(executor)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1134, in _fail_on_deadlock
[ 2690s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s] AssertionError: Executor deadlock:
[ 2690s]
[ 2690s] Thread 0x00007fa69effd700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1175 in test_crash_at_task_unpickle
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2690s]
[ 2690s]
[ 2690s] ======================================================================
[ 2690s] FAIL: test_crash_during_func_exec_on_worker (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest)
[ 2690s] ----------------------------------------------------------------------
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1153, in _check_crash
[ 2690s]     res.result(timeout=self.TIMEOUT)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/_base.py", line 447, in result
[ 2690s]     raise TimeoutError()
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^
[ 2690s] concurrent.futures._base.TimeoutError
[ 2690s]
[ 2690s] During handling of the above exception, another exception occurred:
[ 2690s]
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1179, in test_crash_during_func_exec_on_worker
[ 2690s]     self._check_crash(BrokenProcessPool, _crash)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157, in _check_crash
[ 2690s]     self._fail_on_deadlock(executor)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1134, in _fail_on_deadlock
[ 2690s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s] AssertionError: Executor deadlock:
[ 2690s]
[ 2690s] Thread 0x00007fa69effd700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1179 in test_crash_during_func_exec_on_worker
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2690s]
[ 2690s]
[ 2690s] ======================================================================
[ 2690s] FAIL: test_crash_during_result_pickle_on_worker (test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest)
[ 2690s] ----------------------------------------------------------------------
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1153, in _check_crash
[ 2690s]     res.result(timeout=self.TIMEOUT)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/_base.py", line 447, in result
[ 2690s]     raise TimeoutError()
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^
[ 2690s] concurrent.futures._base.TimeoutError
[ 2690s]
[ 2690s] During handling of the above exception, another exception occurred:
[ 2690s]
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1192, in test_crash_during_result_pickle_on_worker
[ 2690s]     self._check_crash(BrokenProcessPool, _return_instance, CrashAtPickle)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157, in _check_crash
[ 2690s]     self._fail_on_deadlock(executor)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1134, in _fail_on_deadlock
[ 2690s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s] AssertionError: Executor deadlock:
[ 2690s]
[ 2690s] Thread 0x00007fa69effd700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1192 in test_crash_during_result_pickle_on_worker
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2690s]
[ 2690s]
[ 2690s] ======================================================================
[ 2690s] FAIL: test_crash_at_task_unpickle (test.test_concurrent_futures.ProcessPoolForkserverExecutorDeadlockTest)
[ 2690s] ----------------------------------------------------------------------
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1153, in _check_crash
[ 2690s]     res.result(timeout=self.TIMEOUT)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/_base.py", line 447, in result
[ 2690s]     raise TimeoutError()
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^
[ 2690s] concurrent.futures._base.TimeoutError
[ 2690s]
[ 2690s] During handling of the above exception, another exception occurred:
[ 2690s]
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1175, in test_crash_at_task_unpickle
[ 2690s]     self._check_crash(BrokenProcessPool, id, CrashAtUnpickle())
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157, in _check_crash
[ 2690s]     self._fail_on_deadlock(executor)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1134, in _fail_on_deadlock
[ 2690s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s] AssertionError: Executor deadlock:
[ 2690s]
[ 2690s] Thread 0x00007fa69effd700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1175 in test_crash_at_task_unpickle
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2690s]
[ 2690s]
[ 2690s] ======================================================================
[ 2690s] FAIL: test_crash_during_func_exec_on_worker (test.test_concurrent_futures.ProcessPoolForkserverExecutorDeadlockTest)
[ 2690s] ----------------------------------------------------------------------
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1153, in _check_crash
[ 2690s]     res.result(timeout=self.TIMEOUT)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/_base.py", line 447, in result
[ 2690s]     raise TimeoutError()
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^
[ 2690s] concurrent.futures._base.TimeoutError
[ 2690s]
[ 2690s] During handling of the above exception, another exception occurred:
[ 2690s]
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1179, in test_crash_during_func_exec_on_worker
[ 2690s]     self._check_crash(BrokenProcessPool, _crash)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157, in _check_crash
[ 2690s]     self._fail_on_deadlock(executor)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1134, in _fail_on_deadlock
[ 2690s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s] AssertionError: Executor deadlock:
[ 2690s]
[ 2690s] Thread 0x00007fa69effd700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1179 in test_crash_during_func_exec_on_worker
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2690s]
[ 2690s]
[ 2690s] ======================================================================
[ 2690s] FAIL: test_crash_during_result_pickle_on_worker (test.test_concurrent_futures.ProcessPoolForkserverExecutorDeadlockTest)
[ 2690s] ----------------------------------------------------------------------
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1153, in _check_crash
[ 2690s]     res.result(timeout=self.TIMEOUT)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/_base.py", line 447, in result
[ 2690s]     raise TimeoutError()
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^
[ 2690s] concurrent.futures._base.TimeoutError
[ 2690s]
[ 2690s] During handling of the above exception, another exception occurred:
[ 2690s]
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1192, in test_crash_during_result_pickle_on_worker
[ 2690s]     self._check_crash(BrokenProcessPool, _return_instance, CrashAtPickle)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157, in _check_crash
[ 2690s]     self._fail_on_deadlock(executor)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1134, in _fail_on_deadlock
[ 2690s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s] AssertionError: Executor deadlock:
[ 2690s]
[ 2690s] Thread 0x00007fa69effd700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1192 in test_crash_during_result_pickle_on_worker
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2690s]
[ 2690s]
[ 2690s] ======================================================================
[ 2690s] FAIL: test_crash_at_task_unpickle (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest)
[ 2690s] ----------------------------------------------------------------------
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1153, in _check_crash
[ 2690s]     res.result(timeout=self.TIMEOUT)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/_base.py", line 447, in result
[ 2690s]     raise TimeoutError()
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^
[ 2690s] concurrent.futures._base.TimeoutError
[ 2690s]
[ 2690s] During handling of the above exception, another exception occurred:
[ 2690s]
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1175, in test_crash_at_task_unpickle
[ 2690s]     self._check_crash(BrokenProcessPool, id, CrashAtUnpickle())
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157, in _check_crash
[ 2690s]     self._fail_on_deadlock(executor)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1134, in _fail_on_deadlock
[ 2690s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s] AssertionError: Executor deadlock:
[ 2690s]
[ 2690s] Thread 0x00007fa69effd700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1175 in test_crash_at_task_unpickle
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2690s]
[ 2690s]
[ 2690s] ======================================================================
[ 2690s] FAIL: test_crash_during_func_exec_on_worker (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest)
[ 2690s] ----------------------------------------------------------------------
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1153, in _check_crash
[ 2690s]     res.result(timeout=self.TIMEOUT)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/_base.py", line 447, in result
[ 2690s]     raise TimeoutError()
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^
[ 2690s] concurrent.futures._base.TimeoutError
[ 2690s]
[ 2690s] During handling of the above exception, another exception occurred:
[ 2690s]
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1179, in test_crash_during_func_exec_on_worker
[ 2690s]     self._check_crash(BrokenProcessPool, _crash)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157, in _check_crash
[ 2690s]     self._fail_on_deadlock(executor)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1134, in _fail_on_deadlock
[ 2690s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s] AssertionError: Executor deadlock:
[ 2690s]
[ 2690s] Thread 0x00007fa69effd700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1179 in test_crash_during_func_exec_on_worker
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2690s]
[ 2690s]
[ 2690s] ======================================================================
[ 2690s] FAIL: test_crash_during_result_pickle_on_worker (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest)
[ 2690s] ----------------------------------------------------------------------
[ 2690s] test test_concurrent_futures failed
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1153, in _check_crash
[ 2690s]     res.result(timeout=self.TIMEOUT)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/_base.py", line 447, in result
[ 2690s]     raise TimeoutError()
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^
[ 2690s] concurrent.futures._base.TimeoutError
[ 2690s]
[ 2690s] During handling of the above exception, another exception occurred:
[ 2690s]
[ 2690s] Traceback (most recent call last):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1192, in test_crash_during_result_pickle_on_worker
[ 2690s]     self._check_crash(BrokenProcessPool, _return_instance, CrashAtPickle)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157, in _check_crash
[ 2690s]     self._fail_on_deadlock(executor)
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1134, in _fail_on_deadlock
[ 2690s]     self.fail(f"Executor deadlock:\n\n{tb}")
[ 2690s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 2690s] AssertionError: Executor deadlock:
[ 2690s]
[ 2690s] Thread 0x00007fa69effd700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 320 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/queues.py", line 233 in _feed
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 968 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Thread 0x00007fa6c17fa700 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/selectors.py", line 416 in select
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/multiprocessing/connection.py", line 936 in wait
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 376 in wait_result_broken_or_wakeup
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/concurrent/futures/process.py", line 316 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 1031 in _bootstrap_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/threading.py", line 988 in _bootstrap
[ 2690s]
[ 2690s] Current thread 0x00007fa6e90e5740 (most recent call first):
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1125 in _fail_on_deadlock
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1157 in _check_crash
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/test_concurrent_futures.py", line 1192 in test_crash_during_result_pickle_on_worker
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 547 in _callTestMethod
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 591 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/case.py", line 646 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 122 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/suite.py", line 84 in __call__
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/unittest/runner.py", line 197 in run
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 992 in _run_suite
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/support/__init__.py", line 1118 in run_unittest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 261 in _test_module
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 215 in _runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/runtest.py", line 245 in runtest
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 715 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 658 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/libregrtest/main.py", line 736 in main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 43 in _main
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/test/regrtest.py", line 47 in <module>
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 86 in _run_code
[ 2690s]   File "/home/abuild/rpmbuild/BUILD/Python-3.11.0a1/Lib/runpy.py", line 196 in _run_module_as_main
[ 2690s]
[ 2690s]
[ 2690s] ----------------------------------------------------------------------
[ 2690s] Ran 9 tests in 723.733s
[ 2690s]
[ 2690s] FAILED (failures=9)
[ 2690s] 3 tests failed again:
[ 2690s]     test_concurrent_futures test_exceptions test_tools
[ 2690s]
[ 2690s] == Tests result: FAILURE then FAILURE ==
[ 2690s]
[ 2690s] 401 tests OK.
[ 2690s]
[ 2690s] 10 slowest tests:
[ 2690s] - test_capi: 28 min 19 sec
[ 2690s] - test_faulthandler: 21 min 7 sec
[ 2690s] - test_concurrent_futures: 18 min 53 sec
[ 2690s] - test_io: 3 min 23 sec
[ 2690s] - test_peg_generator: 3 min 5 sec
[ 2690s] - test_subprocess: 2 min 49 sec
[ 2690s] - test_multiprocessing_spawn: 2 min 36 sec
[ 2690s] - test_audit: 2 min 15 sec
[ 2690s] - test_multiprocessing_forkserver: 1 min 43 sec
[ 2690s] - test_regrtest: 1 min 42 sec
[ 2690s]
[ 2690s] 3 tests failed:
[ 2690s]     test_concurrent_futures test_exceptions test_tools
[ 2690s]
[ 2690s] 19 tests skipped:
[ 2690s]     test_curses test_devpoll test_ioctl test_kqueue test_msilib
[ 2690s]     test_ossaudiodev test_smtpnet test_socketserver test_startfile
[ 2690s]     test_tix test_tk test_ttk_guionly test_urllib2net test_urllibnet
[ 2690s]     test_winconsoleio test_winreg test_winsound test_xmlrpc_net
[ 2690s]     test_zipfile64
[ 2690s]
[ 2690s] 3 re-run tests:
[ 2690s]     test_concurrent_futures test_exceptions test_tools
[ 2690s]
[ 2690s] Total duration: 40 min 27 sec
[ 2690s] Tests result: FAILURE then FAILURE
[ 2690s] error: Bad exit status from /var/tmp/rpm-tmp.f6B040 (%check)

----------
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45444>
_______________________________________

From report at bugs.python.org  Wed Oct 13 22:29:46 2021
From: report at bugs.python.org (Gregory Szorc)
Date: Thu, 14 Oct 2021 02:29:46 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1634178586.27.0.193699002947.issue45405@roundup.psfhosted.org>


Gregory Szorc <gregory.szorc at gmail.com> added the comment:

> Can you be more specific? This particular issue isn't about cross-compiling.

The point I was trying to make is that clang 13 generically implemented --print-multiarch and the triple logic in configure related to MULTIARCH applies to all platforms, not just macOS.

I was able to perturb this same error on Linux with an x86_64 Clang 13 with configure options --build=x86_64-unknown-linux-gnu --host=i686-unknown-linux-gnu. https://github.com/indygreg/python-build-standalone/runs/3853832124?check_suite_focus=true should work if you are logged into GitHub. Not the exact same failure, but related since it involves --print-multiarch suddenly working.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Wed Oct 13 22:36:21 2021
From: report at bugs.python.org (Gregory Szorc)
Date: Thu, 14 Oct 2021 02:36:21 +0000
Subject: [issue40413] Py_RunMain() crashes on subsequence call
In-Reply-To: <1588038871.72.0.754759187006.issue40413@roundup.psfhosted.org>
Message-ID: <1634178981.98.0.762575578939.issue40413@roundup.psfhosted.org>


Gregory Szorc <gregory.szorc at gmail.com> added the comment:

I can't remember the circumstances of me reproducing this. The added test demonstrating that the interpreter can be initialized/finalized within a single process seems like a reasonable solution to ensure this is supported.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40413>
_______________________________________

From report at bugs.python.org  Wed Oct 13 22:41:45 2021
From: report at bugs.python.org (Evgeniy Ivanov)
Date: Thu, 14 Oct 2021 02:41:45 +0000
Subject: [issue45456] operator 'pass' in 'if-else' linear expression
In-Reply-To: <1634097497.58.0.0510721088772.issue45456@roundup.psfhosted.org>
Message-ID: <1634179305.28.0.592415809831.issue45456@roundup.psfhosted.org>


Evgeniy Ivanov <atxn at yandex.ru> added the comment:

What about this?

if x > 2: my_func(x)

ok this code at 1 line, this code work, but...

PEP 8: E701 multiple statements on one line (colon)


Well f//k it with a pass
Why not add an empty action operator? What is the problem? Such an instruction has existed since the days of assembler - nop

----------
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45456>
_______________________________________

From report at bugs.python.org  Wed Oct 13 23:27:13 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 14 Oct 2021 03:27:13 +0000
Subject: [issue45447] IDLE: Support syntax highlighting for .pyi stub files
In-Reply-To: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>
Message-ID: <1634182033.3.0.292717557241.issue45447@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I am going to call the file util.py and will work on a PR.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Thu Oct 14 00:48:30 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Thu, 14 Oct 2021 04:48:30 +0000
Subject: [issue45456] operator 'pass' in 'if-else' linear expression
In-Reply-To: <1634097497.58.0.0510721088772.issue45456@roundup.psfhosted.org>
Message-ID: <1634186910.88.0.399392713443.issue45456@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Evgeniy, please leave this closed and take the proposal to the python-ideas mailing list.   There is no further progress that can be made in this tracker issue.  We can?t discern any part of your proposal that would make sense for improving the language.

----------
nosy: +rhettinger
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45456>
_______________________________________

From report at bugs.python.org  Thu Oct 14 00:54:00 2021
From: report at bugs.python.org (Ned Deily)
Date: Thu, 14 Oct 2021 04:54:00 +0000
Subject: [issue45405] configure fails on macOS with non-Apple clang version 13
 which implements --print-multiarch
In-Reply-To: <1633611397.74.0.642629173294.issue45405@roundup.psfhosted.org>
Message-ID: <1634187240.67.0.616347147324.issue45405@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

> The point I was trying to make is that clang 13 generically implemented --print-multiarch and the triple logic in configure related to MULTIARCH applies to all platforms, not just macOS.

If there are still issues on other supported platforms, PRs are welcome.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45405>
_______________________________________

From report at bugs.python.org  Thu Oct 14 01:24:07 2021
From: report at bugs.python.org (Hai Shi)
Date: Thu, 14 Oct 2021 05:24:07 +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: <1634189047.3.0.361662300666.issue45113@roundup.psfhosted.org>


Hai Shi <shihai1991 at 126.com> added the comment:

> The only thing the proposed PR adds is a way to set ht_module, which actually isn't very useful (it's used for module state access.

Hm, there have some static types. so I create the PyStructSequence_FromModuleAndDes() could receive tp_flags and try convert those static types to the heap type. eg: https://github.com/python/cpython/blob/main/Python/sysmodule.c#L2837-L2839
We can not do this converting operation by calling PyStructSequence_NewType(), no?

This is my *reason* to create PR-28573 :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Thu Oct 14 02:15:12 2021
From: report at bugs.python.org (Tom Pohl)
Date: Thu, 14 Oct 2021 06:15:12 +0000
Subject: [issue45466] Simple curl/wget-like download functionality in urllib
 (like http offers server)
Message-ID: <1634192112.29.0.508125660114.issue45466@roundup.psfhosted.org>


New submission from Tom Pohl <thomas.pohl at gmail.com>:

In the context of building Docker images, it is often required to download stuff. If curl/wget are available, great, but often slim images don't offer that.

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

If there's some interest, I could open a PR.

----------
components: Library (Lib)
messages: 403888
nosy: tom.pohl
priority: normal
severity: normal
status: open
title: Simple curl/wget-like download functionality in urllib (like http offers server)
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45466>
_______________________________________

From report at bugs.python.org  Thu Oct 14 03:36:51 2021
From: report at bugs.python.org (Alex Waygood)
Date: Thu, 14 Oct 2021 07:36:51 +0000
Subject: [issue45447] IDLE: Support syntax highlighting for .pyi stub files
In-Reply-To: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>
Message-ID: <1634197011.87.0.714510352357.issue45447@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

Oh ? I've already nearly finished a PR. Do you mind if I submit mine? Happy to make any changes you like, obviously.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Thu Oct 14 03:55:21 2021
From: report at bugs.python.org (Michael Sullivan)
Date: Thu, 14 Oct 2021 07:55:21 +0000
Subject: [issue45384] Accept Final as indicating ClassVar for dataclass
In-Reply-To: <1633474802.74.0.28935369268.issue45384@roundup.psfhosted.org>
Message-ID: <1634198121.37.0.164288967409.issue45384@roundup.psfhosted.org>


Michael Sullivan <msully4321 at gmail.com> added the comment:

I tend to agree with Carl that making Final imply ClassVar for dataclass would make things worse.

For better or worse (mostly better, but there are downsides like this!), dataclass class bodies are essentially written in their own domain specific language, and allowances need to be made in how typing things are interpreted in such a case, and I think that Carl is right that the right interpretation in the case of dataclasses is that the annotation describes the eventual instance attribute.

At least, I feel this way 80% of the time. I can definitely see the argument for wanting consistency in the interpretation.

>From a more directly practical perspective, though, the change would also be a breaking one (though /arguably/ only of broken code), and so maybe not worth it even if we would prefer the changed behavior.

I think the right approach is probably to just append the PEP and then maybe also support ClassVar[Final[Whatever]]. It shouldn't need intersection types or anything; if it's a pain to implement it would be for annoying reasons and not deep ones.

----------
nosy: +msully4321

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45384>
_______________________________________

From report at bugs.python.org  Thu Oct 14 04:22:27 2021
From: report at bugs.python.org (primexx)
Date: Thu, 14 Oct 2021 08:22:27 +0000
Subject: [issue45451] IDLE Shell GUI - remove window border
In-Reply-To: <1634087096.76.0.0471723883661.issue45451@roundup.psfhosted.org>
Message-ID: <1634199747.61.0.284527103486.issue45451@roundup.psfhosted.org>


primexx <primexx at gmail.com> added the comment:

of course that's fair, colour schemes are a very preferential thing. the main issue really is the border that creates a visual separation between the line indicators and the lines that they should be visually associated with. thanks!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45451>
_______________________________________

From report at bugs.python.org  Thu Oct 14 05:34:50 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 14 Oct 2021 09:34:50 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634204090.82.0.571687957209.issue45452@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
keywords: +patch
pull_requests: +27230
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28942

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Thu Oct 14 06:17:32 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 10:17:32 +0000
Subject: [issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode
 byte 0x5c in position 8191: \ at end of string
In-Reply-To: <1634135497.37.0.760320895517.issue45461@roundup.psfhosted.org>
Message-ID: <1634206652.9.0.580103818582.issue45461@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset c96d1546b11b4c282a7e21737cb1f5d16349656d by Serhiy Storchaka in branch 'main':
bpo-45461: Fix IncrementalDecoder and StreamReader in the "unicode-escape" codec (GH-28939)
https://github.com/python/cpython/commit/c96d1546b11b4c282a7e21737cb1f5d16349656d


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45461>
_______________________________________

From report at bugs.python.org  Thu Oct 14 06:17:21 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 14 Oct 2021 10:17:21 +0000
Subject: [issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode
 byte 0x5c in position 8191: \ at end of string
In-Reply-To: <1634135497.37.0.760320895517.issue45461@roundup.psfhosted.org>
Message-ID: <1634206641.14.0.670848556141.issue45461@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +27231
pull_request: https://github.com/python/cpython/pull/28943

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45461>
_______________________________________

From report at bugs.python.org  Thu Oct 14 06:29:46 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 10:29:46 +0000
Subject: [issue45467] Fix incremental decoder and stream reader in the
 "raw-unicode-escape" codec
Message-ID: <1634207386.82.0.577344433134.issue45467@roundup.psfhosted.org>


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

Similar to 45461, but with "raw-unicode-escape".

When an incremental decoder gets a part of escape sequence (\uXXXX or \UXXXXXXXX) it raises an exception or return a bare "\" if it was the only part instead of keeping it until getting the rest. It is exposed in text files (io.TextIOWrapper) when reads from the underlying binary stream splits an escape sequence between blocks. There is similar issue with stream readers (codecs.StreamReader).

----------
components: Unicode
messages: 403893
nosy: ezio.melotti, lemburg, serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Fix incremental decoder and stream reader in the "raw-unicode-escape" codec
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45467>
_______________________________________

From report at bugs.python.org  Thu Oct 14 06:30:09 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 10:30:09 +0000
Subject: [issue45467] Fix incremental decoder and stream reader in the
 "raw-unicode-escape" codec
In-Reply-To: <1634207386.82.0.577344433134.issue45467@roundup.psfhosted.org>
Message-ID: <1634207409.97.0.834069769593.issue45467@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
dependencies: +UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45467>
_______________________________________

From report at bugs.python.org  Thu Oct 14 06:36:55 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 10:36:55 +0000
Subject: [issue45467] Fix incremental decoder and stream reader in the
 "raw-unicode-escape" codec
In-Reply-To: <1634207386.82.0.577344433134.issue45467@roundup.psfhosted.org>
Message-ID: <1634207815.01.0.762536989515.issue45467@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
keywords: +patch
pull_requests: +27232
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28944

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45467>
_______________________________________

From report at bugs.python.org  Thu Oct 14 06:52:54 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 10:52:54 +0000
Subject: [issue45247] [C API] Add explicit support for Cython to the C API
In-Reply-To: <1632135587.14.0.29634943523.issue45247@roundup.psfhosted.org>
Message-ID: <1634208774.89.0.821536903866.issue45247@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

My first attempt: Add PyThreadState_EnterTracing() and PyThreadState_LeaveTracing()
https://github.com/python/cpython/pull/28542

It adds an abstraction on accesses to PyThreadState.tracing and PyThreadState.cframe.use_tracing members.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45247>
_______________________________________

From report at bugs.python.org  Thu Oct 14 06:56:35 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 10:56:35 +0000
Subject: [issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode
 byte 0x5c in position 8191: \ at end of string
In-Reply-To: <1634135497.37.0.760320895517.issue45461@roundup.psfhosted.org>
Message-ID: <1634208995.09.0.723165007573.issue45461@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27233
pull_request: https://github.com/python/cpython/pull/28945

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45461>
_______________________________________

From report at bugs.python.org  Thu Oct 14 07:12:26 2021
From: report at bugs.python.org (E. Paine)
Date: Thu, 14 Oct 2021 11:12:26 +0000
Subject: [issue45447] IDLE: Support syntax highlighting for .pyi stub files
In-Reply-To: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>
Message-ID: <1634209946.03.0.0233884258359.issue45447@roundup.psfhosted.org>


Change by E. Paine <xepaine13 at gmail.com>:


----------
nosy: +epaine

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Thu Oct 14 07:35:05 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 11:35:05 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634211305.12.0.504467454908.issue45452@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

How would it be used from Python? What are scenarios?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Thu Oct 14 07:47:14 2021
From: report at bugs.python.org (swgmma)
Date: Thu, 14 Oct 2021 11:47:14 +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: <1634212034.73.0.750870639508.issue30082@roundup.psfhosted.org>


swgmma <jason.nader at protonmail.com> added the comment:

Ping in case anyone from the windows team is available to review the PR

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Thu Oct 14 07:51:17 2021
From: report at bugs.python.org (Gabriele N Tornetta)
Date: Thu, 14 Oct 2021 11:51:17 +0000
Subject: [issue45468] Add support for preloading a Python script
Message-ID: <1634212277.88.0.777172112966.issue45468@roundup.psfhosted.org>


New submission from Gabriele N Tornetta <phoenix1987 at gmail.com>:

I would like to propose adding support for preloading a Python script before executing a Python application.


Potential design:

A new environment variable (e.g. PY_PRELOAD, an allusion to LD_PRELOAD, or PYTHONPRELOAD to be more aligned with the naming pattern of existing variables) is used to specify the path of the script to execute. The script is then executed just before the import of the site module. This is similar to what PYTHONSTARTUP does, except that it works in all cases, not just when launching the REPL.


Rationale:

There are examples of tools that require performing some operations (e.g. monkey-patching) before starting the actual Python application. Currently, this could be achieved in the following rather contrived way:

- prepare an ad-hoc sitecustomize.py file
- add its path to PYTHONPATH
- run the Python application with the computed PYTHONPATH

The ad-hoc sitecustomize.py requires the following steps

- run the custom initialisation code
- remove the path of the custom sitecustomize.py script from sys.path
- unload the sitecustomize module
- try importing sitecustomize to force-load any original sitecustomize scripts that would have run otherwise

The new environment variable makes the whole process a lot easier by allowing tools to just set a single environment variable to achieve the same result.

----------
components: Interpreter Core
messages: 403898
nosy: Gabriele Tornetta
priority: normal
severity: normal
status: open
title: Add support for preloading a Python script
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45468>
_______________________________________

From report at bugs.python.org  Thu Oct 14 07:53:19 2021
From: report at bugs.python.org (Gabriele N Tornetta)
Date: Thu, 14 Oct 2021 11:53:19 +0000
Subject: [issue45468] Add support for preloading a Python script
In-Reply-To: <1634212277.88.0.777172112966.issue45468@roundup.psfhosted.org>
Message-ID: <1634212399.04.0.181382393286.issue45468@roundup.psfhosted.org>


Change by Gabriele N Tornetta <phoenix1987 at gmail.com>:


----------
keywords: +patch
pull_requests: +27235
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28946

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45468>
_______________________________________

From report at bugs.python.org  Thu Oct 14 08:20:21 2021
From: report at bugs.python.org (Vincent Liang)
Date: Thu, 14 Oct 2021 12:20:21 +0000
Subject: [issue45469] lambda issue in for-loop
Message-ID: <1634214021.97.0.77826806934.issue45469@roundup.psfhosted.org>


New submission from Vincent Liang <shenheng80 at qq.com>:

Strange behavior is found when lambda is used inside for-loop.

code:(same as attached file)

# begin of CODE
def aa(x):
    print("aa")
def bb(x):
    print("bb")

namefun = [
    ("a", aa),
    ("b", bb),
]
name2fun = {}
for name, fun in namefun:
    name2fun[name] = lambda x: fun(x)
# issue happened when calling lambda
name2fun["a"](1)
name2fun["b"](1)
# end of CODE

output:
bb
bb

expected output:
aa
bb

----------
components: Interpreter Core
files: test8.py
messages: 403899
nosy: vincent7f
priority: normal
severity: normal
status: open
title: lambda issue in for-loop
type: behavior
versions: Python 3.10, Python 3.9
Added file: https://bugs.python.org/file50357/test8.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45469>
_______________________________________

From report at bugs.python.org  Thu Oct 14 08:46:39 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 14 Oct 2021 12:46:39 +0000
Subject: [issue45448] PIP package installation failure for multiple packages
In-Reply-To: <1634053122.93.0.794234678092.issue45448@roundup.psfhosted.org>
Message-ID: <1634215599.05.0.910977212855.issue45448@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

This is not a problem that we can fix. Third party packages like numpy and tensorflow have not build and publish builds for Python 3.10 for all platforms yet.

----------
nosy: +christian.heimes
resolution:  -> third party
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45448>
_______________________________________

From report at bugs.python.org  Thu Oct 14 08:53:20 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 14 Oct 2021 12:53:20 +0000
Subject: [issue45469] lambda issue in for-loop
In-Reply-To: <1634214021.97.0.77826806934.issue45469@roundup.psfhosted.org>
Message-ID: <1634216000.95.0.175671075801.issue45469@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

You are running in a typical scope issue. The local and global scope of a lambda work differently than you expect. You can work around the issue by making fun a local variable:

for name, fun in namefun:
    name2fun[name] = lambda x, fun=fun: fun(x)

----------
nosy: +christian.heimes
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45469>
_______________________________________

From report at bugs.python.org  Thu Oct 14 08:54:12 2021
From: report at bugs.python.org (Steven D'Aprano)
Date: Thu, 14 Oct 2021 12:54:12 +0000
Subject: [issue45469] lambda issue in for-loop
In-Reply-To: <1634214021.97.0.77826806934.issue45469@roundup.psfhosted.org>
Message-ID: <1634216052.92.0.443277286467.issue45469@roundup.psfhosted.org>


Steven D'Aprano <steve+python at pearwood.info> added the comment:

See also the FAQs:

https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result

----------
nosy: +steven.daprano

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45469>
_______________________________________

From report at bugs.python.org  Thu Oct 14 08:56:37 2021
From: report at bugs.python.org (Lincoln Puzey)
Date: Thu, 14 Oct 2021 12:56:37 +0000
Subject: [issue45457] Documentation for ssl.load_default_certs is outdated
In-Reply-To: <1634108477.44.0.93503538382.issue45457@roundup.psfhosted.org>
Message-ID: <1634216197.82.0.0365814425604.issue45457@roundup.psfhosted.org>


Change by Lincoln Puzey <lincoln at puzey.dev>:


----------
keywords: +patch
pull_requests: +27237
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/28947

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45457>
_______________________________________

From report at bugs.python.org  Thu Oct 14 08:56:37 2021
From: report at bugs.python.org (Lincoln Puzey)
Date: Thu, 14 Oct 2021 12:56:37 +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: <1634216197.89.0.338905134881.issue22449@roundup.psfhosted.org>


Change by Lincoln Puzey <lincoln at puzey.dev>:


----------
nosy: +LincolnPuzey
nosy_count: 10.0 -> 11.0
pull_requests: +27238
pull_request: https://github.com/python/cpython/pull/28947

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22449>
_______________________________________

From report at bugs.python.org  Thu Oct 14 09:06:04 2021
From: report at bugs.python.org (Jan Pieczkowski)
Date: Thu, 14 Oct 2021 13:06:04 +0000
Subject: [issue34897] distutils test errors when CXX is not set
In-Reply-To: <1538684546.1.0.545547206417.issue34897@psf.upfronthosting.co.za>
Message-ID: <1634216764.21.0.475665665198.issue34897@roundup.psfhosted.org>


Jan Pieczkowski <code at physicali.st> added the comment:

This issue also still affects Python versions 3.6.15 and 3.7.12

IMHO it would make sense to backport this patch to the 3.6 and 3.7 branches, especially as it only affects one line of code and doesn't seem to affect anything else, but solves the same issue for prior python versions as the merged patch did for 3.8+

----------
nosy: +physicalist

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34897>
_______________________________________

From report at bugs.python.org  Thu Oct 14 10:43:48 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 14 Oct 2021 14:43:48 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634222628.85.0.870465862415.issue45452@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

> How would it be used from Python? What are scenarios?

I am preparing PoC, I will share you once done.

>From gdbm 1.21, gdbm provides 2 kinds of format. (Standard format / Extended format.)
To create a gdm format with the extended option, GDBM_NUMSYNC flag needs to be supported.
Without this, there is no way to create a database file with extension option from Python module.

I am thinking about the following usage.

import dbm.gnu as dbm
db = dbm.open('x.db', 'nx')

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Thu Oct 14 10:48:09 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 14 Oct 2021 14:48:09 +0000
Subject: [issue45464] TypeError when inheriting from both OSError and
 AttributeError
In-Reply-To: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
Message-ID: <1634222889.01.0.0199430408659.issue45464@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45464>
_______________________________________

From report at bugs.python.org  Thu Oct 14 10:56:37 2021
From: report at bugs.python.org (Mark Shannon)
Date: Thu, 14 Oct 2021 14:56:37 +0000
Subject: [issue45367] Specialize BINARY_MULTIPLY
In-Reply-To: <1633405452.94.0.0777171864008.issue45367@roundup.psfhosted.org>
Message-ID: <1634223397.36.0.902854855265.issue45367@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:


New changeset 3b3d30e8f78271a488965c9cd11136e1aa890757 by Dennis Sweeney in branch 'main':
bpo-45367: Specialize BINARY_MULTIPLY (GH-28727)
https://github.com/python/cpython/commit/3b3d30e8f78271a488965c9cd11136e1aa890757


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45367>
_______________________________________

From report at bugs.python.org  Thu Oct 14 11:26:20 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 14 Oct 2021 15:26:20 +0000
Subject: [issue45464] TypeError when inheriting from both OSError and
 AttributeError
In-Reply-To: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
Message-ID: <1634225180.75.0.382932119736.issue45464@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

You are correct. To be more precise, it's caused by GH-16856. The commit introduced PyAttributeErrorObject struct. Since AttributeError and OSError now have an incompatible memory layout, it is no longer possible to create a subclass that has AttributeError and OSError as parent classes.

----------
keywords: +3.10regression
nosy: +christian.heimes
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45464>
_______________________________________

From report at bugs.python.org  Thu Oct 14 11:35:51 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 15:35:51 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634225751.85.0.239125747522.issue45452@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

And what's next?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Thu Oct 14 11:43:53 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 14 Oct 2021 15:43:53 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634226233.59.0.0421399339785.issue45452@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

> And what's next?

I may introduce following API which only available to use extension format.
(I am PoC with this)

> dbm.gdbm_failure_atomic('snapshot_path0', 'snapshot_path1')


About gdbm_latest_snapshot(), I am still curious that Python module should provide this API so I am still communicating with original authors about this.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Thu Oct 14 11:44:59 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 14 Oct 2021 15:44:59 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634226299.26.0.778876300248.issue45452@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

Sorry, I don't know my answer is enough.
Or do you have any ideas or the opposite ideas?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Thu Oct 14 11:46:42 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 14 Oct 2021 15:46:42 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634226402.18.0.125777930678.issue45452@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

dbm.gdbm_failure_atomic('snapshot_path0', 'snapshot_path1')

-> db.gdbm_failure_atomic('snapshot_path0', 'snapshot_path1')

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Thu Oct 14 11:52:25 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 15:52:25 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634226745.57.0.522585384336.issue45452@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I am interesting how these gdbm_failure_atomic() and gdbm_latest_snapshot() can be used in user code. Some real world examples. They look very low-level and requiring an additional boilerplate code to be useful if I understand it correctly.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Thu Oct 14 11:57:26 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 14 Oct 2021 15:57:26 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634227046.14.0.980225253293.issue45452@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

Yeah, I agree with gdbm_latest_snapshot(), this API might be too low-level.
But as I am one of the rocksdb user who directly uses rocksdb API for the production platform as caching purposes.
so when I think about my and my team's rocksdb usage, gdbm_failure_atomic() itself can be useful if the user needs snapshots if they need to recover for the special situation.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Thu Oct 14 12:10:50 2021
From: report at bugs.python.org (Alex Waygood)
Date: Thu, 14 Oct 2021 16:10:50 +0000
Subject: [issue45447] IDLE: Support syntax highlighting for .pyi stub files
In-Reply-To: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>
Message-ID: <1634227850.32.0.460247916603.issue45447@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
keywords: +patch
pull_requests: +27239
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/28950

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Thu Oct 14 12:12:47 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 16:12:47 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634227967.5.0.835438259127.issue45452@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Please show examples.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Thu Oct 14 12:23:32 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Thu, 14 Oct 2021 16:23:32 +0000
Subject: [issue45464] TypeError when inheriting from both OSError and
 AttributeError
In-Reply-To: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
Message-ID: <1634228612.22.0.849749639676.issue45464@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Unfortunately there isn't much we can do here other than document this :(

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45464>
_______________________________________

From report at bugs.python.org  Thu Oct 14 12:25:24 2021
From: report at bugs.python.org (Alex Waygood)
Date: Thu, 14 Oct 2021 16:25:24 +0000
Subject: [issue45447] IDLE: Support syntax highlighting for .pyi stub files
In-Reply-To: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>
Message-ID: <1634228724.74.0.953227331866.issue45447@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

Have posted my PR. I've tested it manually and run the IDLE test suite on it with the `-u all` setting; it seems fine. The new tests I've written are a bit thin on the ground right now, though. I may need some guidance/help if more extensive tests are needed -- I'm a little new to unittest.

One other thing I'm not sure on: the docstring at the top of `browser.py` includes the line "- finish removing limitation to x.py files (ModuleBrowserTreeItem)" in the TODO items. Can this be removed now?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Thu Oct 14 12:34:32 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 14 Oct 2021 16:34:32 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634229272.93.0.470652384687.issue45452@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

> Please show examples.

Sorry, I don't understand, do you mean caching example or recovery example?
When we use rocksdb, we can get checkpoints files under local file system.
And we can recover the database by using them.
http://rocksdb.org/blog/2015/11/10/use-checkpoints-for-efficient-snapshots.html

If we provide gdbm for similar things, users can recover the database when the accident happens, I believe that it sometimes happens.(Power out, hardware fault etc..)
The recovering tool itself does not need to be Python, but python client needs to have a option to save snapshot, but currently not.

Please read how to recover the database if they have snapshots for gdbm.
https://www.gnu.org.ua/software/gdbm/manual/Crash-recovery.html

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Thu Oct 14 12:42:55 2021
From: report at bugs.python.org (Stefan)
Date: Thu, 14 Oct 2021 16:42:55 +0000
Subject: [issue45470] possible bug in datetime.timestamp()
Message-ID: <1634229775.61.0.860983412697.issue45470@roundup.psfhosted.org>


New submission from Stefan <stefan at sriha.net>:

I noticed that there is a difference between intervals when computed from timedeltas vs timestamps. Is this a bug? Thanks!

In [2]: import datetime as datet
In [3]: d0 = datet.datetime(2016,3,27)
In [4]: d1 = datet.datetime(2016,3,28)
In [5]: (d1-d0).total_seconds()/3600
Out[5]: 24.0
In [6]: (d1.timestamp()-d0.timestamp())/3600
Out[6]: 23.0

----------
messages: 403917
nosy: stef
priority: normal
severity: normal
status: open
title: possible bug in datetime.timestamp()
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45470>
_______________________________________

From report at bugs.python.org  Thu Oct 14 12:52:58 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Thu, 14 Oct 2021 16:52:58 +0000
Subject: [issue45464] TypeError when inheriting from both OSError and
 AttributeError
In-Reply-To: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
Message-ID: <1634230378.87.0.816554603767.issue45464@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Also, just to clarify something: there is no guarantee that multiple build-in, unrelated exceptions can be inherited and this is not supported. And this is not unique to this case. For example:

>>> class A(StopIteration, OSError):
...    ...
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: multiple bases have instance lay-out conflict

>>> class A(SyntaxError, OSError):
...    pass
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: multiple bases have instance lay-out conflict
>>> class A(ModuleNotFoundError, OSError):
...    ...
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: multiple bases have instance lay-out conflict

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45464>
_______________________________________

From report at bugs.python.org  Thu Oct 14 13:02:29 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 17:02:29 +0000
Subject: [issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode
 byte 0x5c in position 8191: \ at end of string
In-Reply-To: <1634135497.37.0.760320895517.issue45461@roundup.psfhosted.org>
Message-ID: <1634230949.64.0.893658815743.issue45461@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 0bff4ccbfd3297b0adf690655d3e9ddb0033bc69 by Miss Islington (bot) in branch '3.10':
[3.10] bpo-45461: Fix IncrementalDecoder and StreamReader in the "unicode-escape" codec (GH-28939) (GH-28943)
https://github.com/python/cpython/commit/0bff4ccbfd3297b0adf690655d3e9ddb0033bc69


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45461>
_______________________________________

From report at bugs.python.org  Thu Oct 14 13:03:33 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 17:03:33 +0000
Subject: [issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode
 byte 0x5c in position 8191: \ at end of string
In-Reply-To: <1634135497.37.0.760320895517.issue45461@roundup.psfhosted.org>
Message-ID: <1634231013.96.0.371590100818.issue45461@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 7c722e32bf582108680f49983cf01eaed710ddb9 by Serhiy Storchaka in branch '3.9':
[3.9] bpo-45461: Fix IncrementalDecoder and StreamReader in the "unicode-escape" codec (GH-28939) (GH-28945)
https://github.com/python/cpython/commit/7c722e32bf582108680f49983cf01eaed710ddb9


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45461>
_______________________________________

From report at bugs.python.org  Thu Oct 14 13:04:23 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 17:04:23 +0000
Subject: [issue45467] Fix incremental decoder and stream reader in the
 "raw-unicode-escape" codec
In-Reply-To: <1634207386.82.0.577344433134.issue45467@roundup.psfhosted.org>
Message-ID: <1634231063.43.0.617731916274.issue45467@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 39aa98346d5dd8ac591a7cafb467af21c53f1e5d by Serhiy Storchaka in branch 'main':
bpo-45467: Fix IncrementalDecoder and StreamReader in the "raw-unicode-escape" codec (GH-28944)
https://github.com/python/cpython/commit/39aa98346d5dd8ac591a7cafb467af21c53f1e5d


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45467>
_______________________________________

From report at bugs.python.org  Thu Oct 14 13:07:08 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 14 Oct 2021 17:07:08 +0000
Subject: [issue45470] possible bug in datetime.timestamp()
In-Reply-To: <1634229775.61.0.860983412697.issue45470@roundup.psfhosted.org>
Message-ID: <1634231228.95.0.0302595654965.issue45470@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +p-ganssle

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45470>
_______________________________________

From report at bugs.python.org  Thu Oct 14 13:10:45 2021
From: report at bugs.python.org (Stefan)
Date: Thu, 14 Oct 2021 17:10:45 +0000
Subject: [issue45470] possible bug in datetime.timestamp()
In-Reply-To: <1634229775.61.0.860983412697.issue45470@roundup.psfhosted.org>
Message-ID: <1634231445.09.0.835171077103.issue45470@roundup.psfhosted.org>


Stefan <stefan at sriha.net> added the comment:

sorry it's resolved. it was a timezone issue:

In [2]: d0 = datet.datetime(2016,3,27,tzinfo=datet.timezone.utc)

In [3]: d1 = datet.datetime(2016,3,28,tzinfo=datet.timezone.utc)

In [4]: (d1-d0).total_seconds()/3600
Out[4]: 24.0

In [5]: (d1.timestamp()-d0.timestamp())/3600
Out[5]: 24.0

----------
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45470>
_______________________________________

From report at bugs.python.org  Thu Oct 14 13:14:13 2021
From: report at bugs.python.org (Zayden Micheal James)
Date: Thu, 14 Oct 2021 17:14:13 +0000
Subject: [issue45448] PIP package installation failure for multiple packages
In-Reply-To: <1634053122.93.0.794234678092.issue45448@roundup.psfhosted.org>
Message-ID: <1634231653.49.0.158431739471.issue45448@roundup.psfhosted.org>


Zayden Micheal James <zayvelleman at gmail.com> added the comment:

Oh so the problem will resolve itself when they, support Python 3.10 PIP 21.2.4.

Sorry for the inconvenience. Can't wait for the libraries to be resolved and optimized

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45448>
_______________________________________

From report at bugs.python.org  Thu Oct 14 13:30:20 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 17:30:20 +0000
Subject: [issue45467] Fix incremental decoder and stream reader in the
 "raw-unicode-escape" codec
In-Reply-To: <1634207386.82.0.577344433134.issue45467@roundup.psfhosted.org>
Message-ID: <1634232620.3.0.648267936664.issue45467@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27240
pull_request: https://github.com/python/cpython/pull/28952

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45467>
_______________________________________

From report at bugs.python.org  Thu Oct 14 13:31:20 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 17:31:20 +0000
Subject: [issue45467] Fix incremental decoder and stream reader in the
 "raw-unicode-escape" codec
In-Reply-To: <1634207386.82.0.577344433134.issue45467@roundup.psfhosted.org>
Message-ID: <1634232680.55.0.170528112976.issue45467@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27241
pull_request: https://github.com/python/cpython/pull/28953

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45467>
_______________________________________

From report at bugs.python.org  Thu Oct 14 13:51:12 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 17:51:12 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634233872.9.0.130165039352.issue45452@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Examples of using the new feature.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Thu Oct 14 13:51:53 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 17:51:53 +0000
Subject: [issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode
 byte 0x5c in position 8191: \ at end of string
In-Reply-To: <1634135497.37.0.760320895517.issue45461@roundup.psfhosted.org>
Message-ID: <1634233913.11.0.263384888536.issue45461@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45461>
_______________________________________

From report at bugs.python.org  Thu Oct 14 13:58:16 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 17:58:16 +0000
Subject: [issue45462] Speed up re.match with pre-compiled patterns
In-Reply-To: <1634143133.69.0.265087114017.issue45462@roundup.psfhosted.org>
Message-ID: <1634234296.72.0.305029671072.issue45462@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Calling re.math() with a pre-compiled pattern is an uncommon case. Common cases are calling re.math() with a string pattern and calling the math() method of a pre-compiled pattern.

Your change speeds up an uncommon case but slows down a common case.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45462>
_______________________________________

From report at bugs.python.org  Thu Oct 14 14:22:57 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 14 Oct 2021 18:22:57 +0000
Subject: [issue45471] _Py_path_config.stdlib_dir should not be set in
 Py_SetPythonHome().
Message-ID: <1634235777.13.0.980768160554.issue45471@roundup.psfhosted.org>


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

(This follows bpo-45211.)

In gh-28586 I added the code in Py_SetPythonHome() to set _Py_path_config.stdlib_dir to the provided directory.  However, this is the wrong value.  Furthermore, the relationship between _Py_path_config.home and _Py_path_config.stdlib_dir is meant to managed in Modules/getpath.c (and PC/getpathp.c).  So the code setting _Py_path_config.stdlib_dir in Py_SetPythonHome() should be dropped.

----------
assignee: eric.snow
components: Interpreter Core
messages: 403926
nosy: eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: _Py_path_config.stdlib_dir should not be set in Py_SetPythonHome().
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45471>
_______________________________________

From report at bugs.python.org  Thu Oct 14 14:23:22 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 14 Oct 2021 18:23:22 +0000
Subject: [issue45471] _Py_path_config.stdlib_dir should not be set in
 Py_SetPythonHome().
In-Reply-To: <1634235777.13.0.980768160554.issue45471@roundup.psfhosted.org>
Message-ID: <1634235802.76.0.214767623295.issue45471@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
keywords: +patch
pull_requests: +27242
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/28954

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45471>
_______________________________________

From report at bugs.python.org  Thu Oct 14 14:23:22 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 14 Oct 2021 18:23:22 +0000
Subject: [issue45211] Useful (expensive) information is discarded in getpath.c.
In-Reply-To: <1631726385.76.0.396419410784.issue45211@roundup.psfhosted.org>
Message-ID: <1634235802.86.0.969617910191.issue45211@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
pull_requests: +27243
pull_request: https://github.com/python/cpython/pull/28954

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45211>
_______________________________________

From report at bugs.python.org  Thu Oct 14 14:23:50 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 18:23:50 +0000
Subject: [issue45467] Fix incremental decoder and stream reader in the
 "raw-unicode-escape" codec
In-Reply-To: <1634207386.82.0.577344433134.issue45467@roundup.psfhosted.org>
Message-ID: <1634235830.46.0.58434259546.issue45467@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 4641afef661e6a22bc64194bd334b161c95edfe2 by Serhiy Storchaka in branch '3.10':
[3.10] bpo-45467: Fix IncrementalDecoder and StreamReader in the "raw-unicode-escape" codec (GH-28944) (GH-28952)
https://github.com/python/cpython/commit/4641afef661e6a22bc64194bd334b161c95edfe2


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45467>
_______________________________________

From report at bugs.python.org  Thu Oct 14 14:23:56 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 18:23:56 +0000
Subject: [issue45467] Fix incremental decoder and stream reader in the
 "raw-unicode-escape" codec
In-Reply-To: <1634207386.82.0.577344433134.issue45467@roundup.psfhosted.org>
Message-ID: <1634235836.3.0.974990987265.issue45467@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 684860280687561f6312e206c4ccfbe4baa17e89 by Serhiy Storchaka in branch '3.9':
bpo-45467: Fix IncrementalDecoder and StreamReader in the "raw-unicode-escape" codec (GH-28944) (GH-28953)
https://github.com/python/cpython/commit/684860280687561f6312e206c4ccfbe4baa17e89


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45467>
_______________________________________

From report at bugs.python.org  Thu Oct 14 14:24:04 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Thu, 14 Oct 2021 18:24:04 +0000
Subject: [issue45468] Add support for preloading a Python script
In-Reply-To: <1634212277.88.0.777172112966.issue45468@roundup.psfhosted.org>
Message-ID: <1634235844.24.0.383055784103.issue45468@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

Can you accomplish what you want with .pth files?

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45468>
_______________________________________

From report at bugs.python.org  Thu Oct 14 14:36:38 2021
From: report at bugs.python.org (Gregory Beauregard)
Date: Thu, 14 Oct 2021 18:36:38 +0000
Subject: [issue45384] Accept Final as indicating ClassVar for dataclass
In-Reply-To: <1633474802.74.0.28935369268.issue45384@roundup.psfhosted.org>
Message-ID: <1634236598.6.0.127983427396.issue45384@roundup.psfhosted.org>


Gregory Beauregard <greg at greg.red> added the comment:

Hi Michael,

Thanks for taking the time to look into this.

I don't feel strongly enough about following the existing PEP wording to desire creating a situation where instance vars can't be marked Final if we can instead make a workaround with ClassVar[Final[...]]. Plus, I can appreciate the argument that dataclasses are their own thing that should be treated specially in the PEP.

If you know what's involved in formally proposing and enacting a PEP amendment I can get behind that.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45384>
_______________________________________

From report at bugs.python.org  Thu Oct 14 14:36:24 2021
From: report at bugs.python.org (Diego Alonso)
Date: Thu, 14 Oct 2021 18:36:24 +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: <1634236584.87.0.765288385.issue45404@roundup.psfhosted.org>


Diego Alonso <diego at mathisart.org> added the comment:

I had an empty stropts.h lying around somewhere in /usr/* (can't remember where) because some programs don't compile if they don't see that file (even an empty one suffices). But Python doesn't compile if it sees it... So I deleted stropts.h and then ran ./configure again, compiled, and it worked.

The Python build code should be modified to set HAVE_STROPTS_H to 0 on platforms (like Linux) that don't support stropts.h

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45404>
_______________________________________

From report at bugs.python.org  Thu Oct 14 14:40:52 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 18:40:52 +0000
Subject: [issue45472] Add public C API for partial "unicode-escape" and
 "raw-unicode-escape" decoding
Message-ID: <1634236852.53.0.0839626073282.issue45472@roundup.psfhosted.org>


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

The proposed PR adds C API functions PyUnicode_DecodeUnicodeEscapeStateful() and PyUnicode_DecodeRawUnicodeEscapeStateful() for partially decoding with "unicode-escape" and "raw-unicode-escape" encodings. It were the only multibyte text codecs which did not provide such interface.

They are neccessary for correct implementation of increment decoders and stream  readers (see issue45461 and issue45467).

----------
components: Unicode
messages: 403932
nosy: ezio.melotti, lemburg, serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Add public C API for partial "unicode-escape" and "raw-unicode-escape" decoding
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45472>
_______________________________________

From report at bugs.python.org  Thu Oct 14 14:53:17 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 14 Oct 2021 18:53:17 +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: <1634237597.37.0.390842473253.issue45404@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

I'm glad you figured out the problem and fixed your system.

Python uses autoconf (configure) to detect the presence of features. It's a standard approach. Since you had a stropts.h in your include directory, configure declared HAVE_STROPTS_H. The system can't deal with incompatible stropts.h.

We could add more checks and workaround. IMHO it's not worth the effort and time. We assume standard behavior and APIs in lots of places.

----------
nosy: +christian.heimes
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45404>
_______________________________________

From report at bugs.python.org  Thu Oct 14 14:55:43 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 14 Oct 2021 18:55:43 +0000
Subject: [issue45468] Add support for preloading a Python script
In-Reply-To: <1634212277.88.0.777172112966.issue45468@roundup.psfhosted.org>
Message-ID: <1634237743.63.0.182666041322.issue45468@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

There is also https://www.python.org/dev/peps/pep-0648/

----------
nosy: +christian.heimes

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45468>
_______________________________________

From report at bugs.python.org  Thu Oct 14 15:00:35 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 19:00:35 +0000
Subject: [issue45472] Add public C API for partial "unicode-escape" and
 "raw-unicode-escape" decoding
In-Reply-To: <1634236852.53.0.0839626073282.issue45472@roundup.psfhosted.org>
Message-ID: <1634238035.32.0.271908705804.issue45472@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
keywords: +patch
pull_requests: +27244
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28955

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45472>
_______________________________________

From report at bugs.python.org  Thu Oct 14 15:06:32 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 19:06:32 +0000
Subject: [issue45467] Fix incremental decoder and stream reader in the
 "raw-unicode-escape" codec
In-Reply-To: <1634207386.82.0.577344433134.issue45467@roundup.psfhosted.org>
Message-ID: <1634238392.06.0.837296706561.issue45467@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Serhiy: I suppose that this issue can now be closed?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45467>
_______________________________________

From report at bugs.python.org  Thu Oct 14 15:11:28 2021
From: report at bugs.python.org (Aaron Koch)
Date: Thu, 14 Oct 2021 19:11:28 +0000
Subject: [issue45473] Enum add "from_name" and "from_value" class methods
Message-ID: <1634238688.3.0.350018662934.issue45473@roundup.psfhosted.org>


New submission from Aaron Koch <aaronkoch99 at yahoo.com>:

Documentation: https://docs.python.org/3/library/enum.html#creating-an-enum

Current behavior:

SomeEnum[name] is used to construct an enum by name
SomeEnum(value) is used to construct an enum by value

Problem:

As a user of enums, it is difficult to remember the mapping between parenthesis/square brackets and construct from name/construct from value.

Suggestion: Add two class methods to Enum

@classmethod
def from_name(cls, name):
    return cls[name]

@classmethod
def from_value(cls, value):
    return cls(value)


Benefits:

This is an additive change only, it doesn't change any behavior of the Enum class, so there are no backwards compatibility issues.  Adding these aliases to the Enum class would allow readers and writers of enums to interact with them more fluently and with less trips to the documentation.  Using these aliases would make it easier to write the code you intended and to spot bugs that might arise from the incorrect use of from_name or from_value.

----------
messages: 403936
nosy: aekoch
priority: normal
severity: normal
status: open
title: Enum add "from_name" and "from_value" class methods
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45473>
_______________________________________

From report at bugs.python.org  Thu Oct 14 15:17:24 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 14 Oct 2021 19:17:24 +0000
Subject: [issue45467] Fix incremental decoder and stream reader in the
 "raw-unicode-escape" codec
In-Reply-To: <1634207386.82.0.577344433134.issue45467@roundup.psfhosted.org>
Message-ID: <1634239044.0.0.259855527436.issue45467@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45467>
_______________________________________

From report at bugs.python.org  Thu Oct 14 15:21:58 2021
From: report at bugs.python.org (Ethan Furman)
Date: Thu, 14 Oct 2021 19:21:58 +0000
Subject: [issue45473] Enum add "from_name" and "from_value" class methods
In-Reply-To: <1634238688.3.0.350018662934.issue45473@roundup.psfhosted.org>
Message-ID: <1634239318.08.0.361911275711.issue45473@roundup.psfhosted.org>


Change by Ethan Furman <ethan at stoneleaf.us>:


----------
assignee:  -> ethan.furman
nosy: +ethan.furman
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45473>
_______________________________________

From report at bugs.python.org  Thu Oct 14 15:46:01 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 19:46:01 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634240761.01.0.795958746463.issue45452@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
nosy:  -vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Thu Oct 14 15:53:12 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 19:53:12 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634241192.5.0.327213799798.issue45439@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 3cc56c828d2d8f8659ea49447234bf0d2b87cd64 by Victor Stinner in branch 'main':
bpo-45439: Move _PyObject_VectorcallTstate() to pycore_call.h (GH-28893)
https://github.com/python/cpython/commit/3cc56c828d2d8f8659ea49447234bf0d2b87cd64


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Thu Oct 14 15:55:15 2021
From: report at bugs.python.org (Gabriele N Tornetta)
Date: Thu, 14 Oct 2021 19:55:15 +0000
Subject: [issue45468] Add support for preloading a Python script
In-Reply-To: <1634212277.88.0.777172112966.issue45468@roundup.psfhosted.org>
Message-ID: <1634241315.21.0.467798833562.issue45468@roundup.psfhosted.org>


Gabriele N Tornetta <phoenix1987 at gmail.com> added the comment:

@christian.heimes thanks for bringing PEP 648 to my attention. The solution proposed there would work for me, although it actually does a bit more with some extra complexity. Not a big issue though.

@eric.smith I think that, as argued in PEP 648, pth files are not meant to be used to inject arbitrary code. Besides, the way to exploit pth files wouldn't be much more different than what I described in the issue body.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45468>
_______________________________________

From report at bugs.python.org  Thu Oct 14 15:59:41 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 19:59:41 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634241581.63.0.877479930872.issue45439@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I decided to merge my PR to address https://bugs.python.org/issue45439 initial issue: "[C API] Move usage of **tp_vectorcall_offset** from public headers to the internal C API".

Last years, I added `tstate` parameters to internal C functions. The agreement was that only internal functions should use it, and indirectly that this `tstate` parameter should be hidden. I'm now sure exactly, but `tstate` started to pop up in `Include/cpython/abstract.h` around "call" functions. This PR fix this issue.

About the impact on performances: well, it's really hard to draw a clear conclusion. Inlining, LTO and PGO give different results on runtime performance and stack memory usage.

IMO the fact that public C API functions are now regular functions should not prevent us to continue (micro) optimizing Python. We can always add a variant to the internal C API using an API a little bit different (e.g. add `tstate` parameter) or defined as a static inline function, rather than a regular function.

The unclear part is if PyObject_CallOneArg() (regular function call) is faster than _PyObject_CallOneArg() (static inline function, inlined). The performance may depend if it's called in the Python executable or in a dynamic library (PLT indirection which may be avoided by `gcc -fno-semantic-interposition`).

Well, happy hacking and let's continue *continuous* benchmarking Python!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Thu Oct 14 16:05:29 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 20:05:29 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634241929.27.0.0515879119095.issue45434@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I tried to remove the <string.h> include from Python.h:

-#include <string.h>               // memcpy()

... but it required me to modify 100+ files. I don't know the exact number, I gave up after 100 files. I was near half of C extensions built by setup.py, so the number total may be around 150 files which should include explicitly <string.h>.

"#include <errno.h>" can now be removed from Python.h, but I'm not sure if it's a good idea. I started by removing <stdlib.h> and my plan is to see if it breaks third party C extensions. Right now, Cython is broken which prevents me to use my https://github.com/vstinner/pythonci tool :-(

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Thu Oct 14 16:09:23 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 20:09:23 +0000
Subject: [issue45474] [C API] marshal.h must not use FILE* type in the limited
 C API
Message-ID: <1634242163.67.0.843815202649.issue45474@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

Include/marshal.h defines 2 functions with FILE* argument in the limited C API, whereas the PEP 384 disallows that:

"In addition, functions expecting FILE* are not part of the ABI, to avoid depending on a specific version of the Microsoft C runtime DLL on Windows."
https://www.python.org/dev/peps/pep-0384/

PyAPI_FUNC(void) PyMarshal_WriteLongToFile(long, FILE *, int);
PyAPI_FUNC(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *, int);

I propose to exclude these functions from the limited C API.

Hopefully, they are not part of the documented stable ABI.

----------
components: C API
messages: 403941
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] marshal.h must not use FILE* type in the limited C API
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45474>
_______________________________________

From report at bugs.python.org  Thu Oct 14 16:19:56 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 20:19:56 +0000
Subject: [issue45474] [C API] marshal.h must not use FILE* type in the limited
 C API
In-Reply-To: <1634242163.67.0.843815202649.issue45474@roundup.psfhosted.org>
Message-ID: <1634242796.7.0.351151001829.issue45474@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
keywords: +patch
pull_requests: +27245
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28956

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45474>
_______________________________________

From report at bugs.python.org  Thu Oct 14 16:31:03 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 14 Oct 2021 20:31:03 +0000
Subject: [issue45468] Add support for preloading a Python script
In-Reply-To: <1634212277.88.0.777172112966.issue45468@roundup.psfhosted.org>
Message-ID: <1634243463.69.0.126219993944.issue45468@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

We generally prefer to have only way way to accomplish a goal. If PEP 648 gets accepted then your proposal won't be accepted. In case the PEP is rejected, then your proposal may still be rejected or may require a new PEP. Preloading has some complicated edge cases, e.g. how it behaves in regards of import errors, subinterpreters, various security flags and startup options.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45468>
_______________________________________

From report at bugs.python.org  Thu Oct 14 16:48:44 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 14 Oct 2021 20:48:44 +0000
Subject: [issue45471] _Py_path_config.stdlib_dir should not be set in
 Py_SetPythonHome().
In-Reply-To: <1634235777.13.0.980768160554.issue45471@roundup.psfhosted.org>
Message-ID: <1634244524.3.0.744858913276.issue45471@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:


New changeset 0bbea0723ee07f9d7ad9745f0e1875718ef38715 by Eric Snow in branch 'main':
bpo-45471: Do not set PyConfig.stdlib_dir in Py_SetPythonHome(). (gh-28954)
https://github.com/python/cpython/commit/0bbea0723ee07f9d7ad9745f0e1875718ef38715


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45471>
_______________________________________

From report at bugs.python.org  Thu Oct 14 16:48:44 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 14 Oct 2021 20:48:44 +0000
Subject: [issue45211] Useful (expensive) information is discarded in getpath.c.
In-Reply-To: <1631726385.76.0.396419410784.issue45211@roundup.psfhosted.org>
Message-ID: <1634244524.35.0.616940212625.issue45211@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:


New changeset 0bbea0723ee07f9d7ad9745f0e1875718ef38715 by Eric Snow in branch 'main':
bpo-45471: Do not set PyConfig.stdlib_dir in Py_SetPythonHome(). (gh-28954)
https://github.com/python/cpython/commit/0bbea0723ee07f9d7ad9745f0e1875718ef38715


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45211>
_______________________________________

From report at bugs.python.org  Thu Oct 14 16:49:11 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 14 Oct 2021 20:49:11 +0000
Subject: [issue45471] _Py_path_config.stdlib_dir should not be set in
 Py_SetPythonHome().
In-Reply-To: <1634235777.13.0.980768160554.issue45471@roundup.psfhosted.org>
Message-ID: <1634244551.94.0.373085241871.issue45471@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45471>
_______________________________________

From report at bugs.python.org  Thu Oct 14 16:53:29 2021
From: report at bugs.python.org (Gabriele N Tornetta)
Date: Thu, 14 Oct 2021 20:53:29 +0000
Subject: [issue45468] Add support for preloading a Python script
In-Reply-To: <1634212277.88.0.777172112966.issue45468@roundup.psfhosted.org>
Message-ID: <1634244809.66.0.810740033251.issue45468@roundup.psfhosted.org>


Gabriele N Tornetta <phoenix1987 at gmail.com> added the comment:

That's totally fine. My aim is to have something in place that would make preloading some code less clunky than what it is just now.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45468>
_______________________________________

From report at bugs.python.org  Thu Oct 14 16:56:57 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 14 Oct 2021 20:56:57 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <1633551663.5.0.531821025802.issue45395@roundup.psfhosted.org>
Message-ID: <1634245017.41.0.447111612436.issue45395@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

@MAL, what's the best way to make sure Tools/freeze is still working?  I don't see any tests for it in the test suite.  I tried running the test in Tools/freeze/test, but I can't get that to work on main (or on the 3.10 branch).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Thu Oct 14 16:59:55 2021
From: report at bugs.python.org (Ethan Furman)
Date: Thu, 14 Oct 2021 20:59:55 +0000
Subject: [issue45417] Enum creation non-linear in the number of values
In-Reply-To: <1633737153.71.0.819400116811.issue45417@roundup.psfhosted.org>
Message-ID: <1634245195.18.0.128307939022.issue45417@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:


New changeset b2af211e229df941d9b404f69547a264115156b5 by Carl Friedrich Bolz-Tereick in branch 'main':
bpo-45417: [Enum] fix quadratic behavior during creation (GH-28907)
https://github.com/python/cpython/commit/b2af211e229df941d9b404f69547a264115156b5


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45417>
_______________________________________

From report at bugs.python.org  Thu Oct 14 17:10:33 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 21:10:33 +0000
Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython
 API" with implementation details
In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
Message-ID: <1634245833.96.0.727140246631.issue35134@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27246
pull_request: https://github.com/python/cpython/pull/28957

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35134>
_______________________________________

From report at bugs.python.org  Thu Oct 14 17:12:01 2021
From: report at bugs.python.org (minstrelofc)
Date: Thu, 14 Oct 2021 21:12:01 +0000
Subject: [issue45475] gzip fails to read a gzipped file (ValueError: readline
 of closed file)
Message-ID: <1634245921.58.0.043840382812.issue45475@roundup.psfhosted.org>


New submission from minstrelofc <minstrelofc at gmail.com>:

Attempting to iterate over an opened gzip file raises a ValueError: readline of closed file

Behavior in Python 3.9.7:
Python 3.9.7 (default, Oct 13 2021, 09:08:19) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gzip
>>> ll = [l for l in gzip.GzipFile(filename='data/UTF-8-test_for_gzip.txt.gz')]
>>> len(ll)
300


Behavior in Python 3.10.0 (and 3.11.0a1 is the same):
Python 3.10.0 (default, Oct 13 2021, 08:53:15) [GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gzip
>>> ll = [l for l in gzip.GzipFile(filename='data/UTF-8-test_for_gzip.txt.gz')]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 1, in <listcomp>
ValueError: readline of closed file


This only happens when iterating directly over the GzipFile object. Using a with: statement has the correct behaviour in both 3.10 and 3.11:
>>> with gzip.GzipFile(filename='UTF-8-test_for_gzip.txt.gz') as input_file:
...     len(list(input_file))
... 
300

----------
files: UTF-8-test_for_gzip.txt.gz
messages: 403948
nosy: minstrelofc
priority: normal
severity: normal
status: open
title: gzip fails to read a gzipped file (ValueError: readline of closed file)
type: behavior
versions: Python 3.10, Python 3.11
Added file: https://bugs.python.org/file50358/UTF-8-test_for_gzip.txt.gz

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45475>
_______________________________________

From report at bugs.python.org  Thu Oct 14 17:16:06 2021
From: report at bugs.python.org (Ethan Furman)
Date: Thu, 14 Oct 2021 21:16:06 +0000
Subject: [issue45473] Enum add "from_name" and "from_value" class methods
In-Reply-To: <1634238688.3.0.350018662934.issue45473@roundup.psfhosted.org>
Message-ID: <1634246166.51.0.359307459214.issue45473@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:

The problem with adding methods is that those names are then unavailable for member names -- at least not without possible confusion.

Also, unlike the `name` and `value` instance attributes which do not hide class attributes (aka members) of the same name, `from_name` is a class method so we couldn't have both a `from_name()` class method and a `from_name` class member at the same time.

If those are issues you know wouldn't a problem for you, you can create your own base Enum class with those methods defined, and then inherit from them:

    class EasyEnum(Enum):
        @classmethod
        def from_name(cls, name):
            return cls[name]
        # etc

     class MyEnum(EasyEnum):
          RED = 1
          # etc.

On the other hand, if you want to use this with any enum, then you'll need to make your own helper functions:

    def from_name(enum, name):
        return enum[name]

    enum_member = from_name(MyEnum, 'RED')

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45473>
_______________________________________

From report at bugs.python.org  Thu Oct 14 17:17:31 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 21:17:31 +0000
Subject: [issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(),
 to static inline functions
Message-ID: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

The Python C API provides "AS" functions to convert an object to another type, like PyFloat_AS_DOUBLE(). These macros can be abused to be used as l-value: "PyFloat_AS_DOUBLE(obj) = new_value;". It prevents to change the PyFloat implementation and makes life harder for Python implementations other than CPython.

I propose to convert these macros to static inline functions to disallow using them as l-value.

I made a similar change for Py_REFCNT(), Py_TYPE() and Py_SIZE(). For these functions, I added "SET" variants: Py_SET_REFCNT(), Py_SET_TYPE(), Py_SET_SIZE(). Here, I don't think that the l-value case is legit, and so I don't see the need to add a way to *set* a value.

For example, I don't think that PyFloat_SET_DOUBLE(obj, value) would make sense. A Python float object is supposed to be immutable.

----------
components: C API
messages: 403950
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45476>
_______________________________________

From report at bugs.python.org  Thu Oct 14 17:19:53 2021
From: report at bugs.python.org (Sourish Basu)
Date: Thu, 14 Oct 2021 21:19:53 +0000
Subject: [issue45477] configure script cannot detect float word ordering on
 linux
Message-ID: <1634246393.25.0.871269149475.issue45477@roundup.psfhosted.org>


New submission from Sourish Basu <sourish.basu at gmail.com>:

I am trying to compile Python 3.10.0 on a Red Hat linux system with intel C/C++ compilers. This is my configure command:

```
./configure --with-computed-gotos --without-gcc --with-ensurepip=install --enable-optimizations --with-libm=-limf --with-cxx-main=icpc --with-threads --enable-ipv6 --with-signal-module CC=icc CXX=icpc LD=xild AR=xiar LIBS='-lpthread -limf -lirc' CFLAGS='-O3 -fPIC -fp-model strict -fp-model source -axCORE-AVX512,CORE-AVX2 -xAVX -ipo -prec-div -prec-sqrt' LDFLAGS='-ipo' CPP='icc -E'
```

The failure comes as follows:

```
checking for --with-libm=STRING... set LIBM="-limf"
checking for --with-libc=STRING... default LIBC=""
checking for x64 gcc inline assembler... yes
checking whether float word ordering is bigendian... unknown
configure: error:

Unknown float word ordering. You need to manually preset
ax_cv_c_float_words_bigendian=no (or yes) according to your system.
```

I saw issue 38527 was fixed in 3.10. Perhaps fixing it on Solaris broke it on some other platforms?

----------
components: Installation
messages: 403951
nosy: sourish.basu
priority: normal
severity: normal
status: open
title: configure script cannot detect float word ordering on linux
type: compile error
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45477>
_______________________________________

From report at bugs.python.org  Thu Oct 14 17:23:15 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 14 Oct 2021 21:23:15 +0000
Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython
 API" with implementation details
In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
Message-ID: <1634246595.71.0.475963187836.issue35134@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

Thanks, Victor!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35134>
_______________________________________

From report at bugs.python.org  Thu Oct 14 17:32:29 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 14 Oct 2021 21:32:29 +0000
Subject: [issue21736] Add __file__ attribute to frozen modules
In-Reply-To: <1402589689.02.0.501075866976.issue21736@psf.upfronthosting.co.za>
Message-ID: <1634247149.84.0.278898963722.issue21736@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:


New changeset 79cf20e48d0b5d69d9fac2a0204b5ac2c366066a by Eric Snow in branch 'main':
bpo-21736: Set __file__ on frozen stdlib modules. (gh-28656)
https://github.com/python/cpython/commit/79cf20e48d0b5d69d9fac2a0204b5ac2c366066a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21736>
_______________________________________

From report at bugs.python.org  Thu Oct 14 17:37:53 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 14 Oct 2021 21:37:53 +0000
Subject: [issue21736] Add __file__ attribute to frozen modules
In-Reply-To: <1402589689.02.0.501075866976.issue21736@psf.upfronthosting.co.za>
Message-ID: <1634247473.47.0.444368080995.issue21736@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

I've merged the change to add __file__ for frozen stdlib modules (when possible) and to set __path__ appropriately.  There are still a number of things to address though:

* set co_filename (for tracebacks)
* implement FrozenImporter.get_filename()
* implement FrozenImporter.get_source()

And then there's the question of supporting __file__, etc. for custom frozen modules.  Presumably all those things are still covered by this issue so I'm leaving it open.

----------
stage: patch review -> needs patch
versions: +Python 3.11 -Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21736>
_______________________________________

From report at bugs.python.org  Thu Oct 14 17:41:14 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 21:41:14 +0000
Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython
 API" with implementation details
In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
Message-ID: <1634247674.07.0.618208254319.issue35134@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 0a883a76cda8205023c52211968bcf87bd47fd6e by Victor Stinner in branch 'main':
bpo-35134: Add Include/cpython/floatobject.h (GH-28957)
https://github.com/python/cpython/commit/0a883a76cda8205023c52211968bcf87bd47fd6e


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35134>
_______________________________________

From report at bugs.python.org  Thu Oct 14 17:59:47 2021
From: report at bugs.python.org (Jack Wong)
Date: Thu, 14 Oct 2021 21:59:47 +0000
Subject: [issue29595] Expose max_queue_size in ThreadPoolExecutor
In-Reply-To: <1487369423.42.0.265838648983.issue29595@psf.upfronthosting.co.za>
Message-ID: <1634248787.3.0.951287022179.issue29595@roundup.psfhosted.org>


Change by Jack Wong <ajackwong at gmail.com>:


----------
nosy: +iforapsy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29595>
_______________________________________

From report at bugs.python.org  Thu Oct 14 18:06:30 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Thu, 14 Oct 2021 22:06:30 +0000
Subject: [issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(),
 to static inline functions
In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org>
Message-ID: <1634249190.01.0.17411237094.issue45476@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

> These macros can be abused to be used as l-value

You could simply document, "don't do that".  Also if these is a need to make an assignment, you're now going to have to create a new setter function to fill the need.

We really don't have to go on thin ice converting to functions that might or might not be inlined depending on compiler specific nuances.

AFAICT, no one has ever has problems with these being macros.  There really isn't a problem to be solved and the "solution" may in fact introduce new problems that we didn't have before.

Put me down for a -1 on the these blanket macro-to-inline function rewrites.  The premise is almost entirely a matter of option, "macros are bad, functions are good" and a naive assumption, "inline functions" always inline.

----------
nosy: +lemburg, rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45476>
_______________________________________

From report at bugs.python.org  Thu Oct 14 18:16:52 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 22:16:52 +0000
Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython
 API" with implementation details
In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
Message-ID: <1634249812.33.0.579772620706.issue35134@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27247
pull_request: https://github.com/python/cpython/pull/28958

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35134>
_______________________________________

From report at bugs.python.org  Thu Oct 14 18:17:13 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 22:17:13 +0000
Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython
 API" with implementation details
In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
Message-ID: <1634249833.27.0.447290032507.issue35134@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I reopen the issue since there is new activity on it :-)

----------
resolution: fixed -> 
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35134>
_______________________________________

From report at bugs.python.org  Thu Oct 14 18:17:32 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 22:17:32 +0000
Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython
 API" with implementation details
In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
Message-ID: <1634249852.02.0.823326889356.issue35134@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests:  -23644

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35134>
_______________________________________

From report at bugs.python.org  Thu Oct 14 18:20:39 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 22:20:39 +0000
Subject: [issue45474] [C API] marshal.h must not use FILE* type in the limited
 C API
In-Reply-To: <1634242163.67.0.843815202649.issue45474@roundup.psfhosted.org>
Message-ID: <1634250039.62.0.414423168096.issue45474@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset af1083e975b9627a5c97013d3a2b9aef0e4b333c by Victor Stinner in branch 'main':
bpo-45474: Fix the limited C API of marshal.h (GH-28956)
https://github.com/python/cpython/commit/af1083e975b9627a5c97013d3a2b9aef0e4b333c


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45474>
_______________________________________

From report at bugs.python.org  Thu Oct 14 18:22:13 2021
From: report at bugs.python.org (Roundup Robot)
Date: Thu, 14 Oct 2021 22:22:13 +0000
Subject: [issue45442] Update `Virtual Environment` tutorial
In-Reply-To: <1634035192.74.0.26138584631.issue45442@roundup.psfhosted.org>
Message-ID: <1634250133.45.0.360714234696.issue45442@roundup.psfhosted.org>


Change by Roundup Robot <devnull at psf.upfronthosting.co.za>:


----------
keywords: +patch
nosy: +python-dev
nosy_count: 2.0 -> 3.0
pull_requests: +27248
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28959

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45442>
_______________________________________

From report at bugs.python.org  Thu Oct 14 18:21:48 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 22:21:48 +0000
Subject: [issue45474] [C API] marshal.h must not use FILE* type in the limited
 C API
In-Reply-To: <1634242163.67.0.843815202649.issue45474@roundup.psfhosted.org>
Message-ID: <1634250108.26.0.801664548845.issue45474@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45474>
_______________________________________

From report at bugs.python.org  Thu Oct 14 18:37:51 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 22:37:51 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634251071.81.0.554231691579.issue45434@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27249
pull_request: https://github.com/python/cpython/pull/28960

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Thu Oct 14 19:09:13 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 23:09:13 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634252953.58.0.215224256462.issue45434@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 284994762d820d8e09cc019f8f7c4bc501e37dd4 by Victor Stinner in branch 'main':
bpo-45434: Limited Python.h no longer includes stdio.h (GH-28960)
https://github.com/python/cpython/commit/284994762d820d8e09cc019f8f7c4bc501e37dd4


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Thu Oct 14 19:09:24 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 23:09:24 +0000
Subject: [issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(),
 to static inline functions
In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org>
Message-ID: <1634252964.64.0.900001360343.issue45476@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
keywords: +patch
pull_requests: +27250
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28961

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45476>
_______________________________________

From report at bugs.python.org  Thu Oct 14 19:11:58 2021
From: report at bugs.python.org (Aaron Koch)
Date: Thu, 14 Oct 2021 23:11:58 +0000
Subject: [issue45473] Enum add "from_name" and "from_value" class methods
In-Reply-To: <1634238688.3.0.350018662934.issue45473@roundup.psfhosted.org>
Message-ID: <1634253118.26.0.736795469512.issue45473@roundup.psfhosted.org>


Aaron Koch <aaronkoch99 at yahoo.com> added the comment:

Are there any other names that you would contemplate besides `from_name` and `from_value`?  My reading of your response indicates that you are fundamentally opposed to the addition of class methods, since they would limit the space of possible instance methods/members.  Is that a fair reading?

If it is not, would you be open to different method names?

Do you agree with the fundamental issue that is identified: that the parenthesis/square bracket construction is difficult to read and makes implementation mistakes more likely?  That it would be good to have some what to make it more explicit at both read and write time whether the enum is being constructed using the name or the value.

One alternative to the class methods I might propose is to use a keyword argument in the __init__ function.
SomeEnum(name="foo")
SomeEnum(value="bar")

This would also solve the stated problem, but I suspect that messing with the init function introduces more limitations to the class than the classmethod solution.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45473>
_______________________________________

From report at bugs.python.org  Thu Oct 14 19:21:18 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 23:21:18 +0000
Subject: [issue41710] threading.Lock.acquire(timeout) should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1634253678.64.0.988172655075.issue41710@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27251
pull_request: https://github.com/python/cpython/pull/28962

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Thu Oct 14 19:24:18 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 23:24:18 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634253858.9.0.118774763543.issue45434@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27252
pull_request: https://github.com/python/cpython/pull/28963

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Thu Oct 14 19:47:11 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 23:47:11 +0000
Subject: [issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(),
 to static inline functions
In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org>
Message-ID: <1634255231.69.0.138274814341.issue45476@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Raymond:
> AFAICT, no one has ever has problems with these being macros.

This issue is about the API of PyFloat_AS_DOUBLE(). Implementing it as a macro or a static inline function is an implementation detail which doesn't matter. But I don't know how to disallow "PyFloat_AS_DOUBLE(obj) = value" if it is defined as a macro.

Have a look at the Facebook "nogil" project which is incompatible with accessing directly the PyObject.ob_refcnt member:
"Extensions must use Py_REFCNT and Py_SET_REFCNT instead of directly accessing reference count fields"
https://docs.google.com/document/d/18CXhDb1ygxg-YXNBJNzfzZsDFosB5e6BfnXLlejd9l0/edit

Raymond:
> You could simply document, "don't do that".

Documentation doesn't work. Developers easily fall into traps when it's possible to fall. See bpo-30459 for such trap with PyList_SET_ITEM() and PyCell_SET() macros. They were misused by two Python projects.


Raymond:
> We really don't have to go on thin ice converting to functions that might or might not be inlined depending on compiler specific nuances.

Do you have a concrete example where a static inline function is not inlined, whereas it was inlined when it was a macro? So far, I'm not aware of any performance issue like that.

There were attempts to use __attribute__((always_inline)) (Py_ALWAYS_INLINE), but so far, using it was not a clear win.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45476>
_______________________________________

From report at bugs.python.org  Thu Oct 14 19:49:40 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 23:49:40 +0000
Subject: [issue41710] threading.Lock.acquire(timeout) should use
 sem_clockwait(CLOCK_MONOTONIC)
In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
Message-ID: <1634255380.8.0.702514059734.issue41710@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 03bbc6066ff40c62edd57612be9150dcf1b123c8 by Victor Stinner in branch 'main':
bpo-41710: Fix What's New Entry credit (GH-28962)
https://github.com/python/cpython/commit/03bbc6066ff40c62edd57612be9150dcf1b123c8


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41710>
_______________________________________

From report at bugs.python.org  Thu Oct 14 19:50:12 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 23:50:12 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634255412.46.0.362853814239.issue45434@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 7076bef8ba8836a19d5033f4ceb8eb9837de2301 by Victor Stinner in branch 'main':
bpo-45434: Remove useless space in includes (GH-28963)
https://github.com/python/cpython/commit/7076bef8ba8836a19d5033f4ceb8eb9837de2301


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Thu Oct 14 19:52:57 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 23:52:57 +0000
Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython
 API" with implementation details
In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
Message-ID: <1634255577.0.0.913160739493.issue35134@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

commit 37b1d607bf0f1a9c1e89b1715349efc24dc180e0 (upstream/main, main)
Author: Victor Stinner <vstinner at python.org>
Date:   Fri Oct 15 01:50:28 2021 +0200

    po-35134: Move Include/funcobject.h to Include/cpython/ (GH-28958)
    
    Remove redundant "#ifndef Py_LIMITED_API" in funcobject.h.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35134>
_______________________________________

From report at bugs.python.org  Thu Oct 14 19:54:06 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 14 Oct 2021 23:54:06 +0000
Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython
 API" with implementation details
In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
Message-ID: <1634255646.55.0.596022707855.issue35134@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27253
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/28964

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35134>
_______________________________________

From report at bugs.python.org  Thu Oct 14 20:00:17 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 00:00:17 +0000
Subject: [issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(),
 to static inline functions
In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org>
Message-ID: <1634256017.81.0.797575756877.issue45476@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I searched for "PyFloat_AS_DOUBLE.*=" regex in the PyPI top 5000 projects. I couldn't find any project doing that.

I only found perfectly safe comparisons:

traits/ctraits.c:            if (PyFloat_AS_DOUBLE(value) <= PyFloat_AS_DOUBLE(low)) {
traits/ctraits.c:            if (PyFloat_AS_DOUBLE(value) >= PyFloat_AS_DOUBLE(high)) {
c/_cffi_backend.c:        return PyFloat_AS_DOUBLE(ob) != 0.0;
pandas/_libs/src/klib/khash_python.h:           ( PyFloat_AS_DOUBLE(a) == PyFloat_AS_DOUBLE(b) );

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45476>
_______________________________________

From report at bugs.python.org  Thu Oct 14 20:08:23 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Fri, 15 Oct 2021 00:08:23 +0000
Subject: [issue45443] 'ThreadPoolExecutor' object has no attribute 'map'
In-Reply-To: <1634035739.42.0.184025452389.issue45443@roundup.psfhosted.org>
Message-ID: <1634256503.13.0.0715364378226.issue45443@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

I was also unable to replicate on any of 3.7-3.11, including 3.9.6. Is it possible that one of your Python stdlib source files was modified? Does this still happen with a fresh install of Python?

Does your problem still happen if you run the file using a python executable directly rather than using IPython/Jupyter? If it's just a problem with Jupyter, this bug report belongs there.

Can you run:

>>> from concurrent.futures import ThreadPoolExecutor as TPE
>>> TPE.__mro__
(<class 'concurrent.futures.thread.ThreadPoolExecutor'>, <class 'concurrent.futures._base.Executor'>, <class 'object'>)
>>> TPE.__mro__[1]
<class 'concurrent.futures._base.Executor'>
>>> dir(TPE.__mro__[1])
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__enter__', '__eq__', '__exit__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'map', 'shutdown', 'submit']

----------
nosy: +Dennis Sweeney

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45443>
_______________________________________

From report at bugs.python.org  Thu Oct 14 20:11:30 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Fri, 15 Oct 2021 00:11:30 +0000
Subject: [issue45443] 'ThreadPoolExecutor' object has no attribute 'map'
In-Reply-To: <1634035739.42.0.184025452389.issue45443@roundup.psfhosted.org>
Message-ID: <1634256690.6.0.823079308503.issue45443@roundup.psfhosted.org>


Change by Dennis Sweeney <sweeney.dennis650 at gmail.com>:


----------
components: +Library (Lib)
status: open -> pending
type: crash -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45443>
_______________________________________

From report at bugs.python.org  Thu Oct 14 20:40:09 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 00:40:09 +0000
Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython
 API" with implementation details
In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
Message-ID: <1634258409.05.0.357888265016.issue35134@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 77b24ba505744532d7cfd721b1c92d205e145180 by Victor Stinner in branch 'main':
bpo-35134: Move Include/cellobject.h to Include/cpython/ (GH-28964)
https://github.com/python/cpython/commit/77b24ba505744532d7cfd721b1c92d205e145180


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35134>
_______________________________________

From report at bugs.python.org  Thu Oct 14 20:42:16 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 00:42:16 +0000
Subject: [issue45439] [C API] Move usage of tp_vectorcall_offset from public
 headers to the internal C API
In-Reply-To: <1633990685.32.0.752281797082.issue45439@roundup.psfhosted.org>
Message-ID: <1634258536.49.0.9808027662.issue45439@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45439>
_______________________________________

From report at bugs.python.org  Thu Oct 14 20:59:49 2021
From: report at bugs.python.org (Ned Deily)
Date: Fri, 15 Oct 2021 00:59:49 +0000
Subject: [issue45465] logging messages are needlessly reformatted for every
 handler
In-Reply-To: <1634164787.38.0.59547649385.issue45465@roundup.psfhosted.org>
Message-ID: <1634259589.08.0.393135849381.issue45465@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
nosy: +vinay.sajip

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45465>
_______________________________________

From report at bugs.python.org  Thu Oct 14 21:56:59 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Fri, 15 Oct 2021 01:56:59 +0000
Subject: [issue45478] Send a patch to libexpat to solve _POSIX_C_SOURCE issue.
Message-ID: <1634263019.88.0.531243767636.issue45478@roundup.psfhosted.org>


New submission from Dong-hee Na <donghee.na at python.org>:

Yesterday, I left an issue to libexpat project about what we solved yesterday to follow Christian suggestion.

https://github.com/libexpat/libexpat/issues/513

The maintainer suggests sending a patch with reordering all headers files related to expat_config.h.
I am now preparing the patch.

I would like to know if there are more issues that we have to solve except header ordering that I don't know yet :)

----------
assignee: corona10
components: Build
messages: 403968
nosy: christian.heimes, corona10, serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Send a patch to libexpat to solve _POSIX_C_SOURCE issue.
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45478>
_______________________________________

From report at bugs.python.org  Thu Oct 14 22:43:32 2021
From: report at bugs.python.org (wyz23x2)
Date: Fri, 15 Oct 2021 02:43:32 +0000
Subject: [issue45420] Python 3.10 final installation failure
In-Reply-To: <1633828108.74.0.92443333438.issue45420@roundup.psfhosted.org>
Message-ID: <1634265812.77.0.944589666569.issue45420@roundup.psfhosted.org>


wyz23x2 <wyz23x2 at 163.com> added the comment:

?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45420>
_______________________________________

From report at bugs.python.org  Thu Oct 14 23:58:47 2021
From: report at bugs.python.org (Benjamin Peterson)
Date: Fri, 15 Oct 2021 03:58:47 +0000
Subject: [issue45479] clean up Py_UniversalNewlineFgets
Message-ID: <1634270327.41.0.602561770606.issue45479@roundup.psfhosted.org>


New submission from Benjamin Peterson <benjamin at python.org>:

Py_UniversalNewlineFgets has a bunch of dead code and general gunk that should be removed.

----------
assignee: benjamin.peterson
components: IO
messages: 403970
nosy: benjamin.peterson
priority: normal
severity: normal
status: open
title: clean up Py_UniversalNewlineFgets
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45479>
_______________________________________

From report at bugs.python.org  Fri Oct 15 00:01:37 2021
From: report at bugs.python.org (Benjamin Peterson)
Date: Fri, 15 Oct 2021 04:01:37 +0000
Subject: [issue45479] clean up Py_UniversalNewlineFgets
In-Reply-To: <1634270327.41.0.602561770606.issue45479@roundup.psfhosted.org>
Message-ID: <1634270497.54.0.178883395901.issue45479@roundup.psfhosted.org>


Change by Benjamin Peterson <benjamin at python.org>:


----------
keywords: +patch
pull_requests: +27254
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28965

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45479>
_______________________________________

From report at bugs.python.org  Fri Oct 15 00:29:00 2021
From: report at bugs.python.org (Benjamin Peterson)
Date: Fri, 15 Oct 2021 04:29:00 +0000
Subject: [issue45479] clean up Py_UniversalNewlineFgets
In-Reply-To: <1634270327.41.0.602561770606.issue45479@roundup.psfhosted.org>
Message-ID: <1634272140.62.0.275755280103.issue45479@roundup.psfhosted.org>


Benjamin Peterson <benjamin at python.org> added the comment:


New changeset 160c38df7fc7ba22dc687879c387bf643ffc3398 by Benjamin Peterson in branch 'main':
closes bpo-45479: Degunkify Py_UniversalNewlineFgets. (GH-28965)
https://github.com/python/cpython/commit/160c38df7fc7ba22dc687879c387bf643ffc3398


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45479>
_______________________________________

From report at bugs.python.org  Fri Oct 15 01:23:07 2021
From: report at bugs.python.org (Benjamin Peterson)
Date: Fri, 15 Oct 2021 05:23:07 +0000
Subject: [issue45479] clean up Py_UniversalNewlineFgets
In-Reply-To: <1634270327.41.0.602561770606.issue45479@roundup.psfhosted.org>
Message-ID: <1634275387.16.0.886995666726.issue45479@roundup.psfhosted.org>


Change by Benjamin Peterson <benjamin at python.org>:


----------
pull_requests: +27255
pull_request: https://github.com/python/cpython/pull/28967

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45479>
_______________________________________

From report at bugs.python.org  Fri Oct 15 02:10:59 2021
From: report at bugs.python.org (Benjamin Peterson)
Date: Fri, 15 Oct 2021 06:10:59 +0000
Subject: [issue45479] clean up Py_UniversalNewlineFgets
In-Reply-To: <1634270327.41.0.602561770606.issue45479@roundup.psfhosted.org>
Message-ID: <1634278259.89.0.862171559259.issue45479@roundup.psfhosted.org>


Benjamin Peterson <benjamin at python.org> added the comment:


New changeset 9ce9cfe595d64e3081e69de7296042cc54bccf18 by Benjamin Peterson in branch 'main':
bpo-45479: Futher simplify Py_UniversalNewlineFgets. (GH-28967)
https://github.com/python/cpython/commit/9ce9cfe595d64e3081e69de7296042cc54bccf18


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45479>
_______________________________________

From report at bugs.python.org  Fri Oct 15 02:31:08 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Fri, 15 Oct 2021 06:31:08 +0000
Subject: [issue45478] Send a patch to libexpat to solve _POSIX_C_SOURCE issue.
In-Reply-To: <1634263019.88.0.531243767636.issue45478@roundup.psfhosted.org>
Message-ID: <1634279468.75.0.00527158969186.issue45478@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

Related PRs

- https://github.com/python/cpython/commit/d413c503636cde2a6ab0ada25dccb0134633a8e6 by Dong-hee
- https://github.com/python/cpython/commit/8177404d520e81f16324a900f093adf3856d33f8 by Pablo
- https://github.com/python/cpython/commit/cf247359d5b7082044eea1fa94b5211a172b1ff6 by Victor
- https://github.com/python/cpython/commit/aa15276ee9554922919df1eb1a78826a102fb321 by Tiran

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45478>
_______________________________________

From report at bugs.python.org  Fri Oct 15 02:43:20 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 06:43:20 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634280200.6.0.551695118379.issue45434@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Fri Oct 15 02:45:18 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 06:45:18 +0000
Subject: [issue45084] urllib.parse: remove deprecated functions (splittype,
 to_bytes, etc.)
In-Reply-To: <1630533536.1.0.485805644066.issue45084@roundup.psfhosted.org>
Message-ID: <1634280318.29.0.503988416055.issue45084@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

pip uses deprecated functions indirectly:
https://github.com/python/cpython/pull/28115

Python 3.11 seems to be too early to *remove* functions. We can attempt again in the next Python release ;-)

----------
resolution:  -> postponed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45084>
_______________________________________

From report at bugs.python.org  Fri Oct 15 02:53:15 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Fri, 15 Oct 2021 06:53:15 +0000
Subject: [issue45478] Send a patch to libexpat to solve _POSIX_C_SOURCE issue.
In-Reply-To: <1634263019.88.0.531243767636.issue45478@roundup.psfhosted.org>
Message-ID: <1634280795.93.0.812685946735.issue45478@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

I will send this patch file, when I apply this patch file, my compiler did not raise _POSIX_C_SOURCE issue.
(gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC))

CPython affects
- xmltok.c
- xmlrole.c (Not yet applied to CPython code)

Not affected
- xmlfile.c

----------
keywords: +patch
Added file: https://bugs.python.org/file50359/0001-Reorder-the-location-of-including-expat_config.h.patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45478>
_______________________________________

From report at bugs.python.org  Fri Oct 15 02:53:47 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Fri, 15 Oct 2021 06:53:47 +0000
Subject: [issue45478] Send a patch to libexpat to solve _POSIX_C_SOURCE issue.
In-Reply-To: <1634263019.88.0.531243767636.issue45478@roundup.psfhosted.org>
Message-ID: <1634280827.01.0.8011729237.issue45478@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

Please take a look at the patch file that it will be okay to CPython code base :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45478>
_______________________________________

From report at bugs.python.org  Fri Oct 15 03:15:03 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 15 Oct 2021 07:15:03 +0000
Subject: [issue44105] tempfile.TemporaryDirectory deleted after sleep in
 threads
In-Reply-To: <1620682741.29.0.136385435366.issue44105@roundup.psfhosted.org>
Message-ID: <1634282103.43.0.797910399159.issue44105@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44105>
_______________________________________

From report at bugs.python.org  Fri Oct 15 03:17:44 2021
From: report at bugs.python.org (Mark Summerfield)
Date: Fri, 15 Oct 2021 07:17:44 +0000
Subject: [issue45480] Missing link(s) to the "Python Module Index" page
Message-ID: <1634282264.33.0.0720790922492.issue45480@roundup.psfhosted.org>


New submission from Mark Summerfield <mark at qtrac.eu>:

I mostly use the Python 3.8 docs since that's the Python I use.
However, when I tried using the 3.9 and 3.10 docs I found that the top of each page has a long search bar (presumably for mobile devices?) but _no_ link to the python module index. I find this last page the most important page for looking things up, so I really hope the 'modules' link is restored.

----------
assignee: docs at python
components: Documentation
messages: 403977
nosy: docs at python, mark
priority: normal
severity: normal
status: open
title: Missing link(s) to the "Python Module Index" page
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45480>
_______________________________________

From report at bugs.python.org  Fri Oct 15 03:18:23 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 15 Oct 2021 07:18:23 +0000
Subject: [issue45477] configure script cannot detect float word ordering on
 linux
In-Reply-To: <1634246393.25.0.871269149475.issue45477@roundup.psfhosted.org>
Message-ID: <1634282303.59.0.02072083421.issue45477@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Python uses the AX_C_FLOAT_WORDS_BIGENDIAN macro from autoconf-archive to detect byte order of floats. You can find the code at https://www.gnu.org/software/autoconf-archive/ax_c_float_words_bigendian.html .

Please attach your config.log file and the conftest.o output file of the follow command:

$ cat > conftest.c << EOF
double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
EOF
$ icc -c conftest.c

----------
nosy: +christian.heimes

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45477>
_______________________________________

From report at bugs.python.org  Fri Oct 15 03:20:27 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 07:20:27 +0000
Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython
 API" with implementation details
In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
Message-ID: <1634282427.58.0.60147479221.issue35134@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27256
pull_request: https://github.com/python/cpython/pull/28968

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35134>
_______________________________________

From report at bugs.python.org  Fri Oct 15 03:30:31 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 07:30:31 +0000
Subject: [issue35081] Move internal headers to Include/internal/
In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za>
Message-ID: <1634283031.83.0.522920027536.issue35081@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27257
pull_request: https://github.com/python/cpython/pull/28969

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35081>
_______________________________________

From report at bugs.python.org  Fri Oct 15 03:30:55 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 07:30:55 +0000
Subject: [issue35081] Move internal headers to Include/internal/
In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za>
Message-ID: <1634283055.57.0.109152503908.issue35081@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I reopen the issue since there is still activity on it.

----------
resolution: fixed -> 
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35081>
_______________________________________

From report at bugs.python.org  Fri Oct 15 03:31:36 2021
From: report at bugs.python.org (EricLin)
Date: Fri, 15 Oct 2021 07:31:36 +0000
Subject: [issue45481] gc is disabled without explict calling gc.disable()
Message-ID: <1634283096.3.0.498579479489.issue45481@roundup.psfhosted.org>


New submission from EricLin <linxiaojun1 at huawei.com>:

First, I would like to clarify that this is a Python 2.7.5 issue. I know python2 is no longer maintained, but I still wish to look for some help here.

We have observed a long running Python 2.7.5 process leaking memory. I tried to inject some code into the process using gdb, to see what's happening inside.
The gdb command looks like:
gdb -p $pid -batch -eval-command='call PyGILState_Ensure()' -eval-command='call PyRun_SimpleString("exec(open(\"/path/to/code\").read())")' -eval-command='call PyGILState_Release($1)'

I printed gc.get_objects() information into a file and took 2 snapshots, but failed to find obvious object size increase. But after calling gc.collect() in the injected code, a dramatic memory decrease is observed. So I tried to print the return value following:

gc.isenabled()
gc.get_count()
gc.get_threshold()

which gives me:

False
(56107, 0, 0)
(700, 10, 10)

This obviously shows that gc is disabled, but I'm sure non of our code does it explicitly. And the same code is running on hundreds of servers but only one has this problem.

Does anyone have any idea what might be the cause, or what to check to find the root cause?

----------
components: Library (Lib)
messages: 403980
nosy: linxiaojun
priority: normal
severity: normal
status: open
title: gc is disabled without explict calling gc.disable()
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45481>
_______________________________________

From report at bugs.python.org  Fri Oct 15 03:34:49 2021
From: report at bugs.python.org (Karthikeyan Singaravelan)
Date: Fri, 15 Oct 2021 07:34:49 +0000
Subject: [issue45475] gzip fails to read a gzipped file (ValueError: readline
 of closed file)
In-Reply-To: <1634245921.58.0.043840382812.issue45475@roundup.psfhosted.org>
Message-ID: <1634283289.75.0.352736434967.issue45475@roundup.psfhosted.org>


Karthikeyan Singaravelan <tir.karthi at gmail.com> added the comment:

This might be related to below commit : 

commit d2a8e69c2c605fbaa3656a5f99aa8d295f74c80e
Author: Inada Naoki <songofacandy at gmail.com>
Date:   Tue Apr 13 13:51:49 2021 +0900

    bpo-43787: Add __iter__ to GzipFile, BZ2File, and LZMAFile (GH-25353)


python -m gzip README.rst
(myenv) ?  cpython git:(main) ? git checkout d2a8e69c2c605fbaa3656a5f99aa8d295f74c80e~1 Lib/gzip.py
Updated 1 path from 2ea7c00ab4
(myenv) ?  cpython git:(main) ? ./python
Python 3.11.0a1+ (heads/main:160c38df7f, Oct 15 2021, 11:25:16) [GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gzip
>>> len([None for _ in gzip.GzipFile("README.rst.gz")])
267
>>> 
(myenv) ?  cpython git:(main) ? git checkout d2a8e69c2c605fbaa3656a5f99aa8d295f74c80e Lib/gzip.py 
Updated 1 path from 1f9874eec6
(myenv) ?  cpython git:(main) ? ./python
Python 3.11.0a1+ (heads/main:160c38df7f, Oct 15 2021, 11:25:16) [GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gzip
>>> len([None for _ in gzip.GzipFile("README.rst.gz")])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 1, in <listcomp>
ValueError: readline of closed file

----------
components: +Library (Lib)
keywords: +3.10regression
nosy: +methane, xtreak

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45475>
_______________________________________

From report at bugs.python.org  Fri Oct 15 03:43:39 2021
From: report at bugs.python.org (Jonas H.)
Date: Fri, 15 Oct 2021 07:43:39 +0000
Subject: [issue45462] Speed up re.match with pre-compiled patterns
In-Reply-To: <1634143133.69.0.265087114017.issue45462@roundup.psfhosted.org>
Message-ID: <1634283819.43.0.760427357733.issue45462@roundup.psfhosted.org>


Jonas H. <jonas at lophus.org> added the comment:

I agree with your statement in principle. Here are numbers for the slowdown that's introduced:

Without the change:
  ./python.exe -m timeit -s 'import re'\n'[re.compile(f"fill_cache{i}") for i in range(512)]'\n'pat = re.compile(".")' 're.match(pat, "asdf")'
  500000 loops, best of 5: 462 nsec per loop
  ./python.exe -m timeit -s 'import re'\n'[re.compile(f"fill_cache{i}") for i in range(512)]'\n'pat = re.compile(".")' 're.match(".", "asdf")'
  1000000 loops, best of 5: 316 nsec per loop

With the change:
  ./python.exe -m timeit -s 'import re'\n'[re.compile(f"fill_cache{i}") for i in range(512)]'\n'pat = re.compile(".")' 're.match(pat, "asdf")'
1000000 loops, best of 5: 207 nsec per loop
  ./python.exe -m timeit -s 'import re'\n'[re.compile(f"fill_cache{i}") for i in range(512)]'\n'pat = re.compile(".")' 're.match(".", "asdf")'
1000000 loops, best of 5: 351 nsec per loop

So we have a 2x speedup in the uncommon case and a 10% slowdown in the common case.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45462>
_______________________________________

From report at bugs.python.org  Fri Oct 15 03:46:37 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 07:46:37 +0000
Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython
 API" with implementation details
In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
Message-ID: <1634283997.08.0.0292763628706.issue35134@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 8e5de40f90476249e9a2e5ef135143b5c6a0b512 by Victor Stinner in branch 'main':
bpo-35134: Move classobject.h to Include/cpython/ (GH-28968)
https://github.com/python/cpython/commit/8e5de40f90476249e9a2e5ef135143b5c6a0b512


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35134>
_______________________________________

From report at bugs.python.org  Fri Oct 15 04:00:51 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 08:00:51 +0000
Subject: [issue45482] [C API] Add PySimpleNamespace_New() function
Message-ID: <1634284851.38.0.689716122011.issue45482@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

Python has a types.SimpleNamespace type which is convenient to cheap a "simple namespace". I propose to make its C API public (but exclude it from the limited C API): add PySimpleNamespace_New() function.

It's currently used in:

* Modules/timemodule.c: time.get_clock_info(name)
* Python/sysmodule.c: sys.implementation

It's also used in:

* Python/import.c: _PyImport_BootstrapImp()
* Modules/_testmultiphase.c: createfunc_nonmodule() used as the Py_mod_create slot

----------
components: C API
messages: 403984
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Add PySimpleNamespace_New() function
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45482>
_______________________________________

From report at bugs.python.org  Fri Oct 15 04:08:24 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Fri, 15 Oct 2021 08:08:24 +0000
Subject: [issue45474] [C API] marshal.h must not use FILE* type in the limited
 C API
In-Reply-To: <1634242163.67.0.843815202649.issue45474@roundup.psfhosted.org>
Message-ID: <1634285304.44.0.607862468874.issue45474@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

Just note that these were *not* part of the limited API, which is defined in Misc/stable_abi.txt rather than the #ifdefs: https://docs.python.org/3.10/c-api/stable.html#stable
If they were, the functions would need to remain in the stable ABI.

----------
nosy: +petr.viktorin

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45474>
_______________________________________

From report at bugs.python.org  Fri Oct 15 04:08:40 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Fri, 15 Oct 2021 08:08:40 +0000
Subject: [issue45480] Missing link(s) to the "Python Module Index" page
In-Reply-To: <1634282264.33.0.0720790922492.issue45480@roundup.psfhosted.org>
Message-ID: <1634285320.4.0.132721584782.issue45480@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

I think https://github.com/python/pythondotorg/issues is the correct place to report issues with the web site.

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45480>
_______________________________________

From report at bugs.python.org  Fri Oct 15 04:09:55 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 15 Oct 2021 08:09:55 +0000
Subject: [issue45462] Speed up re.match with pre-compiled patterns
In-Reply-To: <1634143133.69.0.265087114017.issue45462@roundup.psfhosted.org>
Message-ID: <1634285395.38.0.987683958583.issue45462@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

And compare it with pat.match("asdf").

If the performance is critical, use methods of pre-compiled patterns.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45462>
_______________________________________

From report at bugs.python.org  Fri Oct 15 04:14:57 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Fri, 15 Oct 2021 08:14:57 +0000
Subject: [issue45481] gc is disabled without explict calling gc.disable()
In-Reply-To: <1634283096.3.0.498579479489.issue45481@roundup.psfhosted.org>
Message-ID: <1634285697.96.0.801493928492.issue45481@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

Sorry, but since this is a 2.7 issue, I'm going to close it here. I know this isn't the answer you wanted, but this is really the wrong venue.

I suggest you ask on StackOverflow or the python-list mailing list (https://mail.python.org/mailman/listinfo/python-list).

Good luck!

----------
nosy: +eric.smith
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45481>
_______________________________________

From report at bugs.python.org  Fri Oct 15 04:46:57 2021
From: report at bugs.python.org (Jonas H.)
Date: Fri, 15 Oct 2021 08:46:57 +0000
Subject: [issue45462] Speed up re.match with pre-compiled patterns
In-Reply-To: <1634143133.69.0.265087114017.issue45462@roundup.psfhosted.org>
Message-ID: <1634287617.36.0.77265486639.issue45462@roundup.psfhosted.org>


Jonas H. <jonas at lophus.org> added the comment:

pat.match() has 110 nsec.

Feel free to close the issue and PR if you think this isn't worth changing.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45462>
_______________________________________

From report at bugs.python.org  Fri Oct 15 04:55:53 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 08:55:53 +0000
Subject: [issue45482] [C API] Add PySimpleNamespace_New() function
In-Reply-To: <1634284851.38.0.689716122011.issue45482@roundup.psfhosted.org>
Message-ID: <1634288153.04.0.391391508388.issue45482@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
keywords: +patch
pull_requests: +27258
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28970

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45482>
_______________________________________

From report at bugs.python.org  Fri Oct 15 05:03:45 2021
From: report at bugs.python.org (Mark Dickinson)
Date: Fri, 15 Oct 2021 09:03:45 +0000
Subject: [issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(),
 to static inline functions
In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org>
Message-ID: <1634288625.49.0.631147508815.issue45476@roundup.psfhosted.org>


Change by Mark Dickinson <dickinsm at gmail.com>:


----------
nosy: +mark.dickinson

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45476>
_______________________________________

From report at bugs.python.org  Fri Oct 15 05:10:44 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Fri, 15 Oct 2021 09:10:44 +0000
Subject: [issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(),
 to static inline functions
In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org>
Message-ID: <1634289044.15.0.593978193298.issue45476@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

I am with Raymond on this one.

If "protecting against wrong use" is the only reason to go down the slippery path of starting to rely on compiler optimizations for performance critical operations, the argument is not good enough.

If people do use macros in l-value mode, it's their problem when their code breaks, not ours. Please don't forget that we are operating under the consenting adults principle: we expect users of the CPython API to use it as documented and expect them to take care of the fallout, if things break when they don't.

We don't need to police developers into doing so.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45476>
_______________________________________

From report at bugs.python.org  Fri Oct 15 05:22:46 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 15 Oct 2021 09:22:46 +0000
Subject: [issue45462] Speed up re.match with pre-compiled patterns
In-Reply-To: <1634143133.69.0.265087114017.issue45462@roundup.psfhosted.org>
Message-ID: <1634289766.67.0.137615370623.issue45462@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

For reference, caching was introduced in b1aa19515ffdb84c6633ee0344196fd8bd50ade0 21 years ago, and initially it checked for pre-compiled patterns before looking up in the cache. But it was changed 2 months later in 7898c3e6852565046a9b8b063d35d66777bf5176 and since then the cache was checked first. There was no explicit note about this in commit message, but I think that it was done to speed up the common case.

There were many changes in the caching mechanism, but this part of logic was left unchanged. Maybe if once we implement fast dispatch by the type of the first argument we reconsider this code.

----------
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45462>
_______________________________________

From report at bugs.python.org  Fri Oct 15 05:26:21 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 09:26:21 +0000
Subject: [issue45482] [C API] Add PySimpleNamespace_New() function
In-Reply-To: <1634284851.38.0.689716122011.issue45482@roundup.psfhosted.org>
Message-ID: <1634289981.05.0.303588514489.issue45482@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I created this issue while cleaning the C API. I'm not fully convinced that PySimpleNamespace_New() must be made public.

The other choice is to move the function to the internal C API.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45482>
_______________________________________

From report at bugs.python.org  Fri Oct 15 05:29:31 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 09:29:31 +0000
Subject: [issue45474] [C API] marshal.h must not use FILE* type in the limited
 C API
In-Reply-To: <1634242163.67.0.843815202649.issue45474@roundup.psfhosted.org>
Message-ID: <1634290171.13.0.449985969296.issue45474@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Petr:
> Just note that these were *not* part of the limited API, which is defined in Misc/stable_abi.txt rather than the #ifdefs: https://docs.python.org/3.10/c-api/stable.html#stable
> If they were, the functions would need to remain in the stable ABI.

Thanks for double checking. I wasn't sure ;-)
https://github.com/python/cpython/pull/28956#issuecomment-943704218

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45474>
_______________________________________

From report at bugs.python.org  Fri Oct 15 05:39:06 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 15 Oct 2021 09:39:06 +0000
Subject: [issue45428] py_compile fails to read filenames from stdin
In-Reply-To: <1633937408.55.0.373736391126.issue45428@roundup.psfhosted.org>
Message-ID: <1634290746.05.0.808994738737.issue45428@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 59a633d3e2071d65aa6638da5cf767a5c1310271 by Graham Inggs in branch 'main':
bpo-45428: Fix reading filenames from stdin in py_compile (GH-28848)
https://github.com/python/cpython/commit/59a633d3e2071d65aa6638da5cf767a5c1310271


----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45428>
_______________________________________

From report at bugs.python.org  Fri Oct 15 05:39:16 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 15 Oct 2021 09:39:16 +0000
Subject: [issue45428] py_compile fails to read filenames from stdin
In-Reply-To: <1633937408.55.0.373736391126.issue45428@roundup.psfhosted.org>
Message-ID: <1634290756.76.0.76551881159.issue45428@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
keywords: +patch
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27259
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28971

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45428>
_______________________________________

From report at bugs.python.org  Fri Oct 15 05:43:06 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 09:43:06 +0000
Subject: [issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(),
 to static inline functions
In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org>
Message-ID: <1634290986.94.0.655495121595.issue45476@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

For PyObject, I converted Py_REFCNT(), Py_TYPE() and Py_SIZE() to static inline functions to enforce the usage of Py_SET_REFCNT(), Py_SET_TYPE() and Py_SET_SIZE(). Only a minority of C extensions are affected by these changes. Also, there is more pressure from recent optimization projects to abstract accesses to PyObject members.

I agree that it doesn't seem that "AS" functions are abused to *set* the inner string:

* PyByteArray_AS_STRING()
* PyBytes_AS_STRING()
* PyFloat_AS_DOUBLE()

> If "protecting against wrong use" is the only reason to go down the slippery path of starting to rely on compiler optimizations for performance critical operations, the argument is not good enough.

Again, I'm not aware of any performance issue caused by short static inline functions like Py_TYPE() or the proposed PyFloat_AS_DOUBLE(). If there is a problem, it should be addressed, since Python uses more and more static inline functions.

static inline functions is a common feature of C language. I'm not sure where your doubts of bad performance come from.

Using static inline functions has other advantages. It helps debugging and profiling, since the function name can be retrieved by debuggers and profilers when analysing the machine code. It also avoids macro pitfalls (like abusing a macro to use it as an l-value ;-)).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45476>
_______________________________________

From report at bugs.python.org  Fri Oct 15 05:49:09 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 15 Oct 2021 09:49:09 +0000
Subject: [issue32596] Lazy import concurrent.futures.process and thread
In-Reply-To: <1516359250.47.0.467229070634.issue32596@psf.upfronthosting.co.za>
Message-ID: <1634291349.75.0.0950847683764.issue32596@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

What are issues with using global variable as import target?

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32596>
_______________________________________

From report at bugs.python.org  Fri Oct 15 05:56:37 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 09:56:37 +0000
Subject: [issue35081] Move internal headers to Include/internal/
In-Reply-To: <1540600944.05.0.788709270274.issue35081@psf.upfronthosting.co.za>
Message-ID: <1634291797.37.0.120181737378.issue35081@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 063abd931f064a4b6b478b0b6e9aa13ee38d2cff by Victor Stinner in branch 'main':
bpo-35081: Move interpreteridobject.h to Include/internal/ (GH-28969)
https://github.com/python/cpython/commit/063abd931f064a4b6b478b0b6e9aa13ee38d2cff


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35081>
_______________________________________

From report at bugs.python.org  Fri Oct 15 05:58:47 2021
From: report at bugs.python.org (E. Paine)
Date: Fri, 15 Oct 2021 09:58:47 +0000
Subject: [issue45447] IDLE: Support syntax highlighting for .pyi stub files
In-Reply-To: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>
Message-ID: <1634291927.58.0.155268651881.issue45447@roundup.psfhosted.org>


E. Paine <xepaine13 at gmail.com> added the comment:

Would it make sense, since this issue pretty much makes IDLE officially support .pyi files, to add the "Edit with IDLE" menu when right-clicking on a .pyi file in Windows explorer?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Fri Oct 15 06:03:45 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Fri, 15 Oct 2021 10:03:45 +0000
Subject: [issue45445] Fail if an invalid -X option is provided
In-Reply-To: <1634045986.72.0.556620578821.issue45445@roundup.psfhosted.org>
Message-ID: <1634292225.87.0.888319781486.issue45445@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
pull_requests: +27260
pull_request: https://github.com/python/cpython/pull/28972

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45445>
_______________________________________

From report at bugs.python.org  Fri Oct 15 06:07:13 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 10:07:13 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634292433.66.0.502904706867.issue45434@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27261
pull_request: https://github.com/python/cpython/pull/28973

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Fri Oct 15 06:20:32 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Fri, 15 Oct 2021 10:20:32 +0000
Subject: [issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(),
 to static inline functions
In-Reply-To: <1634290986.94.0.655495121595.issue45476@roundup.psfhosted.org>
Message-ID: <bf6f67d3-efcf-0d92-22f0-e86d596c17d4@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 15.10.2021 11:43, STINNER Victor wrote:
> Again, I'm not aware of any performance issue caused by short static inline functions like Py_TYPE() or the proposed PyFloat_AS_DOUBLE(). If there is a problem, it should be addressed, since Python uses more and more static inline functions.
> 
> static inline functions is a common feature of C language. I'm not sure where your doubts of bad performance come from.

Inlining is something that is completely under the control of the
used compilers. Compilers are free to not inline function marked for
inlining, which can result in significant slowdowns on platforms
which are e.g. restricted in RAM and thus emphasize on small code size,
or where the CPUs have small caches or not enough registers (think
micro-controllers).

The reason why we have those macros is because we want the developers to be
able to make a conscious decision "please inline this code unconditionally
and regardless of platform or compiler". The developer will know better
what to do than the compiler.

If the developer wants to pass control over to the compiler s/he can use
the corresponding C function, which is usually available (and then, in many
cases, also provides error handling).

> Using static inline functions has other advantages. It helps debugging and profiling, since the function name can be retrieved by debuggers and profilers when analysing the machine code. It also avoids macro pitfalls (like abusing a macro to use it as an l-value ;-)).

Perhaps, but then I never had to profile macro use in the past. Instead,
what I typically found was that using macros results in faster code when
used in inner loops, so profiling usually guided me to use macros instead
of functions.

That said, the macros you have inlined so far were all really trivial,
so a compiler will most likely always inline them (the number of machine
code instructions for the call would be more than needed for
the actual operation).

Perhaps we ought to have a threshold for making such decisions, e.g.
number of machine code instructions generated for the macro or so, to
not get into discussions every time :-)

A blanket "static inline" is always better than a macro is not good
enough as an argument, though.

Esp. in PGO driven optimizations the compiler could opt for using
the function call rather than inlining if it finds that the code
in question is not used much and it needs to save space to have
loops fit into CPU caches.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45476>
_______________________________________

From report at bugs.python.org  Fri Oct 15 06:21:07 2021
From: report at bugs.python.org (Vinay Sajip)
Date: Fri, 15 Oct 2021 10:21:07 +0000
Subject: [issue45465] logging messages are needlessly reformatted for every
 handler
In-Reply-To: <1634164787.38.0.59547649385.issue45465@roundup.psfhosted.org>
Message-ID: <1634293267.86.0.414278468969.issue45465@roundup.psfhosted.org>


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

A developer may wish to format messages differently for different audiences (i.e. different handlers) - for example, omit stack traces. This behaviour is by design.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45465>
_______________________________________

From report at bugs.python.org  Fri Oct 15 07:01:27 2021
From: report at bugs.python.org (Gareth Rees)
Date: Fri, 15 Oct 2021 11:01:27 +0000
Subject: [issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(),
 to static inline functions
In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org>
Message-ID: <1634295687.53.0.183322990725.issue45476@roundup.psfhosted.org>


Gareth Rees <gdr at garethrees.org> added the comment:

If the problem is accidental use of the result of PyFloat_AS_DOUBLE() as an lvalue, why not use the comma operator to ensure that the result is an rvalue?

The C99 standard says "A comma operator does not yield an lvalue" in ?6.5.17; I imagine there is similar text in other versions of the standard.

The idea would be to define a helper macro like this:

    /* As expr, but can only be used as an rvalue. */
    #define Py_RVALUE(expr) ((void)0, (expr))

and then use the helper where needed, for example:

    #define PyFloat_AS_DOUBLE(op) Py_RVALUE(((PyFloatObject *)(op))->ob_fval)

----------
nosy: +gdr at garethrees.org

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45476>
_______________________________________

From report at bugs.python.org  Fri Oct 15 07:06:09 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 11:06:09 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634295969.22.0.621635948938.issue45434@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 105582e74c1817bc6a9d99bcb6540b34a3367292 by Victor Stinner in branch 'main':
bpo-45434: Remove Include/eval.h header file (GH-28973)
https://github.com/python/cpython/commit/105582e74c1817bc6a9d99bcb6540b34a3367292


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Fri Oct 15 07:10:22 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 11:10:22 +0000
Subject: [issue44113] [C API] Deprecate legacy API for configure Python
 initialization
In-Reply-To: <1620814854.22.0.288089446549.issue44113@roundup.psfhosted.org>
Message-ID: <1634296222.75.0.133393162124.issue44113@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27262
pull_request: https://github.com/python/cpython/pull/28974

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44113>
_______________________________________

From report at bugs.python.org  Fri Oct 15 07:18:26 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Fri, 15 Oct 2021 11:18:26 +0000
Subject: [issue45445] Fail if an invalid -X option is provided
In-Reply-To: <1634045986.72.0.556620578821.issue45445@roundup.psfhosted.org>
Message-ID: <1634296706.86.0.680195519288.issue45445@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 79bc5e1dc6f87149240bded3654574b24168f1ac by Pablo Galindo Salgado in branch 'main':
bpo-45445: Remove incorrectly commited test file (GH-28972)
https://github.com/python/cpython/commit/79bc5e1dc6f87149240bded3654574b24168f1ac


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45445>
_______________________________________

From report at bugs.python.org  Fri Oct 15 07:25:37 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 11:25:37 +0000
Subject: [issue45482] [C API] Add PySimpleNamespace_New() function
In-Reply-To: <1634284851.38.0.689716122011.issue45482@roundup.psfhosted.org>
Message-ID: <1634297137.11.0.216062454405.issue45482@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27263
pull_request: https://github.com/python/cpython/pull/28975

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45482>
_______________________________________

From report at bugs.python.org  Fri Oct 15 07:26:47 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 11:26:47 +0000
Subject: [issue45482] [C API] Add PySimpleNamespace_New() function
In-Reply-To: <1634284851.38.0.689716122011.issue45482@roundup.psfhosted.org>
Message-ID: <1634297207.58.0.178225835996.issue45482@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> The other choice is to move the function to the internal C API.

I created GH-28975 for that.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45482>
_______________________________________

From report at bugs.python.org  Fri Oct 15 07:37:43 2021
From: report at bugs.python.org (jerry chow)
Date: Fri, 15 Oct 2021 11:37:43 +0000
Subject: [issue45457] Documentation for ssl.load_default_certs is outdated
In-Reply-To: <1634108477.44.0.93503538382.issue45457@roundup.psfhosted.org>
Message-ID: <1634297863.49.0.653457282212.issue45457@roundup.psfhosted.org>


Change by jerry chow <jerrylikerice1s at gmail.com>:


----------
nosy: +jerrylikerice1s

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45457>
_______________________________________

From report at bugs.python.org  Fri Oct 15 07:38:09 2021
From: report at bugs.python.org (jerry chow)
Date: Fri, 15 Oct 2021 11:38:09 +0000
Subject: [issue45451] IDLE Shell GUI - remove window border
In-Reply-To: <1634087096.76.0.0471723883661.issue45451@roundup.psfhosted.org>
Message-ID: <1634297889.43.0.146822565391.issue45451@roundup.psfhosted.org>


Change by jerry chow <jerrylikerice1s at gmail.com>:


----------
nosy: +jerrylikerice1s

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45451>
_______________________________________

From report at bugs.python.org  Fri Oct 15 07:38:19 2021
From: report at bugs.python.org (jerry chow)
Date: Fri, 15 Oct 2021 11:38:19 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634297899.15.0.134411819371.issue45229@roundup.psfhosted.org>


Change by jerry chow <jerrylikerice1s at gmail.com>:


----------
nosy: +jerrylikerice1s

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Fri Oct 15 07:43:51 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 11:43:51 +0000
Subject: [issue44113] [C API] Deprecate legacy API for configure Python
 initialization
In-Reply-To: <1620814854.22.0.288089446549.issue44113@roundup.psfhosted.org>
Message-ID: <1634298231.8.0.781904875119.issue44113@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset a7f8dfd25a167ccfde9996c499fa38a2aba60022 by Victor Stinner in branch 'main':
bpo-44113: Move the What's New entry to Deprecate section (GH-28974)
https://github.com/python/cpython/commit/a7f8dfd25a167ccfde9996c499fa38a2aba60022


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44113>
_______________________________________

From report at bugs.python.org  Fri Oct 15 08:11:18 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Fri, 15 Oct 2021 12:11:18 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <1634245017.41.0.447111612436.issue45395@roundup.psfhosted.org>
Message-ID: <d0132723-8637-f1f3-d2ca-496f83a09c84@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 14.10.2021 22:56, Eric Snow wrote:
> 
> @MAL, what's the best way to make sure Tools/freeze is still working?  I don't see any tests for it in the test suite.  I tried running the test in Tools/freeze/test, but I can't get that to work on main (or on the 3.10 branch).

You'd have to create a frozen binary using the standard way freeze
works. I have never run those tests, so don't know whether they work,
but, of course, made sure that the freeze works as basis for PyRun
and patched it slightly to add features we needed.

One of these days, I need to refactor PyRun into a standalone project
and put it on Github (it's currently integrated into our internal
single repo setup). Then it'll be easier to see the changes I made.
For now, I can only reference the tar file:

https://www.egenix.com/products/python/PyRun/#Download
https://www.egenix.com/products/python/PyRun/#Installation

I can send you an updated version for Python 3.8, if there's
interest.

Essentially, you need to create a Python module which runs your
application, then point freeze.py to it and then compile the
generated .c files using the generated Makefile.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Fri Oct 15 08:14:52 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 15 Oct 2021 12:14:52 +0000
Subject: [issue45428] py_compile fails to read filenames from stdin
In-Reply-To: <1633937408.55.0.373736391126.issue45428@roundup.psfhosted.org>
Message-ID: <1634300092.34.0.853259300018.issue45428@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 2b6eb8149656541044884e76212495175e061a0a by Miss Islington (bot) in branch '3.10':
bpo-45428: Fix reading filenames from stdin in py_compile (GH-28848)
https://github.com/python/cpython/commit/2b6eb8149656541044884e76212495175e061a0a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45428>
_______________________________________

From report at bugs.python.org  Fri Oct 15 08:25:44 2021
From: report at bugs.python.org (E. Paine)
Date: Fri, 15 Oct 2021 12:25:44 +0000
Subject: [issue43139] test_ttk test_compound,
 test_tk test_type fail with Tk 8.6.11.1
In-Reply-To: <1612552092.14.0.798552929042.issue43139@roundup.psfhosted.org>
Message-ID: <1634300744.0.0.359809137377.issue43139@roundup.psfhosted.org>


E. Paine <xepaine13 at gmail.com> added the comment:

TL;DR I believe these are both Tk issues. I will take it up with them when I have time.

Starting with `test_winfo_rgb`, it is not the case that the expected behaviour is no longer that #4a3c8c is equivalent to #4a4a3c3c8c8c since this is documented on the man page (https://www.tcl.tk/man/tcl/TkLib/GetColor.html#M8). I need to do more research into exactly what versions / platforms are effected.

I also believe the problem with `test_configure_type` is on the Tk end, since `[menu .m] configure -type {}` succeeds despite not being documented on the man page (https://www.tcl.tk/man/tcl8.4/TkCmd/menu.html#M13) nor in the "bad type" message:
% [menu .m] configure -type a 
bad type "a": must be normal, tearoff, or menubar

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43139>
_______________________________________

From report at bugs.python.org  Fri Oct 15 08:37:47 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 15 Oct 2021 12:37:47 +0000
Subject: [issue45428] py_compile fails to read filenames from stdin
In-Reply-To: <1633937408.55.0.373736391126.issue45428@roundup.psfhosted.org>
Message-ID: <1634301467.86.0.183173572373.issue45428@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Thank you for your contribution Graham.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45428>
_______________________________________

From report at bugs.python.org  Fri Oct 15 08:41:11 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 12:41:11 +0000
Subject: [issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(),
 to static inline functions
In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org>
Message-ID: <1634301671.81.0.245383160465.issue45476@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27264
pull_request: https://github.com/python/cpython/pull/28976

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45476>
_______________________________________

From report at bugs.python.org  Fri Oct 15 08:41:40 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 15 Oct 2021 12:41:40 +0000
Subject: [issue44977] Deprecate delegation of int to __trunc__
In-Reply-To: <1629623877.06.0.26111591106.issue44977@roundup.psfhosted.org>
Message-ID: <1634301700.24.0.43153372556.issue44977@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
components: +Interpreter Core
stage:  -> needs patch
title: Deprecate delegation of int to __trunc__? -> Deprecate delegation of int to __trunc__
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44977>
_______________________________________

From report at bugs.python.org  Fri Oct 15 08:42:16 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 12:42:16 +0000
Subject: [issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(),
 to static inline functions
In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org>
Message-ID: <1634301736.55.0.303751101053.issue45476@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> #define Py_RVALUE(expr) ((void)0, (expr))

Oh, that's a clever trick!

I wrote GH-28976 which uses it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45476>
_______________________________________

From report at bugs.python.org  Fri Oct 15 08:44:52 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 12:44:52 +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: <1634301892.37.0.794365268377.issue45476@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
title: [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions -> [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45476>
_______________________________________

From report at bugs.python.org  Fri Oct 15 08:59:43 2021
From: report at bugs.python.org (GalaxySnail)
Date: Fri, 15 Oct 2021 12:59:43 +0000
Subject: [issue45483] pure Python class that has been registered as a
 `collections.abc.Sequence` can't be recgnized by the match statement without
 the `_abc` module
Message-ID: <1634302783.77.0.196268254173.issue45483@roundup.psfhosted.org>


New submission from GalaxySnail <ylc991 at 163.com>:

Pure Python class that has been registered as a `collections.abc.Sequence` can't be recgnized by the match statement without the `_abc` module.

For example:

```
>>> from test.support.import_helper import import_fresh_module

>>> collections_abc_with_c_abc = import_fresh_module(
...     "collections.abc", fresh=["_collections_abc", "abc", "_abc"])

>>> class MyList:
...     def __init__(self, iterable):
...         self.list = list(iterable)
...     def __len__(self):
...         return len(self.list)
...     def __getitem__(self, item):
...         return self.list[item]
...
>>> collections_abc_with_c_abc.Sequence.register(MyList)
<class '__main__.MyList'>
>>> match MyList(range(3, 10)):
...     case [x, *_]:
...         print(x)
...     case _:
...         print("not a sequence")
...
3

>>> collections_abc_with_py_abc = import_fresh_module(
...     "collections.abc", fresh=["_collections_abc", "abc"], blocked=["_abc"])
>>> class MyList:
...     def __init__(self, iterable):
...         self.list = list(iterable)
...     def __len__(self):
...         return len(self.list)
...     def __getitem__(self, item):
...         return self.list[item]
...
>>> collections_abc_with_py_abc.Sequence.register(MyList)
<class '__main__.MyList'>
>>> match MyList(range(3, 10)):
...     case [x, *_]:
...         print(x)
...     case _:
...         print("not a sequence")
...
not a sequence
```

It seems to be caused by https://github.com/python/cpython/commit/069e81ab3da46c441335ca762c4333b7bd91861d , only `tp_flags` are checked in the `MATCH_SEQUENCE` opcode. `Mapping` has the same problem.

----------
messages: 404011
nosy: GalaxySnail
priority: normal
severity: normal
status: open
title: pure Python class that has been registered as a `collections.abc.Sequence` can't be recgnized by the match statement without the `_abc` module
type: behavior
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45483>
_______________________________________

From report at bugs.python.org  Fri Oct 15 09:05:50 2021
From: report at bugs.python.org (Inada Naoki)
Date: Fri, 15 Oct 2021 13:05:50 +0000
Subject: [issue32596] Lazy import concurrent.futures.process and thread
In-Reply-To: <1634291349.75.0.0950847683764.issue32596@roundup.psfhosted.org>
Message-ID: <CAEfz+TyPxvvM+6oi3uq1Ati3wg1BXAztqcVQshZpRgeWHT=CGg@mail.gmail.com>


Inada Naoki <songofacandy at gmail.com> added the comment:

See this comment.
https://github.com/python/cpython/pull/5241#discussion_r162765765

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32596>
_______________________________________

From report at bugs.python.org  Fri Oct 15 09:10:22 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 13:10:22 +0000
Subject: [issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the
 limited C API if isinf() is not defined
In-Reply-To: <1633996280.11.0.993737910951.issue45440@roundup.psfhosted.org>
Message-ID: <1634303422.88.0.450057425601.issue45440@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27265
pull_request: https://github.com/python/cpython/pull/28977

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45440>
_______________________________________

From report at bugs.python.org  Fri Oct 15 09:21:25 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 13:21:25 +0000
Subject: [issue45482] [C API] Add PySimpleNamespace_New() function
In-Reply-To: <1634284851.38.0.689716122011.issue45482@roundup.psfhosted.org>
Message-ID: <1634304085.98.0.112161727934.issue45482@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 354c35220d25a893e502014478f6739dad6897f3 by Victor Stinner in branch 'main':
bpo-45482: Rename namespaceobject.h to pycore_namespace.h (GH-28975)
https://github.com/python/cpython/commit/354c35220d25a893e502014478f6739dad6897f3


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45482>
_______________________________________

From report at bugs.python.org  Fri Oct 15 09:22:28 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 13:22:28 +0000
Subject: [issue45482] [C API] Move _PyNamespace_New() to the internal C API
In-Reply-To: <1634284851.38.0.689716122011.issue45482@roundup.psfhosted.org>
Message-ID: <1634304148.72.0.359020302857.issue45482@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
title: [C API] Add PySimpleNamespace_New() function -> [C API] Move _PyNamespace_New() to the internal C API

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45482>
_______________________________________

From report at bugs.python.org  Fri Oct 15 09:27:03 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 13:27:03 +0000
Subject: [issue45484] test_pickle segfault on s390x RHEL7 LTO 3.x
Message-ID: <1634304423.18.0.10367404371.issue45484@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

s390x RHEL7 LTO 3.x:
https://buildbot.python.org/all/#/builders/402/builds/979

--------------------
0:02:00 load avg: 5.14 [193/427/2] test_pickletools crashed (Exit code -11) -- running: test_unparse (30.6 sec), test_concurrent_futures (1 min 56 sec), test_multiprocessing_spawn (43.2 sec)
Fatal Python error: Segmentation fault

Current thread 0x000003ffb8e77700 (most recent call first):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py", line 3304 in __getattr__
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py", line 3305 in __getattr__
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py", line 3305 in __getattr__
  (...)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py", line 3305 in __getattr__
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py", line 3305 in __getattr__
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py", line 3305 in __getattr__
  ...

Extension modules: _testcapi, _testbuffer (total: 2)
--------------------

and

--------------------
test_instance_dispatch_table (test.test_pickle.CDispatchTableTests) ... ok
test_appends_on_non_lists (test.test_pickle.CDumpPickle_LoadPickle) ... ok
test_attribute_name_interning (test.test_pickle.CDumpPickle_LoadPickle) ... ok
Fatal Python error: Segmentation fault

Current thread 0x000003ff80377700 (most recent call first):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py", line 3305 in __getattr__
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py", line 3305 in __getattr__
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py", line 3305 in __getattr__
  (...)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py", line 3305 in __getattr__
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py", line 3305 in __getattr__
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/pickletester.py", line 3305 in __getattr__
  ...

Extension modules: _testcapi, _testbuffer (total: 2)
--------------------

----------
components: Tests
messages: 404014
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_pickle segfault on s390x RHEL7 LTO 3.x
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45484>
_______________________________________

From report at bugs.python.org  Fri Oct 15 09:29:03 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 13:29:03 +0000
Subject: [issue45484] test_pickle segfault on s390x RHEL7 LTO 3.x
In-Reply-To: <1634304423.18.0.10367404371.issue45484@roundup.psfhosted.org>
Message-ID: <1634304543.41.0.942632105666.issue45484@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

It seems like pickle tests started to crash at build 936, 4 days ago:
https://buildbot.python.org/all/#/builders/402/builds/936

This build was trigged by the change:

commit fcb3d2ff633f3e9a826888d8b29c305a3959ff54
Author: Mark Shannon <mark at hotpy.org>
Date:   Mon Oct 11 11:34:02 2021 +0100

    Restore PEP 523 functionality. (GH-28871)


I don't know if the commit is related to the crash or not.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45484>
_______________________________________

From report at bugs.python.org  Fri Oct 15 09:33:49 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 15 Oct 2021 13:33:49 +0000
Subject: [issue32596] Lazy import concurrent.futures.process and thread
In-Reply-To: <1516359250.47.0.467229070634.issue32596@psf.upfronthosting.co.za>
Message-ID: <1634304829.22.0.36829176093.issue32596@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Thank you Inada-san. My first intention when I seen this code was to simplify it, but then I have found that it was an intentional change.

It may be easy to detect such code and raise a syntax warning or error. Or get rid of this limitation and allow globals officially here.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32596>
_______________________________________

From report at bugs.python.org  Fri Oct 15 09:40:35 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 15 Oct 2021 13:40:35 +0000
Subject: [issue44849] test_os: test_get_set_inheritable_o_path() failed on
 AMD64 FreeBSD Shared 3.x
In-Reply-To: <1628246446.17.0.0445752107297.issue44849@roundup.psfhosted.org>
Message-ID: <1634305235.87.0.712413971001.issue44849@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27266
pull_request: https://github.com/python/cpython/pull/28978

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44849>
_______________________________________

From report at bugs.python.org  Fri Oct 15 09:47:36 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 13:47:36 +0000
Subject: [issue45310] test_multiprocessing_forkserver:
 test_shared_memory_basics() failed with FileExistsError: [Errno 17] File
 exists: '/test01_tsmb'
In-Reply-To: <1632831738.98.0.525271172358.issue45310@roundup.psfhosted.org>
Message-ID: <1634305656.93.0.918017817578.issue45310@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27267
pull_request: https://github.com/python/cpython/pull/28979

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45310>
_______________________________________

From report at bugs.python.org  Fri Oct 15 09:53:38 2021
From: report at bugs.python.org (Ethan Furman)
Date: Fri, 15 Oct 2021 13:53:38 +0000
Subject: [issue45473] Enum: add "name" and "value" keywords to call syntax
In-Reply-To: <1634238688.3.0.350018662934.issue45473@roundup.psfhosted.org>
Message-ID: <1634306018.1.0.403366065385.issue45473@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:

> Are there any other names that you would contemplate besides `from_name` and
> `from_value`?

No.

> My reading of your response indicates that you are fundamentally opposed to
> the addition of class methods, since they would limit the space of possible
> instance methods/members.  Is that a fair reading?

Yes.

Instance methods/attributes are not an issue, though, as the instance namespace and the class namespace are distinct -- which is why we can have a `value` member even though each member has a `value` attribute.

The issue is that class methods/attributes and members (which look like attributes) all live in the class namespace, so we cannot have both a `from_value` member and a `from_value` class method in the class namespace.

> Do you agree with the fundamental issue that is identified: that the
> parenthesis/square bracket construction is difficult to read and makes
> implementation mistakes more likely?

Only partially.  Being able to easily tell the difference between round and square brackets is an important skill to have.  With enums, square brackets are akin to dictionary lookup, which uses (string) keys, and the keys of an enum are the member names; that leaves round brackets (parenthesis), which is call syntax, for value lookup.

Additionally, if the wrong syntax is used then an exception will be raised at that location, making it an easy  fix.

> One alternative to the class methods I might propose is to use a keyword
> argument in the __init__ function.
>
>    SomeEnum(name="foo")
>    SomeEnum(value="bar")
>
> This would also solve the stated problem, but I suspect that messing with the
> init function introduces more limitations to the class than the classmethod
> solution.

This idea has come up before.  I'll look into it.

----------
title: Enum add "from_name" and "from_value" class methods -> Enum: add "name" and "value" keywords to call syntax

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45473>
_______________________________________

From report at bugs.python.org  Fri Oct 15 09:59:25 2021
From: report at bugs.python.org (Freek de Kruijf)
Date: Fri, 15 Oct 2021 13:59:25 +0000
Subject: [issue45485] datetime.strptime issues message attribute of type
 'NoneType' is not callableTraceback
Message-ID: <1634306365.71.0.931982823754.issue45485@roundup.psfhosted.org>


New submission from Freek de Kruijf <f.de.kruijf at gmail.com>:

In a piece of code I have
pT = datetime.strptime(a[0],"%Y-%m-%dT%H:%M:%S.%f")
When I check type(a[0]) I got type(a[0]): <class 'str'> not <type 'str'>
In this case I get: message attribute of type 'NoneType' is not callableTraceback
When I use str(a[0]) instead of a[0], the issue is gone.
a[0] behaves elsewhere as a string without the surrounding str().
This piece of code is rather local in a larger program.

----------
components: Interpreter Core
messages: 404018
nosy: f.de.kruijf
priority: normal
severity: normal
status: open
title: datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45485>
_______________________________________

From report at bugs.python.org  Fri Oct 15 10:00:17 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 14:00:17 +0000
Subject: [issue43725] Create a release branch ABI stability regression test
In-Reply-To: <1617510913.58.0.992460597619.issue43725@roundup.psfhosted.org>
Message-ID: <1634306417.63.0.398572325477.issue43725@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> the dump needs to be generated in a docker container using the same compiler version that is used in the CI

I'm not used to docker and I don't know how to get a docker similar than the one used by GitHub Action. Is there a documentation somewhere giving commands to get the docker image and how to run it?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43725>
_______________________________________

From report at bugs.python.org  Fri Oct 15 10:06:39 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 14:06:39 +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: <1634306799.91.0.147752515485.issue43760@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 547d26aa08aa5e4ec6e4f8a5587b30b39064a5ba by Victor Stinner in branch 'main':
bpo-43760: Add PyThreadState_EnterTracing() (GH-28542)
https://github.com/python/cpython/commit/547d26aa08aa5e4ec6e4f8a5587b30b39064a5ba


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43760>
_______________________________________

From report at bugs.python.org  Fri Oct 15 10:09:41 2021
From: report at bugs.python.org (Zachary Ware)
Date: Fri, 15 Oct 2021 14:09:41 +0000
Subject: [issue45481] gc is disabled without explict calling gc.disable()
In-Reply-To: <1634283096.3.0.498579479489.issue45481@roundup.psfhosted.org>
Message-ID: <1634306981.05.0.241534644503.issue45481@roundup.psfhosted.org>


Change by Zachary Ware <zachary.ware at gmail.com>:


----------
versions:  -Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45481>
_______________________________________

From report at bugs.python.org  Fri Oct 15 10:15:21 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 15 Oct 2021 14:15:21 +0000
Subject: [issue45447] IDLE: Support syntax highlighting for .pyi stub files
In-Reply-To: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>
Message-ID: <1634307321.18.0.153307990382.issue45447@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Yes.  After this issue is done, we should open a new issue and nosy Steve Dower, who is in charge of that for Windows, and Ned Deily, in case anything should be done on mac.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Fri Oct 15 10:16:28 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Fri, 15 Oct 2021 14:16:28 +0000
Subject: [issue43725] Create a release branch ABI stability regression test
In-Reply-To: <1617510913.58.0.992460597619.issue43725@roundup.psfhosted.org>
Message-ID: <1634307388.48.0.910690214409.issue43725@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

I will add something to the devguide explaining how to do it. In any case, the RM should be ideally the one doing this because every potential ABI breakage need to be supervised by the RM (even if is a false positive).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43725>
_______________________________________

From report at bugs.python.org  Fri Oct 15 10:23:10 2021
From: report at bugs.python.org (Ronald Oussoren)
Date: Fri, 15 Oct 2021 14:23:10 +0000
Subject: [issue45447] IDLE: Support syntax highlighting for .pyi stub files
In-Reply-To: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>
Message-ID: <1634307790.51.0.494296249196.issue45447@roundup.psfhosted.org>


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

The most straightforward change for macOS is to add ?pyi? to the list of extensions in ?Mac/IDLE/IDLE.app/Contents/Info.plist?.  That way IDLE will be seen as a valid editor for .pyi files.

----------
nosy: +ronaldoussoren

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Fri Oct 15 10:31:49 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 14:31:49 +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: <1634308309.73.0.602199433177.issue43760@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> bpo-43760: Add PyThreadState_EnterTracing() (GH-28542)

I created changes to use it:

* pythoncapi_compat: https://github.com/pythoncapi/pythoncapi_compat/commit/10fde24739cab4547e9c27c31c8804a25e23e8a0
* Cython: https://github.com/cython/cython/pull/4411
* greenlet: https://github.com/python-greenlet/greenlet/pull/267

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43760>
_______________________________________

From report at bugs.python.org  Fri Oct 15 10:38:14 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 14:38:14 +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: <1634308694.42.0.343636321736.issue43760@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

PyThreadState.cframe.use_tracing format changed again: set value set to 0 or 255.
https://github.com/python/cpython/commit/bd627eb7ed08a891dd1356756feb1ce2600358e4

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43760>
_______________________________________

From report at bugs.python.org  Fri Oct 15 10:44:37 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Fri, 15 Oct 2021 14:44:37 +0000
Subject: [issue45485] datetime.strptime issues message attribute of type
 'NoneType' is not callableTraceback
In-Reply-To: <1634306365.71.0.931982823754.issue45485@roundup.psfhosted.org>
Message-ID: <1634309077.92.0.736426465703.issue45485@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

Please provide a code snippet we can run that demonstrates the problem.

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45485>
_______________________________________

From report at bugs.python.org  Fri Oct 15 10:58:34 2021
From: report at bugs.python.org (Eric Snow)
Date: Fri, 15 Oct 2021 14:58:34 +0000
Subject: [issue45486] Stop using internal APIs in _xxsubinterpretersmodule.c.
Message-ID: <1634309914.57.0.687775238283.issue45486@roundup.psfhosted.org>


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

By design, _xxsubinterpretersmodule is not supposed to be a builtin module.  As a regular extension module it should only use public (or private-but-not-internal) APIs.  In fact, I was careful to not use any internal APIs in the implementation.  However, some have crept in.  The usage of internal API should be replaced with public (or private) API.  If necessary, new API should be added.

----------
messages: 404027
nosy: eric.snow, vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: Stop using internal APIs in _xxsubinterpretersmodule.c.
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45486>
_______________________________________

From report at bugs.python.org  Fri Oct 15 11:06:27 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 15:06:27 +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: <1634310387.96.0.143863747914.issue45444@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

What is your operating system? (name/version) Did you try to build Python manually and run the test manually? How did you build Python? What are the configure flags and compiler flags?

----------
nosy: +vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45444>
_______________________________________

From report at bugs.python.org  Fri Oct 15 11:08:28 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 15:08:28 +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: <1634310508.53.0.767769846816.issue45116@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
title: Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build -> Performance regression 3.10b1: inlining issue in the big _PyEval_EvalFrameDefault() function with Visual Studio (MSC)

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45116>
_______________________________________

From report at bugs.python.org  Fri Oct 15 11:08:59 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 15 Oct 2021 15:08:59 +0000
Subject: [issue43139] test_ttk test_compound,
 test_tk test_type fail with Tk 8.6.11.1
In-Reply-To: <1612552092.14.0.798552929042.issue43139@roundup.psfhosted.org>
Message-ID: <1634310539.62.0.235356040765.issue43139@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

In Paine's failing color test, the returned tuple is The returned tuple is (0x4a48, 0x3c27, 0x8c91) versus (0x4a4a, 0x3c3c, 0x8c91), which is to say, nearly correct.  Since the tested call is 
  self._getints(self.tk.call('winfo', 'rgb', self._w, color))
either ._getints is buggy on this particular system (seems very unlikely), or root.tk.call is doing something flakey on this particular system (ditto), or the result is entirely the responsibility of tcl/tk and the test is too severe, testing tk, not our _tkinter/tkinter.

The preceding assert, which passed, is
  self.assertEqual(rgb('#F0F'), (0xFFFF, 0x0000, 0xFFFF))
Since the should that the call basically works, is the more detailed test needed for testing tkinter?

I looked at the color man page.  It says "When fewer than 16 bits are provided for each color, they represent the most significant bits of the color, while the lower unfilled bits will be repeatedly replicated from the available higher bits. For example, #3a7 is the same as #3333aaaa7777." This is 4 bits to 16. It does not give an example for 8 or 12 to 16 and this might allow some wiggle room.

Other text indicates some fuzziness in exact colors. "Tk_AllocColorFromObj returns a pointer to an XColor structure; the structure indicates the exact intensities of the allocated color (which may differ slightly from those requested, depending on the limitations of the screen)"  Perhaps this screen-specific behavior is happening here. 

Also, "They allow colors to be shared whenever possible, so that colormap space is preserved, and they pick closest available colors when colormap space is exhausted. "  Could this happen here?

test_winfo_rgb has multiple asserts.  If this one is commented out, do the rest pass?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43139>
_______________________________________

From report at bugs.python.org  Fri Oct 15 11:11:45 2021
From: report at bugs.python.org (Shivnaren Srinivasan)
Date: Fri, 15 Oct 2021 15:11:45 +0000
Subject: [issue45442] Update `Virtual Environment` tutorial
In-Reply-To: <1634035192.74.0.26138584631.issue45442@roundup.psfhosted.org>
Message-ID: <1634310705.94.0.55886270949.issue45442@roundup.psfhosted.org>


Change by Shivnaren Srinivasan <shivnaren at gmail.com>:


----------
pull_requests: +27268
pull_request: https://github.com/python/cpython/pull/28981

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45442>
_______________________________________

From report at bugs.python.org  Fri Oct 15 11:18:58 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 15:18:58 +0000
Subject: [issue30459] PyList_SET_ITEM  could be safer
In-Reply-To: <1495638852.56.0.0790136948712.issue30459@psf.upfronthosting.co.za>
Message-ID: <1634311138.52.0.765684069722.issue30459@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27269
pull_request: https://github.com/python/cpython/pull/28982

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30459>
_______________________________________

From report at bugs.python.org  Fri Oct 15 11:29:47 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 15 Oct 2021 15:29:47 +0000
Subject: [issue45447] IDLE: Support syntax highlighting for .pyi stub files
In-Reply-To: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>
Message-ID: <1634311787.57.0.0225804267884.issue45447@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Steve, how do we make it so that "Edit with IDLE" appears when right-clicking on a .pyi file in Windows explorer?  As easy as on mac (see Ronald's answer above)?

----------
nosy: +steve.dower

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Fri Oct 15 11:30:45 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Fri, 15 Oct 2021 15:30:45 +0000
Subject: [issue45483] pure Python class that has been registered as a
 `collections.abc.Sequence` can't be recgnized by the match statement without
 the `_abc` module
In-Reply-To: <1634302783.77.0.196268254173.issue45483@roundup.psfhosted.org>
Message-ID: <1634311845.22.0.411727651379.issue45483@roundup.psfhosted.org>


Change by Raymond Hettinger <raymond.hettinger at gmail.com>:


----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45483>
_______________________________________

From report at bugs.python.org  Fri Oct 15 11:35:49 2021
From: report at bugs.python.org (Ned Deily)
Date: Fri, 15 Oct 2021 15:35:49 +0000
Subject: [issue45480] Missing link(s) to the "Python Module Index" page
In-Reply-To: <1634282264.33.0.0720790922492.issue45480@roundup.psfhosted.org>
Message-ID: <1634312149.28.0.768957496294.issue45480@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

> I think https://github.com/python/pythondotorg/issues is the correct place to report issues with the web site.

In this case, it has to do with how the docs are generated with Sphinx and the source for them is in the cpython repo. You can see the problem if you build the docs yourself and open them in a browser.

----------
nosy: +mdk, ned.deily

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45480>
_______________________________________

From report at bugs.python.org  Fri Oct 15 11:37:06 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Fri, 15 Oct 2021 15:37:06 +0000
Subject: [issue45480] Missing link(s) to the "Python Module Index" page
In-Reply-To: <1634282264.33.0.0720790922492.issue45480@roundup.psfhosted.org>
Message-ID: <1634312226.91.0.865872367193.issue45480@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

Thanks for the correction, Ned!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45480>
_______________________________________

From report at bugs.python.org  Fri Oct 15 11:41:08 2021
From: report at bugs.python.org (Richard)
Date: Fri, 15 Oct 2021 15:41:08 +0000
Subject: [issue45487] SSLEOFError regression with certain servers in Python
 3.10
Message-ID: <1634312468.77.0.966089091529.issue45487@roundup.psfhosted.org>


New submission from Richard <nyuszika7h at gmail.com>:

Starting in Python 3.10, TLS connections to certain servers (e.g. websocket-cs.vudu.com:443) are failing when it worked fine on Python 3.9 and earlier on the same system.


Minimal working example:

```
#!/usr/bin/env python3

import socket
import ssl

HOST = 'websocket-cs.vudu.com'
PORT = 443

sock = socket.create_connection((HOST, PORT))
ctx = ssl.create_default_context()
ssock = ctx.wrap_socket(sock, server_hostname=HOST)
print("Connection successful")
```


Output:
```
? python3.9 ssl_eof_test.py
Connection successful

? python3.10 ssl_eof_test.py
Traceback (most recent call last):
  File "/home/nyuszika7h/ssl_eof_test.py", line 11, in <module>
    ssock = ctx.wrap_socket(sock, server_hostname=HOST)
  File "/home/nyuszika7h/.pyenv/versions/3.10.0/lib/python3.10/ssl.py", line 512, in wrap_socket
    return self.sslsocket_class._create(
  File "/home/nyuszika7h/.pyenv/versions/3.10.0/lib/python3.10/ssl.py", line 1070, in _create
    self.do_handshake()
  File "/home/nyuszika7h/.pyenv/versions/3.10.0/lib/python3.10/ssl.py", line 1341, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997)

? python3.11 ssl_eof_test.py
Traceback (most recent call last):
  File "/home/nyuszika7h/ssl_eof_test.py", line 11, in <module>
    ssock = ctx.wrap_socket(sock, server_hostname=HOST)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyuszika7h/.pyenv/versions/3.11-dev/lib/python3.11/ssl.py", line 517, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nyuszika7h/.pyenv/versions/3.11-dev/lib/python3.11/ssl.py", line 1075, in _create
    self.do_handshake()
    ^^^^^^^^^^^^^^^^^^^
  File "/home/nyuszika7h/.pyenv/versions/3.11-dev/lib/python3.11/ssl.py", line 1346, in do_handshake
    self._sslobj.do_handshake()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:998)
```


System information:

```
? uname -a
Linux cadoth 5.10.0-8-amd64 #1 SMP Debian 5.10.46-5 (2021-09-23) x86_64 GNU/Linux

? lsb_release -d
Description:    Debian GNU/Linux 11 (bullseye)

? openssl version
OpenSSL 1.1.1k  25 Mar 2021

? python3.9 -VV
Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
[GCC 10.2.1 20210110]

? python3.10 -VV
Python 3.10.0 (default, Oct  5 2021, 00:24:29) [GCC 10.2.1 20210110]

? python3.11 -VV
Python 3.11.0a1+ (heads/main:547d26aa08, Oct 15 2021, 17:35:52) [GCC 10.2.1 20210110]

? python3.9 -c 'import ssl; print(ssl.OPENSSL_VERSION)'
OpenSSL 1.1.1k  25 Mar 2021

? python3.10 -c 'import ssl; print(ssl.OPENSSL_VERSION)'
OpenSSL 1.1.1k  25 Mar 2021

? python3.11 -c 'import ssl; print(ssl.OPENSSL_VERSION)'
OpenSSL 1.1.1k  25 Mar 2021
```

----------
assignee: christian.heimes
components: SSL
messages: 404033
nosy: christian.heimes, nyuszika7h
priority: normal
severity: normal
status: open
title: SSLEOFError regression with certain servers in Python 3.10
type: behavior
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45487>
_______________________________________

From report at bugs.python.org  Fri Oct 15 11:42:40 2021
From: report at bugs.python.org (Richard)
Date: Fri, 15 Oct 2021 15:42:40 +0000
Subject: [issue45487] SSLEOFError regression with certain servers in Python
 3.10
In-Reply-To: <1634312468.77.0.966089091529.issue45487@roundup.psfhosted.org>
Message-ID: <1634312560.05.0.923604146225.issue45487@roundup.psfhosted.org>


Richard <nyuszika7h at gmail.com> added the comment:

Note that the same happens with pyenv-compiled Python 3.9.7 (same way as I compiled 3.10 and 3.11), to rule out issues with different installation methods:

```
? python3.9 -VV
Python 3.9.7 (default, Oct  8 2021, 10:30:22) 
[GCC 10.2.1 20210110]
```

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45487>
_______________________________________

From report at bugs.python.org  Fri Oct 15 11:43:39 2021
From: report at bugs.python.org (Richard)
Date: Fri, 15 Oct 2021 15:43:39 +0000
Subject: [issue45487] SSLEOFError regression with certain servers in Python
 3.10
In-Reply-To: <1634312468.77.0.966089091529.issue45487@roundup.psfhosted.org>
Message-ID: <1634312619.86.0.959502899956.issue45487@roundup.psfhosted.org>


Richard <nyuszika7h at gmail.com> added the comment:

Sorry, I mean it works fine with Python 3.9.2 from apt as well as Python 3.9.7 from pyenv. But 3.10.0 and 3.11-dev from pyenv are broken.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45487>
_______________________________________

From report at bugs.python.org  Fri Oct 15 12:07:46 2021
From: report at bugs.python.org (Ethan Furman)
Date: Fri, 15 Oct 2021 16:07:46 +0000
Subject: [issue45417] Enum creation non-linear in the number of values
In-Reply-To: <1633737153.71.0.819400116811.issue45417@roundup.psfhosted.org>
Message-ID: <1634314066.52.0.328183331324.issue45417@roundup.psfhosted.org>


Change by Ethan Furman <ethan at stoneleaf.us>:


----------
assignee:  -> ethan.furman
stage: patch review -> backport needed
versions:  -Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45417>
_______________________________________

From report at bugs.python.org  Fri Oct 15 12:17:44 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Fri, 15 Oct 2021 16:17:44 +0000
Subject: [issue42222] Modernize integer test/conversion in randrange()
In-Reply-To: <1604165232.15.0.0916383458838.issue42222@roundup.psfhosted.org>
Message-ID: <1634314664.54.0.0778911161935.issue42222@roundup.psfhosted.org>


Change by Raymond Hettinger <raymond.hettinger at gmail.com>:


----------
pull_requests: +27270
pull_request: https://github.com/python/cpython/pull/28983

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42222>
_______________________________________

From report at bugs.python.org  Fri Oct 15 12:25:23 2021
From: report at bugs.python.org (The Guy)
Date: Fri, 15 Oct 2021 16:25:23 +0000
Subject: [issue45488] Powershell Commands no Longer Recognised
Message-ID: <1634315123.49.0.821466530777.issue45488@roundup.psfhosted.org>


New submission from The Guy <julienbloxerk at gmail.com>:

I am using pyinstaller to port my python programs into windows executables so that I can distribute them among my friends, and I recently assigned python to my windows PATH (I'm still not 100% sure what that means so idk if im even saying that right) and now a large amount of my computers basic powershell commands are no longer recognized; trying to use the cmd cmdlet i am only met with the "not recognized as the name of a cmdlet, function, or operable program" error. I've checked the internet pretty extensively and I haven't found anything that works, if you know what's going on or have any ideas on how to fix it, any help would be greatly appreciated. 
P.S. I am an amateur programmer and I just started dipping my toes into python, so I apologize if I don't give enough/correct information, I am still very new to this and am happy to answer questions as needed. Also sorry if this is the wrong place to ask about these kinds of issues, idk where else to ask. (pls be nice im new)

----------
assignee: docs at python
components: Documentation, Windows
messages: 404036
nosy: docs at python, julienbloxerk, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Powershell Commands no Longer Recognised
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45488>
_______________________________________

From report at bugs.python.org  Fri Oct 15 12:37:31 2021
From: report at bugs.python.org (Bobbey Reese)
Date: Fri, 15 Oct 2021 16:37:31 +0000
Subject: [issue45489] ForwardRef does not support | operator
Message-ID: <1634315851.69.0.0714715298786.issue45489@roundup.psfhosted.org>


New submission from Bobbey Reese <bobbeyreese at gmail.com>:

Not positive this is a bug, but it seems like ForwardRef should support the pipe (|) operator for indicating Unions in Python 3.10:

Python 3.10.0 (default, Oct  4 2021, 22:09:55) [GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from typing import ForwardRef
>>> ForwardRef('asdf') | ForwardRef('fdsa')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for |: 'ForwardRef' and 'ForwardRef'
>>> int | str
int | str
>>>

----------
messages: 404037
nosy: bobbeyreese
priority: normal
severity: normal
status: open
title: ForwardRef does not support | operator
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45489>
_______________________________________

From report at bugs.python.org  Fri Oct 15 13:43:25 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 17:43:25 +0000
Subject: [issue45490] [meta][C API] Avoid C macro pitfalls and usage of static
 inline functions
Message-ID: <1634319805.82.0.902360778503.issue45490@roundup.psfhosted.org>


New submission from STINNER Victor <vstinner at python.org>:

C macros are really cool and useful, but there are a bunch of pitfalls which are better to avoid:
https://gcc.gnu.org/onlinedocs/cpp/Macro-Pitfalls.html

Some macros of the Python C API have been converted to static inline functions over the last years. It went smoothly, I am not aware of any major issue with these conversions.

This meta issue tracks other issues related to macros and static inline functions.


=== Return void ===

One issue is that some macros are treated as an expression and can be reused, whereas it was not intended. For example PyList_SET_ITEM() was implemented as (simplified code):

  #define PyList_SET_ITEM(op, i, v) (op->ob_item[i] = v)

This expression has a value! Two projects used this value by mistake, like:

  "if (obj == NULL || PyList_SET_ITEM (l, i, obj) < 0)"

PyList_SET_ITEM() was fixed by casting the expression to void:

  #define PyList_SET_ITEM(op, i, v) ((void)(op->ob_item[i] = v))

=> bpo-30459



=== Abuse macros as an l-value ===

The Py_TYPE() macro could be used to assign a value: "Py_TYPE(obj) = new_type".

The macro was defined as:

  #define Py_TYPE(ob) (ob->ob_type)

It was converted to a static inline function to disallow using it as an l-value and a new Py_SET_TYPE(op, new_type) function was added. These changes give more freedom to other Python implementations to implement "PyObject" and Py_SET_TYPE().

=> bpo-45476 "[C API] Disallow using PyFloat_AS_DOUBLE() as l-value"
=> bpo-39573 PyObject Py_TYPE/Py_SET_TYPE


=== C API: Macros and embedded Python ===

Sadly, only symbols exported by libpython are accessible to other programming languages embedding Python. Macros of the Python C API are simply not available to them. Projects embedding Python have to hardcode constants and copy macros to their own language, with the risk of being outdated when Python macros are updated.

Even some projects written in C cannot use macros, because they only use libpython symbols. The vim text editor embeds Python this way.

Also, macros are simply excluded from the Python stable ABI (PEP 384).


=== Performance of static inline functions ===

In bpo-45116, it seems like _PyEval_EvalFrameDefault() reached Visual Studio thresholds and some static inline functions are no longer inlined (Py_INCREF/Py_DECREF).

I also noticed that when Python is built in debug mode in Visual Studio, static inline functions are not inlined. Well, the compiler is free to not inline in debug mode. I guess that GCC and clang also skip inlining using -Og and/or -O0 optimization levels. Using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds was discussed in bpo-45094, but the idea was rejected.

On the other side, sometimes it's better to *disable* inlining on purpose to reduce the stack memory consumption, using the Py_NO_INLINE macro. See recent measurements of the stack memory usage:
https://bugs.python.org/issue45439#msg403768

In GH-28893, I noticed that converting a static inline function (PyObject_CallOneArg) to a regular function made it faster. I am not really sure, more benchmarks should be run to really what's going on.


=== Advantages of static inline functions ===

* It's possible to put a breakpoint on a static inline functions.

* Debuggers and profilers are able to get the static inline function names from the machine line, even with inline functions.

* Parameters and the return value have well defined types.

* Variables have a local scope.

* There is no risk of evaluating an expression multiple times.

* Regular C code. No need to use "\" character to multi-line statement. No need for "do { ... } while (0)" and other quicks to workaround preprocessor pitfalls. No abuse of (((parenthesis))).

----------
components: C API
messages: 404038
nosy: vstinner
priority: normal
severity: normal
status: open
title: [meta][C API] Avoid C macro pitfalls and usage of static inline functions
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45490>
_______________________________________

From report at bugs.python.org  Fri Oct 15 13:44:08 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 17:44:08 +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: <1634319848.28.0.641383321413.issue45476@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I created bpo-45490: "[meta][C API] Avoid C macro pitfalls and usage of static inline functions" to discuss macros and static inline functions more generally.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45476>
_______________________________________

From report at bugs.python.org  Fri Oct 15 13:44:05 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 15 Oct 2021 17:44:05 +0000
Subject: [issue12872] --with-tsc crashes on ppc64
In-Reply-To: <1314827484.72.0.601008700485.issue12872@psf.upfronthosting.co.za>
Message-ID: <1634319845.09.0.735211032339.issue12872@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
stage: patch review -> resolved
status: pending -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue12872>
_______________________________________

From report at bugs.python.org  Fri Oct 15 13:44:47 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 17:44:47 +0000
Subject: [issue30459] PyList_SET_ITEM  could be safer
In-Reply-To: <1495638852.56.0.0790136948712.issue30459@psf.upfronthosting.co.za>
Message-ID: <1634319887.7.0.650099681932.issue30459@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 51f8196d05f0e271358eee0f90fe044b20449fb5 by Victor Stinner in branch 'main':
bpo-30459: Use (void) in macros setting variables (GH-28982)
https://github.com/python/cpython/commit/51f8196d05f0e271358eee0f90fe044b20449fb5


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30459>
_______________________________________

From report at bugs.python.org  Fri Oct 15 13:45:37 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 15 Oct 2021 17:45:37 +0000
Subject: [issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the
 limited C API if isinf() is not defined
In-Reply-To: <1633996280.11.0.993737910951.issue45440@roundup.psfhosted.org>
Message-ID: <1634319937.93.0.358423208156.issue45440@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 00ffc4513df7b89a168e88da4d1e3ac367f7682f by Victor Stinner in branch 'main':
bpo-45440: Remove pymath.c fallbacks (GH-28977)
https://github.com/python/cpython/commit/00ffc4513df7b89a168e88da4d1e3ac367f7682f


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45440>
_______________________________________

From report at bugs.python.org  Fri Oct 15 13:49:06 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 15 Oct 2021 17:49:06 +0000
Subject: [issue45195] test_readline: test_nonascii() failed on aarch64 RHEL8
 Refleaks 3.x
In-Reply-To: <1631618041.01.0.810175030001.issue45195@roundup.psfhosted.org>
Message-ID: <1634320146.68.0.428565339906.issue45195@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27271
pull_request: https://github.com/python/cpython/pull/28984

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45195>
_______________________________________

From report at bugs.python.org  Fri Oct 15 14:35:55 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Fri, 15 Oct 2021 18:35:55 +0000
Subject: [issue45379] Improve errors related to frozen modules.
In-Reply-To: <1633449120.03.0.98563217148.issue45379@roundup.psfhosted.org>
Message-ID: <1634322955.73.0.0134471336206.issue45379@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
nosy: +FFY00

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45379>
_______________________________________

From report at bugs.python.org  Fri Oct 15 14:35:48 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Fri, 15 Oct 2021 18:35:48 +0000
Subject: [issue45486] Stop using internal APIs in _xxsubinterpretersmodule.c.
In-Reply-To: <1634309914.57.0.687775238283.issue45486@roundup.psfhosted.org>
Message-ID: <1634322948.18.0.803515565572.issue45486@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
nosy: +FFY00

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45486>
_______________________________________

From report at bugs.python.org  Fri Oct 15 15:01:09 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Fri, 15 Oct 2021 19:01:09 +0000
Subject: [issue45427] importlib.readers.MultiplexedPath
In-Reply-To: <1633932362.03.0.000713660770349.issue45427@roundup.psfhosted.org>
Message-ID: <1634324469.68.0.917299723335.issue45427@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

The Traversable protocol does not guarantee you access to the file-system path. pathlib.Path happens to give you that information, but other traversables are not required to.

The main reasoning for this is that traversables do not need to exist on the file-system, we can be reading from a zip, database, etc.

str(path) does give you the file-system path on pathlib.Path, but there is no guarantee about the value of __str__ on other traversables.
My recommendation here would be to use os.fspath[1] instead if you want to try getting the file-system path from traversables.

I don't really know what you are trying to accomplish, but I would recommend that you try designing your code directly on top of the Traversable interface, which should make it work on anything we return in importlib.resources.files.
If you actually need a file-system path, to pass to an external program or something like that, you can use the importlib.resources.as_file[2] helper.

bpo-44200 proposes documenting that traversables should implement __fspath__ if they represent a file-system path, which could help a bit with your issue.

[1] https://docs.python.org/3/library/os.html#os.fspath
[2] https://docs.python.org/3/library/importlib.html#importlib.resources.as_file

----------
nosy: +FFY00, jaraco

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45427>
_______________________________________

From report at bugs.python.org  Fri Oct 15 15:04:40 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Fri, 15 Oct 2021 19:04:40 +0000
Subject: [issue45427] importlib.readers.MultiplexedPath
In-Reply-To: <1633932362.03.0.000713660770349.issue45427@roundup.psfhosted.org>
Message-ID: <1634324680.51.0.327029279136.issue45427@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

Just to clarify, as I realize I did point this out in my reply, Traversable[1][2] is the protocol that objects returned by importlib.resources.files implement.

[1] https://docs.python.org/3/library/importlib.html#importlib.abc.Traversable
[2] https://github.com/python/cpython/blob/00ffc4513df7b89a168e88da4d1e3ac367f7682f/Lib/importlib/abc.py#L355

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45427>
_______________________________________

From report at bugs.python.org  Fri Oct 15 15:09:56 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Fri, 15 Oct 2021 19:09:56 +0000
Subject: [issue45427] importlib.readers.MultiplexedPath
In-Reply-To: <1633932362.03.0.000713660770349.issue45427@roundup.psfhosted.org>
Message-ID: <1634324995.99.0.94319322122.issue45427@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

*realize I did *not* point this out

:facepalm: sorry!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45427>
_______________________________________

From report at bugs.python.org  Fri Oct 15 15:18:44 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Fri, 15 Oct 2021 19:18:44 +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: <6bc6e186-d1dd-51b8-1a80-b8d9b24af8cd@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

Meta comment :-) ... wouldn't it be better to enable the Github wiki feature for
such collections ?

----------
nosy: +lemburg

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45490>
_______________________________________

From report at bugs.python.org  Fri Oct 15 16:12:29 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 15 Oct 2021 20:12:29 +0000
Subject: [issue43139] test_ttk test_compound,
 test_tk test_type fail with Tk 8.6.11.1
In-Reply-To: <1612552092.14.0.798552929042.issue43139@roundup.psfhosted.org>
Message-ID: <1634328749.76.0.961959370249.issue43139@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

See PR 6578. We already faced a similar problem when test_winfo_rgb was added. We finally found test colors which behave consistently on all tested platforms. But it turns out that not on all.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43139>
_______________________________________

From report at bugs.python.org  Fri Oct 15 16:35:41 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 15 Oct 2021 20:35:41 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634330141.0.0.435534957139.issue45229@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27272
pull_request: https://github.com/python/cpython/pull/28986

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Fri Oct 15 17:13:38 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Fri, 15 Oct 2021 21:13:38 +0000
Subject: [issue45445] Fail if an invalid -X option is provided
In-Reply-To: <1634045986.72.0.556620578821.issue45445@roundup.psfhosted.org>
Message-ID: <1634332418.76.0.255452820545.issue45445@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45445>
_______________________________________

From report at bugs.python.org  Fri Oct 15 17:20:21 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Fri, 15 Oct 2021 21:20:21 +0000
Subject: [issue42174] shutil.get_terminal_size() returns 0 when run in a pty
In-Reply-To: <1603816351.29.0.440046743483.issue42174@roundup.psfhosted.org>
Message-ID: <1634332821.55.0.991626915287.issue42174@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
nosy: +FFY00

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42174>
_______________________________________

From report at bugs.python.org  Fri Oct 15 17:23:07 2021
From: report at bugs.python.org (Freek de Kruijf)
Date: Fri, 15 Oct 2021 21:23:07 +0000
Subject: [issue45485] datetime.strptime issues message attribute of type
 'NoneType' is not callableTraceback
In-Reply-To: <1634306365.71.0.931982823754.issue45485@roundup.psfhosted.org>
Message-ID: <1634332987.4.0.152738145832.issue45485@roundup.psfhosted.org>


Freek de Kruijf <f.de.kruijf at gmail.com> added the comment:

The python program is called from a surrounding system called domoticz. I will include the python program.

----------
Added file: https://bugs.python.org/file50360/plugin.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45485>
_______________________________________

From report at bugs.python.org  Fri Oct 15 17:24:29 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 15 Oct 2021 21:24:29 +0000
Subject: [issue45442] Update `Virtual Environment` tutorial
In-Reply-To: <1634035192.74.0.26138584631.issue45442@roundup.psfhosted.org>
Message-ID: <1634333069.87.0.636740352258.issue45442@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 11b2ae7f5bc0e7ebbfe944bb746a0b3dfcd7ff43 by srinivasan in branch 'main':
bpo-45442: Add deactivate step to venv tutorial. (GH-28981)
https://github.com/python/cpython/commit/11b2ae7f5bc0e7ebbfe944bb746a0b3dfcd7ff43


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45442>
_______________________________________

From report at bugs.python.org  Fri Oct 15 17:28:49 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Fri, 15 Oct 2021 21:28:49 +0000
Subject: [issue45485] datetime.strptime issues message attribute of type
 'NoneType' is not callableTraceback
In-Reply-To: <1634306365.71.0.931982823754.issue45485@roundup.psfhosted.org>
Message-ID: <1634333329.41.0.112371971456.issue45485@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

If you want us to check if there's a bug in Python here, please reduce this to 5 or 10 lines, with no external dependencies. As it is, we cannot run this code.

You also need to show how you run the program, what version of Python you're using, and what system you're running this on.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45485>
_______________________________________

From report at bugs.python.org  Fri Oct 15 17:29:28 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Fri, 15 Oct 2021 21:29:28 +0000
Subject: [issue45491] help() is too noisy for types used like functions
Message-ID: <1634333368.34.0.317512316582.issue45491@roundup.psfhosted.org>


New submission from Raymond Hettinger <raymond.hettinger at gmail.com>:

When someone requests help(range), help(zip), help(property), or help(classmethod), the expectation and need is to see something like what is shown in main documentation rather than being subjected to a listing of every standard dunder method.

It would be nice to have a way to mark types that are mostly used like functions so that help() output will be more focused and less noisy.  Then help() can omit the Methods and Static methods sections.  It would keep the section for non-standard descriptors such as start, stop, step, fget, fset, or fdel.

Alternatively, for all types, we can condense the Methods and Static Methods sections to just list the standard dunder methods rather that eating several rows of output per method.

----------
components: Library (Lib)
messages: 404050
nosy: rhettinger
priority: normal
severity: normal
status: open
title: help() is too noisy for types used like functions
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45491>
_______________________________________

From report at bugs.python.org  Fri Oct 15 17:35:17 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Fri, 15 Oct 2021 21:35:17 +0000
Subject: =?utf-8?b?W2lzc3VlNDUxMzFdIGB2ZW52YCDihpIgYGVuc3VyZXBpcGAgbWF5IHJlYWQg?=
 =?utf-8?q?local_=60setup=2Ecfg=60_and_fail_mysteriously?=
In-Reply-To: <1631038521.89.0.222056793507.issue45131@roundup.psfhosted.org>
Message-ID: <1634333717.14.0.197281137737.issue45131@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
nosy: +dstufft, ncoghlan, pradyunsg

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45131>
_______________________________________

From report at bugs.python.org  Fri Oct 15 17:39:30 2021
From: report at bugs.python.org (Eryk Sun)
Date: Fri, 15 Oct 2021 21:39:30 +0000
Subject: [issue45488] Powershell Commands no Longer Recognised
In-Reply-To: <1634315123.49.0.821466530777.issue45488@roundup.psfhosted.org>
Message-ID: <1634333970.75.0.900769787298.issue45488@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

This tracker is for issues with the Python language and standard library. You can ask for help with configuration problems on the Users discussion forum:

https://discuss.python.org/c/users/7

----------
nosy: +eryksun
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45488>
_______________________________________

From report at bugs.python.org  Fri Oct 15 17:39:44 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Fri, 15 Oct 2021 21:39:44 +0000
Subject: [issue45445] Fail if an invalid -X option is provided
In-Reply-To: <1634045986.72.0.556620578821.issue45445@roundup.psfhosted.org>
Message-ID: <1634333984.4.0.821638199382.issue45445@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

I'm opening this again as, this is still not finished as we want to still extend the initialization API to allow a non static string to improve the error message.

In general, the protocol is to ask if there is something else to be done before closing (and giving it some time before closing if nobody answers) :)

----------
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45445>
_______________________________________

From report at bugs.python.org  Fri Oct 15 17:44:43 2021
From: report at bugs.python.org (Freek de Kruijf)
Date: Fri, 15 Oct 2021 21:44:43 +0000
Subject: [issue45485] datetime.strptime issues message attribute of type
 'NoneType' is not callableTraceback
In-Reply-To: <1634306365.71.0.931982823754.issue45485@roundup.psfhosted.org>
Message-ID: <1634334283.87.0.0949206205672.issue45485@roundup.psfhosted.org>


Freek de Kruijf <f.de.kruijf at gmail.com> added the comment:

When I try it in a few lines, there is no problem. So it is an issue in this bigger context with class definitions.
In the few lines type(a[0]) reports <type 'str'>; in the bigger context type(a[0]) reports <class 'str?>. I have no idea how to reduce this issue in a few lines. It must have to do with the use of class in the bigger program, I assume. I found a workaround, so it up to you to analyze this further. I have only a vary basic knowledge about Python.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45485>
_______________________________________

From report at bugs.python.org  Fri Oct 15 17:48:23 2021
From: report at bugs.python.org (Freek de Kruijf)
Date: Fri, 15 Oct 2021 21:48:23 +0000
Subject: [issue45485] datetime.strptime issues message attribute of type
 'NoneType' is not callableTraceback
In-Reply-To: <1634306365.71.0.931982823754.issue45485@roundup.psfhosted.org>
Message-ID: <1634334503.04.0.932127727772.issue45485@roundup.psfhosted.org>


Freek de Kruijf <f.de.kruijf at gmail.com> added the comment:

About what version of Python is used, I don't know. Both 2.7.18 and 3.6.12 are installed. I use the program on a Raspberry Pi 4B with openSUSE Leap 15.3.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45485>
_______________________________________

From report at bugs.python.org  Fri Oct 15 17:53:08 2021
From: report at bugs.python.org (Freek de Kruijf)
Date: Fri, 15 Oct 2021 21:53:08 +0000
Subject: [issue45485] datetime.strptime issues message attribute of type
 'NoneType' is not callableTraceback
In-Reply-To: <1634306365.71.0.931982823754.issue45485@roundup.psfhosted.org>
Message-ID: <1634334788.45.0.766447973377.issue45485@roundup.psfhosted.org>


Freek de Kruijf <f.de.kruijf at gmail.com> added the comment:

The content of a[0] is something like '2021-10-15T15:02:11.486'

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45485>
_______________________________________

From report at bugs.python.org  Fri Oct 15 18:03:41 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Fri, 15 Oct 2021 22:03:41 +0000
Subject: [issue45485] datetime.strptime issues message attribute of type
 'NoneType' is not callableTraceback
In-Reply-To: <1634306365.71.0.931982823754.issue45485@roundup.psfhosted.org>
Message-ID: <1634335421.9.0.510074476084.issue45485@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

It sounds like you're using python 2.7, which is unsupported.

You've not even shown us what line produces the error you're seeing. I don't see "type(a[0])" anywhere in the code you posted.

Lacking a way to reproduce this on our own with python 3.x, I'm going to have to close this issue.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45485>
_______________________________________

From report at bugs.python.org  Fri Oct 15 18:06:36 2021
From: report at bugs.python.org (Eric Snow)
Date: Fri, 15 Oct 2021 22:06:36 +0000
Subject: [issue35081] Move internal headers to Include/internal/
In-Reply-To: <1634291797.37.0.120181737378.issue35081@roundup.psfhosted.org>
Message-ID: <CALFfu7Ai7B_GqQnxo07O0K6eDfZCbRXwT3ofh98NB37P3CjYuA@mail.gmail.com>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

On Fri, Oct 15, 2021 at 3:56 AM STINNER Victor <report at bugs.python.org> wrote:
> New changeset 063abd931f064a4b6b478b0b6e9aa13ee38d2cff by Victor Stinner in branch 'main':
> bpo-35081: Move interpreteridobject.h to Include/internal/ (GH-28969)

FYI, _xxsubinterpretersmodule is supposed to be an extension module
(not builtin), so it's not meant to use internal APIs.  At some point
that happened and I only noticed now.  I've created bpo-45486 to
address that.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35081>
_______________________________________

From report at bugs.python.org  Fri Oct 15 18:14:32 2021
From: report at bugs.python.org (=?utf-8?b?0KDQvtC80LDQvSDQlNC+0L3Rh9C10L3QutC+?=)
Date: Fri, 15 Oct 2021 22:14:32 +0000
Subject: [issue45465] logging messages are needlessly reformatted for every
 handler
In-Reply-To: <1634164787.38.0.59547649385.issue45465@roundup.psfhosted.org>
Message-ID: <1634336072.77.0.370288077478.issue45465@roundup.psfhosted.org>


????? ???????? <dpb at corrigendum.ru> added the comment:

But message formatting is controlled by the record, not by the handler. The same record will always be formatted the same way (assuming that getMessage is deterministic, which seems like a fair assumption).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45465>
_______________________________________

From report at bugs.python.org  Fri Oct 15 19:31:13 2021
From: report at bugs.python.org (Eric Snow)
Date: Fri, 15 Oct 2021 23:31:13 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <1633551663.5.0.531821025802.issue45395@roundup.psfhosted.org>
Message-ID: <1634340673.74.0.0592710372571.issue45395@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

@MAL, who's maintaining Tools/freeze?  I'm not aware of who's using it (other than you, of course).  It looks like PyRun isn't compatible with anything newer than 3.5, so it seems like that isn't verifying that Tools/freeze still works.  Neither does it have tests that run in the test suite (nor on buildbots).

So could Tools/freeze have been broken for a while?  I ask because I haven't been able to get it work work on the master branch (or on 3.10).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Fri Oct 15 19:59:54 2021
From: report at bugs.python.org (Vinay Sajip)
Date: Fri, 15 Oct 2021 23:59:54 +0000
Subject: [issue45465] logging messages are needlessly reformatted for every
 handler
In-Reply-To: <1634164787.38.0.59547649385.issue45465@roundup.psfhosted.org>
Message-ID: <1634342394.14.0.152157380935.issue45465@roundup.psfhosted.org>


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

Oh, I see what you mean now - I was thinking of the overall message formatted using a formatter. However, filters can still change a record's attributes and getMessage() could behave differently on different calls because of this. Changing things in this area could break existing code.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45465>
_______________________________________

From report at bugs.python.org  Fri Oct 15 22:26:15 2021
From: report at bugs.python.org (Inada Naoki)
Date: Sat, 16 Oct 2021 02:26:15 +0000
Subject: [issue45475] gzip fails to read a gzipped file (ValueError: readline
 of closed file)
In-Reply-To: <1634245921.58.0.043840382812.issue45475@roundup.psfhosted.org>
Message-ID: <1634351175.62.0.998862148811.issue45475@roundup.psfhosted.org>


Inada Naoki <songofacandy at gmail.com> added the comment:

>>> ll = [l for l in gzip.GzipFile(filename='data/UTF-8-test_for_gzip.txt.gz')]

This is bad code pattern because you don't close the file explicitly.
Actually, the error caused by the optimization thet iter(GzipFile) returns underlaying faster iterator that don't have reference to the GzipFile. So GzipFile.__del__ close the file.

Although this is caused by bad code pattern, I must admit this is a regression.
We need to call slow Python function for each lines instead of using fast C iterator...

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45475>
_______________________________________

From report at bugs.python.org  Fri Oct 15 22:31:06 2021
From: report at bugs.python.org (tongxiaoge)
Date: Sat, 16 Oct 2021 02:31:06 +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: <1634351466.6.0.321138425033.issue45444@roundup.psfhosted.org>


tongxiaoge <shixuantong at huawei.com> 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:

1?python3 Lib/test/test_concurrent_futures.py

2?python3 -m test test_concurrent_futures

The test cases are all passed, but I can reproduce the problem in other people's container environment. I suspect it is related to the environment configuration, but I don't know what it is related to?

Please refer to the attachment for some log information and python3.spec files used for build.

----------
Added file: https://bugs.python.org/file50361/log_and_spec_file.rar

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45444>
_______________________________________

From report at bugs.python.org  Fri Oct 15 22:56:54 2021
From: report at bugs.python.org (tongxiaoge)
Date: Sat, 16 Oct 2021 02:56:54 +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: <1634353014.61.0.788167421676.issue45444@roundup.psfhosted.org>


tongxiaoge <shixuantong at huawei.com> added the comment:

I compared the log and found that  test_socket.HAVE_SOCKET_QIPCRTR is false in x86_ 64, and the value is true in the build log on the aarch64 architecture. I don't know whether it is related to this value.

----------
Added file: https://bugs.python.org/file50362/log.rar

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45444>
_______________________________________

From report at bugs.python.org  Sat Oct 16 04:49:07 2021
From: report at bugs.python.org (Freek de Kruijf)
Date: Sat, 16 Oct 2021 08:49:07 +0000
Subject: [issue45485] datetime.strptime issues message attribute of type
 'NoneType' is not callableTraceback
In-Reply-To: <1634335421.9.0.510074476084.issue45485@roundup.psfhosted.org>
Message-ID: <2117178.yXezIbnKmT@eiktum>


Freek de Kruijf <f.de.kruijf at gmail.com> added the comment:

Op zaterdag 16 oktober 2021 00:03:41 CEST schreef u:
> Eric V. Smith <eric at trueblade.com> added the comment:
> 
> It sounds like you're using python 2.7, which is unsupported.
> 
> You've not even shown us what line produces the error you're seeing. I don't
> see "type(a[0])" anywhere in the code you posted.
> 
> Lacking a way to reproduce this on our own with python 3.x, I'm going to
> have to close this issue.

I am sorry I can't be of more help.

-- 
fr.gr.

Freek de Kruijf

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45485>
_______________________________________

From report at bugs.python.org  Sat Oct 16 05:44:14 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Sat, 16 Oct 2021 09:44:14 +0000
Subject: [issue45485] datetime.strptime issues message attribute of type
 'NoneType' is not callableTraceback
In-Reply-To: <1634306365.71.0.931982823754.issue45485@roundup.psfhosted.org>
Message-ID: <1634377454.19.0.583345449112.issue45485@roundup.psfhosted.org>


Change by Eric V. Smith <eric at trueblade.com>:


----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45485>
_______________________________________

From report at bugs.python.org  Sat Oct 16 05:47:18 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 16 Oct 2021 09:47:18 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634377638.05.0.214872916379.issue45452@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

I've done my PoC in my local environment.

```
import dbm.gnu as dbm
db = dbm.open('x.db', 'nx')
db.gdbm_failure_atomic('even_snapshot.bin', 'odd_snapshot.bin')
for k, v in zip('abcdef', 'ghijkl'):
    db[k] = v
    db.sync()
db.close()
```

By doing this in local fs both snapshot files are created and it can be used for recovery x.db file.

gdbmtool> snapshot even_snapshot.bin odd_snapshot.bin
GDBM_SNAPSHOT_OK: Selected the most recent snapshot.
odd_snapshot.bin: 400 r-------- 1634377177.462498326 6

you can use odd_snapshot.bin as the last successful snapshot file.

>>> import dbm.gnu as dbm
>>> db = dbm.open('odd_snapshot.bin', 'r')
>>> db.keys()
[b'c', b'f', b'a', b'd', b'b', b'e']

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Sat Oct 16 05:51:50 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 16 Oct 2021 09:51:50 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634377910.73.0.736818465591.issue45452@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

So IMHO, those APIs are not that low-level API since they only need to create a file with 'x' flag and then calling gdbm_failure_atomic API.

and if the user failed to save the file due to several accidents.
They can easily restore the local file DB by using the latest valid snapshot.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Sat Oct 16 06:20:05 2021
From: report at bugs.python.org (Julien Palard)
Date: Sat, 16 Oct 2021 10:20:05 +0000
Subject: [issue42238] Deprecate suspicious.py?
In-Reply-To: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org>
Message-ID: <1634379605.79.0.293476459154.issue42238@roundup.psfhosted.org>


Julien Palard <julien+python at palard.fr> added the comment:

DING DING DING DING DING DING, a new one today, and a true positive for `make suspicious`, fixed in:

https://github.com/python/cpython/pull/28988/files

(along with the test added to rstlint)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42238>
_______________________________________

From report at bugs.python.org  Sat Oct 16 06:45:28 2021
From: report at bugs.python.org (Dutcho)
Date: Sat, 16 Oct 2021 10:45:28 +0000
Subject: [issue45492] stdlib inspect documentation on code.co_names is
 incorrect
Message-ID: <1634381128.63.0.689395571563.issue45492@roundup.psfhosted.org>


New submission from Dutcho <dutcho at ziggo.nl>:

The standard library documentation on module inspect starts with an overview of types and attributes. This overview (in all Python versions) states:
    code.co_names: tuple of names of local variables
    code.co_varnames: tuple of names of arguments and local variables
That suggests the argument names are set(code.co_varnames) - set(code.co_names), which is incorrect.

I think the attribute description should be:
    code.co_names: tuple of names of used global and built-in variables

>>> def f(x): a = 1; print(f, a)
>>> assert f.__code__.co_varnames == ('x', 'a')  # argument and local, in that order
>>> assert set(f.__code__.co_names) == set(('f', 'print'))  # global and built-in (don't care order), not local

----------
assignee: docs at python
components: Documentation
messages: 404068
nosy: Dutcho, docs at python
priority: normal
severity: normal
status: open
title: stdlib inspect documentation on code.co_names is incorrect
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45492>
_______________________________________

From report at bugs.python.org  Sat Oct 16 06:58:57 2021
From: report at bugs.python.org (Dutcho)
Date: Sat, 16 Oct 2021 10:58:57 +0000
Subject: [issue45493] str() and repr() of enum different in Python 3.11 from
 from Python <= 3.10
Message-ID: <1634381937.08.0.264995167777.issue45493@roundup.psfhosted.org>


New submission from Dutcho <dutcho at ziggo.nl>:

See below example, which shows Python 3.11 repr(enum) == Python 3.10 str(enum).

The enum module documentation lists various enhancements in 3.11, but not this.
And the what's new? documentation of 3.11 doesn't mention enum at all.

Either this is by intent, and then should be documented incl. breaking old code depending on representation, or is by accident, and then merits fixing (which is what alphas are for).

> py -3.10 enum_test.py
3.10.0 (tags/v3.10.0:b494f59, Oct  4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)]
ABC.a ABC.b ABC.c ABC.a <ABC.a: 1>

> py -3.11 enum_test.py
3.11.0a1 (tags/v3.11.0a1:7c12e48, Oct  5 2021, 15:38:19) [MSC v.1929 64 bit (AMD64)]
a b c a ABC.a

> more enum_test.py
import enum
import sys


class ABC(enum.Enum):
    a = enum.auto()
    b = enum.auto()
    c = enum.auto()


print(sys.version)
print(*ABC, str(ABC.a), repr(ABC.a))

----------
components: Library (Lib)
messages: 404069
nosy: Dutcho
priority: normal
severity: normal
status: open
title: str() and repr() of enum different in Python 3.11 from from Python <= 3.10
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45493>
_______________________________________

From report at bugs.python.org  Sat Oct 16 07:01:05 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Sat, 16 Oct 2021 11:01:05 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <1634340673.74.0.0592710372571.issue45395@roundup.psfhosted.org>
Message-ID: <e81aadd1-9c82-7e90-084b-c7a0ff568a20@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 16.10.2021 01:31, Eric Snow wrote:
> 
> @MAL, who's maintaining Tools/freeze?  I'm not aware of who's using it (other than you, of course).  It looks like PyRun isn't compatible with anything newer than 3.5, so it seems like that isn't verifying that Tools/freeze still works.  Neither does it have tests that run in the test suite (nor on buildbots).
> 
> So could Tools/freeze have been broken for a while?  I ask because I haven't been able to get it work work on the master branch (or on 3.10).

I don't know who maintains it, but it's been working fine up until Python 3.8,
which is the last version I ported PyRun to.

There have also been a couple of patches going into the freeze tool, so this is
still on the radar of at least some people other than me. It's also one of the
oldest tools we have in Python and dates back to the early days of Python. Guido
wrote the initial version.

I can try to port PyRun to 3.9 and 3.10 to see whether I run into any issues.
Would that help ?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Sat Oct 16 07:20:03 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 16 Oct 2021 11:20:03 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <1633551663.5.0.531821025802.issue45395@roundup.psfhosted.org>
Message-ID: <1634383203.23.0.360311208707.issue45395@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Sat Oct 16 07:44:00 2021
From: report at bugs.python.org (Dutcho)
Date: Sat, 16 Oct 2021 11:44:00 +0000
Subject: [issue45493] str() and repr() of enum different in Python 3.11 from
 Python <= 3.10
In-Reply-To: <1634381937.08.0.264995167777.issue45493@roundup.psfhosted.org>
Message-ID: <1634384640.37.0.985070520321.issue45493@roundup.psfhosted.org>


Change by Dutcho <dutcho at ziggo.nl>:


----------
title: str() and repr() of enum different in Python 3.11 from from Python <= 3.10 -> str() and repr() of enum different in Python 3.11 from Python <= 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45493>
_______________________________________

From report at bugs.python.org  Sat Oct 16 07:43:56 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 11:43:56 +0000
Subject: [issue45420] Python 3.10 final installation failure
In-Reply-To: <1633828108.74.0.92443333438.issue45420@roundup.psfhosted.org>
Message-ID: <1634384636.31.0.722443382497.issue45420@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Did you delete the old installation in the old location first?

----------
nosy: +terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45420>
_______________________________________

From report at bugs.python.org  Sat Oct 16 07:49:20 2021
From: report at bugs.python.org (Dutcho)
Date: Sat, 16 Oct 2021 11:49:20 +0000
Subject: [issue45493] str() and repr() of enum different in Python 3.11 from
 Python <= 3.10
In-Reply-To: <1634381937.08.0.264995167777.issue45493@roundup.psfhosted.org>
Message-ID: <1634384960.08.0.346102270696.issue45493@roundup.psfhosted.org>


Dutcho <dutcho at ziggo.nl> added the comment:

perhaps related to https://bugs.python.org/issue44559 ?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45493>
_______________________________________

From report at bugs.python.org  Sat Oct 16 07:51:07 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 11:51:07 +0000
Subject: [issue45425] There is an error in the Chinese documentation of
 contextlib.AbstractContextManager
In-Reply-To: <1633914837.36.0.697960733933.issue45425@roundup.psfhosted.org>
Message-ID: <1634385067.2.0.156007679516.issue45425@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I believe that translation errors should be reported elsewhere, but I do not see anything in https://docs.python.org/3/bugs.html.  Adding something to the English version of that doc would be covered here.  Julien?

----------
nosy: +mdk, terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45425>
_______________________________________

From report at bugs.python.org  Sat Oct 16 07:59:45 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 11:59:45 +0000
Subject: [issue45450] Improve syntax error for parenthesized arguments
In-Reply-To: <1634059257.61.0.643840687035.issue45450@roundup.psfhosted.org>
Message-ID: <1634385585.68.0.70748471394.issue45450@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I suggest "Lambda expression parameters ...".  Keep "Function parameters ..." for the other.

Note that the first error is adding invalid outer parens, whereas the second is adding inner parens for sublist.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45450>
_______________________________________

From report at bugs.python.org  Sat Oct 16 08:07:27 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 12:07:27 +0000
Subject: [issue45463] Document that # of identifiers allowed in global stmt is
 plural
In-Reply-To: <1634147643.19.0.48482298028.issue45463@roundup.psfhosted.org>
Message-ID: <1634386047.15.0.222970592489.issue45463@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
stage:  -> patch review
title: Documentation inconsistency on the number of identifiers allowed in global stmt -> Document that # of identifiers allowed in global stmt is plural
versions: +Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45463>
_______________________________________

From report at bugs.python.org  Sat Oct 16 08:16:41 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 12:16:41 +0000
Subject: [issue45464] TypeError when inheriting from both OSError and
 AttributeError
In-Reply-To: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
Message-ID: <1634386601.74.0.696364350204.issue45464@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Suggestion: At the end of https://docs.python.org/3/bugs.html, add

"Creating a subclass that inherits from multiple exceptions may not work and the potential conflicts may change in new versions."

----------
assignee:  -> docs at python
components: +Documentation
nosy: +docs at python, terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45464>
_______________________________________

From report at bugs.python.org  Sat Oct 16 08:25:31 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 12:25:31 +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: <1634387131.39.0.690068848652.issue45466@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Posting the idea to python-ideas list might generate interest and ideas.

----------
nosy: +terry.reedy
stage:  -> test needed
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45466>
_______________________________________

From report at bugs.python.org  Sat Oct 16 08:53:09 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 12:53:09 +0000
Subject: [issue45489] ForwardRef does not support | operator
In-Reply-To: <1634315851.69.0.0714715298786.issue45489@roundup.psfhosted.org>
Message-ID: <1634388789.49.0.479725884054.issue45489@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
nosy: +gvanrossum, kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45489>
_______________________________________

From report at bugs.python.org  Sat Oct 16 08:55:22 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 12:55:22 +0000
Subject: [issue45463] Document that # of identifiers allowed in global stmt is
 plural
In-Reply-To: <1634147643.19.0.48482298028.issue45463@roundup.psfhosted.org>
Message-ID: <1634388922.33.0.831364336267.issue45463@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:


New changeset 4ecd119b007cb766b8bede2dc78b70d29cd932dd by Luca Chiodini in branch 'main':
bpo-45463: Clarify that global statements allows multiple names (GH-28851)
https://github.com/python/cpython/commit/4ecd119b007cb766b8bede2dc78b70d29cd932dd


----------
nosy: +terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45463>
_______________________________________

From report at bugs.python.org  Sat Oct 16 08:55:39 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 16 Oct 2021 12:55:39 +0000
Subject: [issue45463] Document that # of identifiers allowed in global stmt is
 plural
In-Reply-To: <1634147643.19.0.48482298028.issue45463@roundup.psfhosted.org>
Message-ID: <1634388939.2.0.787221387052.issue45463@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27274
pull_request: https://github.com/python/cpython/pull/28990

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45463>
_______________________________________

From report at bugs.python.org  Sat Oct 16 08:55:35 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 16 Oct 2021 12:55:35 +0000
Subject: [issue45463] Document that # of identifiers allowed in global stmt is
 plural
In-Reply-To: <1634147643.19.0.48482298028.issue45463@roundup.psfhosted.org>
Message-ID: <1634388935.05.0.635240883167.issue45463@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
keywords: +patch
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27273
pull_request: https://github.com/python/cpython/pull/28989

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45463>
_______________________________________

From report at bugs.python.org  Sat Oct 16 09:37:12 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 16 Oct 2021 13:37:12 +0000
Subject: [issue45489] ForwardRef does not support | operator
In-Reply-To: <1634315851.69.0.0714715298786.issue45489@roundup.psfhosted.org>
Message-ID: <1634391432.56.0.38696896488.issue45489@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45489>
_______________________________________

From report at bugs.python.org  Sat Oct 16 09:43:34 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 16 Oct 2021 13:43:34 +0000
Subject: [issue45489] ForwardRef does not support | operator
In-Reply-To: <1634315851.69.0.0714715298786.issue45489@roundup.psfhosted.org>
Message-ID: <1634391814.27.0.892958821982.issue45489@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -719,6 +719,12 @@ def __eq__(self, other):
     def __hash__(self):
         return hash(self.__forward_arg__)

+    def __or__(self, other):
+        return Union[self, other]
+
+    def __ror__(self, other):
+        return Union[other, self]
+
     def __repr__(self):
         return f'ForwardRef({self.__forward_arg__!r})'

This can be easily fixed, but I am waiting for guido and ken to check whether this is an intentioned operation.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45489>
_______________________________________

From report at bugs.python.org  Sat Oct 16 09:45:17 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 16 Oct 2021 13:45:17 +0000
Subject: [issue45489] ForwardRef does not support | operator
In-Reply-To: <1634315851.69.0.0714715298786.issue45489@roundup.psfhosted.org>
Message-ID: <1634391917.68.0.94427386019.issue45489@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45489>
_______________________________________

From report at bugs.python.org  Sat Oct 16 10:01:22 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 14:01:22 +0000
Subject: [issue45463] Document that # of identifiers allowed in global stmt is
 plural
In-Reply-To: <1634147643.19.0.48482298028.issue45463@roundup.psfhosted.org>
Message-ID: <1634392882.0.0.933343740307.issue45463@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:


New changeset ac1b7a3319f268487c310ac7449703193f5eddad by Miss Islington (bot) in branch '3.9':
[3.9]bpo-45463: Clarify that global statements allows multiple names (GH-28851) (GH-28990)
https://github.com/python/cpython/commit/ac1b7a3319f268487c310ac7449703193f5eddad


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45463>
_______________________________________

From report at bugs.python.org  Sat Oct 16 10:01:58 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 14:01:58 +0000
Subject: [issue45463] Document that # of identifiers allowed in global stmt is
 plural
In-Reply-To: <1634147643.19.0.48482298028.issue45463@roundup.psfhosted.org>
Message-ID: <1634392918.61.0.398189010403.issue45463@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:


New changeset 855d6247adb39d4e38b698b89e519587318abd80 by Miss Islington (bot) in branch '3.10':
[3.10]bpo-45463: Clarify that global statements allows multiple names (GH-28851) (GH-28989)
https://github.com/python/cpython/commit/855d6247adb39d4e38b698b89e519587318abd80


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45463>
_______________________________________

From report at bugs.python.org  Sat Oct 16 10:02:47 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 14:02:47 +0000
Subject: [issue45463] Document that # of identifiers allowed in global stmt is
 plural
In-Reply-To: <1634147643.19.0.48482298028.issue45463@roundup.psfhosted.org>
Message-ID: <1634392967.57.0.659864631835.issue45463@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Thanks for the ready-to-go patch.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45463>
_______________________________________

From report at bugs.python.org  Sat Oct 16 10:24:17 2021
From: report at bugs.python.org (Ammar Askar)
Date: Sat, 16 Oct 2021 14:24:17 +0000
Subject: [issue45494] [fuzzer] Parser null deref with continuation characters
 and generator parenthesis error
Message-ID: <1634394257.16.0.767966008926.issue45494@roundup.psfhosted.org>


New submission from Ammar Askar <ammar at ammaraskar.com>:

Another parser crash found by the fuzzer:

"\
"(1for c in I,\
\

Recreator:

>>> import ast
>>> ast.literal_eval('"\\\n"(1for c in I,\\\n\\')
[1]    17916 segmentation fault  ./python

>>> import ast
>>> ast.literal_eval(r'''
... "\
... "(1for c in I,\
... \ ''')
[1]    17935 segmentation fault  ./python


-------------------
Raw ASAN stacktrace
-------------------

	==1668==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000001 (pc 0x7f4157e5e08c bp 0x7fffbd48b300 sp 0x7fffbd48aab8 T0)
==1668==The signal is caused by a READ memory access.
==1668==Hint: address points to the zero page.
    #0 0x7f4157e5e08c in strchr-avx2.S:57 /build/glibc-eX1tMB/glibc-2.31/sysdeps/x86_64/multiarch/strchr-avx2.S:57
    #1 0x4d7a88 in strchr /src/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:0
    #2 0x9fa6f5 in get_error_line cpython3/Parser/pegen.c:406:25
    #3 0x9fa6f5 in _PyPegen_raise_error_known_location cpython3/Parser/pegen.c:497:26
    #4 0xa18a92 in RAISE_ERROR_KNOWN_LOCATION cpython3/Parser/pegen.h:169:5
    #5 0xa331d5 in invalid_arguments_rule cpython3/Parser/parser.c:17831:20
    #6 0xa21a87 in arguments_rule cpython3/Parser/parser.c:15462:38
    #7 0xa2056b in primary_raw cpython3/Parser/parser.c:12867:18
    #8 0xa2056b in primary_rule cpython3/Parser/parser.c:12745:22
    #9 0xa1f9cd in await_primary_rule cpython3/Parser/parser.c:12700:28
    #10 0xa1f119 in power_rule cpython3/Parser/parser.c:12578:18
    #11 0xa1eabc in factor_rule cpython3/Parser/parser.c:12530:26
    #12 0xa1dc04 in term_raw cpython3/Parser/parser.c:12373:27
    #13 0xa1dc04 in term_rule cpython3/Parser/parser.c:12138:22
    #14 0xa1c899 in sum_raw cpython3/Parser/parser.c:12093:25
    #15 0xa1c899 in sum_rule cpython3/Parser/parser.c:11975:22
    #16 0xa1bb99 in shift_expr_raw cpython3/Parser/parser.c:11936:24
    #17 0xa1bb99 in shift_expr_rule cpython3/Parser/parser.c:11818:22
    #18 0xa1af2c in bitwise_and_raw cpython3/Parser/parser.c:11779:31
    #19 0xa1af2c in bitwise_and_rule cpython3/Parser/parser.c:11700:22
    #20 0xa1a49c in bitwise_xor_raw cpython3/Parser/parser.c:11661:32
    #21 0xa1a49c in bitwise_xor_rule cpython3/Parser/parser.c:11582:22
    #22 0xa1917c in bitwise_or_raw cpython3/Parser/parser.c:11543:32
    #23 0xa1917c in bitwise_or_rule cpython3/Parser/parser.c:11464:22
    #24 0xa2cd39 in comparison_rule cpython3/Parser/parser.c:10727:18
    #25 0xa2c912 in inversion_rule cpython3/Parser/parser.c:10680:31
    #26 0xa2b951 in conjunction_rule cpython3/Parser/parser.c:10559:18
    #27 0xa258e1 in disjunction_rule cpython3/Parser/parser.c:10473:18
    #28 0xa17cb1 in invalid_expression_rule cpython3/Parser/parser.c:18253:18
    #29 0xa17cb1 in expression_rule cpython3/Parser/parser.c:9754:39
    #30 0xa56979 in expressions_rule cpython3/Parser/parser.c:9628:18
    #31 0xa0acf5 in eval_rule cpython3/Parser/parser.c:1035:18
    #32 0xa0acf5 in _PyPegen_parse cpython3/Parser/parser.c:33076:18
    #33 0xa001a5 in _PyPegen_run_parser cpython3/Parser/pegen.c:1350:9
    #34 0xa01fa5 in _PyPegen_run_parser_from_string cpython3/Parser/pegen.c:1482:14
    #35 0xa80fc9 in _PyParser_ASTFromString cpython3/Parser/peg_api.c:14:21
    #36 0x8611ca in Py_CompileStringObject cpython3/Python/pythonrun.c:1371:11
    #37 0xc04a8f in builtin_compile_impl cpython3/Python/bltinmodule.c:842:14
    #38 0xc04a8f in builtin_compile cpython3/Python/clinic/bltinmodule.c.h:249:20
    #39 0xb78ade in cfunction_vectorcall_FASTCALL_KEYWORDS cpython3/Objects/methodobject.c:446:24
    #40 0x57c0ec in _PyObject_VectorcallTstate cpython3/Include/internal/pycore_call.h:89:11
    #41 0x57c0ec in PyObject_Vectorcall cpython3/Objects/call.c:298:12
    #42 0x766191 in call_function cpython3/Python/ceval.c:6619:13
    #43 0x748137 in _PyEval_EvalFrameDefault cpython3/Python/ceval.c:4734:19
    #44 0x741ae4 in _PyEval_EvalFrame cpython3/Include/internal/pycore_ceval.h:48:16
    #45 0x741ae4 in _PyEval_Vector cpython3/Python/ceval.c:5810:24
    #46 0x57cb50 in _PyFunction_Vectorcall cpython3/Objects/call.c:0
    #47 0x57c0ec in _PyObject_VectorcallTstate cpython3/Include/internal/pycore_call.h:89:11
    #48 0x57c0ec in PyObject_Vectorcall cpython3/Objects/call.c:298:12
    #49 0x766191 in call_function cpython3/Python/ceval.c:6619:13
    #50 0x748137 in _PyEval_EvalFrameDefault cpython3/Python/ceval.c:4734:19
    #51 0x741ae4 in _PyEval_EvalFrame cpython3/Include/internal/pycore_ceval.h:48:16
    #52 0x741ae4 in _PyEval_Vector cpython3/Python/ceval.c:5810:24
    #53 0x57cb50 in _PyFunction_Vectorcall cpython3/Objects/call.c:0
    #54 0x57c920 in _PyObject_VectorcallTstate cpython3/Include/internal/pycore_call.h:89:11
    #55 0x57c920 in PyObject_CallOneArg cpython3/Objects/call.c:375:12
    #56 0x579d18 in fuzz_ast_literal_eval cpython3/Modules/_xxtestfuzz/fuzzer.c:425:25
    #57 0x579d18 in _run_fuzz cpython3/Modules/_xxtestfuzz/fuzzer.c:443:14
    #58 0x579d18 in LLVMFuzzerTestOneInput cpython3/Modules/_xxtestfuzz/fuzzer.c:565:11
    #59 0x472623 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) cxa_noexception.cpp:0
    #60 0x45ded2 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:324:6
    #61 0x463985 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) cxa_noexception.cpp:0
    #62 0x48c672 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #63 0x7f4157cfa0b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/libc-start.c:308:16
    #64 0x43b16d in _start

----------
components: Parser
messages: 404082
nosy: ammar2, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: [fuzzer] Parser null deref with continuation characters and generator parenthesis error
type: crash
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45494>
_______________________________________

From report at bugs.python.org  Sat Oct 16 10:24:45 2021
From: report at bugs.python.org (Julien Palard)
Date: Sat, 16 Oct 2021 14:24:45 +0000
Subject: [issue45495] IDLE: Add match and case
Message-ID: <1634394285.54.0.829596302519.issue45495@roundup.psfhosted.org>


New submission from Julien Palard <julien+python at palard.fr>:

In IDLE, when hitting Ctrl-space on `matc` or `cas`, there's no completion to `match` and `case.

References: https://mail.python.org/archives/list/docs at python.org/thread/DRZIHLQU25JUD7IQKCOIIKI4ADB746MA/

----------
assignee: terry.reedy
components: IDLE
messages: 404083
nosy: mdk, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Add match and case
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45495>
_______________________________________

From report at bugs.python.org  Sat Oct 16 10:31:07 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Sat, 16 Oct 2021 14:31:07 +0000
Subject: [issue45489] ForwardRef does not support | operator
In-Reply-To: <1634315851.69.0.0714715298786.issue45489@roundup.psfhosted.org>
Message-ID: <1634394667.24.0.991530546101.issue45489@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

I suppose this is useful for programs that use runtime annotations (e.g. pydantic?). I don?t mind adding this.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45489>
_______________________________________

From report at bugs.python.org  Sat Oct 16 10:47:49 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 16 Oct 2021 14:47:49 +0000
Subject: [issue45489] ForwardRef does not support | operator
In-Reply-To: <1634315851.69.0.0714715298786.issue45489@roundup.psfhosted.org>
Message-ID: <1634395669.66.0.682548698223.issue45489@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
keywords: +patch
pull_requests: +27275
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28991

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45489>
_______________________________________

From report at bugs.python.org  Sat Oct 16 10:48:33 2021
From: report at bugs.python.org (Ken Jin)
Date: Sat, 16 Oct 2021 14:48:33 +0000
Subject: [issue45489] ForwardRef does not support | operator
In-Reply-To: <1634315851.69.0.0714715298786.issue45489@roundup.psfhosted.org>
Message-ID: <1634395713.06.0.993048506775.issue45489@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

ForwardRef is for internal use, and writing ForwardRef('fdsa') is discouraged, as the docs say:

   This class should not be instantiated by a user.

However, I don't see any cons from adding union support, so let's do it!

Note that a workaround exists for OP's example. But it may not be sufficient for complex runtime libraries:

ForwardRef('asdf | fdsa')

----------
stage: patch review -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45489>
_______________________________________

From report at bugs.python.org  Sat Oct 16 11:13:06 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 16 Oct 2021 15:13:06 +0000
Subject: [issue45489] ForwardRef does not support | operator
In-Reply-To: <1634315851.69.0.0714715298786.issue45489@roundup.psfhosted.org>
Message-ID: <1634397186.58.0.055605051274.issue45489@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset 15ad52fbf607b6ccec44a38a8a32a5f1fad635ee by Dong-hee Na in branch 'main':
bpo-45489: Update ForwardRef to support | operator. (GH-28991)
https://github.com/python/cpython/commit/15ad52fbf607b6ccec44a38a8a32a5f1fad635ee


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45489>
_______________________________________

From report at bugs.python.org  Sat Oct 16 11:15:16 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 16 Oct 2021 15:15:16 +0000
Subject: [issue45489] ForwardRef does not support | operator
In-Reply-To: <1634315851.69.0.0714715298786.issue45489@roundup.psfhosted.org>
Message-ID: <1634397316.31.0.730259635128.issue45489@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

@guido

Do we need to create a backport for 3.10?
Ken and I are waiting for your comment :)
https://github.com/python/cpython/pull/28991#issuecomment-944926933

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45489>
_______________________________________

From report at bugs.python.org  Sat Oct 16 11:16:58 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sat, 16 Oct 2021 15:16:58 +0000
Subject: [issue42222] Modernize integer test/conversion in randrange()
In-Reply-To: <1604165232.15.0.0916383458838.issue42222@roundup.psfhosted.org>
Message-ID: <1634397418.3.0.110257279076.issue42222@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:


New changeset 5afa0a411243210a30526c7459a0ccff5cb88494 by Raymond Hettinger in branch 'main':
bpo-42222: Remove deprecated support for non-integer values (GH-28983)
https://github.com/python/cpython/commit/5afa0a411243210a30526c7459a0ccff5cb88494


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42222>
_______________________________________

From report at bugs.python.org  Sat Oct 16 11:26:06 2021
From: report at bugs.python.org (neonene)
Date: Sat, 16 Oct 2021 15:26:06 +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: <1634397966.41.0.0665737379238.issue45116@roundup.psfhosted.org>


neonene <nicesalmon at gmail.com> added the comment:

msg402954
>https://github.com/faster-cpython/tools

According to the suggested stats and pgomgr.exe, I experimentally moved LOAD_FAST and LOAD_CONST cases out of switch as below.

        if (opcode == LOAD_FAST) {
            ...
            DISPATCH();
        }

        if (opcode == LOAD_CONST) {
            ...
            DISPATCH();
        }

        switch (opcode) {


x64 performance results after patched (msvc2019)

Good inliner ver.
    3.10.0+    1.03x faster than before
    28d28e0~1  1.04x faster
    3.8.12     1.03x faster

Bad inliner ver. (too big evalfunc. Has msvc2022 increased the capacity?)
    3.10.0/rc2 1.00x faster
    3.11a1+    1.02x faster


It seems to me since quite a while ago the optimizer has stopped at some place after successful inlining. So the performance may be sensitive to code changes and it could be possible to detect where the optimization is aborted.

(Benchmarks: switch-case_unarranged_bench.txt)

----------
Added file: https://bugs.python.org/file50363/switch-case_unarranged_bench.txt

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45116>
_______________________________________

From report at bugs.python.org  Sat Oct 16 11:39:38 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Sat, 16 Oct 2021 15:39:38 +0000
Subject: [issue45489] ForwardRef does not support | operator
In-Reply-To: <1634315851.69.0.0714715298786.issue45489@roundup.psfhosted.org>
Message-ID: <1634398778.39.0.86541786586.issue45489@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

No. :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45489>
_______________________________________

From report at bugs.python.org  Sat Oct 16 11:43:32 2021
From: report at bugs.python.org (Ken Jin)
Date: Sat, 16 Oct 2021 15:43:32 +0000
Subject: [issue45489] ForwardRef does not support | operator
In-Reply-To: <1634315851.69.0.0714715298786.issue45489@roundup.psfhosted.org>
Message-ID: <1634399012.76.0.418790741672.issue45489@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

Thanks @corona10 for the patch.

@bobbeyreese
The new behavior is available in 3.11 and up. 3.10.x won't be supporting the | operator.

----------
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions:  -Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45489>
_______________________________________

From report at bugs.python.org  Sat Oct 16 12:03:27 2021
From: report at bugs.python.org (wyz23x2)
Date: Sat, 16 Oct 2021 16:03:27 +0000
Subject: [issue45420] Python 3.10 final installation failure
In-Reply-To: <1633828108.74.0.92443333438.issue45420@roundup.psfhosted.org>
Message-ID: <1634400207.03.0.439287281663.issue45420@roundup.psfhosted.org>


wyz23x2 <wyz23x2 at 163.com> added the comment:

I did.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45420>
_______________________________________

From report at bugs.python.org  Sat Oct 16 12:13:00 2021
From: report at bugs.python.org (Steve Dower)
Date: Sat, 16 Oct 2021 16:13:00 +0000
Subject: [issue45420] Python 3.10 final installation failure
In-Reply-To: <1633828108.74.0.92443333438.issue45420@roundup.psfhosted.org>
Message-ID: <1634400780.64.0.628892748783.issue45420@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

You probably need to also select the "Install for All Users" checkbox, rather than just updating the target path. Running as admin *technically* gives you the ability to write to those locations, but it also implies that nobody except Admin should be able to access it. Choosing the proper option should do it correctly.

This kind of issue can also arise when you directly delete the install, rather than uninstalling it. Best thing to do if you can is to run a repair through the Add Remove Programs entry, and then uninstall it (this is because ensurepip needs a working install to uninstall itself... not ideal, but that's how it was added). Then you should be able to do the proper install.

However, if it was previously installed for All Users, then switching the option in your new install might be able to handle it. Trying to upgrade from per-user to all users seems to hit issues sometimes.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45420>
_______________________________________

From report at bugs.python.org  Sat Oct 16 12:25:46 2021
From: report at bugs.python.org (Steve Dower)
Date: Sat, 16 Oct 2021 16:25:46 +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: <1634401546.33.0.528314050212.issue30082@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

Had a look. The change looks fine, just needs a NEWS entry, which I suggested as:

Adds new `force_hide` argument to :mod:`subprocess` functions. This passes ``SW_HIDE`` to the new process, which most applications will use to not display any window even if they normally would.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Sat Oct 16 12:26:21 2021
From: report at bugs.python.org (Steve Dower)
Date: Sat, 16 Oct 2021 16:26:21 +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: <1634401581.57.0.806753777947.issue30082@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

That 'force_hide' in the NEWS shouldn't have single backticks. Make them ``double``, or the docs won't compile.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Sat Oct 16 12:27:32 2021
From: report at bugs.python.org (Sourish Basu)
Date: Sat, 16 Oct 2021 16:27:32 +0000
Subject: [issue45477] configure script cannot detect float word ordering on
 linux
In-Reply-To: <1634246393.25.0.871269149475.issue45477@roundup.psfhosted.org>
Message-ID: <1634401652.31.0.211485406784.issue45477@roundup.psfhosted.org>


Sourish Basu <sourish.basu at gmail.com> added the comment:

See attached my config log.

When I tried to compile conftest.c with 'icc -c conftest.c', it produced 'conftest.o' without any errors.

----------
Added file: https://bugs.python.org/file50364/config.log

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45477>
_______________________________________

From report at bugs.python.org  Sat Oct 16 12:29:00 2021
From: report at bugs.python.org (E. Paine)
Date: Sat, 16 Oct 2021 16:29:00 +0000
Subject: [issue45496] Tkinter: test_winfo_rgb failure
Message-ID: <1634401740.26.0.645054867141.issue45496@roundup.psfhosted.org>


New submission from E. Paine <xepaine13 at gmail.com>:

This issue is to separately address the test_winfo_rgb failure reported by myself in #43139. This issue does not currently affect any of the buildbots.

---

On one computer I am experiencing a problem with the test_winfo_rgb test:

======================================================================
FAIL: test_winfo_rgb (tkinter.test.test_tkinter.test_misc.MiscTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/cpython/Lib/tkinter/test/test_tkinter/test_misc.py", line 213, in test_winfo_rgb
    self.assertEqual(rgb('#4a3c8c'), (0x4a4a, 0x3c3c, 0x8c8c))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (19016, 15399, 35985) != (19018, 15420, 35980)

First differing element 0:
19016
19018

- (19016, 15399, 35985)
?      ^    ^^^      ^

+ (19018, 15420, 35980)
?      ^    ^^^      ^

I have tested another computer with a very similar setup (Plasma on X11) with exactly the same monitor (both using HDMI) and it passed this test. The only notable difference is one computer is using Intel integrated graphics while the other is Nvidia.

----------
components: Tests, Tkinter
messages: 404097
nosy: epaine, serhiy.storchaka, terry.reedy
priority: normal
severity: normal
status: open
title: Tkinter: test_winfo_rgb failure
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45496>
_______________________________________

From report at bugs.python.org  Sat Oct 16 12:29:26 2021
From: report at bugs.python.org (E. Paine)
Date: Sat, 16 Oct 2021 16:29:26 +0000
Subject: [issue43139] test_ttk test_compound,
 test_tk test_type fail with Tk 8.6.11.1
In-Reply-To: <1612552092.14.0.798552929042.issue43139@roundup.psfhosted.org>
Message-ID: <1634401766.12.0.116016551982.issue43139@roundup.psfhosted.org>


E. Paine <xepaine13 at gmail.com> added the comment:

> I need to do more research into exactly what versions / platforms are affected.

There is something non-trivial about this test failure. I have now tested another computer with a very similar setup (Plasma on X11) with exactly the same monitor (both using HDMI) and it passed this test. The only notable difference is one computer is using Intel integrated graphics while the other is Nvidia.

> If this one is commented out, do the rest pass?

No. The test for #dede14143939 also fails:
- (57050, 5122, 14630)
+ (57054, 5140, 14649)

---

I've opened #45496 for this test failure so we can focus on the `AssertionError`s originally reported in this issue.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43139>
_______________________________________

From report at bugs.python.org  Sat Oct 16 12:31:13 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sat, 16 Oct 2021 16:31:13 +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: <1634401873.86.0.575894771637.issue45494@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
keywords: +patch
pull_requests: +27276
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28993

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45494>
_______________________________________

From report at bugs.python.org  Sat Oct 16 12:31:46 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sat, 16 Oct 2021 16:31:46 +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: <1634401906.43.0.562943877257.issue45494@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Presto!! PR 28993

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45494>
_______________________________________

From report at bugs.python.org  Sat Oct 16 12:34:21 2021
From: report at bugs.python.org (Steve Dower)
Date: Sat, 16 Oct 2021 16:34:21 +0000
Subject: [issue45447] IDLE: Support syntax highlighting for .pyi stub files
In-Reply-To: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>
Message-ID: <1634402061.49.0.624543424045.issue45447@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

Bit more complicated. It'll need changes to Tools/msi/launcher/launcher_reg.wxs, Tools/msi/tcltk/tcltk_reg.wxs, and PC/layout/support/appxmanifest.py, but I don't think it's that obvious where (we don't want these files to open with py.exe by default, so they'll need a whole new definition).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Sat Oct 16 12:44:15 2021
From: report at bugs.python.org (E. Paine)
Date: Sat, 16 Oct 2021 16:44:15 +0000
Subject: [issue38867] Enable Tkinter on Windows ARM
In-Reply-To: <1574271681.28.0.800107532571.issue38867@roundup.psfhosted.org>
Message-ID: <1634402655.87.0.085542880687.issue38867@roundup.psfhosted.org>


E. Paine <xepaine13 at gmail.com> added the comment:

Does Tk 8.6.11 support WoA? I can't see anything mentioning it...

----------
nosy: +epaine

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38867>
_______________________________________

From report at bugs.python.org  Sat Oct 16 12:54:34 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sat, 16 Oct 2021 16:54:34 +0000
Subject: [issue45447] IDLE: Support syntax highlighting for .pyi stub files
In-Reply-To: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>
Message-ID: <1634403274.35.0.325128543132.issue45447@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

Shall I add the change to the mac file to my PR, or would it be better to leave it for a separate PR? (I'm not confident enough to make the changes to the Windows files.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Sat Oct 16 13:27:56 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 16 Oct 2021 17:27:56 +0000
Subject: [issue45249] Update doctect SyntaxErrors for location range
In-Reply-To: <1632155458.61.0.570546761746.issue45249@roundup.psfhosted.org>
Message-ID: <1634405276.0.0.169873068722.issue45249@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27277
pull_request: https://github.com/python/cpython/pull/28994

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45249>
_______________________________________

From report at bugs.python.org  Sat Oct 16 13:27:51 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 16 Oct 2021 17:27:51 +0000
Subject: [issue45249] Update doctect SyntaxErrors for location range
In-Reply-To: <1632155458.61.0.570546761746.issue45249@roundup.psfhosted.org>
Message-ID: <1634405271.4.0.81282163052.issue45249@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset fe0d9e22a52a10c4cbe52254b51f2d4e74d83568 by Pablo Galindo Salgado in branch 'main':
bpo-45249: Fix caret location when end_offset is set to 0 (GH-28855)
https://github.com/python/cpython/commit/fe0d9e22a52a10c4cbe52254b51f2d4e74d83568


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45249>
_______________________________________

From report at bugs.python.org  Sat Oct 16 13:37:28 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sat, 16 Oct 2021 17:37:28 +0000
Subject: [issue45249] Update doctect SyntaxErrors for location range
In-Reply-To: <1632155458.61.0.570546761746.issue45249@roundup.psfhosted.org>
Message-ID: <1634405848.45.0.355384541192.issue45249@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45249>
_______________________________________

From report at bugs.python.org  Sat Oct 16 13:39:32 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 16 Oct 2021 17:39:32 +0000
Subject: [issue45496] Tkinter: test_winfo_rgb failure
In-Reply-To: <1634401740.26.0.645054867141.issue45496@roundup.psfhosted.org>
Message-ID: <1634405972.17.0.158191689992.issue45496@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

And on what of them it is failed?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45496>
_______________________________________

From report at bugs.python.org  Sat Oct 16 13:50:14 2021
From: report at bugs.python.org (E. Paine)
Date: Sat, 16 Oct 2021 17:50:14 +0000
Subject: [issue45496] Tkinter: test_winfo_rgb failure
In-Reply-To: <1634401740.26.0.645054867141.issue45496@roundup.psfhosted.org>
Message-ID: <1634406614.38.0.998922129625.issue45496@roundup.psfhosted.org>


E. Paine <xepaine13 at gmail.com> added the comment:

Nvidia (using the proprietary drivers)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45496>
_______________________________________

From report at bugs.python.org  Sat Oct 16 13:51:11 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 16 Oct 2021 17:51:11 +0000
Subject: [issue45249] Update doctect SyntaxErrors for location range
In-Reply-To: <1632155458.61.0.570546761746.issue45249@roundup.psfhosted.org>
Message-ID: <1634406671.95.0.641867403466.issue45249@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 5df35faf3611b459f7f32bfe9fd2ffa7fb2dc59e by Miss Islington (bot) in branch '3.10':
bpo-45249: Fix caret location when end_offset is set to 0 (GH-28855)
https://github.com/python/cpython/commit/5df35faf3611b459f7f32bfe9fd2ffa7fb2dc59e


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45249>
_______________________________________

From report at bugs.python.org  Sat Oct 16 13:56:04 2021
From: report at bugs.python.org (Shivnaren Srinivasan)
Date: Sat, 16 Oct 2021 17:56:04 +0000
Subject: [issue45442] Update `Virtual Environment` tutorial
In-Reply-To: <1634035192.74.0.26138584631.issue45442@roundup.psfhosted.org>
Message-ID: <1634406964.65.0.0929086825477.issue45442@roundup.psfhosted.org>


Change by Shivnaren Srinivasan <shivnaren at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45442>
_______________________________________

From report at bugs.python.org  Sat Oct 16 13:57:14 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sat, 16 Oct 2021 17:57:14 +0000
Subject: [issue45464] TypeError when inheriting from both OSError and
 AttributeError
In-Reply-To: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
Message-ID: <1634407034.93.0.193270420993.issue45464@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

> Suggestion: At the end of https://docs.python.org/3/bugs.html, add

Hummm, I am not sure that page is the most adecuate for this, no? That is how to deal with bugs in general, not about specific bugs.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45464>
_______________________________________

From report at bugs.python.org  Sat Oct 16 14:00:52 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sat, 16 Oct 2021 18:00:52 +0000
Subject: [issue45464] TypeError when inheriting from both OSError and
 AttributeError
In-Reply-To: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
Message-ID: <1634407252.49.0.979945230672.issue45464@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
keywords: +patch
pull_requests: +27279
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28995

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45464>
_______________________________________

From report at bugs.python.org  Sat Oct 16 14:42:33 2021
From: report at bugs.python.org (Shivnaren Srinivasan)
Date: Sat, 16 Oct 2021 18:42:33 +0000
Subject: [issue45497] Argparse: Refactor '%' interpolation to f-strings
Message-ID: <1634409753.34.0.421014561785.issue45497@roundup.psfhosted.org>


New submission from Shivnaren Srinivasan <shivnaren at gmail.com>:

I use `argparse` a lot, and I think it's great?going through the source code, I see all string interpolation is with the old printf `%` formatting.

AFAIK, f-strings are now the suggested method for interpolation (*after they were introduced, that is*).

Do we want to refactor the '%' instances to f-strings? Happy to submit a PR if so.

----------
components: Library (Lib)
messages: 404108
nosy: rhettinger, shivnaren
priority: normal
severity: normal
status: open
title: Argparse: Refactor '%' interpolation to f-strings
type: enhancement
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45497>
_______________________________________

From report at bugs.python.org  Sat Oct 16 14:59:01 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 18:59:01 +0000
Subject: [issue45495] IDLE: Add match and case to completions
In-Reply-To: <1634394285.54.0.829596302519.issue45495@roundup.psfhosted.org>
Message-ID: <1634410741.16.0.928424672885.issue45495@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
title: IDLE: Add match and case -> IDLE: Add match and case to completions

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45495>
_______________________________________

From report at bugs.python.org  Sat Oct 16 15:07:27 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 19:07:27 +0000
Subject: [issue45495] IDLE: Add match and case to completions
In-Reply-To: <1634394285.54.0.829596302519.issue45495@roundup.psfhosted.org>
Message-ID: <1634411247.29.0.338513493202.issue45495@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

That is because they are not keywords in keyword.kwlist.  But we can add them to the completion list.  Thanks for transferring the report.

----------
stage:  -> test needed
type:  -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45495>
_______________________________________

From report at bugs.python.org  Sat Oct 16 15:11:33 2021
From: report at bugs.python.org (Eric Snow)
Date: Sat, 16 Oct 2021 19:11:33 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org>
Message-ID: <1634411493.47.0.637790512556.issue45020@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
pull_requests: +27280
pull_request: https://github.com/python/cpython/pull/28997

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Sat Oct 16 15:11:57 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 19:11:57 +0000
Subject: [issue45447] IDLE: Support syntax highlighting for .pyi stub files
In-Reply-To: <1634052276.56.0.989526823091.issue45447@roundup.psfhosted.org>
Message-ID: <1634411517.44.0.622860103332.issue45447@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

We can add the mac change once it is manually tested on some system.  I may try on my macbook.  Windows will be another PR or even issue.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45447>
_______________________________________

From report at bugs.python.org  Sat Oct 16 15:16:16 2021
From: report at bugs.python.org (Eric Snow)
Date: Sat, 16 Oct 2021 19:16:16 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org>
Message-ID: <1634411776.38.0.807663014903.issue45020@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:


New changeset b9cdd0fb9c463c2503a4d854bb6529a9db58fe1b by Eric Snow in branch 'main':
bpo-45020: Default to using frozen modules unless running from source tree. (gh-28940)
https://github.com/python/cpython/commit/b9cdd0fb9c463c2503a4d854bb6529a9db58fe1b


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Sat Oct 16 15:20:49 2021
From: report at bugs.python.org (Eric Snow)
Date: Sat, 16 Oct 2021 19:20:49 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <e81aadd1-9c82-7e90-084b-c7a0ff568a20@egenix.com>
Message-ID: <CALFfu7AzGVtY5VCvCrLWcMhgdXBAVY=Zwp0vt7p-6dLrXE45sg@mail.gmail.com>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

On Sat, Oct 16, 2021 at 5:01 AM Marc-Andre Lemburg
<report at bugs.python.org> wrote:
> I can try to port PyRun to 3.9 and 3.10 to see whether I run into any issues.
> Would that help ?

Yeah, that would totally help.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Sat Oct 16 16:46:11 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 16 Oct 2021 20:46:11 +0000
Subject: [issue45497] Argparse: Refactor '%' interpolation to f-strings
In-Reply-To: <1634409753.34.0.421014561785.issue45497@roundup.psfhosted.org>
Message-ID: <1634417171.96.0.181336786411.issue45497@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Pure cosmetic changes are usually rejected.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45497>
_______________________________________

From report at bugs.python.org  Sat Oct 16 16:49:25 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Sat, 16 Oct 2021 20:49:25 +0000
Subject: [issue45497] Argparse: Refactor '%' interpolation to f-strings
In-Reply-To: <1634409753.34.0.421014561785.issue45497@roundup.psfhosted.org>
Message-ID: <1634417365.92.0.317904449928.issue45497@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

As a rule, we don?t accept such wholesale changes. If there?s a performance problem, or a bug, then we?d look at individual cases.

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45497>
_______________________________________

From report at bugs.python.org  Sat Oct 16 16:59:22 2021
From: report at bugs.python.org (Lahfa Samy)
Date: Sat, 16 Oct 2021 20:59:22 +0000
Subject: [issue45498] [doc] Fix a code example,
 non declared variable being printed
Message-ID: <1634417962.21.0.795610058247.issue45498@roundup.psfhosted.org>


New submission from Lahfa Samy <lahfa121999 at gmail.com>:

I was looking through the documentation at examples for reading CSV files and noticed that an undefined variable was printed in a code example, this affects Python version from 3.6 till 3.110a1 (dev version of the documentation).

It got me kind of confused, because a for loop does not really declare variables.
The fix is really simple, just printing the variable that is declared.

----------
assignee: docs at python
components: Documentation
files: csv-example-fix.patch
keywords: patch
messages: 404115
nosy: AkechiShiro, docs at python
priority: normal
severity: normal
status: open
title: [doc] Fix a code example, non declared variable being printed
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/file50365/csv-example-fix.patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45498>
_______________________________________

From report at bugs.python.org  Sat Oct 16 17:23:09 2021
From: report at bugs.python.org (Lahfa Samy)
Date: Sat, 16 Oct 2021 21:23:09 +0000
Subject: [issue45498] [doc] Fix a code example,
 non declared variable being printed
In-Reply-To: <1634417962.21.0.795610058247.issue45498@roundup.psfhosted.org>
Message-ID: <1634419389.16.0.673776058802.issue45498@roundup.psfhosted.org>


Change by Lahfa Samy <lahfa121999 at gmail.com>:


----------
pull_requests: +27281
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28999

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45498>
_______________________________________

From report at bugs.python.org  Sat Oct 16 17:33:33 2021
From: report at bugs.python.org (Shivnaren Srinivasan)
Date: Sat, 16 Oct 2021 21:33:33 +0000
Subject: [issue45497] Argparse: Refactor '%' interpolation to f-strings
In-Reply-To: <1634409753.34.0.421014561785.issue45497@roundup.psfhosted.org>
Message-ID: <1634420013.17.0.969596699215.issue45497@roundup.psfhosted.org>


Shivnaren Srinivasan <shivnaren at gmail.com> added the comment:

Understood--thank you for the responses.

----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45497>
_______________________________________

From report at bugs.python.org  Sat Oct 16 17:39:41 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 21:39:41 +0000
Subject: [issue45495] IDLE: Add match and case to completions
In-Reply-To: <1634394285.54.0.829596302519.issue45495@roundup.psfhosted.org>
Message-ID: <1634420381.85.0.19177030742.issue45495@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
keywords: +patch
pull_requests: +27282
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/29000

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45495>
_______________________________________

From report at bugs.python.org  Sat Oct 16 17:44:44 2021
From: report at bugs.python.org (Lahfa Samy)
Date: Sat, 16 Oct 2021 21:44:44 +0000
Subject: [issue45498] [doc] Fix a code example,
 non declared variable being printed
In-Reply-To: <1634417962.21.0.795610058247.issue45498@roundup.psfhosted.org>
Message-ID: <1634420684.2.0.999082169591.issue45498@roundup.psfhosted.org>


Change by Lahfa Samy <lahfa121999 at gmail.com>:


----------
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45498>
_______________________________________

From report at bugs.python.org  Sat Oct 16 17:46:33 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Sat, 16 Oct 2021 21:46:33 +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: <1634420793.98.0.416452326301.issue45494@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

I confirmed that 3.9 does NOT seem to have the problem:

Python 3.9.5 (default, May 19 2021, 11:32:47) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> x = r'''
... "\
... "(1for c in I,\
... \ '''
>>> import ast
>>> ast.literal_eval(x)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.9/ast.py", line 62, in literal_eval
    node_or_string = parse(node_or_string, mode='eval')
  File "/usr/lib/python3.9/ast.py", line 50, in parse
    return compile(source, filename, mode, flags,
  File "<unknown>", line 3
    "\
      ^
SyntaxError: Generator expression must be parenthesized

----------
nosy: +gregory.p.smith
versions: +Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45494>
_______________________________________

From report at bugs.python.org  Sat Oct 16 18:44:08 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 22:44:08 +0000
Subject: [issue45495] IDLE: Add match and case to completions
In-Reply-To: <1634394285.54.0.829596302519.issue45495@roundup.psfhosted.org>
Message-ID: <1634424248.25.0.175472226975.issue45495@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:


New changeset 42ac06dcd234bdda989dcfe854ac5173337024c9 by Terry Jan Reedy in branch 'main':
bpo-45495: Add 'case' and 'match' to IDLE completions list. (GH-29000)
https://github.com/python/cpython/commit/42ac06dcd234bdda989dcfe854ac5173337024c9


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45495>
_______________________________________

From report at bugs.python.org  Sat Oct 16 18:44:18 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 16 Oct 2021 22:44:18 +0000
Subject: [issue45495] IDLE: Add match and case to completions
In-Reply-To: <1634394285.54.0.829596302519.issue45495@roundup.psfhosted.org>
Message-ID: <1634424258.1.0.32573950512.issue45495@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +27283
pull_request: https://github.com/python/cpython/pull/29001

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45495>
_______________________________________

From report at bugs.python.org  Sat Oct 16 18:54:51 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sat, 16 Oct 2021 22:54:51 +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: <1634424891.12.0.184338916424.issue45494@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

> I confirmed that 3.9 does NOT seem to have the problem:


It does, is just that is not a crash. The point where the error message point is totally wrong

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45494>
_______________________________________

From report at bugs.python.org  Sat Oct 16 19:14:19 2021
From: report at bugs.python.org (miss-islington)
Date: Sat, 16 Oct 2021 23:14:19 +0000
Subject: [issue45495] IDLE: Add match and case to completions
In-Reply-To: <1634394285.54.0.829596302519.issue45495@roundup.psfhosted.org>
Message-ID: <1634426059.56.0.434213795399.issue45495@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset a29470307308f64af9c55263cdd6e1984ba89925 by Miss Islington (bot) in branch '3.10':
[3.10] bpo-45495: Add 'case' and 'match' to IDLE completions list. (GH-29000) (GH-29001)
https://github.com/python/cpython/commit/a29470307308f64af9c55263cdd6e1984ba89925


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45495>
_______________________________________

From report at bugs.python.org  Sat Oct 16 19:19:42 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 16 Oct 2021 23:19:42 +0000
Subject: [issue45495] IDLE: Add match and case to completions
In-Reply-To: <1634394285.54.0.829596302519.issue45495@roundup.psfhosted.org>
Message-ID: <1634426382.31.0.0750987853812.issue45495@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I emailed the OP reporting the fix, which will be in the next releases of 3.10 and 3.11.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45495>
_______________________________________

From report at bugs.python.org  Sat Oct 16 19:27:43 2021
From: report at bugs.python.org (Eryk Sun)
Date: Sat, 16 Oct 2021 23:27:43 +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: <1634426863.11.0.264030851367.issue30082@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

The force_hide option could also force the use of a new hidden window, even if the current process has a console. That way the output is always hidden. For example:

    if force_hide or shell:
        if force_hide and not (creationflags & _winapi.DETACHED_PROCESS):
            creationflags |= _winapi.CREATE_NEW_CONSOLE
        startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW
        startupinfo.wShowWindow = _winapi.SW_HIDE

One can also use CREATE_NO_WINDOW to create a console that has no window, as opposed to a hidden window. For example:

    if force_no_window:
        if creationflags & _winapi.CREATE_NEW_CONSOLE:
            raise ValueError('force_no_window cannot be used with '
                             'CREATE_NEW_CONSOLE')
        creationflags |= _winapi.CREATE_NO_WINDOW

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Sat Oct 16 21:58:20 2021
From: report at bugs.python.org (wyz23x2)
Date: Sun, 17 Oct 2021 01:58:20 +0000
Subject: [issue45420] Python 3.10 final installation failure
In-Reply-To: <1633828108.74.0.92443333438.issue45420@roundup.psfhosted.org>
Message-ID: <1634435900.2.0.589228028553.issue45420@roundup.psfhosted.org>


wyz23x2 <wyz23x2 at 163.com> added the comment:

I'm sorry, but the option is grayed out. See attached screenshot.

----------
Added file: https://bugs.python.org/file50366/screenshot.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45420>
_______________________________________

From report at bugs.python.org  Sat Oct 16 22:11:38 2021
From: report at bugs.python.org (wyz23x2)
Date: Sun, 17 Oct 2021 02:11:38 +0000
Subject: [issue45420] Python 3.10 final installation failure
In-Reply-To: <1633828108.74.0.92443333438.issue45420@roundup.psfhosted.org>
Message-ID: <1634436698.86.0.484326474513.issue45420@roundup.psfhosted.org>


wyz23x2 <wyz23x2 at 163.com> added the comment:

> This kind of issue can also arise when you directly delete the install, rather than uninstalling it.
Sort of, but I expected upgrading with a new directory to work. When the first few times didn't work, I deleted the installation directly (should have uninstalled it). :(
> Best thing to do if you can is to run a repair through the Add Remove Programs entry, and then uninstall it (this is because ensurepip needs a working install to uninstall itself... not ideal, but that's how it was added). Then you should be able to do the proper install.
Running from the Add Remove Programs entry prompts for admin access. (Is there a way to do that in Control Panel?) Directly running "repair" in the rc2 installer with admin says "No Python 3.10 installation was detected", error code: 0x8007064. (Same error message & code when running 3.10 final installation.)

Sorry if the problem is complicated.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45420>
_______________________________________

From report at bugs.python.org  Sat Oct 16 23:19:27 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Sun, 17 Oct 2021 03:19:27 +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: <1634440767.92.0.269922476275.issue45494@roundup.psfhosted.org>


Change by Gregory P. Smith <greg at krypto.org>:


----------
priority: normal -> high
versions: +Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45494>
_______________________________________

From report at bugs.python.org  Sun Oct 17 00:50:55 2021
From: report at bugs.python.org (theeshallnotknowethme)
Date: Sun, 17 Oct 2021 04:50:55 +0000
Subject: [issue45499] from __future__ import annotations is not mandatory in
 3.11.0a1+
Message-ID: <1634446255.85.0.0444213933031.issue45499@roundup.psfhosted.org>


New submission from theeshallnotknowethme <nohackingofkrowten at gmail.com>:

>>> import sys
>>> import __future__
>>> __future__.annotations
_Feature((3, 7, 0, 'beta', 1), (3, 11, 0, 'alpha', 0), 16777216)
>>> sys.version_info
sys.version_info(major=3, minor=11, micro=0, releaselevel='alpha', serial=1)
>>> sys.version_info > __future__.annotations.mandatory
True
>>> sys.version_info >= __future__.annotations.mandatory
True

Why is it still not automatically inside python 3.11.0a1?

----------
components: Installation
messages: 404125
nosy: February291948
priority: normal
severity: normal
status: open
title: from __future__ import annotations is not mandatory in 3.11.0a1+
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45499>
_______________________________________

From report at bugs.python.org  Sun Oct 17 00:52:54 2021
From: report at bugs.python.org (theeshallnotknowethme)
Date: Sun, 17 Oct 2021 04:52:54 +0000
Subject: [issue45499] from __future__ import annotations is not mandatory in
 3.11.0a1+
In-Reply-To: <1634446255.85.0.0444213933031.issue45499@roundup.psfhosted.org>
Message-ID: <1634446374.32.0.596637599437.issue45499@roundup.psfhosted.org>


theeshallnotknowethme <nohackingofkrowten at gmail.com> added the comment:

test case:
>>> a: A = 'test'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'A' is not defined. Did you mean: 'a'?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45499>
_______________________________________

From report at bugs.python.org  Sun Oct 17 01:30:27 2021
From: report at bugs.python.org (Steven D'Aprano)
Date: Sun, 17 Oct 2021 05:30:27 +0000
Subject: [issue45499] from __future__ import annotations is not mandatory in
 3.11.0a1+
In-Reply-To: <1634446255.85.0.0444213933031.issue45499@roundup.psfhosted.org>
Message-ID: <1634448627.77.0.87689195357.issue45499@roundup.psfhosted.org>


Steven D'Aprano <steve+python at pearwood.info> added the comment:

> Why is it still not automatically inside python 3.11.0a1?

Probably because this is the .0a1 version, and making it mandatory just hasn't been done yet. The developers are only human and can't do everything instantly.

----------
nosy: +steven.daprano

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45499>
_______________________________________

From report at bugs.python.org  Sun Oct 17 01:34:10 2021
From: report at bugs.python.org (Steven D'Aprano)
Date: Sun, 17 Oct 2021 05:34:10 +0000
Subject: [issue45499] from __future__ import annotations is not mandatory in
 3.11.0a1+
In-Reply-To: <1634446255.85.0.0444213933031.issue45499@roundup.psfhosted.org>
Message-ID: <1634448850.81.0.146454458045.issue45499@roundup.psfhosted.org>


Steven D'Aprano <steve+python at pearwood.info> added the comment:

Duplicate: #38605

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45499>
_______________________________________

From report at bugs.python.org  Sun Oct 17 01:34:30 2021
From: report at bugs.python.org (Steven D'Aprano)
Date: Sun, 17 Oct 2021 05:34:30 +0000
Subject: [issue45499] from __future__ import annotations is not mandatory in
 3.11.0a1+
In-Reply-To: <1634446255.85.0.0444213933031.issue45499@roundup.psfhosted.org>
Message-ID: <1634448870.03.0.858045886097.issue45499@roundup.psfhosted.org>


Change by Steven D'Aprano <steve+python at pearwood.info>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45499>
_______________________________________

From report at bugs.python.org  Sun Oct 17 01:47:50 2021
From: report at bugs.python.org (Steven D'Aprano)
Date: Sun, 17 Oct 2021 05:47:50 +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: <1634449670.77.0.489212473238.issue38605@roundup.psfhosted.org>


Steven D'Aprano <steve+python at pearwood.info> added the comment:

Now that we're in 3.11, people are starting to notice that stringy annotations are not the default (see #45499 for example).

What can we do to get PEP 649 moving forward?

----------
nosy: +steven.daprano

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38605>
_______________________________________

From report at bugs.python.org  Sun Oct 17 03:28:36 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 17 Oct 2021 07:28:36 +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: <1634455716.92.0.937706635176.issue38605@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I think it would help if we could enable some future feature globally by command line option or environment variable, without modifying all source files. It would allow users to quickly test their code base for compatibility with future changes. The problem currently is that nobody bothers to add "from __future__ import ...", so we have surprises every time when try to make it by default.

A tool which automatically adds or removes "from __future__ import ..." in files could help too.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38605>
_______________________________________

From report at bugs.python.org  Sun Oct 17 04:48:32 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sun, 17 Oct 2021 08:48:32 +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: <1634460512.44.0.618940191819.issue38605@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
nosy: +AlexWaygood

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38605>
_______________________________________

From report at bugs.python.org  Sun Oct 17 05:55:33 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 17 Oct 2021 09:55:33 +0000
Subject: [issue45500] Rewrite test_dbm
Message-ID: <1634464533.25.0.959205582661.issue45500@roundup.psfhosted.org>


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

* Generate test classes at import time. It allows to filter them when run with unittest. E.g: "./python -m unittest test.test_dbm.TestCase_gnu -v".
* Create a database class in a new directory which will be removed after test. It guarantees that all created files and directories be removed and will not conflict with other dbm tests.
* Restore dbm._defaultmod after tests. Previously it was set to the last dbm module (dbm.dumb) which affected other tests.
* Enable the whichdb test for dbm.dumb.
* Move test_keys to the correct test class. It does not test whichdb().
* Remove some outdated code and comments.

----------
components: Tests
messages: 404131
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Rewrite test_dbm
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45500>
_______________________________________

From report at bugs.python.org  Sun Oct 17 05:59:00 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 17 Oct 2021 09:59:00 +0000
Subject: [issue45500] Rewrite test_dbm
In-Reply-To: <1634464533.25.0.959205582661.issue45500@roundup.psfhosted.org>
Message-ID: <1634464740.57.0.945998301694.issue45500@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
keywords: +patch
pull_requests: +27284
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29002

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45500>
_______________________________________

From report at bugs.python.org  Sun Oct 17 06:10:17 2021
From: report at bugs.python.org (Julien Palard)
Date: Sun, 17 Oct 2021 10:10:17 +0000
Subject: [issue45501] [idea] Successfully creating a venv could print a
 message.
Message-ID: <1634465417.7.0.0888644827871.issue45501@roundup.psfhosted.org>


New submission from Julien Palard <julien+python at palard.fr>:

I realized that many students get surprised by `python -m venv .venv` not printing anything, a few even think it completly failed.

I'm OK teaching them this is normal, as `mv`, `cp`, `rm`, `django-admin startproject`, ... does not print neither when they succeed.

But I fear many other Python users could be surprised too and not have a teacher around to reassure them.

I kept this as a status-quo for years but thinking of it today I though ??And why not telling them how to activate the venv???

Would'nt it be great to have:

    $ python3 -m venv .venv
    Environment created successfully, activate it using:

        source .venv/bin/activate

or

    PS C:\Users\Admin> python3 -m venv .venv
    Environment created successfully, activate it using:

        .venv\Scripts\Activate.ps1

and so on?

A `-q`/`--quiet` could be added for scripts creating venvs.

----------
messages: 404132
nosy: mdk
priority: normal
severity: normal
status: open
title: [idea] Successfully creating a venv could print a message.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45501>
_______________________________________

From report at bugs.python.org  Sun Oct 17 06:15:57 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 17 Oct 2021 10:15:57 +0000
Subject: [issue45502] Fix test_shelve and make it discoverable
Message-ID: <1634465757.41.0.209752823951.issue45502@roundup.psfhosted.org>


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

test_shelve was intended to run some tests for all underlying dbm implementation, but since b17acad68ea21c60dbc2088644f2934032304628 (at May 2008) it runs them with the same implementation.

The proposed PR fixes this regression and also makes test_shelve discoverable, so it can be run with the unittest module.

----------
components: Tests
messages: 404133
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Fix test_shelve and make it discoverable
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45502>
_______________________________________

From report at bugs.python.org  Sun Oct 17 06:19:43 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 17 Oct 2021 10:19:43 +0000
Subject: [issue45502] Fix test_shelve and make it discoverable
In-Reply-To: <1634465757.41.0.209752823951.issue45502@roundup.psfhosted.org>
Message-ID: <1634465983.47.0.616001868646.issue45502@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Also it was only tested with pickle protocols 0, 1 and 2. Now it will be tested with all pickle protocols.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45502>
_______________________________________

From report at bugs.python.org  Sun Oct 17 06:20:45 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 17 Oct 2021 10:20:45 +0000
Subject: [issue45502] Fix test_shelve and make it discoverable
In-Reply-To: <1634465757.41.0.209752823951.issue45502@roundup.psfhosted.org>
Message-ID: <1634466045.69.0.802930082558.issue45502@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
keywords: +patch
pull_requests: +27285
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29003

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45502>
_______________________________________

From report at bugs.python.org  Sun Oct 17 06:21:20 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 17 Oct 2021 10:21:20 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634466080.63.0.120554845767.issue45229@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
dependencies: +Fix test_shelve and make it discoverable

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Sun Oct 17 06:21:57 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 17 Oct 2021 10:21:57 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634466117.72.0.835757658589.issue45229@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
dependencies: +Rewrite test_dbm

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Sun Oct 17 06:26:38 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 17 Oct 2021 10:26:38 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634466398.82.0.437574343108.issue45229@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27286
pull_request: https://github.com/python/cpython/pull/29004

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Sun Oct 17 06:56:43 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sun, 17 Oct 2021 10:56:43 +0000
Subject: [issue45477] configure script cannot detect float word ordering on
 linux
In-Reply-To: <1634246393.25.0.871269149475.issue45477@roundup.psfhosted.org>
Message-ID: <1634468203.22.0.851460985185.issue45477@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Please build conftest.o with compiler flags 

    icc -c -O3 -fPIC -fp-model strict -fp-model source -axCORE-AVX512,CORE-AVX2 -xAVX -ipo -prec-div -prec-sqrt 

and attach the file.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45477>
_______________________________________

From report at bugs.python.org  Sun Oct 17 07:35:30 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sun, 17 Oct 2021 11:35:30 +0000
Subject: [issue45503] Several improvement point of gdbm module
Message-ID: <1634470530.26.0.70415684726.issue45503@roundup.psfhosted.org>


New submission from Dong-hee Na <donghee.na at python.org>:

I have a chance to exchange mail with gdbm module maintainer Sergey Poznyakoff to supporting the crash tolerance feature.
(See bpo-45452) 

Other dbm modules also might have the same issue what the maintainer pointed out.

I copy and paste the content that gdbm maintainer's pointed out.

I would like to listen to other core dev's opinions about the gdbm moudle and also other dbm module interface improvements.
I add the core devs who might have an interest in this issue.

Personally, I have interests in Error handling and items() and values() methods issues.


1. Error handling

The most problematic place.  Most methods throw an error in case of
failure, which is quite OK.  However, to do so they use PyErr_SetString
and PyErr_SetFromErrno family functions, passing the gdbm_errno value
as their argument.  This is plain wrong.  These functions treat the
errno argument as a value of C "errno" variable.  Obviously, gdbm_errno
codes have diffeent meanings, so the resulting diagnostics is misleading
if not downright unusable.

2. Lack of interfaces for database export/import (gdbm_dump and
gdbm_load functions).  This is quite an important aspect, in particular
for handling database backups.

3. Lack of interface for database recovery (gdbm_recover function).

4. The items() and values() methods are not supported.  These should be
easy to implement using gdbm_firstkey/gdbm_nextkey.

----------
messages: 404136
nosy: corona10, methane, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Several improvement point of gdbm module

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45503>
_______________________________________

From report at bugs.python.org  Sun Oct 17 07:35:45 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sun, 17 Oct 2021 11:35:45 +0000
Subject: [issue45503] Several improvement point of gdbm module
In-Reply-To: <1634470530.26.0.70415684726.issue45503@roundup.psfhosted.org>
Message-ID: <1634470545.76.0.547927732344.issue45503@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
components: +Library (Lib)
type:  -> enhancement
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45503>
_______________________________________

From report at bugs.python.org  Sun Oct 17 08:06:48 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 17 Oct 2021 12:06:48 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634472408.75.0.25064628732.issue45229@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27287
pull_request: https://github.com/python/cpython/pull/29006

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Sun Oct 17 08:06:48 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 17 Oct 2021 12:06:48 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634472408.14.0.250411852407.issue45229@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset b3f0ceae919c1627094ff628c87184684a5cedd6 by Serhiy Storchaka in branch 'main':
bpo-45229: Make test_http_cookiejar discoverable (GH-29004)
https://github.com/python/cpython/commit/b3f0ceae919c1627094ff628c87184684a5cedd6


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Sun Oct 17 08:06:53 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 17 Oct 2021 12:06:53 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634472413.16.0.929026533868.issue45229@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27288
pull_request: https://github.com/python/cpython/pull/29007

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Sun Oct 17 09:25:22 2021
From: report at bugs.python.org (Sourish Basu)
Date: Sun, 17 Oct 2021 13:25:22 +0000
Subject: [issue45477] configure script cannot detect float word ordering on
 linux
In-Reply-To: <1634246393.25.0.871269149475.issue45477@roundup.psfhosted.org>
Message-ID: <1634477122.16.0.635638109708.issue45477@roundup.psfhosted.org>


Sourish Basu <sourish.basu at gmail.com> added the comment:

I executed:

$ icc -c -O3 -fPIC -fp-model strict -fp-model source -axCORE-AVX512,CORE-AVX2 -xAVX -ipo -prec-div -prec-sqrt conftest.c

and conftest.o was built without errors. It has one symbol, as expected:

$ nm conftest.o
                 U __must_be_linked_with_icc_or_xild
0000000000000000 D d

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45477>
_______________________________________

From report at bugs.python.org  Sun Oct 17 10:02:54 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Sun, 17 Oct 2021 14:02:54 +0000
Subject: [issue45192] The tempfile._infer_return_type function cannot infer
 the type of os.PathLike objects.
In-Reply-To: <1631598244.07.0.518019074651.issue45192@roundup.psfhosted.org>
Message-ID: <1634479374.02.0.631205526442.issue45192@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

This is a duplicate of #29447, so if this is merged, the other issue should also be closed as fixed.

----------
nosy: +andrei.avk

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45192>
_______________________________________

From report at bugs.python.org  Sun Oct 17 11:41:33 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sun, 17 Oct 2021 15:41:33 +0000
Subject: [issue45478] Send a patch to libexpat to solve _POSIX_C_SOURCE issue.
In-Reply-To: <1634263019.88.0.531243767636.issue45478@roundup.psfhosted.org>
Message-ID: <1634485293.48.0.737900257859.issue45478@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

https://github.com/libexpat/libexpat/pull/514

merged, The change is affected to libexpat 2.4.2

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45478>
_______________________________________

From report at bugs.python.org  Sun Oct 17 11:50:50 2021
From: report at bugs.python.org (Irit Katriel)
Date: Sun, 17 Oct 2021 15:50:50 +0000
Subject: [issue31419] Can not install python3.6.2 due to Error 0x80070643:
 Failed to install MSI package
In-Reply-To: <1505137249.23.0.24915016523.issue31419@psf.upfronthosting.co.za>
Message-ID: <1634485850.65.0.166219753366.issue31419@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Please create a new issue if this is still a problem on 3.9 or above.

----------
resolution:  -> out of date
stage:  -> resolved
status: pending -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31419>
_______________________________________

From report at bugs.python.org  Sun Oct 17 12:47:01 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 17 Oct 2021 16:47:01 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634489221.6.0.751116184704.issue45229@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 1dbf9c86b25463b9bc695e434ac034a7e313ba01 by Miss Islington (bot) in branch '3.9':
bpo-45229: Make test_http_cookiejar discoverable (GH-29004)
https://github.com/python/cpython/commit/1dbf9c86b25463b9bc695e434ac034a7e313ba01


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Sun Oct 17 12:47:07 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 17 Oct 2021 16:47:07 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634489227.04.0.105863274306.issue45229@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 65c1db794e0484e18142658c691141387c1dc2e4 by Miss Islington (bot) in branch '3.10':
bpo-45229: Make test_http_cookiejar discoverable (GH-29004)
https://github.com/python/cpython/commit/65c1db794e0484e18142658c691141387c1dc2e4


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Sun Oct 17 13:27:15 2021
From: report at bugs.python.org (Foster Snowhill)
Date: Sun, 17 Oct 2021 17:27:15 +0000
Subject: [issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken
In-Reply-To: <1496250931.44.0.236459920081.issue30528@psf.upfronthosting.co.za>
Message-ID: <1634491635.72.0.689842981157.issue30528@roundup.psfhosted.org>


Change by Foster Snowhill <python at pen.gy>:


----------
pull_requests: +27289
pull_request: https://github.com/python/cpython/pull/29011

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30528>
_______________________________________

From report at bugs.python.org  Sun Oct 17 13:38:56 2021
From: report at bugs.python.org (Foster Snowhill)
Date: Sun, 17 Oct 2021 17:38:56 +0000
Subject: [issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken
In-Reply-To: <1496250931.44.0.236459920081.issue30528@psf.upfronthosting.co.za>
Message-ID: <1634492336.79.0.0714818362439.issue30528@roundup.psfhosted.org>


Foster Snowhill <python at pen.gy> added the comment:

I've stumbled upon this myself, and had a go at fixing it, before looking up this issue. My approach ended up being a bit different:

1. I rewrote the existing _reverse_pointer() methods, so that they'd handle both addresses and networks, instead of defining separate methods for the IPvXNetwork classes.
2. Trying to generate a reverse pointer for a prefix that doesn't align with the granularity of reverse pointers (8 bits for IPv4, 4 bits for IPv6) will raise an exception instead of returning a more general prefix.

I would like to bring up point 2 for discussion, since it differs from both of the other PRs submitted regarding this issue.

For example, let's take an example subnet 127.45.240.0/20. The other solutions here propose generating a reverse pointer like "45.127.in-addr.arpa", i.e. returning a reverse pointer to a bigger subnet that includes the original one. When you convert that reverse pointer back into a network, you get 127.45.0.0/16. It doesn't match the original network, thus you lose some information about it.

I'd like to propose to be more strict about it (or at least, make the strict behaviour an option) to avoid unintentional loss of precision when generating reverse pointers in these cases.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30528>
_______________________________________

From report at bugs.python.org  Sun Oct 17 16:48:34 2021
From: report at bugs.python.org (Irit Katriel)
Date: Sun, 17 Oct 2021 20:48:34 +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: <1634503714.04.0.178309064182.issue32291@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Is there anything left to do here?

It seems hongweipeng's explanation and the link to the documentation pretty much cover it.

----------
nosy: +iritkatriel
resolution:  -> not a bug
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32291>
_______________________________________

From report at bugs.python.org  Sun Oct 17 17:25:35 2021
From: report at bugs.python.org (Irit Katriel)
Date: Sun, 17 Oct 2021 21:25:35 +0000
Subject: [issue32584] Uninitialized free_extra in code_dealloc
In-Reply-To: <1516203304.77.0.467229070634.issue32584@psf.upfronthosting.co.za>
Message-ID: <1634505935.67.0.331402694351.issue32584@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Is there anything left to do on this issue? It seems like a question more than a bug report.

----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32584>
_______________________________________

From report at bugs.python.org  Sun Oct 17 17:40:22 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sun, 17 Oct 2021 21:40:22 +0000
Subject: [issue39679] functools: singledispatchmethod doesn't work with
 classmethod
In-Reply-To: <1582053375.25.0.178240077179.issue39679@roundup.psfhosted.org>
Message-ID: <1634506822.28.0.357548492943.issue39679@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

Happily, this bug appears to have been resolved in Python 3.10 due to the fact that a `classmethod` wrapping a function `F` will now have an `__annotations__` dict equal to `F`.

In Python 3.9:

```
>>> x = lambda y: y
>>> x.__annotations__ = {'y': int}
>>> c = classmethod(x)
>>> c.__annotations__
Traceback (most recent call last):
  File "<pyshell#37>", line 1, in <module>
    c.__annotations__
AttributeError: 'classmethod' object has no attribute '__annotations__'
```

In Python 3.10:

```
x = lambda y: y
x.__annotations__ = {'y': int}
c = classmethod(x)
c.__annotations__
{'y': <class 'int'>}
```

This change appears to have resolved the bug in `functools.singledispatchmethod`. The bug remains in Python 3.9, however.

----------
nosy: +AlexWaygood
versions:  -Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39679>
_______________________________________

From report at bugs.python.org  Sun Oct 17 17:49:38 2021
From: report at bugs.python.org (Irit Katriel)
Date: Sun, 17 Oct 2021 21:49:38 +0000
Subject: [issue30774] list_repr not safe against concurrent mutation
In-Reply-To: <1498507019.02.0.505462443219.issue30774@psf.upfronthosting.co.za>
Message-ID: <1634507378.65.0.346336612443.issue30774@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11.

----------
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30774>
_______________________________________

From report at bugs.python.org  Sun Oct 17 18:13:16 2021
From: report at bugs.python.org (Irit Katriel)
Date: Sun, 17 Oct 2021 22:13:16 +0000
Subject: [issue37013] Fatal Python error in socket.if_indextoname()
In-Reply-To: <1558542505.9.0.778249415018.issue37013@roundup.psfhosted.org>
Message-ID: <1634508796.54.0.00579262016939.issue37013@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37013>
_______________________________________

From report at bugs.python.org  Sun Oct 17 18:39:17 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Sun, 17 Oct 2021 22:39:17 +0000
Subject: [issue45367] Specialize BINARY_MULTIPLY
In-Reply-To: <1633405452.94.0.0777171864008.issue45367@roundup.psfhosted.org>
Message-ID: <1634510357.98.0.122978856914.issue45367@roundup.psfhosted.org>


Change by Dennis Sweeney <sweeney.dennis650 at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45367>
_______________________________________

From report at bugs.python.org  Sun Oct 17 18:48:34 2021
From: report at bugs.python.org (Irit Katriel)
Date: Sun, 17 Oct 2021 22:48:34 +0000
Subject: [issue39419] Core dump when trying to use workaround for custom
 warning category (Fatal Python error: init_sys_streams: can't initialize sys
 standard streams)
In-Reply-To: <1579702267.6.0.24270262544.issue39419@roundup.psfhosted.org>
Message-ID: <1634510913.99.0.244595936914.issue39419@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Can you reproduce this on 3.10 or 3.11?

OpenWrapper is deprecated and no longer defined in the io module from 3.10.

----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39419>
_______________________________________

From report at bugs.python.org  Sun Oct 17 20:24:01 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Mon, 18 Oct 2021 00:24:01 +0000
Subject: [issue39423] Process finished with exit code -1073741819 (0xC0000005)
 when trying to access data from a pickled file
In-Reply-To: <1579709155.26.0.28815846735.issue39423@roundup.psfhosted.org>
Message-ID: <1634516641.8.0.821759573685.issue39423@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

As your problem involves numpy and PyQt, both of which are very complicated third party extension module code, chances are there is a bug within those that is leading to memory corruption.

----------
nosy: +gregory.p.smith
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39423>
_______________________________________

From report at bugs.python.org  Sun Oct 17 20:48:46 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Mon, 18 Oct 2021 00:48:46 +0000
Subject: [issue30570] issubclass segfaults on objects with weird __getattr__
In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za>
Message-ID: <1634518126.41.0.902522711291.issue30570@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

This is a stack overflow in Objects/abstract.c because we infinitely recurse within abstract_issubclass().

We should probably do some validity checking on the bases tuple that abstract_get_bases returns (ideally within abstract_get_bases?).  The tuple must contain types.

----------
nosy: +gregory.p.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30570>
_______________________________________

From report at bugs.python.org  Sun Oct 17 20:48:55 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Mon, 18 Oct 2021 00:48:55 +0000
Subject: [issue30570] issubclass segfaults on objects with weird __getattr__
In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za>
Message-ID: <1634518135.17.0.185264946013.issue30570@roundup.psfhosted.org>


Change by Gregory P. Smith <greg at krypto.org>:


----------
assignee:  -> gregory.p.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30570>
_______________________________________

From report at bugs.python.org  Sun Oct 17 21:06:31 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Mon, 18 Oct 2021 01:06:31 +0000
Subject: [issue30570] issubclass segfaults on objects with weird __getattr__
In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za>
Message-ID: <1634519191.65.0.994955791216.issue30570@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

Python metaprogramming allows type-like things to be bases, not just things that pass PyType_Check().  so being that strict isn't going to work.

The other classic way to prevent this is to track what you're recursing on to avoid a loop.  i.e. Keeping a set of PyObjects that have been seen and not recursing if the value is in that.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30570>
_______________________________________

From report at bugs.python.org  Sun Oct 17 21:49:40 2021
From: report at bugs.python.org (Inada Naoki)
Date: Mon, 18 Oct 2021 01:49:40 +0000
Subject: [issue45475] gzip fails to read a gzipped file (ValueError: readline
 of closed file)
In-Reply-To: <1634245921.58.0.043840382812.issue45475@roundup.psfhosted.org>
Message-ID: <1634521780.09.0.614223540297.issue45475@roundup.psfhosted.org>


Change by Inada Naoki <songofacandy at gmail.com>:


----------
keywords: +patch
pull_requests: +27290
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29016

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45475>
_______________________________________

From report at bugs.python.org  Sun Oct 17 21:53:22 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Mon, 18 Oct 2021 01:53:22 +0000
Subject: [issue30570] issubclass segfaults on objects with weird __getattr__
In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za>
Message-ID: <1634522002.97.0.068155765424.issue30570@roundup.psfhosted.org>


Change by Gregory P. Smith <greg at krypto.org>:


----------
keywords: +patch
pull_requests: +27291
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29017

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30570>
_______________________________________

From report at bugs.python.org  Sun Oct 17 22:01:44 2021
From: report at bugs.python.org (Steven)
Date: Mon, 18 Oct 2021 02:01:44 +0000
Subject: [issue45504] [argparse] Entering a partial config_parser flag works
 with subparsers
Message-ID: <1634522504.9.0.975535352366.issue45504@roundup.psfhosted.org>


New submission from Steven <steven at swills.me>:

I have a package with a module called `commands.py`. This file is basically three sub parsers and an entry point. 

Here is one of my subparsers. It shows the current path of a config file, and lets you update the path if you want.

    #config sub-command
    config_parser = subparsers.add_parser('config')
    config_parser.set_defaults(func=config_path)
    config_parser.add_argument('--show', help='show current config file path - takes no input', action='store_true')
    config_parser.add_argument('--update', help='modify config file path', dest='path')

If you look at the first config_parser which is `--show`. Notice how it doesn't take an input. You just pass in --show and it prints the config path to the cli.

Here is the function that tells --show what to do.;

    def config_path(args):
        dotenv_file = dotenv.find_dotenv()
        dotenv.load_dotenv(dotenv_file)
        if args.show:
            print(os.environ['FILE_PATH']) 
        elif args.path:
            os.environ['FILE_PATH'] = args.path
            dotenv.set_key(dotenv_file, 'FILE_PATH', os.environ['FILE_PATH'])

This is what my entrypoints in my setup.py looks like.

    entry_points={
            'console_scripts': [
                #command = package.module:function
                'conftool = conftool.commands:main',
            ],
        }
    )

All of the following work

    conftool config --s
    conftool config --sh
    conftool config --sho
    conftool config --show

I have another sub parser and function like the one above. The config_parser is basically the same. It has an option that doesn't take an argument and store is true. They behave the same way. The other function and subparser have an option that is `--gettoken`. It works with --g, --ge, --get, --gett, --getto, --gettok, gettoke.

Is this possibly a bug?

----------
components: Parser
messages: 404153
nosy: lys.nikolaou, pablogsal, swills1
priority: normal
severity: normal
status: open
title: [argparse] Entering a partial config_parser flag works with subparsers
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45504>
_______________________________________

From report at bugs.python.org  Sun Oct 17 23:04:27 2021
From: report at bugs.python.org (Steven W)
Date: Mon, 18 Oct 2021 03:04:27 +0000
Subject: [issue45504] [argparse] Entering a partial config_parser flag works
 with subparsers
In-Reply-To: <1634522504.9.0.975535352366.issue45504@roundup.psfhosted.org>
Message-ID: <1634526267.46.0.76099707927.issue45504@roundup.psfhosted.org>


Change by Steven W <steven at swills.me>:


----------
components: +Library (Lib) -Parser

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45504>
_______________________________________

From report at bugs.python.org  Sun Oct 17 23:09:47 2021
From: report at bugs.python.org (Myles Steinhauser)
Date: Mon, 18 Oct 2021 03:09:47 +0000
Subject: [issue34781] infinite waiting in multiprocessing.Pool
In-Reply-To: <1537734641.75.0.956365154283.issue34781@psf.upfronthosting.co.za>
Message-ID: <1634526587.82.0.700706451499.issue34781@roundup.psfhosted.org>


Change by Myles Steinhauser <myles.steinhauser at gmail.com>:


----------
nosy: +myles.steinhauser

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34781>
_______________________________________

From report at bugs.python.org  Sun Oct 17 23:11:08 2021
From: report at bugs.python.org (Myles Steinhauser)
Date: Mon, 18 Oct 2021 03:11:08 +0000
Subject: [issue22393] multiprocessing.Pool shouldn't hang forever if a worker
 process dies unexpectedly
In-Reply-To: <1410474786.78.0.264797717105.issue22393@psf.upfronthosting.co.za>
Message-ID: <1634526668.82.0.438332046034.issue22393@roundup.psfhosted.org>


Change by Myles Steinhauser <myles.steinhauser at gmail.com>:


----------
nosy: +myles.steinhauser

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22393>
_______________________________________

From report at bugs.python.org  Sun Oct 17 23:11:18 2021
From: report at bugs.python.org (Myles Steinhauser)
Date: Mon, 18 Oct 2021 03:11:18 +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: <1634526678.68.0.244649095572.issue43805@roundup.psfhosted.org>


Change by Myles Steinhauser <myles.steinhauser at gmail.com>:


----------
nosy: +myles.steinhauser

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43805>
_______________________________________

From report at bugs.python.org  Mon Oct 18 01:03:38 2021
From: report at bugs.python.org (David Rajaratnam)
Date: Mon, 18 Oct 2021 05:03:38 +0000
Subject: [issue45427] importlib.readers.MultiplexedPath
In-Reply-To: <1633932362.03.0.000713660770349.issue45427@roundup.psfhosted.org>
Message-ID: <1634533418.94.0.615488401338.issue45427@roundup.psfhosted.org>


David Rajaratnam <daver at gemarex.com.au> added the comment:

Hi Filipe,

Thanks very much for the pointers and for the clarifications. I'll look at using importlib.resources.as_file(). I think this is the API that I stupidly seemed to have missed!

However, it is also very possible that I am misunderstanding the correct usage of the importlib.resource library, so here is a summary of my use-case:

I am working with a specialised language interpreter that can be embedded in python. The interpreter API requires a file system path to load files and the language itself has its own "include" statements for loading files. So in my case it has to be a file system path and not some other resource (eg. zip file or database).

However, I have struggled to understand what is the correct way to treat these files when installed as part of a python package. It seems to me that python's setuptools is too limited to cover the range of options that I would want. AFAIK setuptools allows only two options for installing non-python files; "data_files" and "package_data". "data_files" doesn't seem to be the right place because I couldn't find a full-proof way to programmatically find out where these files are installed. So it seems to be focused more on supplementary data (high-level docs, examples, etc) rather than data files that are necessary for the operations of the application.

On the other hand "package_data" forces these non-python files to be embedded within the python package structure. This is a bit ugly since its not really a natural fit; for example the language has its own command-line tools that I use during development.

So what I've tried to do is that for development I separate the python code from my other interpreter's code, but then for installation have setup.py map the specialised language files into the python package structure. I'm not overly happy with how I've done it (although it does seem to work),so I would be very happy if someone can point to a better way.

Dave

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45427>
_______________________________________

From report at bugs.python.org  Mon Oct 18 01:30:14 2021
From: report at bugs.python.org (Jan Wolski)
Date: Mon, 18 Oct 2021 05:30:14 +0000
Subject: [issue45505] Remove unneeded ZipFile IO
Message-ID: <1634535014.34.0.466383948896.issue45505@roundup.psfhosted.org>


New submission from Jan Wolski <jan at wolski.fi>:

Currently in the ZipFile class implementation, when processing the zip file headers "extra" field, a .read() call is used without using the returned value in any way. This call could be replaced with a .seek() to avoid actually doing the IO.

The change would improve performance in use cases where the fileobject given to ZipFile is backed by high latency IO, eg. HTTP range requests.

----------
components: Library (Lib)
messages: 404155
nosy: data-ux
priority: normal
pull_requests: 27292
severity: normal
status: open
title: Remove unneeded ZipFile IO
type: performance

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45505>
_______________________________________

From report at bugs.python.org  Mon Oct 18 01:45:40 2021
From: report at bugs.python.org (David Rajaratnam)
Date: Mon, 18 Oct 2021 05:45:40 +0000
Subject: [issue45427] importlib.readers.MultiplexedPath
In-Reply-To: <1633932362.03.0.000713660770349.issue45427@roundup.psfhosted.org>
Message-ID: <1634535940.24.0.52145450345.issue45427@roundup.psfhosted.org>


David Rajaratnam <daver at gemarex.com.au> added the comment:

I'm closing the bug report. Clearly not a bug. It looks like importlib.resources.as_file() is exactly what I want. It returns a context and can potentially create a temporary file system directory structure with all files I want underneath. Not sure how I missed this before and was struggling to work out what to do with a MultiplexedPath object.

If you do have comments on a better way of separating python and non-python code (see my previous use-case explanation) I'm interested to hear it.

Regards,
Dave

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45427>
_______________________________________

From report at bugs.python.org  Mon Oct 18 02:50:43 2021
From: report at bugs.python.org (Marco Cognetta)
Date: Mon, 18 Oct 2021 06:50:43 +0000
Subject: [issue37295] Possible optimizations for math.comb()
In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org>
Message-ID: <1634539843.34.0.00318191233209.issue37295@roundup.psfhosted.org>


Change by Marco Cognetta <cognetta.marco at gmail.com>:


----------
keywords: +patch
nosy: +mcognetta
nosy_count: 6.0 -> 7.0
pull_requests: +27293
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29020

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37295>
_______________________________________

From report at bugs.python.org  Mon Oct 18 03:10:04 2021
From: report at bugs.python.org (Carl Friedrich Bolz-Tereick)
Date: Mon, 18 Oct 2021 07:10:04 +0000
Subject: [issue30570] issubclass segfaults on objects with weird __getattr__
In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za>
Message-ID: <1634541004.9.0.287138873138.issue30570@roundup.psfhosted.org>


Carl Friedrich Bolz-Tereick <cfbolz at gmx.de> added the comment:

PyPy raises a RecursionError here, which sounds like an ok outcome. So simply checking for the recursion would also be a way of fixing this...

----------
nosy: +Carl.Friedrich.Bolz

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30570>
_______________________________________

From report at bugs.python.org  Mon Oct 18 03:52:49 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Mon, 18 Oct 2021 07:52:49 +0000
Subject: [issue30570] issubclass segfaults on objects with weird __getattr__
In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za>
Message-ID: <1634543569.5.0.5422568968.issue30570@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

Oh yeah -- Py_EnterRecursiveCall/Py_LeaveRecursiveCall in abstract_get_bases would be simpler. Also, the set approach also probably still c-stack overflows on

class C:
    def __getattr__(self, attr):
        class A: pass
        class B: pass
        A.__getattr__ = B.__getattr__ = C.__getattr__
        return (A(), B())

issubclass(C(), int)

----------
nosy: +Dennis Sweeney

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30570>
_______________________________________

From report at bugs.python.org  Mon Oct 18 03:53:48 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Mon, 18 Oct 2021 07:53:48 +0000
Subject: [issue45506] Out of source tree builds failing on main -
 test_importlib others unreliable
Message-ID: <1634543628.08.0.540033030663.issue45506@roundup.psfhosted.org>


New submission from Gregory P. Smith <greg at krypto.org>:

The behavior is odd, I don't really know how to characterize it other than something serious has gone wrong.  Memory corruption thus differing failures perhaps?  it seems like maybe a race condition?

on the main branch (i cannot reproduce this on 3.10 thankfully):

1) git checkout https://github.com/python/cpython.git upstream
2) mkdir b-u && cd b-u
3) ../upstream/configure --with-pydebug && make -j3 && ./python -m test.regrtest test_importlib

- sometimes it hangs forever.
- sometimes it crashes with a long list of error messages coming out of regrtest itself.  The crashes appear to happen in a child process so regrtest can continue and run other tests if you tell it to run more.  Sometimes it'll be an error about "import _frozenimport_lib as bootstrap" failing with sys.modules containing None. (Linux does that for me)  On macOS when it doesn't hang, I get a blowup from test_importlib/test_threaded_import.py.

I've reproduced this on Linux and macOS.  macOS alternates between a traceback blowup and hang with an occasional pass.  On Linux it is quite consistently a huge chain of stacktraces.

Linux:

```
0:00:00 load avg: 2.48 Run tests sequentially
0:00:00 load avg: 2.48 [1/1] test_importlib
Failed to import test module: test.test_importlib.builtin.test_finder
Traceback (most recent call last):
  File "/home/greg/oss/python/cpython/gpshead/Lib/importlib/__init__.py", line 16, in <module>
    import _frozen_importlib as _bootstrap
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: import of _frozen_importlib halted; None in sys.modules

During handling of the above exception, another exception occurred:

...  tons more  ...
```

Our buildbot fleet is not bloody looking.  Which is why I tried it on two different systems and OSes before reporting.  When I do a ./configure and run everything within the source tree it does not fail.  This is only for proper out-of-tree builds (which are what I always use - as should everybody).

Do our buildbots only do in-tree builds?

----------
components: Build
messages: 404159
nosy: gregory.p.smith
priority: high
severity: normal
stage: needs patch
status: open
title: Out of source tree builds failing on main - test_importlib others unreliable
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Mon Oct 18 03:55:48 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 07:55:48 +0000
Subject: [issue44926] [DOC] typing.get_type_hints() raises for type aliases
 with forward references
In-Reply-To: <1629134116.67.0.00330387851755.issue44926@roundup.psfhosted.org>
Message-ID: <1634543748.2.0.123294196136.issue44926@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
assignee:  -> docs at python
components: +Documentation
nosy: +docs at python
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
title: typing.get_type_hints() raises for type aliases with forward references -> [DOC] typing.get_type_hints() raises for type aliases with forward references
type: crash -> behavior
versions:  -Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44926>
_______________________________________

From report at bugs.python.org  Mon Oct 18 04:00:05 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Mon, 18 Oct 2021 08:00:05 +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: <1634544005.09.0.344049302401.issue45506@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

for easy pasting:

git clone https://github.com/python/cpython.git upstream && \
mkdir b-u && cd b-u && \
../upstream/configure --with-pydebug && make -j3 && \
./python -m test.regrtest test_importlib

[change python to python.exe for macos, adjust -j as appropriate]

(if I can figure out git bisect command i'll start one before going to bed...)

(oh hey, i've got macOS producing the same error as Linux now somehow)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Mon Oct 18 04:03:33 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Mon, 18 Oct 2021 08:03:33 +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: <1634544213.04.0.105979675916.issue45506@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

further down in the tracebacks in that situation:

```
  File "/Users/greg/oss/python/upstream/Lib/importlib/_bootstrap.py", line 887, in _fix_up_module
    assert module.__file__ == __file__, (module.__file__, __file__)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: ('/Users/greg/oss/python/upstream/Lib/zipimport.py', '/Users/greg/oss/python/b-u/../upstream/Lib/zipimport.py')
```

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Mon Oct 18 04:05:09 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Mon, 18 Oct 2021 08:05:09 +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: <1634544309.49.0.441501173146.issue45506@roundup.psfhosted.org>


Change by Gregory P. Smith <greg at krypto.org>:


----------
nosy: +eric.snow

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Mon Oct 18 04:14:50 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 18 Oct 2021 08:14:50 +0000
Subject: [issue42222] Modernize integer test/conversion in randrange()
In-Reply-To: <1604165232.15.0.0916383458838.issue42222@roundup.psfhosted.org>
Message-ID: <1634544890.52.0.614959310473.issue42222@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27294
pull_request: https://github.com/python/cpython/pull/29021

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42222>
_______________________________________

From report at bugs.python.org  Mon Oct 18 04:27:46 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Mon, 18 Oct 2021 08:27:46 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634545666.97.0.93439459439.issue45434@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +corona10
nosy_count: 1.0 -> 2.0
pull_requests: +27295
pull_request: https://github.com/python/cpython/pull/29015

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Mon Oct 18 04:31:32 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Mon, 18 Oct 2021 08:31:32 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634545892.43.0.3941429802.issue45434@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset fd03917786a9036ee87b7df604dfb260cc2420c9 by Dong-hee Na in branch 'main':
bpo-45434: Include stdlib.h for specialize stat (GH-29015)
https://github.com/python/cpython/commit/fd03917786a9036ee87b7df604dfb260cc2420c9


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Mon Oct 18 04:36:15 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Mon, 18 Oct 2021 08:36:15 +0000
Subject: [issue45478] Send a patch to libexpat to solve _POSIX_C_SOURCE issue.
In-Reply-To: <1634263019.88.0.531243767636.issue45478@roundup.psfhosted.org>
Message-ID: <1634546175.26.0.984739766211.issue45478@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45478>
_______________________________________

From report at bugs.python.org  Mon Oct 18 04:47:20 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 08:47:20 +0000
Subject: [issue35799] fix or remove smtpd.PureProxy
In-Reply-To: <1548091515.27.0.738178577175.issue35799@roundup.psfhosted.org>
Message-ID: <1634546840.78.0.849533665191.issue35799@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

The whole smtpd is now deprecated for removal in 3.12.

----------
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35799>
_______________________________________

From report at bugs.python.org  Mon Oct 18 04:50:49 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Mon, 18 Oct 2021 08:50:49 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org>
Message-ID: <1634547049.11.0.672546688035.issue45020@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

could changes related to this be the cause of https://bugs.python.org/issue45506 ?

out of tree builds in main usually cannot pass key tests today.  they often hang or blow up with strange exceptions.

----------
nosy: +gregory.p.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Mon Oct 18 04:51:32 2021
From: report at bugs.python.org (Ruben Vorderman)
Date: Mon, 18 Oct 2021 08:51:32 +0000
Subject: [issue45507] Small oversight in 3.11 gzip.decompress implementation
 with regards to backwards compatibility
Message-ID: <1634547092.41.0.572458235667.issue45507@roundup.psfhosted.org>


New submission from Ruben Vorderman <r.h.p.vorderman at lumc.nl>:

A 'struct.error: unpack requires a buffer of 8 bytes' is thrown when a gzip trailer is truncated instead of an EOFError such as in the 3.10 and prior releases.

----------
components: Library (Lib)
messages: 404165
nosy: rhpvorderman
priority: normal
severity: normal
status: open
title: Small oversight in 3.11 gzip.decompress implementation with regards to backwards compatibility
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45507>
_______________________________________

From report at bugs.python.org  Mon Oct 18 04:52:16 2021
From: report at bugs.python.org (Ruben Vorderman)
Date: Mon, 18 Oct 2021 08:52:16 +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: <1634547136.21.0.378778488661.issue45507@roundup.psfhosted.org>


Change by Ruben Vorderman <r.h.p.vorderman at lumc.nl>:


----------
keywords: +patch
pull_requests: +27296
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29023

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45507>
_______________________________________

From report at bugs.python.org  Mon Oct 18 04:57:28 2021
From: report at bugs.python.org (Mark Shannon)
Date: Mon, 18 Oct 2021 08:57:28 +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: <1634547448.54.0.212747077291.issue45256@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:


New changeset 70945d57e775b335eb58b734d82e68484063e835 by Mark Shannon in branch 'main':
bpo-45256: Avoid C calls for most Python to Python calls. (GH-28937)
https://github.com/python/cpython/commit/70945d57e775b335eb58b734d82e68484063e835


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45256>
_______________________________________

From report at bugs.python.org  Mon Oct 18 05:15:50 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Mon, 18 Oct 2021 09:15: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: <1634548550.12.0.978620000948.issue45506@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

git bisect on Linux yielded this culprit change:


```
79cf20e48d0b5d69d9fac2a0204b5ac2c366066a is the first bad commit
commit 79cf20e48d0b5d69d9fac2a0204b5ac2c366066a
Author: Eric Snow <ericsnowcurrently at gmail.com>
Date:   Thu Oct 14 15:32:18 2021 -0600

    bpo-21736: Set __file__ on frozen stdlib modules. (gh-28656)
```

...
Running a git bisect ritual on macOS wasn't helpful, test_importlib out of tree too often simply hangs there (going much further back).  Apparently more than one possible issue at play here.  Lets let this issue be for the Linux one.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Mon Oct 18 05:21:23 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Mon, 18 Oct 2021 09:21:23 +0000
Subject: [issue21736] Add __file__ attribute to frozen modules
In-Reply-To: <1402589689.02.0.501075866976.issue21736@psf.upfronthosting.co.za>
Message-ID: <1634548883.31.0.725428544878.issue21736@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

That appears to have caused https://bugs.python.org/issue45506

----------
nosy: +gregory.p.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21736>
_______________________________________

From report at bugs.python.org  Mon Oct 18 05:45:06 2021
From: report at bugs.python.org (Ruben Vorderman)
Date: Mon, 18 Oct 2021 09:45:06 +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: <1634550306.59.0.351771249081.issue45507@roundup.psfhosted.org>


Ruben Vorderman <r.h.p.vorderman at lumc.nl> added the comment:

It turns out there is a bug where FNAME and/or FCOMMENT flags are set in the header, but no error is thrown when NAME and COMMENT fields are missing.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45507>
_______________________________________

From report at bugs.python.org  Mon Oct 18 05:47:47 2021
From: report at bugs.python.org (Thomas Wouters)
Date: Mon, 18 Oct 2021 09:47:47 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634550467.15.0.570747192061.issue45434@roundup.psfhosted.org>


Thomas Wouters <thomas at python.org> added the comment:

Victor, what's the benefit of doing this work? Are there real problems this fixes? I'm worried about the churn in third-party extensions, examples, tutorials, etc, especially for audiences that upon seeing a compiler error won't immediately realise they need to include stdlib.h themselves. (Also, since Python.h sets things like _POSIX_C_SOURCE and _XOPEN_SOURCE, including them in the wrong order can produce even more confusing errors, or errors that only appear on some platforms.)

----------
nosy: +twouters

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Mon Oct 18 05:49:42 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Mon, 18 Oct 2021 09:49:42 +0000
Subject: [issue45508] Specialize INPLACE_ADD
Message-ID: <1634550582.0.0.584054071431.issue45508@roundup.psfhosted.org>


New submission from Dennis Sweeney <sweeney.dennis650 at gmail.com>:

I ran on WSL with PGO and got "1.00x faster":
https://gist.github.com/sweeneyde/41a76356e875e2a98d16ce5410ab41c0

My benchmarking doesn't seem particularly reliable, so someone else should probably verify.

Great specialization stats, except for telco, which uses decimal += decimal.

bm_fannkuch:
    inplace_add.specialization_success : 23
    inplace_add.specialization_failure : 3
    inplace_add.hit : 7968285
    inplace_add.deferred : 198
    inplace_add.miss : 39
    inplace_add.deopt : 3
    inplace_add.unquickened : 168

bm_nbody:
    inplace_add.specialization_success : 27
    inplace_add.specialization_failure : 3
    inplace_add.hit : 3600615
    inplace_add.deferred : 198
    inplace_add.miss : 39
    inplace_add.deopt : 3
    inplace_add.unquickened : 178

bm_spectral_norm:
    inplace_add.specialization_success : 24
    inplace_add.specialization_failure : 5
    inplace_add.hit : 2684690
    inplace_add.deferred : 326
    inplace_add.miss : 20843
    inplace_add.deopt : 3
    inplace_add.unquickened : 171

bm_telco:
    inplace_add.specialization_success : 21
    inplace_add.specialization_failure : 18537
    inplace_add.hit : 597
    inplace_add.deferred : 1186282
    inplace_add.miss : 39
    inplace_add.deopt : 3
    inplace_add.unquickened : 187

----------
messages: 404171
nosy: Dennis Sweeney
priority: normal
severity: normal
status: open
title: Specialize INPLACE_ADD

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45508>
_______________________________________

From report at bugs.python.org  Mon Oct 18 05:50:47 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Mon, 18 Oct 2021 09:50:47 +0000
Subject: [issue45508] Specialize INPLACE_ADD
In-Reply-To: <1634550582.0.0.584054071431.issue45508@roundup.psfhosted.org>
Message-ID: <1634550647.77.0.879222189007.issue45508@roundup.psfhosted.org>


Change by Dennis Sweeney <sweeney.dennis650 at gmail.com>:


----------
keywords: +patch
pull_requests: +27297
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29024

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45508>
_______________________________________

From report at bugs.python.org  Mon Oct 18 05:58:07 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 18 Oct 2021 09:58:07 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634551087.71.0.706015023397.issue45434@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I reopen the issue.

----------
resolution: fixed -> 
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Mon Oct 18 06:01:10 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 18 Oct 2021 10:01:10 +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: <1634551270.62.0.84575212713.issue32291@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
nosy:  -vstinner
status: pending -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32291>
_______________________________________

From report at bugs.python.org  Mon Oct 18 06:01:47 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 18 Oct 2021 10:01:47 +0000
Subject: [issue30774] list_repr not safe against concurrent mutation
In-Reply-To: <1498507019.02.0.505462443219.issue30774@psf.upfronthosting.co.za>
Message-ID: <1634551307.95.0.149194096272.issue30774@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
nosy:  -vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30774>
_______________________________________

From report at bugs.python.org  Mon Oct 18 06:12:34 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 10:12:34 +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: <1634551954.33.0.0879451132697.issue32291@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32291>
_______________________________________

From report at bugs.python.org  Mon Oct 18 06:15:46 2021
From: report at bugs.python.org (=?utf-8?q?Lum=C3=ADr_Balhar?=)
Date: Mon, 18 Oct 2021 10:15:46 +0000
Subject: [issue45413] Add install scheme for virtual environments
In-Reply-To: <1633715402.49.0.434363843275.issue45413@roundup.psfhosted.org>
Message-ID: <1634552146.35.0.366047570337.issue45413@roundup.psfhosted.org>


Change by Lum?r Balhar <frenzy.madness at gmail.com>:


----------
nosy: +frenzy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45413>
_______________________________________

From report at bugs.python.org  Mon Oct 18 06:17:17 2021
From: report at bugs.python.org (=?utf-8?q?Lum=C3=ADr_Balhar?=)
Date: Mon, 18 Oct 2021 10:17:17 +0000
Subject: [issue45460] distutils.sysconfig.get_python_lib() does not respect
 sysconfig/distutils install schemes
In-Reply-To: <1634133759.79.0.719278605469.issue45460@roundup.psfhosted.org>
Message-ID: <1634552237.7.0.0440562410642.issue45460@roundup.psfhosted.org>


Change by Lum?r Balhar <frenzy.madness at gmail.com>:


_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45460>
_______________________________________

From report at bugs.python.org  Mon Oct 18 06:20:51 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 18 Oct 2021 10:20:51 +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: <1634552451.52.0.9444450227.issue43760@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> * Cython: https://github.com/cython/cython/pull/4411

Merged:

* 0.29.x: https://github.com/cython/cython/commit/cbddad23e30ea6d31e0178a4c623f1f6d75452c3
* master: https://github.com/cython/cython/commit/4df1103bd30143ce022b07f98a2f62678d417e92

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43760>
_______________________________________

From report at bugs.python.org  Mon Oct 18 06:38:48 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 18 Oct 2021 10:38:48 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634553528.81.0.910647327453.issue45434@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27298
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/29027

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Mon Oct 18 06:41:07 2021
From: report at bugs.python.org (Ruben Vorderman)
Date: Mon, 18 Oct 2021 10:41:07 +0000
Subject: [issue45509] Gzip header corruption not properly checked.
Message-ID: <1634553667.76.0.606198171759.issue45509@roundup.psfhosted.org>


New submission from Ruben Vorderman <r.h.p.vorderman at lumc.nl>:

The following headers are currently allowed while being wrong:

- Headers with FCOMMENT flag set, but with incomplete or missing COMMENT bytes.
- Headers with FNAME flag set, but with incomplete or missing NAME bytes
- Headers with FHCRC set, the crc is read, but not checked.

----------
components: Library (Lib)
messages: 404174
nosy: rhpvorderman
priority: normal
severity: normal
status: open
title: Gzip header corruption not properly checked.
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45509>
_______________________________________

From report at bugs.python.org  Mon Oct 18 07:06:07 2021
From: report at bugs.python.org (Steve Dower)
Date: Mon, 18 Oct 2021 11:06:07 +0000
Subject: [issue45420] Python 3.10 final installation failure
In-Reply-To: <1633828108.74.0.92443333438.issue45420@roundup.psfhosted.org>
Message-ID: <1634555167.21.0.332842085102.issue45420@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

It's not really complicated, it's just a little difficult to find the right files you need.

> Running from the Add Remove Programs entry prompts for admin access.

Which clearly shows it was previously installed by an admin, and so you'll need that to remove/repair/upgrade it properly. If you aren't an administrator on your machine, you'll need to find out who is and ask them to do it.

> Directly running "repair" in the rc2 installer with admin says "No Python 3.10 installation was detected"

This generally means you need a different copy of the installer. There should only be 32-bit and 64-bit ones floating around, but it may be that you actually need RC1 and not RC2? They are all subtly different (most notably in their primary UUID ;) ) and won't repair each other (which would be an upgrade/downgrade, which should work when you haven't deleted all the files manually).

Otherwise, there used to be tools out there that could delete all the registrations in the Windows installer database, but I haven't had to use one in years and I have no idea which would work well. If you can remove all the registration entries (which you can't do by hand, trust me, you need a clever tool) then you should be able to install a new version without hitting these issues.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45420>
_______________________________________

From report at bugs.python.org  Mon Oct 18 07:14:17 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Mon, 18 Oct 2021 11:14:17 +0000
Subject: [issue45510] Specialize BINARY_SUBTRACT
Message-ID: <1634555657.96.0.480345209598.issue45510@roundup.psfhosted.org>


New submission from Dong-hee Na <donghee.na at python.org>:

https://github.com/faster-cpython/ideas/issues/100

----------
messages: 404176
nosy: corona10
priority: normal
severity: normal
status: open
title: Specialize BINARY_SUBTRACT
type: performance
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45510>
_______________________________________

From report at bugs.python.org  Mon Oct 18 07:19:41 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Mon, 18 Oct 2021 11:19:41 +0000
Subject: [issue45510] Specialize BINARY_SUBTRACT
In-Reply-To: <1634555657.96.0.480345209598.issue45510@roundup.psfhosted.org>
Message-ID: <1634555981.41.0.87943143894.issue45510@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
keywords: +patch
pull_requests: +27299
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29010

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45510>
_______________________________________

From report at bugs.python.org  Mon Oct 18 07:40:57 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Mon, 18 Oct 2021 11:40:57 +0000
Subject: [issue26387] Crash calling sqlite3_close with invalid pointer
In-Reply-To: <1455818373.79.0.020961668279.issue26387@psf.upfronthosting.co.za>
Message-ID: <1634557257.84.0.82194400621.issue26387@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

FYI: We've been using sqlite3_close_v2(), when available, since 2017 (see 86a670543ff97d52fd9b8ca0477f8b6d27ee946d), but we now call it with GIL held.

I'm leaning towards closing this as out-of-date. There is no reproducer, there has been no more similar bug reports, and there has been no activity on this issue.


Possible improvement of connection_close():
  1. save database pointer to temporary variable
  2. clear self->db
  3. call sqlite3_close_v2() (without holding GIL)

diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index d6d1fa8bf2..47c0267e89 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -301,9 +301,12 @@ static void
 connection_close(pysqlite_Connection *self)
 {
     if (self->db) {
-        int rc = sqlite3_close_v2(self->db);
-        assert(rc == SQLITE_OK), (void)rc;
+        sqlite *db = self->db;
         self->db = NULL;
+        Py_BEGIN_ALLOW_THREADS
+        int rc = sqlite3_close_v2(db);
+        assert(rc == SQLITE_OK), (void)rc;
+        Py_END_ALLOW_THREADS
     }
 }
 }

----------
nosy: +erlendaasland

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26387>
_______________________________________

From report at bugs.python.org  Mon Oct 18 07:42:47 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Mon, 18 Oct 2021 11:42:47 +0000
Subject: [issue26387] Crash calling sqlite3_close with invalid pointer
In-Reply-To: <1455818373.79.0.020961668279.issue26387@psf.upfronthosting.co.za>
Message-ID: <1634557367.34.0.38640276725.issue26387@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

>From https://sqlite.org/c3ref/close.html:

  If sqlite3_close_v2() is called with unfinalized prepared statements,
  unclosed BLOB handlers, and/or unfinished sqlite3_backups, it returns
  SQLITE_OK regardless, but instead of deallocating the database connection
  immediately, it marks the database connection as an unusable "zombie" and
  makes arrangements to automatically deallocate the database connection after
  all prepared statements are finalized, all BLOB handles are closed, and all
  backups have finished. The sqlite3_close_v2() interface is intended for use
  with host languages that are garbage collected, and where the order in which
  destructors are called is arbitrary.


Also:

  Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer argument
  is a harmless no-op.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26387>
_______________________________________

From report at bugs.python.org  Mon Oct 18 07:48:39 2021
From: report at bugs.python.org (Ruben Vorderman)
Date: Mon, 18 Oct 2021 11:48:39 +0000
Subject: [issue45509] Gzip header corruption not properly checked.
In-Reply-To: <1634553667.76.0.606198171759.issue45509@roundup.psfhosted.org>
Message-ID: <1634557719.47.0.93301553489.issue45509@roundup.psfhosted.org>


Change by Ruben Vorderman <r.h.p.vorderman at lumc.nl>:


----------
keywords: +patch
pull_requests: +27300
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29028

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45509>
_______________________________________

From report at bugs.python.org  Mon Oct 18 08:01:32 2021
From: report at bugs.python.org (Ruben Vorderman)
Date: Mon, 18 Oct 2021 12:01:32 +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: <1634558492.09.0.01539174553.issue45507@roundup.psfhosted.org>


Change by Ruben Vorderman <r.h.p.vorderman at lumc.nl>:


----------
pull_requests: +27301
pull_request: https://github.com/python/cpython/pull/29029

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45507>
_______________________________________

From report at bugs.python.org  Mon Oct 18 08:32:04 2021
From: report at bugs.python.org (Romuald Brunet)
Date: Mon, 18 Oct 2021 12:32:04 +0000
Subject: [issue45511] input() method limited to 4095 characters on *NIX
Message-ID: <1634560324.05.0.266580517788.issue45511@roundup.psfhosted.org>


New submission from Romuald Brunet <romuald.brunet at gmail.com>:

When run in non-interactive mode and with a TTY stdin, the input() method will not read more than 4095 characters

Simple example:

>>> foo = input()  # paste a 5000 character pasteboard (one line)
>>> print(len(foo))
4095

Note that this will **not** happen when using an interactive shell (using python -i on the same script will not have the 4095 limit)

I've traced the issue (I think) to the fgets function called from my_fgets in myreadline.c, but I have no clue as to how one might fix this.

----------
components: Interpreter Core
messages: 404179
nosy: Romuald
priority: normal
severity: normal
status: open
title: input() method limited to 4095 characters on *NIX
type: behavior
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45511>
_______________________________________

From report at bugs.python.org  Mon Oct 18 08:54:07 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Mon, 18 Oct 2021 12:54:07 +0000
Subject: [issue26143] Ensure that IDLE's stdlib imports are from the stdlib
In-Reply-To: <1453089950.28.0.356846327087.issue26143@psf.upfronthosting.co.za>
Message-ID: <1634561647.06.0.496292134588.issue26143@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I was CC-ed on a response to a user who reported module shadowing as a security issue.  If it is disabled by default, we could add an option to enable for intentional experiments.  See idle.py.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26143>
_______________________________________

From report at bugs.python.org  Mon Oct 18 08:55:52 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Mon, 18 Oct 2021 12:55:52 +0000
Subject: [issue26143] Ensure that IDLE's stdlib imports are from the stdlib
In-Reply-To: <1453089950.28.0.356846327087.issue26143@psf.upfronthosting.co.za>
Message-ID: <1634561752.51.0.0687721506083.issue26143@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I believe standard interpreter only adds '' to path after its startup.  But it might be vulnerable to shadowing of delayed imports.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26143>
_______________________________________

From report at bugs.python.org  Mon Oct 18 08:59:11 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Mon, 18 Oct 2021 12:59:11 +0000
Subject: [issue45512] [sqlite3] simplify "isolation level"
Message-ID: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org>


New submission from Erlend E. Aasland <erlend.aasland at innova.no>:

While working on bpo-45126 / GH-28227 (and while working on the AC conversion, bpo-40956), I've been slightly frustrated on the implementation of sqlite3 "isolation level". The code is messy, and we've got two connection members that carry pretty much the same type of information (self->isolation_level, and self->begin_statement).

I would like to make the following enhancements:
  - merge 'isolation_level' and 'begin_statement' members in some kind of way
  - split pysqlite_connection_set_isolation_level():
    + one method for parsing and storing the 'isolation_level' member
    + one method for carrying out any needed SQLite API operation

This should result in a cleaner connection __init__() method.


Another slightly related performance enhancement could be to cache the "begin" (and "commit") statements as sqlite3_stmt pointers on the connection object, but that is a digression.

----------
components: Extension Modules
messages: 404182
nosy: erlendaasland
priority: low
severity: normal
status: open
title: [sqlite3] simplify "isolation level"
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45512>
_______________________________________

From report at bugs.python.org  Mon Oct 18 09:10:35 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 18 Oct 2021 13:10:35 +0000
Subject: [issue37295] Possible optimizations for math.comb()
In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org>
Message-ID: <1634562635.69.0.477371537259.issue37295@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27302
pull_request: https://github.com/python/cpython/pull/29030

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37295>
_______________________________________

From report at bugs.python.org  Mon Oct 18 09:17:23 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Mon, 18 Oct 2021 13:17:23 +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: <1634563043.65.0.30540684077.issue45490@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

+1!

See also bpo-43502

----------
nosy: +erlendaasland

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45490>
_______________________________________

From report at bugs.python.org  Mon Oct 18 09:18:12 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 18 Oct 2021 13:18:12 +0000
Subject: [issue37295] Possible optimizations for math.comb()
In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org>
Message-ID: <1634563092.49.0.679112189023.issue37295@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Here is more optimized PR inspired by PR 29020. It would be too long to explain how PR 29020 can be improved, so I write a new PR.

Basically it implements Raymond's idea #1, but supports n>62 for smaller k.

How to calculate limits:

import math
n = m = 2**64
k = 1
while True:
    nmax = int(math.ceil((m * math.factorial(k-1)) ** (1/k) + (k-1)/2)) + 100
    n = min(n, nmax)
    while math.comb(n, k) * k >= m:
        n -= 1
    if n < 2*k: break
    print(k, n)
    k += 1

----------
versions: +Python 3.11 -Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37295>
_______________________________________

From report at bugs.python.org  Mon Oct 18 09:18:50 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Mon, 18 Oct 2021 13:18:50 +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: <1634563130.8.0.133418085752.issue45490@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

Previous discussion on Discourse:

https://discuss.python.org/t/what-to-do-with-unsafe-macros/7771

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45490>
_______________________________________

From report at bugs.python.org  Mon Oct 18 09:31:04 2021
From: report at bugs.python.org (Timothe Litt)
Date: Mon, 18 Oct 2021 13:31:04 +0000
Subject: [issue45513] PIP error Cannot call rmtree on a symbolic link should
 report the lilnk
Message-ID: <1634563864.17.0.975785076379.issue45513@roundup.psfhosted.org>


New submission from Timothe Litt <tlhackque at yahoo.com>:

Debugging this would be a whole lot easier if the symlink in question was in the error message... (Not to mention that "successfully uninstalled the installer followed by why the new one can't be installed isn't a good thing....)

pip3 install --upgrade pip
Requirement already satisfied: pip in /usr/local/lib/python3.10/site-packages (21.2.3)
Collecting pip
  Using cached pip-21.3-py3-none-any.whl (1.7 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.3
    Uninstalling pip-21.2.3:
      Successfully uninstalled pip-21.2.3
ERROR: Could not install packages due to an OSError: Cannot call rmtree on a symbolic link

----------
components: Installation
messages: 404186
nosy: tlhackque
priority: normal
severity: normal
status: open
title: PIP error Cannot call rmtree on a symbolic link should report the lilnk
type: enhancement
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45513>
_______________________________________

From report at bugs.python.org  Mon Oct 18 10:03:36 2021
From: report at bugs.python.org (Ken Jin)
Date: Mon, 18 Oct 2021 14:03:36 +0000
Subject: [issue45330] dulwich_log performance regression in 3.10
In-Reply-To: <1633007368.54.0.0773120735117.issue45330@roundup.psfhosted.org>
Message-ID: <1634565816.12.0.167938403503.issue45330@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

Considering both Inada-san and I can't repro this on Linux and Windows respectively, I'm closing this and blaming code placement or some magic. Thanks everyone.

----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45330>
_______________________________________

From report at bugs.python.org  Mon Oct 18 10:26:19 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 14:26:19 +0000
Subject: [issue44191] Getting an ImportError DLL load failed while importing
 _ssl
In-Reply-To: <1621527722.25.0.757236958787.issue44191@roundup.psfhosted.org>
Message-ID: <1634567179.6.0.494118682509.issue44191@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44191>
_______________________________________

From report at bugs.python.org  Mon Oct 18 10:26:29 2021
From: report at bugs.python.org (Eric Snow)
Date: Mon, 18 Oct 2021 14:26:29 +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: <1634567189.4.0.286854592146.issue45506@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

I'm looking into it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Mon Oct 18 10:32:40 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Mon, 18 Oct 2021 14:32:40 +0000
Subject: [issue45221] Linker flags starting with -h breaks setup.py
 (regression)
In-Reply-To: <1631804203.7.0.524724045399.issue45221@roundup.psfhosted.org>
Message-ID: <1634567560.66.0.283269391969.issue45221@roundup.psfhosted.org>


Change by Andrei Kulakov <andrei.avk at gmail.com>:


----------
keywords: +patch
nosy: +andrei.avk
nosy_count: 1.0 -> 2.0
pull_requests: +27303
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29031

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45221>
_______________________________________

From report at bugs.python.org  Mon Oct 18 10:43:05 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 18 Oct 2021 14:43:05 +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: <1634568185.34.0.79579073752.issue43760@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27304
pull_request: https://github.com/python/cpython/pull/29032

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43760>
_______________________________________

From report at bugs.python.org  Mon Oct 18 10:49:09 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Mon, 18 Oct 2021 14:49:09 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634568549.24.0.543288261588.issue45452@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

@serhiy
what is the main concern about this feature?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Mon Oct 18 10:50:52 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Mon, 18 Oct 2021 14:50:52 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634568652.93.0.790249445901.issue45452@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

if you think that this feature is not usable, I will let gdbms maintainers write the idea to the Python-dev mailing list if they want to enable this feature.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Mon Oct 18 10:54:26 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Mon, 18 Oct 2021 14:54:26 +0000
Subject: [issue45221] Linker flags starting with -h breaks setup.py
 (regression)
In-Reply-To: <1631804203.7.0.524724045399.issue45221@roundup.psfhosted.org>
Message-ID: <1634568866.4.0.766656153206.issue45221@roundup.psfhosted.org>


Change by Andrei Kulakov <andrei.avk at gmail.com>:


----------
nosy: +kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45221>
_______________________________________

From report at bugs.python.org  Mon Oct 18 11:08:36 2021
From: report at bugs.python.org (Eric Snow)
Date: Mon, 18 Oct 2021 15:08:36 +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: <1634569716.28.0.972882240829.issue45506@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

> Do our buildbots only do in-tree builds?

>From what I understand, we do not have any (stable?) buildbots that check out-of-tree builds.

FWIW, in the last month I started testing my changes out-of-tree before merging, after Victor once pointed out that I had broken such builds.  Clearly there must be a gap in what I'm doing.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Mon Oct 18 11:28:21 2021
From: report at bugs.python.org (Ned Deily)
Date: Mon, 18 Oct 2021 15:28:21 +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: <1634570901.85.0.992046246141.issue45506@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

@gps, on macOS, you may need to bump the open file descriptors limit for the test process, i.e. ulimit -n 1000. I build and run out-of-tree builds all the time on macOS.

----------
nosy: +ned.deily

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Mon Oct 18 11:37:15 2021
From: report at bugs.python.org (Ned Deily)
Date: Mon, 18 Oct 2021 15:37:15 +0000
Subject: [issue45513] PIP error Cannot call rmtree on a symbolic link should
 report the lilnk
In-Reply-To: <1634563864.17.0.975785076379.issue45513@roundup.psfhosted.org>
Message-ID: <1634571435.45.0.776596917377.issue45513@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

This appears to be an issue with pip. You should report the issue to the pip project: https://github.com/pypa/pip/issues/

----------
nosy: +ned.deily
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45513>
_______________________________________

From report at bugs.python.org  Mon Oct 18 11:49:19 2021
From: report at bugs.python.org (Alex Waygood)
Date: Mon, 18 Oct 2021 15:49:19 +0000
Subject: [issue39679] functools: singledispatchmethod doesn't work with
 classmethod
In-Reply-To: <1582053375.25.0.178240077179.issue39679@roundup.psfhosted.org>
Message-ID: <1634572159.7.0.0397804650846.issue39679@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
keywords: +patch
pull_requests: +27305
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29034

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39679>
_______________________________________

From report at bugs.python.org  Mon Oct 18 11:51:27 2021
From: report at bugs.python.org (Ned Deily)
Date: Mon, 18 Oct 2021 15:51:27 +0000
Subject: [issue45221] Linker flags starting with -h breaks setup.py
 (regression)
In-Reply-To: <1631804203.7.0.524724045399.issue45221@roundup.psfhosted.org>
Message-ID: <1634572287.06.0.22012693173.issue45221@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
nosy: +ned.deily

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45221>
_______________________________________

From report at bugs.python.org  Mon Oct 18 11:57:29 2021
From: report at bugs.python.org (Christian Heimes)
Date: Mon, 18 Oct 2021 15:57:29 +0000
Subject: [issue45459] Limited API support for Py_buffer
In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>
Message-ID: <1634572649.97.0.676978309211.issue45459@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
keywords: +patch
pull_requests: +27306
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29035

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Mon Oct 18 12:09:44 2021
From: report at bugs.python.org (Ken Jin)
Date: Mon, 18 Oct 2021 16:09:44 +0000
Subject: [issue45221] Linker flags starting with -h breaks setup.py
 (regression)
In-Reply-To: <1631804203.7.0.524724045399.issue45221@roundup.psfhosted.org>
Message-ID: <1634573384.82.0.805629323347.issue45221@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

@ux, could you please provide more information? What platform are you on, and what compiler version produces this error?

----------
nosy: +christian.heimes

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45221>
_______________________________________

From report at bugs.python.org  Mon Oct 18 12:10:54 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Mon, 18 Oct 2021 16:10:54 +0000
Subject: [issue45221] Linker flags starting with -h breaks setup.py
 (regression)
In-Reply-To: <1631804203.7.0.524724045399.issue45221@roundup.psfhosted.org>
Message-ID: <1634573454.87.0.236218872295.issue45221@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Inada: adding you as you merged the patch that made the switch optparse->argparse.

----------
nosy: +methane

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45221>
_______________________________________

From report at bugs.python.org  Mon Oct 18 12:26:02 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 16:26:02 +0000
Subject: [issue43537] interpreter crashes when handling long text in input()
In-Reply-To: <1616050088.79.0.477395111242.issue43537@roundup.psfhosted.org>
Message-ID: <1634574362.89.0.658912226256.issue43537@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43537>
_______________________________________

From report at bugs.python.org  Mon Oct 18 12:28:51 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 16:28:51 +0000
Subject: [issue42935] Pickle can't import builtins at exit
In-Reply-To: <1610712338.22.0.647900497597.issue42935@roundup.psfhosted.org>
Message-ID: <1634574531.27.0.40142358361.issue42935@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42935>
_______________________________________

From report at bugs.python.org  Mon Oct 18 12:33:41 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 16:33:41 +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: <1634574821.32.0.584473222651.issue36281@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

I don't get the error on 3.11, and I think it may have been fixed under Issue39104.

----------
nosy: +iritkatriel
resolution:  -> duplicate
status: open -> pending
superseder:  -> ProcessPoolExecutor hangs on shutdown nowait with pickling failure

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36281>
_______________________________________

From report at bugs.python.org  Mon Oct 18 12:40:51 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 18 Oct 2021 16:40:51 +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: <1634575251.49.0.311197491791.issue43760@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 034f607906de6e375cc9a98cc3b09f6d56f8be10 by Victor Stinner in branch 'main':
bpo-43760: Rename _PyThreadState_DisableTracing() (GH-29032)
https://github.com/python/cpython/commit/034f607906de6e375cc9a98cc3b09f6d56f8be10


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43760>
_______________________________________

From report at bugs.python.org  Mon Oct 18 12:51:03 2021
From: report at bugs.python.org (Jason R. Coombs)
Date: Mon, 18 Oct 2021 16:51:03 +0000
Subject: [issue45427] importlib.readers.MultiplexedPath
In-Reply-To: <1633932362.03.0.000713660770349.issue45427@roundup.psfhosted.org>
Message-ID: <1634575863.13.0.628144349578.issue45427@roundup.psfhosted.org>


Jason R. Coombs <jaraco at jaraco.com> added the comment:

Thanks Dave for closing. I would recommend in the future if you have packaging questions to bring them to packaging problems repo as indicated at https://packaging.python.org/support/#how-to-get-support.

Glad to hear that `as_file` promised to do what you need. Do be aware that it doesn't yet support a directory of files (only individual files), a known deficiency (https://github.com/python/importlib_resources/issues/228).

I don't have any good advice on separating Python and non-Python code in your package. You're right that the current interfaces for supporting package resources are specifically designed around resources in a Python package (aka package_data).

I agree that there may not be a robust way to locate "data_files". It sounds like you have a use-case that's not well served by the current implementation. I'd recommend to file a report describing a detailed minimal example of the use-case you have and what you'd like to see (in packaging-problems; maybe search if someone's already reported). One thing you'll want to answer is where do you expect these files to be installed if not in the python package?

Thanks and good luck!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45427>
_______________________________________

From report at bugs.python.org  Mon Oct 18 12:58:25 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 16:58:25 +0000
Subject: =?utf-8?q?=5Bissue37722=5D_imaplib_crashes_when_trying_to_read_a_letter_f?=
 =?utf-8?b?cm9tIGFuIGltYXAgc2VydmVyIGltYXBzLtC/0L7Rh9GC0LAu0YDRg9GB?=
Message-ID: <1634576305.86.0.467134973778.issue37722@roundup.psfhosted.org>


New submission from Irit Katriel <iritkatriel at gmail.com>:

Changing type because crash typically refers to segfault or hang and not an exception.

It doesn't seem possible to connect to imaps.?????.??c anymore.  Is there another way to reproduce this problem?

----------
nosy: +iritkatriel
type: crash -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37722>
_______________________________________

From report at bugs.python.org  Mon Oct 18 13:07:59 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 18 Oct 2021 17:07:59 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634576879.48.0.299758679002.issue45452@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

The main concern is that it is not clear how to use this feature, and if it is not clear, it will not be used. I am not even sure that it is Pythonic, because I do not know how to use it. For example, can it be used to implement transactions? How it works with multithreading and multiprocessing if works at all? Does it restore after failure automatically or needs some user's action? And how do user can know that some actions are required?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Mon Oct 18 13:09:59 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 17:09:59 +0000
Subject: [issue43668] Segfault with for fresh ubuntu 20.04 install
In-Reply-To: <1617102331.02.0.538346172049.issue43668@roundup.psfhosted.org>
Message-ID: <1634576999.84.0.633476369497.issue43668@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43668>
_______________________________________

From report at bugs.python.org  Mon Oct 18 13:18:41 2021
From: report at bugs.python.org (Christian Heimes)
Date: Mon, 18 Oct 2021 17:18:41 +0000
Subject: [issue45459] Limited API support for Py_buffer
In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>
Message-ID: <1634577521.58.0.525897285129.issue45459@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

CC Antoine for his expertise of the buffer protocol

Opaque Py_Buffer and PyObject structs will require a different approach and prevent some optimizations. The consumer will have to malloc() a Py_buffer struct on the heap. In non-trivial cases the producer (exporter) may have to malloc() another blob and store it in Py_buffer.internal [1]. I'm not particularly worried about the performance of malloc here.

[1] https://docs.python.org/3/c-api/buffer.html?highlight=pybuffer#c.Py_buffer.internal

----------
nosy: +pitrou

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Mon Oct 18 13:34:19 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 17:34:19 +0000
Subject: [issue36581] __dir__ on unittest.mock not safe for all spec types
In-Reply-To: <1554849971.17.0.495097985154.issue36581@roundup.psfhosted.org>
Message-ID: <1634578459.34.0.0704249760366.issue36581@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Changing type as crash typically refers to segfault or hang or the like, and not an exception.

Reproduced on 3.11.

----------
nosy: +iritkatriel
type: crash -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36581>
_______________________________________

From report at bugs.python.org  Mon Oct 18 13:46:35 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 17:46:35 +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: <1634579195.94.0.955062800032.issue35828@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

3.8 is no longer being maintained. Is this an issue on 3.9+?

----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35828>
_______________________________________

From report at bugs.python.org  Mon Oct 18 13:48:11 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 17:48:11 +0000
Subject: [issue24319] Crash during "make coverage-report"
In-Reply-To: <1432832461.97.0.279218434752.issue24319@psf.upfronthosting.co.za>
Message-ID: <1634579291.27.0.174241156513.issue24319@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

3.6 is no longer maintained. Is this still an issue on 3.9+?

----------
nosy: +iritkatriel
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24319>
_______________________________________

From report at bugs.python.org  Mon Oct 18 14:03:23 2021
From: report at bugs.python.org (Jason R. Coombs)
Date: Mon, 18 Oct 2021 18:03:23 +0000
Subject: [issue45514] Deprecate legacy functions from importlib.resources
 (importlib_resources 5.3)
Message-ID: <1634580203.88.0.440304730222.issue45514@roundup.psfhosted.org>


New submission from Jason R. Coombs <jaraco at jaraco.com>:

[importlib_resources 5.3](https://importlib-resources.readthedocs.io/en/latest/history.html#v5-3-0), deprecates the functions in _legacy. Let's introduce that deprecation in CPython also.

In addition to merging the changes from importlib_resources, this change will require some updates to documentation.

----------
assignee: jaraco
components: Library (Lib)
messages: 404205
nosy: FFY00, jaraco
priority: normal
severity: normal
status: open
title: Deprecate legacy functions from importlib.resources (importlib_resources 5.3)
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45514>
_______________________________________

From report at bugs.python.org  Mon Oct 18 14:25:04 2021
From: report at bugs.python.org (wim glenn)
Date: Mon, 18 Oct 2021 18:25:04 +0000
Subject: [issue40379] multiprocessing's default start method of
 fork()-without-exec() is broken
In-Reply-To: <1587752543.41.0.119768714545.issue40379@roundup.psfhosted.org>
Message-ID: <1634581504.66.0.422710284922.issue40379@roundup.psfhosted.org>


Change by wim glenn <wim.glenn at gmail.com>:


----------
nosy: +wim.glenn

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40379>
_______________________________________

From report at bugs.python.org  Mon Oct 18 14:26:30 2021
From: report at bugs.python.org (Ned Deily)
Date: Mon, 18 Oct 2021 18:26:30 +0000
Subject: [issue45221] Linker flags starting with -h breaks setup.py
 (regression)
In-Reply-To: <1631804203.7.0.524724045399.issue45221@roundup.psfhosted.org>
Message-ID: <1634581590.46.0.614198433374.issue45221@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:


New changeset 6a533a423869e28d9086cf4d79029f59e9eec916 by andrei kulakov in branch 'main':
bpo-45221: Fix handling of LDFLAGS and CPPFLAGS options in setup.py (GH-29031)
https://github.com/python/cpython/commit/6a533a423869e28d9086cf4d79029f59e9eec916


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45221>
_______________________________________

From report at bugs.python.org  Mon Oct 18 14:26:55 2021
From: report at bugs.python.org (Jason R. Coombs)
Date: Mon, 18 Oct 2021 18:26:55 +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: <1634581615.31.0.187610153468.issue45514@roundup.psfhosted.org>


Change by Jason R. Coombs <jaraco at jaraco.com>:


----------
keywords: +patch
pull_requests: +27307
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29036

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45514>
_______________________________________

From report at bugs.python.org  Mon Oct 18 14:27:18 2021
From: report at bugs.python.org (miss-islington)
Date: Mon, 18 Oct 2021 18:27:18 +0000
Subject: [issue45221] Linker flags starting with -h breaks setup.py
 (regression)
In-Reply-To: <1631804203.7.0.524724045399.issue45221@roundup.psfhosted.org>
Message-ID: <1634581638.56.0.368780380961.issue45221@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +27308
pull_request: https://github.com/python/cpython/pull/29037

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45221>
_______________________________________

From report at bugs.python.org  Mon Oct 18 14:47:36 2021
From: report at bugs.python.org (Paul Ganssle)
Date: Mon, 18 Oct 2021 18:47:36 +0000
Subject: [issue45515] Add reference to zoneinfo in the datetime module
 documetnation
Message-ID: <1634582856.08.0.897823851685.issue45515@roundup.psfhosted.org>


New submission from Paul Ganssle <bpo at m.ganssle.io>:

Right now the datetime documentation recommends using `dateutil.tz` for IANA time zones, but we should update this to point to `zoneinfo`.

----------
assignee: p-ganssle
components: Documentation
messages: 404207
nosy: p-ganssle
priority: low
severity: normal
status: open
title: Add reference to zoneinfo in the datetime module documetnation
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45515>
_______________________________________

From report at bugs.python.org  Mon Oct 18 14:49:26 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 18 Oct 2021 18:49:26 +0000
Subject: [issue37295] Possible optimizations for math.comb()
In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org>
Message-ID: <1634582966.04.0.182201022595.issue37295@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Microbenchmarks:

$ ./python -m pyperf timeit -s 'from math import comb' '[comb(n, k) for n in range(63) for k in range(n+1)]'
Mean +- std dev: 1.57 ms +- 0.07 ms -> 209 us +- 11 us: 7.53x faster

$ ./python -m pyperf timeit -s 'from math import comb' 'comb(62, 31)'
Mean +- std dev: 2.95 us +- 0.14 us -> 296 ns +- 11 ns: 9.99x faster

$ ./python -m pyperf timeit -s 'from math import comb' 'comb(110, 15)'
Mean +- std dev: 1.33 us +- 0.06 us -> 95.8 ns +- 3.1 ns: 13.86x faster

$ ./python -m pyperf timeit -s 'from math import comb' 'comb(1449, 7)'
Mean +- std dev: 689 ns +- 33 ns -> 59.0 ns +- 3.2 ns: 11.69x faster

$ ./python -m pyperf timeit -s 'from math import comb' 'comb(3329022, 3)'
Mean +- std dev: 308 ns +- 19 ns -> 57.2 ns +- 4.2 ns: 5.39x faster

Now I want to try to optimize for larger arguments. Perhaps using recursive formula C(n, k) = C(n, j)*C(n-j, k-j)//C(k, j) where j=k//2 could help.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37295>
_______________________________________

From report at bugs.python.org  Mon Oct 18 14:49:36 2021
From: report at bugs.python.org (miss-islington)
Date: Mon, 18 Oct 2021 18:49:36 +0000
Subject: [issue45221] Linker flags starting with -h breaks setup.py
 (regression)
In-Reply-To: <1631804203.7.0.524724045399.issue45221@roundup.psfhosted.org>
Message-ID: <1634582976.42.0.966219808933.issue45221@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset b1949e0b58714724a3105cad3ad1b61384688da7 by Miss Islington (bot) in branch '3.10':
[3.10] bpo-45221: Fix handling of LDFLAGS and CPPFLAGS options in setup.py (GH-29031) (GH-29037)
https://github.com/python/cpython/commit/b1949e0b58714724a3105cad3ad1b61384688da7


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45221>
_______________________________________

From report at bugs.python.org  Mon Oct 18 14:53:22 2021
From: report at bugs.python.org (Paul Ganssle)
Date: Mon, 18 Oct 2021 18:53:22 +0000
Subject: [issue45515] Add reference to zoneinfo in the datetime module
 documetnation
In-Reply-To: <1634582856.08.0.897823851685.issue45515@roundup.psfhosted.org>
Message-ID: <1634583202.49.0.0873784231889.issue45515@roundup.psfhosted.org>


Change by Paul Ganssle <bpo at m.ganssle.io>:


----------
keywords: +patch
pull_requests: +27309
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29038

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45515>
_______________________________________

From report at bugs.python.org  Mon Oct 18 14:55:53 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Mon, 18 Oct 2021 18:55:53 +0000
Subject: [issue25066] Better repr for multiprocessing.synchronize objects
In-Reply-To: <1441945512.28.0.268911334925.issue25066@psf.upfronthosting.co.za>
Message-ID: <1634583353.67.0.957720130145.issue25066@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Nihir: in synchronize.py, only Barrier inherits from threading.Barrier, as far as I can see. Other classes inherit from `object`.

----------
nosy: +andrei.avk

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25066>
_______________________________________

From report at bugs.python.org  Mon Oct 18 15:02:52 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Mon, 18 Oct 2021 19:02:52 +0000
Subject: [issue44210] Make importlib.metadata._meta.PackageMetadata public
In-Reply-To: <1621628484.8.0.908930544273.issue44210@roundup.psfhosted.org>
Message-ID: <1634583772.58.0.700045989972.issue44210@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44210>
_______________________________________

From report at bugs.python.org  Mon Oct 18 15:07:19 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Mon, 18 Oct 2021 19:07:19 +0000
Subject: [issue45516] Add protocol description to the Traversable and
 TraversableResources documentation
Message-ID: <1634584039.33.0.945856615309.issue45516@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
assignee: docs at python
components: Documentation
nosy: FFY00, docs at python
priority: normal
severity: normal
status: open
title: Add protocol description to the Traversable and TraversableResources documentation

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45516>
_______________________________________

From report at bugs.python.org  Mon Oct 18 15:12:35 2021
From: report at bugs.python.org (Ned Deily)
Date: Mon, 18 Oct 2021 19:12:35 +0000
Subject: [issue45221] Linker flags starting with -h breaks setup.py
 (regression)
In-Reply-To: <1631804203.7.0.524724045399.issue45221@roundup.psfhosted.org>
Message-ID: <1634584355.52.0.876460210589.issue45221@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

Thanks for the report, @ux, and thanks for the PR, Andrei! I've backported the fix for release in 3.10.1 but I think it's pretty late in 3.9's release cycle and we've lived this long with the issue.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45221>
_______________________________________

From report at bugs.python.org  Mon Oct 18 15:13:00 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Mon, 18 Oct 2021 19:13:00 +0000
Subject: [issue45516] Add protocol description to the Traversable and
 TraversableResources documentation
Message-ID: <1634584380.03.0.994661604041.issue45516@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
keywords: +patch
pull_requests: +27310
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29039

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45516>
_______________________________________

From report at bugs.python.org  Mon Oct 18 15:16:45 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Mon, 18 Oct 2021 19:16:45 +0000
Subject: [issue45221] Linker flags starting with -h breaks setup.py
 (regression)
In-Reply-To: <1631804203.7.0.524724045399.issue45221@roundup.psfhosted.org>
Message-ID: <1634584605.85.0.762164321938.issue45221@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

I agree re: 3.9, thanks Ned!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45221>
_______________________________________

From report at bugs.python.org  Mon Oct 18 15:35:07 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 19:35:07 +0000
Subject: [issue11275] Linking to gcc's gomp causes crash later.
In-Reply-To: <1298310879.67.0.760994081627.issue11275@psf.upfronthosting.co.za>
Message-ID: <1634585707.94.0.557048283375.issue11275@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Please create a new issue if you see the problem on a current python version.

----------
nosy: +iritkatriel
resolution:  -> out of date
stage: test needed -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11275>
_______________________________________

From report at bugs.python.org  Mon Oct 18 15:46:45 2021
From: report at bugs.python.org (Tal Einat)
Date: Mon, 18 Oct 2021 19:46:45 +0000
Subject: [issue19459] Python does not support the GEORGIAN-PS charset
In-Reply-To: <1383216779.28.0.251946690468.issue19459@psf.upfronthosting.co.za>
Message-ID: <1634586405.12.0.526798120578.issue19459@roundup.psfhosted.org>


Tal Einat <taleinat+python at gmail.com> added the comment:

With recent versions of Python (e.g. 3.9) this no longer causes a crash. Python apparently falls back to UTF-8, at least on my system:

$ LANG=ka_GE.georgianps python3.9
Python 3.9.7 (default, Sep  9 2021, 23:20:13) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale; print(locale.getpreferredencoding())
UTF-8

I'm marking this as fixed. If someone still has issues with this encoding, please open a new issue with up-to-date information.

----------
nosy: +taleinat
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19459>
_______________________________________

From report at bugs.python.org  Mon Oct 18 16:10:47 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 20:10:47 +0000
Subject: [issue34708] Odd crashes/freezes when sys.stdout.shell.console is
 typed
In-Reply-To: <1537152781.74.0.956365154283.issue34708@psf.upfronthosting.co.za>
Message-ID: <1634587847.38.0.120707374209.issue34708@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Terry, I don't see any PseudoOutputFile in the current codebase. Is this out of date?

----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34708>
_______________________________________

From report at bugs.python.org  Mon Oct 18 16:19:58 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 20:19:58 +0000
Subject: [issue33713] memoryview can set an exception in tp_clear
In-Reply-To: <1527768910.92.0.682650639539.issue33713@psf.upfronthosting.co.za>
Message-ID: <1634588398.2.0.208849620129.issue33713@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33713>
_______________________________________

From report at bugs.python.org  Mon Oct 18 16:36:07 2021
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 18 Oct 2021 20:36:07 +0000
Subject: [issue26626] test_dbm_gnu
In-Reply-To: <1458752282.36.0.8486326367.issue26626@psf.upfronthosting.co.za>
Message-ID: <1634589367.61.0.261009394098.issue26626@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:

Judging by the error message ("Device or resource busy:"), it seems likely to me that NFS was the culprit here.  The fact that the tests passed when run alone may point to an issue with the way tests were run as a group, but this has changed significantly since 2016.

If this can still be reproduced with modern versions of everything involved, it may be worth opening a new issue.  In the meantime, I'm closing this as out of date.

----------
nosy: +zach.ware
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26626>
_______________________________________

From report at bugs.python.org  Mon Oct 18 16:37:06 2021
From: report at bugs.python.org (Jesse Kinkead)
Date: Mon, 18 Oct 2021 20:37:06 +0000
Subject: [issue45517] TarFile.add skips files when tarfile name matches a
 directory
Message-ID: <1634589426.34.0.303079244476.issue45517@roundup.psfhosted.org>


New submission from Jesse Kinkead <jesse.kinkead at gmail.com>:

tarfile.open has a "name" parameter that can be used to open a file for reading or writing in the local filesystem. The documentation is unclear what the purpose is if providing a "fileobj" parameter as well, but it has very surprising behavior when the name matches an existing directory.

Specifically, when you provide a "fileobj" for writing and provide a "name" that matches an existing directory, calling .add() on that directory will have it (and any child files) to be silently skipped.

The desired behavior is either to have the files be added (consistent with "name" being totally ignored), or to have it be an error to provide such a "name" value (either one that matches an existing directory, or to provide one at all when using "fileobj").

----------
components: Library (Lib)
files: repro.py
messages: 404217
nosy: jkinkead
priority: normal
severity: normal
status: open
title: TarFile.add skips files when tarfile name matches a directory
versions: Python 3.8
Added file: https://bugs.python.org/file50367/repro.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45517>
_______________________________________

From report at bugs.python.org  Mon Oct 18 16:43:49 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 20:43:49 +0000
Subject: [issue32629] PyImport_ImportModule occasionally cause access violation
In-Reply-To: <1516689389.11.0.467229070634.issue32629@psf.upfronthosting.co.za>
Message-ID: <1634589829.19.0.173282311039.issue32629@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

This looks like you are accessing memory that has been corrupted, which can happen in any number of ways. I am closing this because there isn't enough information to do anything about it.

If you can show us how to reproduce the crash, and it occurs on a current version of python (>= 3.9), then please create a new issue.

----------
nosy: +iritkatriel
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32629>
_______________________________________

From report at bugs.python.org  Mon Oct 18 16:47:42 2021
From: report at bugs.python.org (Ethan Furman)
Date: Mon, 18 Oct 2021 20:47:42 +0000
Subject: [issue45517] TarFile.add skips files when tarfile name matches a
 directory
In-Reply-To: <1634589426.34.0.303079244476.issue45517@roundup.psfhosted.org>
Message-ID: <1634590062.99.0.328871690168.issue45517@roundup.psfhosted.org>


Change by Ethan Furman <ethan at stoneleaf.us>:


----------
nosy: +ethan.furman

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45517>
_______________________________________

From report at bugs.python.org  Mon Oct 18 16:52:18 2021
From: report at bugs.python.org (Tal Einat)
Date: Mon, 18 Oct 2021 20:52:18 +0000
Subject: [issue15251] new.code and new.function crashes Python iterpretter
In-Reply-To: <1341422953.77.0.576650378209.issue15251@psf.upfronthosting.co.za>
Message-ID: <1634590338.49.0.407144413321.issue15251@roundup.psfhosted.org>


Tal Einat <taleinat+python at gmail.com> added the comment:

I couldn't reproduce this on the latest main branch with an updated version of the code sample (see attached repro.py). I also couldn't get such a crash with some variations of this.

I'm marking this as fixed for now. We can re-open this if anyone runs into an up-to-date case of this crash.

----------
nosy: +taleinat
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
Added file: https://bugs.python.org/file50368/repro.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15251>
_______________________________________

From report at bugs.python.org  Mon Oct 18 16:53:29 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Mon, 18 Oct 2021 20:53:29 +0000
Subject: [issue34192] FunctionType.__new__ can generate functions that
 immediately crash
In-Reply-To: <1532318245.8.0.56676864532.issue34192@psf.upfronthosting.co.za>
Message-ID: <1634590409.78.0.719292028086.issue34192@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

>From https://github.com/python/cpython/blob/main/Lib/test/crashers/bogus_code_obj.py :


"""
Broken bytecode objects can easily crash the interpreter.

This is not going to be fixed.  It is generally agreed that there is no
point in writing a bytecode verifier and putting it in CPython just for
this.  Moreover, a verifier is bound to accept only a subset of all safe
bytecodes, so it could lead to unnecessary breakage.
"""

Since this is messing with implementation details of code objects, I'll close this as "won't fix".

----------
nosy: +Dennis Sweeney
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34192>
_______________________________________

From report at bugs.python.org  Mon Oct 18 16:53:49 2021
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 18 Oct 2021 20:53:49 +0000
Subject: [issue25934] ICC compiler: ICC treats denormal floating point numbers
 as 0.0
In-Reply-To: <1450911743.93.0.393041043786.issue25934@psf.upfronthosting.co.za>
Message-ID: <1634590429.28.0.989896414683.issue25934@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:

I no longer have access to ICC, and the ICC buildbots have been mothballed some years ago.  Closing this as out of date; the issue might not be, but the information about it here probably is :)

----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25934>
_______________________________________

From report at bugs.python.org  Mon Oct 18 17:00:16 2021
From: report at bugs.python.org (Eric Snow)
Date: Mon, 18 Oct 2021 21:00:16 +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: <1634590816.89.0.289642505353.issue45506@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
keywords: +patch
pull_requests: +27311
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29040

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Mon Oct 18 17:04:21 2021
From: report at bugs.python.org (Eric Snow)
Date: Mon, 18 Oct 2021 21:04:21 +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: <1634591061.48.0.213679043279.issue45506@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

The PR I put up should fix the problem.  If it doesn't then I'll probably drop the checks in the second half of FrozenImporter._fix_module().

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Mon Oct 18 17:23:30 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 21:23:30 +0000
Subject: [issue26906] Special method lookup fails on uninitialized types
In-Reply-To: <1462194444.45.0.679859267338.issue26906@psf.upfronthosting.co.za>
Message-ID: <1634592210.93.0.247133722382.issue26906@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

All of the examples for python 3 are working now:

>>> import array
>>> it = iter(array.array('i'))
>>> format(it)
'<array.arrayiterator object at 0x10598f7a0>'
>>> format(iter([]))
'<list_iterator object at 0x10598f890>'
>>> import operator
>>> operator.length_hint(iter("abc"))
03

----------
nosy: +iritkatriel
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26906>
_______________________________________

From report at bugs.python.org  Mon Oct 18 17:23:55 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 21:23:55 +0000
Subject: [issue11702] dir on return value of msilib.OpenDatabase() crashes
 python
In-Reply-To: <1301325222.81.0.910767875041.issue11702@psf.upfronthosting.co.za>
Message-ID: <1634592235.0.0.10544369543.issue11702@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Special method lookup fails on uninitialized types

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11702>
_______________________________________

From report at bugs.python.org  Mon Oct 18 17:38:39 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Mon, 18 Oct 2021 21:38:39 +0000
Subject: [issue34708] Odd crashes/freezes when sys.stdout.shell.console is
 typed
In-Reply-To: <1537152781.74.0.956365154283.issue34708@psf.upfronthosting.co.za>
Message-ID: <1634593119.66.0.800944056435.issue34708@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Unfortunately, no.  The standard stream replacements were renamed to StdOutputFile, etc, and slightly revised, but the buggy behavior remains.  The worst is that shell restart does not completely restart the shell.  It has to be closed instead.

I would like to fix this first by adding 'provision for graceful failure'.  'try' is now nearly free when there is no exception.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34708>
_______________________________________

From report at bugs.python.org  Mon Oct 18 17:39:41 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 21:39:41 +0000
Subject: [issue41560] pathlib.Path.glob fails on empty string
In-Reply-To: <1597543364.86.0.966636544489.issue41560@roundup.psfhosted.org>
Message-ID: <1634593181.36.0.228424185072.issue41560@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

path.glob() returns a generator now, but the contents are still this exception:

>>> from pathlib import Path
>>> path = Path('./myfile.txt')
>>> 
>>> path.glob('')
<generator object Path.glob at 0x1059abc50>
>>> list(path.glob(''))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/iritkatriel/src/cpython-654/Lib/pathlib.py", line 1027, in glob
    raise ValueError("Unacceptable pattern: {!r}".format(pattern))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Unacceptable pattern: ''
>>> 


I'm changing the type as crash typically refers to segfaults or hangs and not exceptions reporting errors in input.

----------
nosy: +iritkatriel
type: crash -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41560>
_______________________________________

From report at bugs.python.org  Mon Oct 18 17:41:12 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 21:41:12 +0000
Subject: [issue34708] Odd crashes/freezes when sys.stdout.shell.console is
 typed
In-Reply-To: <1537152781.74.0.956365154283.issue34708@psf.upfronthosting.co.za>
Message-ID: <1634593272.84.0.985053528346.issue34708@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34708>
_______________________________________

From report at bugs.python.org  Mon Oct 18 17:43:34 2021
From: report at bugs.python.org (Thomas Wouters)
Date: Mon, 18 Oct 2021 21:43:34 +0000
Subject: [issue29941] Confusion between asserts and Py_DEBUG
In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za>
Message-ID: <1634593414.33.0.849950400664.issue29941@roundup.psfhosted.org>


Change by Thomas Wouters <thomas at python.org>:


----------
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29941>
_______________________________________

From report at bugs.python.org  Mon Oct 18 17:45:12 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Mon, 18 Oct 2021 21:45:12 +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: <1634593512.54.0.465005208831.issue45506@roundup.psfhosted.org>


Barry A. Warsaw <barry at python.org> added the comment:

FWIW, Greg's test case does not fail for me with 6a533a4238

----------
nosy: +barry

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Mon Oct 18 17:46:45 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 21:46:45 +0000
Subject: [issue32966] Python 3.7.2 - 0x80070643 - Fatal Error during
 installation
In-Reply-To: <1519767226.7.0.467229070634.issue32966@psf.upfronthosting.co.za>
Message-ID: <1634593605.66.0.458879476881.issue32966@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32966>
_______________________________________

From report at bugs.python.org  Mon Oct 18 17:51:35 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 21:51:35 +0000
Subject: [issue44372] Can't install Python3.8, 3.9,
 3.10 various errors including 0x80070643
In-Reply-To: <1623310130.37.0.4237956149.issue44372@roundup.psfhosted.org>
Message-ID: <1634593895.83.0.664258491773.issue44372@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Closing as it's not clear what the issue is and there was no reply to follow-up questions. 

Please create a new issue if you can provide more information.

----------
nosy: +iritkatriel
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44372>
_______________________________________

From report at bugs.python.org  Mon Oct 18 17:56:10 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Mon, 18 Oct 2021 21:56:10 +0000
Subject: =?utf-8?q?=5Bissue37722=5D_imaplib_crashes_when_trying_to_read_a_letter_f?=
 =?utf-8?b?cm9tIGFuIGltYXAgc2VydmVyIGltYXBzLtC/0L7Rh9GC0LAu0YDRg9GB?=
In-Reply-To: <1634576305.86.0.467134973778.issue37722@roundup.psfhosted.org>
Message-ID: <1634594170.11.0.339683663143.issue37722@roundup.psfhosted.org>


Change by Barry A. Warsaw <barry at python.org>:


----------
nosy:  -barry

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37722>
_______________________________________

From report at bugs.python.org  Mon Oct 18 17:57:36 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Mon, 18 Oct 2021 21:57:36 +0000
Subject: [issue21736] Add __file__ attribute to frozen modules
In-Reply-To: <1402589689.02.0.501075866976.issue21736@psf.upfronthosting.co.za>
Message-ID: <1634594256.48.0.607381969454.issue21736@roundup.psfhosted.org>


Barry A. Warsaw <barry at python.org> added the comment:

Weird.  PR 28655 is merged on GH, but still shows open on this bpo ticket.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21736>
_______________________________________

From report at bugs.python.org  Mon Oct 18 17:59:48 2021
From: report at bugs.python.org (Tom Karzes)
Date: Mon, 18 Oct 2021 21:59:48 +0000
Subject: [issue9334] argparse does not accept options taking arguments
 beginning with dash (regression from optparse)
In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za>
Message-ID: <1634594388.51.0.604348309722.issue9334@roundup.psfhosted.org>


Tom Karzes <karzes at sonic.net> added the comment:

Is there *still* no fix for this?  I keep running into this bug.  People sometimes say "oh, it's no problem, just use = to associate the option value with the option name".  That is so sad.  It's basically saying "it can't be made to work the way it should, so instead use = to introduce your option values."  I should *never* have to use = to introduce an option value.

And besides, using = doesn't even handle all cases.  For example, suppose I have an option that takes two string arguments, i.e. type=str and nargs=2.  Now I want to specify "-x" and "-y" as the two string arguments, like this:

    --opt -x -y

As far as I can tell, argparse simply cannot handle this, and there's no workaround.  Using = doesn't solve this case.

One more time:  All I want to do is disable the undesirable option look-ahead.  It is utterly and completely useless to me.  I want sequential, unambiguous option parsing.  You know, the way the entire rest of the world does it.  All that's needed is something that tells argparse to disable its look-ahead heuristic and to simply do what it's told.  Scan left-to-right.  If the next string is a recognized option name, then treat it as an option and take its arguments from the strings that follow, regardless of what they look like.  Rinse and repeat.  That is how correct option parsing is done.

All this look-ahead heuristic does is cater to confused beginners, at the cost of breaking it for experienced users who know exactly what they want and are frustrated that argparse won't let them specify it.

By the way, is there any supported, competing alternative to argparse?  It seems like argparse is never going to support option values that begin with hyphens, so at this point I'm looking for an alternative that I don't have to fight every time I want to allow option values that begin with hyphens.  Maybe it's time to create a new option parsing package that supports the most useful argparse features, but doesn't mistake option values for option names.  You know, something more like optparse, but with some added features.  It just needs to support strict left-to-right option parsing.

At this point, I'm thinking it may be time to bite the bullet and write my own option parsing package.  One that actually works, and can't be deprecated.  But it seems like such a waste of time.  It's hard to fathom why Python no longer provides a working option parser.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue9334>
_______________________________________

From report at bugs.python.org  Mon Oct 18 18:07:24 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 22:07:24 +0000
Subject: [issue40720] accessing mmap of file that is overwritten causes bus
 error
In-Reply-To: <1590096773.09.0.253309734553.issue40720@roundup.psfhosted.org>
Message-ID: <1634594844.56.0.949291291623.issue40720@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11.

----------
nosy: +iritkatriel
versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40720>
_______________________________________

From report at bugs.python.org  Mon Oct 18 18:09:59 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 22:09:59 +0000
Subject: [issue43264] ListProxy with EventProxy in caused FileNotFoundError:
 [Errno 2] No such file or directory problem
In-Reply-To: <1613724942.01.0.259421151252.issue43264@roundup.psfhosted.org>
Message-ID: <1634594999.42.0.808925213434.issue43264@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Changing type as crash typically refers to segfault or hang and not exception.

----------
nosy: +iritkatriel
type: crash -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43264>
_______________________________________

From report at bugs.python.org  Mon Oct 18 18:13:39 2021
From: report at bugs.python.org (Bozhi You)
Date: Mon, 18 Oct 2021 22:13:39 +0000
Subject: [issue45518] Invalid example for typing
Message-ID: <1634595219.24.0.159671466805.issue45518@roundup.psfhosted.org>


New submission from Bozhi You <youbozhi at cs.utexas.edu>:

The first example snippet under https://docs.python.org/3/library/typing.html#type-aliases is invalid to run.

```
Traceback (most recent call last):
  File "main.py", line 1, in <module>
    Vector = list[float]
TypeError: 'type' object is not subscriptable
```

A solution to this may be replacing `list` with `List` from `typing`.

----------
assignee: docs at python
components: Documentation
messages: 404232
nosy: bozhiyou, docs at python
priority: normal
severity: normal
status: open
title: Invalid example for typing
type: compile error
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45518>
_______________________________________

From report at bugs.python.org  Mon Oct 18 18:15:29 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 22:15:29 +0000
Subject: [issue35883] Python startup fails with a fatal error if a command
 line argument contains an invalid Unicode character
In-Reply-To: <1549040138.25.0.646545491344.issue35883@roundup.psfhosted.org>
Message-ID: <1634595329.67.0.405893096322.issue35883@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35883>
_______________________________________

From report at bugs.python.org  Mon Oct 18 18:15:36 2021
From: report at bugs.python.org (Steve Dower)
Date: Mon, 18 Oct 2021 22:15:36 +0000
Subject: [issue42260] [C API] Add _PyInterpreterState_SetConfig(): reconfigure
 an interpreter
In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org>
Message-ID: <1634595336.66.0.190104388973.issue42260@roundup.psfhosted.org>


Change by Steve Dower <steve.dower at python.org>:


----------
nosy: +steve.dower
nosy_count: 5.0 -> 6.0
pull_requests: +27312
pull_request: https://github.com/python/cpython/pull/29041

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42260>
_______________________________________

From report at bugs.python.org  Mon Oct 18 18:24:10 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 22:24:10 +0000
Subject: [issue33193] Cannot create a venv on Windows when directory path
 contains dollar character
In-Reply-To: <1522549543.99.0.467229070634.issue33193@psf.upfronthosting.co.za>
Message-ID: <1634595850.32.0.117050862604.issue33193@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11.

----------
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33193>
_______________________________________

From report at bugs.python.org  Mon Oct 18 18:38:23 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 18 Oct 2021 22:38:23 +0000
Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython
 API" with implementation details
In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
Message-ID: <1634596703.33.0.753700785929.issue35134@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27313
pull_request: https://github.com/python/cpython/pull/29042

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35134>
_______________________________________

From report at bugs.python.org  Mon Oct 18 18:40:17 2021
From: report at bugs.python.org (Steve Dower)
Date: Mon, 18 Oct 2021 22:40:17 +0000
Subject: [issue33193] Cannot create a venv on Windows when directory path
 contains dollar character
In-Reply-To: <1522549543.99.0.467229070634.issue33193@psf.upfronthosting.co.za>
Message-ID: <1634596817.08.0.687485134972.issue33193@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

Affects distutils, which is deprecated and won't be getting any more fixes.

I've migrated it to https://github.com/pypa/distutils/issues/63

----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33193>
_______________________________________

From report at bugs.python.org  Mon Oct 18 18:41:38 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 22:41:38 +0000
Subject: [issue31442] assertion failures on Windows in Python/traceback.c in
 case of a bad io.open
In-Reply-To: <1505292398.96.0.794182656458.issue31442@psf.upfronthosting.co.za>
Message-ID: <1634596898.9.0.506602885167.issue31442@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11.

----------
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31442>
_______________________________________

From report at bugs.python.org  Mon Oct 18 18:49:58 2021
From: report at bugs.python.org (Ivan Savov)
Date: Mon, 18 Oct 2021 22:49:58 +0000
Subject: [issue45519] Minor docstring improvement in __contains__
Message-ID: <1634597398.51.0.583956979541.issue45519@roundup.psfhosted.org>


New submission from Ivan Savov <ivan.savov at gmail.com>:

Currently,

```
>>> help(list.__contains__)
```
returns
```
Help on wrapper_descriptor:
__contains__(self, key, /)
    Return key in self.
```

Which is a conceptual circular reference,
since `in` is implemented by `__contains__`.

Changing the help string to

"Return True if key in self."

would fix this.

----------
assignee: docs at python
components: Documentation
messages: 404236
nosy: Ivan.Savov, docs at python
priority: normal
severity: normal
status: open
title: Minor docstring improvement in __contains__
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45519>
_______________________________________

From report at bugs.python.org  Mon Oct 18 18:53:41 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 22:53:41 +0000
Subject: [issue34290] _ctypes PyCField_new doesn't do anything
In-Reply-To: <1533032787.65.0.56676864532.issue34290@psf.upfronthosting.co.za>
Message-ID: <1634597621.35.0.382472453752.issue34290@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

What is the bug you are reporting?

----------
nosy: +iritkatriel
type: crash -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34290>
_______________________________________

From report at bugs.python.org  Mon Oct 18 18:55:17 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Mon, 18 Oct 2021 22:55:17 +0000
Subject: [issue45493] str() and repr() of enum different in Python 3.11 from
 Python <= 3.10
In-Reply-To: <1634381937.08.0.264995167777.issue45493@roundup.psfhosted.org>
Message-ID: <1634597717.39.0.105513937433.issue45493@roundup.psfhosted.org>


Barry A. Warsaw <barry at python.org> added the comment:

This doesn't seem right, given that PEP 663 has not been approved by the SC yet:

3.9.7 (default, Oct 13 2021, 06:45:31) 
[Clang 13.0.0 (clang-1300.0.29.3)]
ABC.a ABC.b ABC.c ABC.a <ABC.a: 1>
|main=|@presto[~/projects/python/cpython:1058]% python3.10 /tmp/foo.py 
3.10.0 (default, Oct 13 2021, 06:45:00) [Clang 13.0.0 (clang-1300.0.29.3)]
ABC.a ABC.b ABC.c ABC.a <ABC.a: 1>
|main=|@presto[~/projects/python/cpython:1059]% ./python.exe /tmp/foo.py 
3.11.0a1+ (heads/main:6a533a4238, Oct 18 2021, 15:30:20) [Clang 13.0.0 (clang-1300.0.29.3)]
a b c a ABC.a

In 3.10, the behavior was reverted back to 3.9, so it makes sense that those two have the same output.  Python 3.11 should as well, for now at least, until the SC approves PEP 663

----------
nosy: +barry, ethan.furman

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45493>
_______________________________________

From report at bugs.python.org  Mon Oct 18 18:57:46 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 22:57:46 +0000
Subject: [issue15727] PyType_FromSpecWithBases tp_new bugfix
In-Reply-To: <1345391866.4.0.54341725267.issue15727@psf.upfronthosting.co.za>
Message-ID: <1634597866.81.0.937144427346.issue15727@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> The danger of PyType_FromSpec()

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15727>
_______________________________________

From report at bugs.python.org  Mon Oct 18 18:58:23 2021
From: report at bugs.python.org (Jason R. Coombs)
Date: Mon, 18 Oct 2021 22:58:23 +0000
Subject: [issue45516] Add protocol description to the Traversable and
 TraversableResources documentation
Message-ID: <1634597903.13.0.806758851296.issue45516@roundup.psfhosted.org>


New submission from Jason R. Coombs <jaraco at jaraco.com>:


New changeset 4d03de3329ed8daa9c1107b1aedbb0fa280bddb6 by Filipe La?ns in branch 'main':
bpo-45516: add protocol description to the Traversable documentation (#29039)
https://github.com/python/cpython/commit/4d03de3329ed8daa9c1107b1aedbb0fa280bddb6


----------
nosy: +jaraco

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45516>
_______________________________________

From report at bugs.python.org  Mon Oct 18 18:59:25 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 22:59:25 +0000
Subject: [issue31885] Cygwin: socket test suites hang indefinitely due to bug
 in Cygwin
In-Reply-To: <1509116163.97.0.213398074469.issue31885@psf.upfronthosting.co.za>
Message-ID: <1634597965.85.0.049304870648.issue31885@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Erik, is this still relevant, given the Cygwin bug was fixed 4 years ago?

----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31885>
_______________________________________

From report at bugs.python.org  Mon Oct 18 19:00:33 2021
From: report at bugs.python.org (Ivan Savov)
Date: Mon, 18 Oct 2021 23:00:33 +0000
Subject: [issue45519] Minor docstring improvement in __contains__
In-Reply-To: <1634597398.51.0.583956979541.issue45519@roundup.psfhosted.org>
Message-ID: <1634598033.95.0.981402121044.issue45519@roundup.psfhosted.org>


Change by Ivan Savov <ivan.savov at gmail.com>:


----------
keywords: +patch
pull_requests: +27314
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29043

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45519>
_______________________________________

From report at bugs.python.org  Mon Oct 18 19:03:37 2021
From: report at bugs.python.org (Ethan Furman)
Date: Mon, 18 Oct 2021 23:03:37 +0000
Subject: [issue45493] str() and repr() of enum different in Python 3.11 from
 Python <= 3.10
In-Reply-To: <1634381937.08.0.264995167777.issue45493@roundup.psfhosted.org>
Message-ID: <1634598217.18.0.487201463825.issue45493@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:

Enum was reverted at the last minute for 3.10.  I would like to keep the changes in 3.11 so they get more exposure.

I have asked the SC a few times for thoughts about PEP 663, including whether an information PEP needs formal approval, but still haven't heard back.

At any rate, I do not have the band-width to undo and then redo all the changes in the 3.11 Enum.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45493>
_______________________________________

From report at bugs.python.org  Mon Oct 18 19:07:30 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 23:07:30 +0000
Subject: [issue39098] OSError: handle closed,
 ProcessPoolExecutor shutdown(wait=False)
In-Reply-To: <1576761583.89.0.930155685361.issue39098@roundup.psfhosted.org>
Message-ID: <1634598450.52.0.542517268835.issue39098@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

3.7 and 3.8 are no longer receiving bugfixes.
Changing type because crash typically refers to segfaults and hangs, not exceptions.

----------
nosy: +iritkatriel
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type: crash -> behavior
versions:  -Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39098>
_______________________________________

From report at bugs.python.org  Mon Oct 18 19:14:00 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 23:14:00 +0000
Subject: [issue31573] PyStructSequence_New() doesn't validate its input type
 (crashes in os.wait3() and os.wait4() in case of a bad
 resource.struct_rusage)
In-Reply-To: <1506337097.58.0.681670010247.issue31573@psf.upfronthosting.co.za>
Message-ID: <1634598840.51.0.354977468773.issue31573@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11.

----------
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31573>
_______________________________________

From report at bugs.python.org  Mon Oct 18 19:16:49 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 23:16:49 +0000
Subject: [issue31165] list_slice() crashes if the list is mutated indirectly
 by PyList_New()
In-Reply-To: <1502329382.83.0.596499846373.issue31165@psf.upfronthosting.co.za>
Message-ID: <1634599009.63.0.181494928439.issue31165@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11.

----------
nosy: +iritkatriel
title: list_slice() does crash if the list is mutated indirectly by PyList_New() -> list_slice() crashes if the list is mutated indirectly by PyList_New()
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31165>
_______________________________________

From report at bugs.python.org  Mon Oct 18 19:18:22 2021
From: report at bugs.python.org (Christina Gorbenko)
Date: Mon, 18 Oct 2021 23:18:22 +0000
Subject: [issue45520] Frozen dataclass deep copy doesn't work with __slots__
Message-ID: <1634599102.35.0.694436062352.issue45520@roundup.psfhosted.org>


New submission from Christina Gorbenko <jfuruness at gmail.com>:

If you define a frozen dataclass with slots and deep copy it, an error will occur. If you run the same code and remove the slots, the error will not occur. I assume this behavior is not intentional? Apologies if I'm submitting this wrong, this is the first time I've submitted an issue here so I'm not quite sure how to do it properly.

Example below:

```
from dataclasses import dataclass
from copy import deepcopy

@dataclass(frozen=True)
class FrozenData:
    # Without slots no errors occur?
    __slots__ = "my_string",

    my_string: str

deepcopy(FrozenData(my_string="initial"))
```

Error that occurs:
```
dataclasses.FrozenInstanceError: cannot assign to field 'my_string'
```

----------
messages: 404245
nosy: jfuruness
priority: normal
severity: normal
status: open
title: Frozen dataclass deep copy doesn't work with __slots__
type: behavior
versions: Python 3.10, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45520>
_______________________________________

From report at bugs.python.org  Mon Oct 18 19:22:00 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 23:22:00 +0000
Subject: [issue38031] FileIO.__init__ aborts when opener returns bad fd
In-Reply-To: <1567631981.81.0.541424946013.issue38031@roundup.psfhosted.org>
Message-ID: <1634599320.55.0.746629942729.issue38031@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11.

----------
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38031>
_______________________________________

From report at bugs.python.org  Mon Oct 18 19:26:10 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 18 Oct 2021 23:26:10 +0000
Subject: [issue38354] Fix for bug 30378 regressed SysLogHandler by making it
 resolve addresses at initialization instead of in `.emit()`
In-Reply-To: <1570051932.55.0.313239800858.issue38354@roundup.psfhosted.org>
Message-ID: <1634599570.9.0.772304544468.issue38354@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11.

Changing type because crash typically refers to segfault or hang in the interpreter rather than a valid exception.

----------
nosy: +iritkatriel
type: crash -> behavior
versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38354>
_______________________________________

From report at bugs.python.org  Mon Oct 18 19:32:05 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 18 Oct 2021 23:32:05 +0000
Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython
 API" with implementation details
In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
Message-ID: <1634599925.23.0.282802476799.issue35134@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset aad88d33d9db0a93e480f0234292b948890dfc2a by Victor Stinner in branch 'main':
bpo-35134: Split warnings.h and weakrefobject.h (GH-29042)
https://github.com/python/cpython/commit/aad88d33d9db0a93e480f0234292b948890dfc2a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35134>
_______________________________________

From report at bugs.python.org  Mon Oct 18 19:39:27 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 18 Oct 2021 23:39:27 +0000
Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython
 API" with implementation details
In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
Message-ID: <1634600367.66.0.725220517435.issue35134@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27315
pull_request: https://github.com/python/cpython/pull/29044

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35134>
_______________________________________

From report at bugs.python.org  Mon Oct 18 19:46:02 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Mon, 18 Oct 2021 23:46:02 +0000
Subject: [issue35673] Loader for namespace packages
In-Reply-To: <1546781003.0.0.391060889435.issue35673@roundup.psfhosted.org>
Message-ID: <1634600762.82.0.866625749806.issue35673@roundup.psfhosted.org>


Barry A. Warsaw <barry at python.org> added the comment:

I'm going to take a look at this during the Python core sprint.

----------
assignee:  -> barry

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35673>
_______________________________________

From report at bugs.python.org  Mon Oct 18 19:46:36 2021
From: report at bugs.python.org (STINNER Victor)
Date: Mon, 18 Oct 2021 23:46:36 +0000
Subject: [issue19459] Python does not support the GEORGIAN-PS charset
In-Reply-To: <1383216779.28.0.251946690468.issue19459@psf.upfronthosting.co.za>
Message-ID: <1634600796.09.0.937077344912.issue19459@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Python uses UTF-8 if the locale is not supported:

$ LANG=xxx python3.9 -c "import sys; print(sys.flags.utf8_mode)"
1

On Fedora 34, the locale is still supported, and Python 3.11 still fails:

vstinner at apu$ LANG=ka_GE.georgianps locale
LANG=ka_GE.georgianps
LC_CTYPE="ka_GE.georgianps"
LC_NUMERIC="ka_GE.georgianps"
LC_TIME="ka_GE.georgianps"
LC_COLLATE="ka_GE.georgianps"
LC_MONETARY="ka_GE.georgianps"
LC_MESSAGES="ka_GE.georgianps"
LC_PAPER="ka_GE.georgianps"
LC_NAME="ka_GE.georgianps"
LC_ADDRESS="ka_GE.georgianps"
LC_TELEPHONE="ka_GE.georgianps"
LC_MEASUREMENT="ka_GE.georgianps"
LC_IDENTIFICATION="ka_GE.georgianps"
LC_ALL=

vstinner at apu$ LANG=ka_GE.georgianps python3.11 -c "import sys; print(sys.flags.utf8_mode)"
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = './python'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  stdlib dir = '/home/vstinner/python/main/Lib'
  sys._base_executable = '/home/vstinner/python/main/python'
  sys.base_prefix = '/usr/local'
  sys.base_exec_prefix = '/usr/local'
  sys.platlibdir = 'lib'
  sys.executable = '/home/vstinner/python/main/python'
  sys.prefix = '/usr/local'
  sys.exec_prefix = '/usr/local'
  sys.path = [
    '/usr/local/lib/python311.zip',
    '/home/vstinner/python/main/Lib',
    '/home/vstinner/python/main/build/lib.linux-x86_64-3.11-pydebug',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
LookupError: unknown encoding: GEORGIAN-PS

Current thread 0x00007ff89b81d2c0 (most recent call first):
  <no Python frame>

----------
resolution: fixed -> 
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19459>
_______________________________________

From report at bugs.python.org  Mon Oct 18 19:46:53 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Mon, 18 Oct 2021 23:46:53 +0000
Subject: [issue35673] Loader for namespace packages
In-Reply-To: <1546781003.0.0.391060889435.issue35673@roundup.psfhosted.org>
Message-ID: <1634600813.93.0.95705989675.issue35673@roundup.psfhosted.org>


Change by Barry A. Warsaw <barry at python.org>:


----------
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35673>
_______________________________________

From report at bugs.python.org  Mon Oct 18 20:00:04 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Tue, 19 Oct 2021 00:00:04 +0000
Subject: [issue45336] Issue with xml.tree.ElementTree.write
In-Reply-To: <1633031921.76.0.241035024911.issue45336@roundup.psfhosted.org>
Message-ID: <1634601604.87.0.708877426983.issue45336@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Ed: something looks a bit odd with the call to `write()` that you used:

> rte_ecu_tree.write(rtexmlFile, encoding="UTF-8", xml_declaration="True", default_namespace="None" method="xml",short_empty_elements="True" )

Note that default val for `default_namespace` is None, but you have it quoted, and you also have quoted xml_declaration and short_empty_elements. Try re-running with these arg values unquoted.

----------
nosy: +andrei.avk

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45336>
_______________________________________

From report at bugs.python.org  Mon Oct 18 20:00:17 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Tue, 19 Oct 2021 00:00:17 +0000
Subject: [issue45336] Issue with xml.tree.ElementTree.write
In-Reply-To: <1633031921.76.0.241035024911.issue45336@roundup.psfhosted.org>
Message-ID: <1634601617.22.0.565736516145.issue45336@roundup.psfhosted.org>


Change by Andrei Kulakov <andrei.avk at gmail.com>:


----------
type: performance -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45336>
_______________________________________

From report at bugs.python.org  Mon Oct 18 20:05:03 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 19 Oct 2021 00:05:03 +0000
Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython
 API" with implementation details
In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
Message-ID: <1634601903.17.0.0755846991143.issue35134@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 5f09bb021a2862ba89c3ecb53e7e6e95a9e07e1d by Victor Stinner in branch 'main':
bpo-35134: Add Include/cpython/longobject.h (GH-29044)
https://github.com/python/cpython/commit/5f09bb021a2862ba89c3ecb53e7e6e95a9e07e1d


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35134>
_______________________________________

From report at bugs.python.org  Mon Oct 18 20:11:04 2021
From: report at bugs.python.org (Zachary Ware)
Date: Tue, 19 Oct 2021 00:11:04 +0000
Subject: [issue10071] Should not release GIL while running RegEnumValue
In-Reply-To: <1286884651.82.0.158483399845.issue10071@psf.upfronthosting.co.za>
Message-ID: <1634602264.12.0.363661036288.issue10071@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:

With Steve's opposition and the fact that we've gotten along for 11 years since this issue was opened without it (and also without further reports of issues), I'm going to go ahead and close the issue.

----------
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue10071>
_______________________________________

From report at bugs.python.org  Mon Oct 18 20:11:40 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Tue, 19 Oct 2021 00:11:40 +0000
Subject: [issue45516] Add protocol description to the Traversable and
 TraversableResources documentation
In-Reply-To: <1634597903.13.0.806758851296.issue45516@roundup.psfhosted.org>
Message-ID: <1634602300.89.0.895603115418.issue45516@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

Actually, since TraversableResources is simply implementing ResourceReader, the protocol is documented. We could reference ResourceReader in the docstring though.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45516>
_______________________________________

From report at bugs.python.org  Mon Oct 18 20:18:32 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Tue, 19 Oct 2021 00:18:32 +0000
Subject: [issue45516] Add protocol description to the Traversable and
 TraversableResources documentation
In-Reply-To: <1634597903.13.0.806758851296.issue45516@roundup.psfhosted.org>
Message-ID: <1634602712.01.0.986577232112.issue45516@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
pull_requests: +27316
pull_request: https://github.com/python/cpython/pull/29045

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45516>
_______________________________________

From report at bugs.python.org  Mon Oct 18 20:32:03 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Tue, 19 Oct 2021 00:32:03 +0000
Subject: [issue42174] shutil.get_terminal_size() returns 0 when run in a pty
In-Reply-To: <1603816351.29.0.440046743483.issue42174@roundup.psfhosted.org>
Message-ID: <1634603523.63.0.458882727987.issue42174@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
keywords: +patch
pull_requests: +27317
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29046

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42174>
_______________________________________

From report at bugs.python.org  Mon Oct 18 20:33:02 2021
From: report at bugs.python.org (Logan Jones)
Date: Tue, 19 Oct 2021 00:33:02 +0000
Subject: [issue45518] Invalid example for typing
In-Reply-To: <1634595219.24.0.159671466805.issue45518@roundup.psfhosted.org>
Message-ID: <1634603582.48.0.00351581123246.issue45518@roundup.psfhosted.org>


Logan Jones <loganasherjones at gmail.com> added the comment:

Hi Bozhi. The syntax that you're referencing was added in 3.9. So if you're trying the syntax in earlier versions of Python, it won't work. The standard collections were added in PEP 585 (https://www.python.org/dev/peps/pep-0585/)

I think the reason the examples use this syntax is that the previous List classes were deprecated in favor of the new syntax.

Hope this helps!

----------
nosy: +loganasherjones

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45518>
_______________________________________

From report at bugs.python.org  Mon Oct 18 20:42:36 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Tue, 19 Oct 2021 00:42:36 +0000
Subject: [issue45449] Document that collections.abc types are subscriptable
In-Reply-To: <1634058701.61.0.841344967504.issue45449@roundup.psfhosted.org>
Message-ID: <1634604156.92.0.298079162212.issue45449@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
keywords: +patch
pull_requests: +27318
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29047

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45449>
_______________________________________

From report at bugs.python.org  Mon Oct 18 20:52:36 2021
From: report at bugs.python.org (Jason R. Coombs)
Date: Tue, 19 Oct 2021 00:52:36 +0000
Subject: [issue45516] Add protocol description to the Traversable and
 TraversableResources documentation
In-Reply-To: <1634597903.13.0.806758851296.issue45516@roundup.psfhosted.org>
Message-ID: <1634604756.4.0.763510005512.issue45516@roundup.psfhosted.org>


Jason R. Coombs <jaraco at jaraco.com> added the comment:


New changeset c0295675305f6896e4ba7496441cc470d7edca89 by Filipe La?ns in branch 'main':
bpo-45516: use documentation links in TraversableResources' description (GH-29045)
https://github.com/python/cpython/commit/c0295675305f6896e4ba7496441cc470d7edca89


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45516>
_______________________________________

From report at bugs.python.org  Mon Oct 18 20:52:45 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Tue, 19 Oct 2021 00:52:45 +0000
Subject: [issue45520] Frozen dataclass deep copy doesn't work with __slots__
In-Reply-To: <1634599102.35.0.694436062352.issue45520@roundup.psfhosted.org>
Message-ID: <1634604765.12.0.356820817863.issue45520@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45520>
_______________________________________

From report at bugs.python.org  Mon Oct 18 20:53:18 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Tue, 19 Oct 2021 00:53:18 +0000
Subject: [issue45516] Add protocol description to the Traversable and
 TraversableResources documentation
In-Reply-To: <1634597903.13.0.806758851296.issue45516@roundup.psfhosted.org>
Message-ID: <1634604798.54.0.156537152757.issue45516@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45516>
_______________________________________

From report at bugs.python.org  Mon Oct 18 20:59:09 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Tue, 19 Oct 2021 00:59: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: <1634605149.06.0.55710020553.issue30570@roundup.psfhosted.org>


Change by Dennis Sweeney <sweeney.dennis650 at gmail.com>:


----------
pull_requests: +27319
pull_request: https://github.com/python/cpython/pull/29048

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30570>
_______________________________________

From report at bugs.python.org  Mon Oct 18 21:14:31 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Tue, 19 Oct 2021 01:14:31 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org>
Message-ID: <1634606071.09.0.130198862188.issue45020@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

Is gh-28940 only for UNIX?

I built on Windows with default options (PCbuild\build.bat) and it looks like the frozen modules are used by default even though I am running in the source directory. (I put a printf() call in unmarshal_frozen_code().)

I also put a printf() in is_dev_env() and found that it returns 0 on this check:

    /* If dirname() is the same for both then it is a dev build. */
    if (len != _Py_find_basename(stdlib)) {
        return 0;
    }

I assume that's because the binary (in my case at least) is at PCbuild\amd64\python.exe which is not the same as my current directory (which is the repo root).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Mon Oct 18 21:17:10 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Tue, 19 Oct 2021 01:17:10 +0000
Subject: [issue35673] Loader for namespace packages
In-Reply-To: <1546781003.0.0.391060889435.issue35673@roundup.psfhosted.org>
Message-ID: <1634606230.17.0.324949123531.issue35673@roundup.psfhosted.org>


Change by Barry A. Warsaw <barry at python.org>:


----------
keywords: +patch
pull_requests: +27320
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29049

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35673>
_______________________________________

From report at bugs.python.org  Mon Oct 18 21:18:03 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Tue, 19 Oct 2021 01:18:03 +0000
Subject: [issue35673] Loader for namespace packages
In-Reply-To: <1546781003.0.0.391060889435.issue35673@roundup.psfhosted.org>
Message-ID: <1634606283.5.0.834733967975.issue35673@roundup.psfhosted.org>


Barry A. Warsaw <barry at python.org> added the comment:

First crack at a PR for this issue.

----------
keywords: +needs review -patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35673>
_______________________________________

From report at bugs.python.org  Mon Oct 18 21:19:19 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Tue, 19 Oct 2021 01:19:19 +0000
Subject: [issue35673] Loader for namespace packages
In-Reply-To: <1546781003.0.0.391060889435.issue35673@roundup.psfhosted.org>
Message-ID: <1634606359.56.0.567756901478.issue35673@roundup.psfhosted.org>


Barry A. Warsaw <barry at python.org> added the comment:

Since the documentation problem reported here has since been fixed, and really all that's left is to expose NamespaceLoader publicly and register it with the abc, this is technically a new feature so it can't be backported.  Thus, targeting only 3.11.

----------
versions:  -Python 3.10, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35673>
_______________________________________

From report at bugs.python.org  Mon Oct 18 21:25:42 2021
From: report at bugs.python.org (Josh Rosenberg)
Date: Tue, 19 Oct 2021 01:25:42 +0000
Subject: [issue45520] Frozen dataclass deep copy doesn't work with __slots__
In-Reply-To: <1634599102.35.0.694436062352.issue45520@roundup.psfhosted.org>
Message-ID: <1634606742.71.0.91350377208.issue45520@roundup.psfhosted.org>


Josh Rosenberg <shadowranger+python at gmail.com> added the comment:

When I define this with the new-in-3.10 slots=True argument to dataclass rather than manually defining __slots__ it works just fine. Looks like the pickle format changes rather dramatically to accommodate it.

>>> @dataclass(frozen=True, slots=True)
... class FrozenData:
...     my_string: str
...
>>> deepcopy(FrozenData('initial'))
FrozenData(my_string='initial')

Is there a strong motivation to support manually defined __slots__ on top of slots=True that warrants fixing it for 3.10 onward?

----------
nosy: +josh.r

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45520>
_______________________________________

From report at bugs.python.org  Mon Oct 18 21:35:16 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Tue, 19 Oct 2021 01:35:16 +0000
Subject: [issue33277] Deprecate __loader__, __package__, __file__,
 and __cached__ on modules
In-Reply-To: <1523656102.14.0.682650639539.issue33277@psf.upfronthosting.co.za>
Message-ID: <1634607316.69.0.0572341765311.issue33277@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
nosy: +FFY00

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33277>
_______________________________________

From report at bugs.python.org  Mon Oct 18 22:09:17 2021
From: report at bugs.python.org (swgmma)
Date: Tue, 19 Oct 2021 02:09:17 +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: <1634609357.68.0.30431890103.issue30082@roundup.psfhosted.org>


swgmma <jason.nader at protonmail.com> added the comment:

I implemented your first suggestion for `force_hide`.

Should we add your `force_no_window` suggestion as well?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Mon Oct 18 22:14:27 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Tue, 19 Oct 2021 02:14:27 +0000
Subject: [issue45452] Support crash tolerance feature for gdbm module
In-Reply-To: <1634089522.9.0.931859161119.issue45452@roundup.psfhosted.org>
Message-ID: <1634609667.94.0.980309030522.issue45452@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

Wow, long discussion than I expected, I wish that you don't feel uncomfortable with my opinion first :)

> The main concern is that it is not clear how to use this feature, and if it is not clear

IMHO, this feature is similar usage level with gdbm.reorganize() API for end-user. 

https://docs.python.org/3/library/dbm.html?highlight=gdbm#dbm.gnu.gdbm.reorganize

I already show you how end-user will use this API in msg404065.
So I don't want to explain the usage again.

> For example, can it be used to implement transactions? 

AFAIk this feature is only used for left snapshot files storing
if the user wants to recover when the user needed.(for example, disk is too old so it can cause the system is down, or any disaster situation, or unexpected system fault)
And snapshot files can be stored anywhere(separated secondary disk, remote-mounted disk.)

So if you can ask snapshot is important? From my side *yes*, it can guarantee that we can recover the file when we want to.

IMHO using this API is up to the end user's purpose.

> I am not even sure that it is Pythonic,

Hmm, you mean API signature? Python has a long tradition of being a thin wrapper to C functions. (gdbm.reorganize() is a good example)

Since gdbm module is the most accessible python client that today Python users can use, I think we have to provide this feature since gdbm authors write this feature for end-user usage.
if not authors may not expose those APIs through `gdbmtool`.

FYI, gdbmtool is a CLI tool that you can execute basic gdbms operations.
If you installed gdbm 1.21 on your local machine, you can use crash tolerance features simply though gdbmtool

The essential of this feature looks simple.
* If you want to left snapshot files for gdbm, please create the gdbm file extension format(X flag) and then execute gdbm_failure_atomic.

If you don't feel the same way, I would like to suggest sending a mailing list and I may requests this to gdbms author since they request this issue to me through a mail and they are also more expert about gdbm more than me.

Thanks for reading.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45452>
_______________________________________

From report at bugs.python.org  Mon Oct 18 22:52:07 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 19 Oct 2021 02:52:07 +0000
Subject: [issue45475] gzip fails to read a gzipped file (ValueError: readline
 of closed file)
In-Reply-To: <1634245921.58.0.043840382812.issue45475@roundup.psfhosted.org>
Message-ID: <1634611927.8.0.215526695313.issue45475@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27321
pull_request: https://github.com/python/cpython/pull/29050

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45475>
_______________________________________

From report at bugs.python.org  Mon Oct 18 22:52:00 2021
From: report at bugs.python.org (Inada Naoki)
Date: Tue, 19 Oct 2021 02:52:00 +0000
Subject: [issue45475] gzip fails to read a gzipped file (ValueError: readline
 of closed file)
In-Reply-To: <1634245921.58.0.043840382812.issue45475@roundup.psfhosted.org>
Message-ID: <1634611920.45.0.0262488638881.issue45475@roundup.psfhosted.org>


Inada Naoki <songofacandy at gmail.com> added the comment:


New changeset 0a4c82ddd34a3578684b45b76f49cd289a08740b by Inada Naoki in branch 'main':
bpo-45475: Revert `__iter__` optimization for GzipFile, BZ2File, and LZMAFile. (GH-29016)
https://github.com/python/cpython/commit/0a4c82ddd34a3578684b45b76f49cd289a08740b


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45475>
_______________________________________

From report at bugs.python.org  Mon Oct 18 23:01:04 2021
From: report at bugs.python.org (Eryk Sun)
Date: Tue, 19 Oct 2021 03:01:04 +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: <1634612464.36.0.346193738635.issue30082@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

I was intending force_no_window as an alternative to adding force_hide, since CREATE_NO_WINDOW only affects console applications. Maybe a better name is force_hide_console.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Mon Oct 18 23:15:56 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 19 Oct 2021 03:15:56 +0000
Subject: [issue45475] gzip fails to read a gzipped file (ValueError: readline
 of closed file)
In-Reply-To: <1634245921.58.0.043840382812.issue45475@roundup.psfhosted.org>
Message-ID: <1634613356.97.0.906545304087.issue45475@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 97ce855ca8ce437070424b43f5b41158685ac140 by Miss Islington (bot) in branch '3.10':
bpo-45475: Revert `__iter__` optimization for GzipFile, BZ2File, and LZMAFile. (GH-29016)
https://github.com/python/cpython/commit/97ce855ca8ce437070424b43f5b41158685ac140


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45475>
_______________________________________

From report at bugs.python.org  Mon Oct 18 23:19:24 2021
From: report at bugs.python.org (David Rajaratnam)
Date: Tue, 19 Oct 2021 03:19:24 +0000
Subject: [issue45427] importlib.readers.MultiplexedPath
In-Reply-To: <1633932362.03.0.000713660770349.issue45427@roundup.psfhosted.org>
Message-ID: <1634613564.71.0.831651221578.issue45427@roundup.psfhosted.org>


David Rajaratnam <daver at gemarex.com.au> added the comment:

Hi Jason,

Thanks for the extra pointers.  My initial intention in explaining my use-case was to find out whether treating an externally embedded  interpreter's files as `importlib.resources` is the correct use of this library. However, you're right that my explanation turned into a python packaging support question. I'm sorry about that.

Thanks for the clarification about the limitations of `as_file()`. I guess that means that at the moment it doesn't fully support my use-case, but hopefully may do so at some point in the future.

Regards,
Dave

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45427>
_______________________________________

From report at bugs.python.org  Mon Oct 18 23:32:27 2021
From: report at bugs.python.org (Inada Naoki)
Date: Tue, 19 Oct 2021 03:32:27 +0000
Subject: [issue45475] gzip fails to read a gzipped file (ValueError: readline
 of closed file)
In-Reply-To: <1634245921.58.0.043840382812.issue45475@roundup.psfhosted.org>
Message-ID: <1634614347.81.0.785324214441.issue45475@roundup.psfhosted.org>


Change by Inada Naoki <songofacandy at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45475>
_______________________________________

From report at bugs.python.org  Mon Oct 18 23:39:12 2021
From: report at bugs.python.org (Steven D'Aprano)
Date: Tue, 19 Oct 2021 03:39:12 +0000
Subject: [issue45501] [idea] Successfully creating a venv could print a
 message.
In-Reply-To: <1634465417.7.0.0888644827871.issue45501@roundup.psfhosted.org>
Message-ID: <1634614752.16.0.817450214929.issue45501@roundup.psfhosted.org>


Steven D'Aprano <steve+python at pearwood.info> added the comment:

This may be an example of the problem:

https://discuss.python.org/t/why-does-venv-not-work-on-my-windows-system/11167

The poster there hasn't responded yet, so it isn't clear what is the actual issue is. But it looks suspiciously like a failure to realise that the venv actually did work.

----------
nosy: +steven.daprano

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45501>
_______________________________________

From report at bugs.python.org  Tue Oct 19 01:37:59 2021
From: report at bugs.python.org (Neil Schemenauer)
Date: Tue, 19 Oct 2021 05:37:59 +0000
Subject: [issue45521] obmalloc radix tree typo in code
Message-ID: <1634621878.99.0.975140050244.issue45521@roundup.psfhosted.org>


New submission from Neil Schemenauer <nas-python at arctrix.com>:

There is a typo in the radix tree obmalloc code, spotted by Inada Naoki. 

-#define MAP_TOP_MASK (MAP_BOT_LENGTH - 1)
+#define MAP_TOP_MASK (MAP_TOP_LENGTH - 1)

This should be fixed both in the main branch and in 3.10.x.

----------
assignee: methane
components: Interpreter Core
messages: 404268
nosy: methane, nascheme
priority: high
severity: normal
stage: patch review
status: open
title: obmalloc radix tree typo in code
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45521>
_______________________________________

From report at bugs.python.org  Tue Oct 19 01:45:28 2021
From: report at bugs.python.org (Inada Naoki)
Date: Tue, 19 Oct 2021 05:45:28 +0000
Subject: [issue45521] obmalloc radix tree typo in code
In-Reply-To: <1634621878.99.0.975140050244.issue45521@roundup.psfhosted.org>
Message-ID: <1634622328.45.0.254032937506.issue45521@roundup.psfhosted.org>


Inada Naoki <songofacandy at gmail.com> added the comment:

When I am trying to understand this issue, I see this segfault.

https://gist.github.com/methane/1b83e2abc6739017e0490c5f70a27b52

I am not sure this segfault is caused by this issue or not. If this is unrelated, I will create another issue.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45521>
_______________________________________

From report at bugs.python.org  Tue Oct 19 01:57:45 2021
From: report at bugs.python.org (Neil Schemenauer)
Date: Tue, 19 Oct 2021 05:57:45 +0000
Subject: [issue45521] obmalloc radix tree typo in code
In-Reply-To: <1634621878.99.0.975140050244.issue45521@roundup.psfhosted.org>
Message-ID: <1634623065.59.0.0799439607555.issue45521@roundup.psfhosted.org>


Change by Neil Schemenauer <nas-python at arctrix.com>:


----------
keywords: +patch
pull_requests: +27322
pull_request: https://github.com/python/cpython/pull/29051

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45521>
_______________________________________

From report at bugs.python.org  Tue Oct 19 03:04:37 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Tue, 19 Oct 2021 07:04:37 +0000
Subject: [issue45493] str() and repr() of enum different in Python 3.11 from
 Python <= 3.10
In-Reply-To: <1634381937.08.0.264995167777.issue45493@roundup.psfhosted.org>
Message-ID: <1634627077.2.0.428906502316.issue45493@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

We just need https://github.com/python/cpython/pull/27010 to be done on main to roll it back.

str and repr changes are quite painful to foist upon users existing code and tests.

----------
nosy: +gregory.p.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45493>
_______________________________________

From report at bugs.python.org  Tue Oct 19 03:13:53 2021
From: report at bugs.python.org (=?utf-8?b?R8O2a2hhbiDDlnp0w7xyaw==?=)
Date: Tue, 19 Oct 2021 07:13:53 +0000
Subject: [issue36481] telnetlib process_rawq() callback
In-Reply-To: <1553911873.53.0.089397149063.issue36481@roundup.psfhosted.org>
Message-ID: <1634627633.46.0.861155538403.issue36481@roundup.psfhosted.org>


Change by G?khan ?zt?rk <gokhan at eg-ozturk.com>:


----------
pull_requests: +27323
pull_request: https://github.com/python/cpython/pull/29052

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36481>
_______________________________________

From report at bugs.python.org  Tue Oct 19 03:26:27 2021
From: report at bugs.python.org (=?utf-8?b?R8O2a2hhbiDDlnp0w7xyaw==?=)
Date: Tue, 19 Oct 2021 07:26:27 +0000
Subject: [issue36481] telnetlib process_rawq() callback
In-Reply-To: <1553911873.53.0.089397149063.issue36481@roundup.psfhosted.org>
Message-ID: <1634628387.06.0.322586787864.issue36481@roundup.psfhosted.org>


G?khan ?zt?rk <gokhan at eg-ozturk.com> added the comment:

Made updates, tests for this old issue.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36481>
_______________________________________

From report at bugs.python.org  Tue Oct 19 03:56:45 2021
From: report at bugs.python.org (Justin Furuness)
Date: Tue, 19 Oct 2021 07:56:45 +0000
Subject: [issue45520] Frozen dataclass deep copy doesn't work with __slots__
In-Reply-To: <1634606742.71.0.91350377208.issue45520@roundup.psfhosted.org>
Message-ID: <CANDi=9HX7uT0N0tVy9NnEmu41jwHSkHosruvGopmVtXBwcaYsw@mail.gmail.com>


Justin Furuness <jfuruness at gmail.com> added the comment:

I didn't realize it was possible to add slots in that way (slots=True). I
think for normal classes manually defining __slots__ is the common way of
adding __slots__ (at least for me), so it feels weird to me that manually
defining __slots__ instead of adding slots=True produces different
behaviour. That being said, no strong motivation to change it, this fixes
my issue, feel free to close this.

Thanks,
Justin

On Mon, Oct 18, 2021 at 9:25 PM Josh Rosenberg <report at bugs.python.org>
wrote:

>
> Josh Rosenberg <shadowranger+python at gmail.com> added the comment:
>
> When I define this with the new-in-3.10 slots=True argument to dataclass
> rather than manually defining __slots__ it works just fine. Looks like the
> pickle format changes rather dramatically to accommodate it.
>
> >>> @dataclass(frozen=True, slots=True)
> ... class FrozenData:
> ...     my_string: str
> ...
> >>> deepcopy(FrozenData('initial'))
> FrozenData(my_string='initial')
>
> Is there a strong motivation to support manually defined __slots__ on top
> of slots=True that warrants fixing it for 3.10 onward?
>
> ----------
> nosy: +josh.r
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue45520>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45520>
_______________________________________

From report at bugs.python.org  Tue Oct 19 04:23:16 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 19 Oct 2021 08:23:16 +0000
Subject: [issue45459] Limited API support for Py_buffer
In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>
Message-ID: <1634631796.64.0.841330396441.issue45459@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Py_buffer is often used for handling arguments if the function supports bytes, bytearray and other bytes-like objects. For example bytes.partition(). Any additional memory allocation would add significant overhead here. bytes.join() creates Py_buffer for every item, it would be a deoptimization if it would need to allocate them all separately.

We should allow to allocate Py_buffer on stack. Currently it has too complex structure and we cannot guarantee its stability (although there were no changes for years). I propose to split Py_buffer on transparent and opaque parts and standardize the transparent structure. It should include: obj, buf, len, possible flags (to distinguish read-only from writeable) and a pointer to opaque data. For bytes, bytearray, BytesIO, mmap and most other classes the pointer to opaque data is NULL. For array and memoryview objects the opaque data could be embedded into the object.

----------
nosy: +skrah

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Tue Oct 19 04:44:49 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 19 Oct 2021 08:44:49 +0000
Subject: [issue19459] Python does not support the GEORGIAN-PS charset
In-Reply-To: <1383216779.28.0.251946690468.issue19459@psf.upfronthosting.co.za>
Message-ID: <1634633089.27.0.996674044666.issue19459@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Possible solutions (they can be combined):

1. Add support for the GEORGIAN-PS charset and all other encodings used in libc (issue22679). The problem is that it is difficult to get the official information about these encodings.

2. Falls back to utf-8 or ascii+surrogateescape in case of unsupported locale encoding. But typos can slip unnoticed.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19459>
_______________________________________

From report at bugs.python.org  Tue Oct 19 05:00:36 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 19 Oct 2021 09:00:36 +0000
Subject: [issue45512] [sqlite3] simplify "isolation level"
In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org>
Message-ID: <1634634036.51.0.917402284242.issue45512@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
keywords: +patch
pull_requests: +27325
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29053

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45512>
_______________________________________

From report at bugs.python.org  Tue Oct 19 05:02:28 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 09:02:28 +0000
Subject: [issue34553] Python Crashes when trying to access any date related
 fields in MailItem
In-Reply-To: <1535701663.99.0.56676864532.issue34553@psf.upfronthosting.co.za>
Message-ID: <1634634148.39.0.821140178156.issue34553@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

It doesn't look like there's anything we can do here on the python side.

If nobody will object I will close this ticket.

----------
nosy: +iritkatriel
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34553>
_______________________________________

From report at bugs.python.org  Tue Oct 19 05:07:52 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 09:07:52 +0000
Subject: [issue38384] An assertion failure in test_pickle
In-Reply-To: <1570369149.47.0.841206648458.issue38384@roundup.psfhosted.org>
Message-ID: <1634634472.24.0.147535314876.issue38384@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11 with Serhiy's reproducer: 

class F:
    @property
    def read(self):
        1/0

import pickle
pickle.load(F())

----------
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38384>
_______________________________________

From report at bugs.python.org  Tue Oct 19 05:13:50 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 19 Oct 2021 09:13:50 +0000
Subject: [issue41309] test_subprocess.test_pause_reading timing out randomly
 on Windows
In-Reply-To: <1594850173.83.0.809593966079.issue41309@roundup.psfhosted.org>
Message-ID: <1634634830.43.0.155423724081.issue41309@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

Assuming this is fixed

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41309>
_______________________________________

From report at bugs.python.org  Tue Oct 19 05:15:36 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 09:15:36 +0000
Subject: [issue37402] Fatal Python error: Cannot recover from stack overflow
 issues on Python 3.6 and 3.7
In-Reply-To: <1561467308.7.0.878273526771.issue37402@roundup.psfhosted.org>
Message-ID: <1634634936.49.0.676639453826.issue37402@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

There has been work done on recursion handling in more recent python versions, so you should get clean RecursionErrors now rather than the fatal error.  Please create a new issue if you have such problems on current versions (3.9+).

----------
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37402>
_______________________________________

From report at bugs.python.org  Tue Oct 19 05:28:30 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 09:28:30 +0000
Subject: [issue37910] argparse wrapping fails with metavar="" (no metavar)
In-Reply-To: <1566425299.96.0.375120843288.issue37910@roundup.psfhosted.org>
Message-ID: <1634635710.8.0.0177405835523.issue37910@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11.

----------
nosy: +iritkatriel
type: crash -> behavior
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37910>
_______________________________________

From report at bugs.python.org  Tue Oct 19 05:48:51 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 19 Oct 2021 09:48:51 +0000
Subject: [issue36073] sqlite crashes with converters mutating cursor
In-Reply-To: <1550821487.87.0.741979609564.issue36073@roundup.psfhosted.org>
Message-ID: <1634636931.91.0.853217931482.issue36073@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
pull_requests: +27326
pull_request: https://github.com/python/cpython/pull/29054

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36073>
_______________________________________

From report at bugs.python.org  Tue Oct 19 05:58:43 2021
From: report at bugs.python.org (Erik Janssens)
Date: Tue, 19 Oct 2021 09:58:43 +0000
Subject: [issue34553] Python Crashes when trying to access any date related
 fields in MailItem
In-Reply-To: <1634634148.39.0.821140178156.issue34553@roundup.psfhosted.org>
Message-ID: <af57e44e4c2f261965ce502c5e52e894665a83c6.camel@conceptive.be>


Erik Janssens <erik.janssens at conceptive.be> added the comment:

At least for us, the issue seems to be related to the MSVC runtime.
We compiled python with mingw using the mingw runtime, and the issue
was gone.
On Tue, 2021-10-19 at 09:02 +0000, Irit Katriel wrote:
> Irit Katriel <iritkatriel at gmail.com> added the comment:
> It doesn't look like there's anything we can do here on the python
> side.
> If nobody will object I will close this ticket.
> ----------nosy: +iritkatrielstatus: open -> pending
> _______________________________________Python tracker
> <report at bugs.python.org><
> https://bugs.python.org/issue34553>_______________________________________

----------
status: pending -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34553>
_______________________________________

From report at bugs.python.org  Tue Oct 19 06:04:59 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 10:04:59 +0000
Subject: [issue34553] Python Crashes when trying to access any date related
 fields in MailItem
In-Reply-To: <1535701663.99.0.56676864532.issue34553@psf.upfronthosting.co.za>
Message-ID: <1634637899.61.0.720916916456.issue34553@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Cool, and Nick also resolved it with the appropriate import. 

I'll close and if anyone still has a problem (on current python versions - 3.9+) then please create a new issue with up to date info.

----------
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34553>
_______________________________________

From report at bugs.python.org  Tue Oct 19 06:10:26 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 19 Oct 2021 10:10:26 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634638226.6.0.465706820607.issue45434@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:


New changeset 52af0756b2ffc6788e364971d05cdaf127d77d5a by Victor Stinner in branch 'main':
bpo-45434: Only exclude <stdlib.h> in Python 3.11 limited C API (GH-29027)
https://github.com/python/cpython/commit/52af0756b2ffc6788e364971d05cdaf127d77d5a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Tue Oct 19 06:14:31 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 10:14:31 +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: <1634638471.05.0.696293061659.issue23449@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Seems out of date. I will close if nobody objects.

----------
nosy: +iritkatriel
resolution:  -> out of date
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23449>
_______________________________________

From report at bugs.python.org  Tue Oct 19 06:22:17 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 10:22:17 +0000
Subject: [issue31779] assertion failures and a crash when using an
 uninitialized struct.Struct object
In-Reply-To: <1507892060.42.0.213398074469.issue31779@psf.upfronthosting.co.za>
Message-ID: <1634638937.2.0.341645869191.issue31779@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11.

----------
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31779>
_______________________________________

From report at bugs.python.org  Tue Oct 19 06:48:34 2021
From: report at bugs.python.org (ed wolf)
Date: Tue, 19 Oct 2021 10:48:34 +0000
Subject: [issue45336] Issue with xml.tree.ElementTree.write
In-Reply-To: <1633031921.76.0.241035024911.issue45336@roundup.psfhosted.org>
Message-ID: <1634640514.3.0.574973611974.issue45336@roundup.psfhosted.org>


ed wolf <bq824 at cummins.com> added the comment:

Hi Andrew

I removed the quotes and still see an issue with the standalone not being added to the xml declaration. I set the command as follows

rte_ecu_tree.write(rtexmlFile, encoding="UTF-8", xml_declaration=True, default_namespace=None, method="xml",short_empty_elements=True )

The xml declaration came out as
<?xml version='1.0' encoding='UTF-8'?>

but should be
<?xml version="1.0" encoding="UTF-8" standalone="no"?>

standalone did not get added to the declaration.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45336>
_______________________________________

From report at bugs.python.org  Tue Oct 19 06:51:56 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 19 Oct 2021 10:51:56 +0000
Subject: [issue39410] CentOS 6.10 SQLite 3.30.1 - _sqlite3 builds successfully
 but is removed because it cannot be imported.
In-Reply-To: <1579611222.47.0.288920213647.issue39410@roundup.psfhosted.org>
Message-ID: <1634640716.48.0.198541638312.issue39410@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

If you are building CPython against a specific version of SQLite (for example one you've compiled yourself), make sure that you adjust _both_ CFLAGS and LDFLAGS.

Note: since bpo-40810 / GH-24106, SQLite 3.7.15 or newer is required.

Closing this as not-a-bug. Please reopen if you disagree.

----------
nosy: +erlendaasland
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39410>
_______________________________________

From report at bugs.python.org  Tue Oct 19 07:00:02 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 19 Oct 2021 11:00:02 +0000
Subject: [issue43851] Optimise SQLite builds on macOS and Windows
In-Reply-To: <1618442168.97.0.98960637018.issue43851@roundup.psfhosted.org>
Message-ID: <1634641202.3.0.8851625685.issue43851@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:


New changeset 8702b667d8e7da7a1888297d84f493f26c580a2d by Erlend Egeberg Aasland in branch 'main':
bpo-43851: Build SQLite with SQLITE_OMIT_AUTOINIT on Windows (GH-25414)
https://github.com/python/cpython/commit/8702b667d8e7da7a1888297d84f493f26c580a2d


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43851>
_______________________________________

From report at bugs.python.org  Tue Oct 19 07:02:40 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 19 Oct 2021 11:02:40 +0000
Subject: [issue43851] Optimise SQLite builds on macOS and Windows
In-Reply-To: <1618442168.97.0.98960637018.issue43851@roundup.psfhosted.org>
Message-ID: <1634641360.2.0.370370011166.issue43851@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43851>
_______________________________________

From report at bugs.python.org  Tue Oct 19 07:06:04 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 19 Oct 2021 11:06:04 +0000
Subject: [issue45522] Allow to build Python without freelists
Message-ID: <1634641564.68.0.977403045358.issue45522@roundup.psfhosted.org>


New submission from Christian Heimes <lists at cheimes.de>:

Freelists are an optimization trick to avoid allocation and deallocation of commonly used structures. Currently Python has freelists for frame, tuple, float, list, dict, async generators, and context objects. Small ints are also cached.

For experimentation with alternative memory allocators such as mimalloc, I would like to introduce a way to disable freelists. Tuples's _Py_tuple_state struct has a conditional check on #if PyTuple_MAXSAVESIZE > 0. I propose to add same logic to all other structs.

----------
assignee: christian.heimes
components: C API
messages: 404289
nosy: christian.heimes
priority: normal
severity: normal
stage: patch review
status: open
title: Allow to build Python without freelists
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45522>
_______________________________________

From report at bugs.python.org  Tue Oct 19 07:06:47 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 11:06:47 +0000
Subject: [issue37577] ModuleNotFoundError: No module named
 '_sysconfigdata__linux_x86_64-linux-gnu'
In-Reply-To: <1562982731.24.0.816575023926.issue37577@roundup.psfhosted.org>
Message-ID: <1634641607.52.0.598089345198.issue37577@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
type: crash -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37577>
_______________________________________

From report at bugs.python.org  Tue Oct 19 07:20:36 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Tue, 19 Oct 2021 11:20:36 +0000
Subject: [issue19459] Python does not support the GEORGIAN-PS charset
In-Reply-To: <1634633089.27.0.996674044666.issue19459@roundup.psfhosted.org>
Message-ID: <725d9a1f-ea72-4cde-0e01-41922a168f27@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 19.10.2021 10:44, Serhiy Storchaka wrote:
> 
> Possible solutions (they can be combined):
> 
> 1. Add support for the GEORGIAN-PS charset and all other encodings used in libc (issue22679). The problem is that it is difficult to get the official information about these encodings.

As with all encodings we add: there has to be a real need to support
them natively in Python (as opposed to installing codecs via PyPI)
and we need a definite source for the encoding, e.g. a standards
document from an official body.

IMO, we should not really add more encodings to the stdlib, but instead
point people to e.g. the iconv package:

https://pypi.org/project/python-iconv/

Perhaps we ought to make it easier for such packages to provide
additional codecs even during the startup phase, e.g. via a special
env var which points Python to a list of codec packages to load
prior to initializing the I/O encoding... not sure whether this is
possible, though.

> 2. Falls back to utf-8 or ascii+surrogateescape in case of unsupported locale encoding. But typos can slip unnoticed.

I think this would be a more general solution to such cases, provided
the startup logic issues a visible warning about the fallback.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19459>
_______________________________________

From report at bugs.python.org  Tue Oct 19 07:21:45 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 19 Oct 2021 11:21:45 +0000
Subject: [issue45522] Allow to build Python without freelists
In-Reply-To: <1634641564.68.0.977403045358.issue45522@roundup.psfhosted.org>
Message-ID: <1634642505.27.0.808702877123.issue45522@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
keywords: +patch
pull_requests: +27327
pull_request: https://github.com/python/cpython/pull/29056

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45522>
_______________________________________

From report at bugs.python.org  Tue Oct 19 07:59:55 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 11:59:55 +0000
Subject: [issue34543] _struct.Struct: calling functions without calling
 __init__ results in SystemError
In-Reply-To: <1535559532.49.0.56676864532.issue34543@psf.upfronthosting.co.za>
Message-ID: <1634644795.72.0.200219859831.issue34543@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11:

>>> from _struct import Struct
>>> s = Struct.__new__(Struct)
>>> s.unpack_from(b'asdf')
Assertion failed: (self->s_codes != NULL), function Struct_unpack_from_impl, file /Users/iritkatriel/src/cpython/Modules/_struct.c, line 1603.
zsh: abort      ./python.exe

----------
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11 -Python 2.7, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34543>
_______________________________________

From report at bugs.python.org  Tue Oct 19 08:27:07 2021
From: report at bugs.python.org (EricLin)
Date: Tue, 19 Oct 2021 12:27:07 +0000
Subject: [issue1336] subprocess.Popen hangs when child writes to stderr
In-Reply-To: <1193407452.43.0.999665750675.issue1336@psf.upfronthosting.co.za>
Message-ID: <1634646427.86.0.994245595626.issue1336@roundup.psfhosted.org>


EricLin <linxiaojun1 at huawei.com> added the comment:

@torsten
Your comment here did a great help to me. I observed a long running python 2.7 process leaking memory. I did a lot of digging and eventually found that gc was disabled in this process.
But who disabled it? I really have no idea.
Luckily, I find this comment. The scenario of my process is exactly the same as you said, threading + subprocess. Finally...what a hard trip here.
Thanks a lot!

----------
nosy: +linxiaojun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue1336>
_______________________________________

From report at bugs.python.org  Tue Oct 19 08:31:11 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 19 Oct 2021 12:31:11 +0000
Subject: [issue44927] [sqlite3] proposal: add sqlite3.Cursor.insert() method
In-Reply-To: <1629136860.31.0.191643980598.issue44927@roundup.psfhosted.org>
Message-ID: <1634646671.03.0.902704680102.issue44927@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

I'm closing this for now. As I see it, there is little added value, and it would be hard to make a good API for all invariants. If this idea surfaces again, we can always reopen this issue.

Thanks for you interest in improving CPython :)

----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44927>
_______________________________________

From report at bugs.python.org  Tue Oct 19 09:09:37 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Tue, 19 Oct 2021 13:09:37 +0000
Subject: [issue45459] Limited API support for Py_buffer
In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>
Message-ID: <1634648977.81.0.816381470463.issue45459@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

> I recommend to get feedback from NumPy, Pillow, and Cython devs first.

Could you split this into two PRs: one to add the new API, and another to  add things to the limited set?

There's no rush to add it to the limited API, esp. since it can't be tested with the intended consumers yet. And it's a hassle to remove mistakes from the limited API, even in alphas/betas.

To try this out I suggest making the struct opaque when something like `_PyBuffer_IS_OPAQUE` is #defined. Then you can let the compiler tell you what needs to change in those projects :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Tue Oct 19 09:17:01 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Tue, 19 Oct 2021 13:17:01 +0000
Subject: [issue45336] Issue with xml.tree.ElementTree.write
In-Reply-To: <1633031921.76.0.241035024911.issue45336@roundup.psfhosted.org>
Message-ID: <1634649421.35.0.466633115947.issue45336@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Ed: it seems ElementTree.write does not support `standalone` option, but both minidom (https://docs.python.org/3/library/xml.dom.minidom.html) and lxml (https://lxml.de/) support it. Are either of those suitable for your usecase?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45336>
_______________________________________

From report at bugs.python.org  Tue Oct 19 09:17:38 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Tue, 19 Oct 2021 13:17:38 +0000
Subject: [issue45336] Issue with xml.tree.ElementTree.write
In-Reply-To: <1633031921.76.0.241035024911.issue45336@roundup.psfhosted.org>
Message-ID: <1634649458.11.0.746748997497.issue45336@roundup.psfhosted.org>


Change by Andrei Kulakov <andrei.avk at gmail.com>:


----------
components: +Library (Lib) -Documentation
nosy: +kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45336>
_______________________________________

From report at bugs.python.org  Tue Oct 19 09:18:14 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Tue, 19 Oct 2021 13:18:14 +0000
Subject: [issue45336] xml.tree.ElementTree.write does not support `standalone`
 option
In-Reply-To: <1633031921.76.0.241035024911.issue45336@roundup.psfhosted.org>
Message-ID: <1634649494.11.0.602378077638.issue45336@roundup.psfhosted.org>


Change by Andrei Kulakov <andrei.avk at gmail.com>:


----------
title: Issue with xml.tree.ElementTree.write -> xml.tree.ElementTree.write does not support `standalone` option

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45336>
_______________________________________

From report at bugs.python.org  Tue Oct 19 09:33:48 2021
From: report at bugs.python.org (Erik Bray)
Date: Tue, 19 Oct 2021 13:33:48 +0000
Subject: [issue31885] Cygwin: socket test suites hang indefinitely due to bug
 in Cygwin
In-Reply-To: <1509116163.97.0.213398074469.issue31885@psf.upfronthosting.co.za>
Message-ID: <1634650428.78.0.718422748988.issue31885@roundup.psfhosted.org>


Erik Bray <erik.m.bray at gmail.com> added the comment:

Thanks for asking.  Indeed the fix to that issue was included in https://cygwin.com/git/?p=newlib-cygwin.git;a=commit;h=5ca286666a0cd71436a84797d5d66831790004e0 and as Cygwin obsoletes old releases rather quickly I see no reason to keep this issue open.

----------
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31885>
_______________________________________

From report at bugs.python.org  Tue Oct 19 09:33:59 2021
From: report at bugs.python.org (ed wolf)
Date: Tue, 19 Oct 2021 13:33:59 +0000
Subject: [issue45336] xml.tree.ElementTree.write does not support `standalone`
 option
In-Reply-To: <1633031921.76.0.241035024911.issue45336@roundup.psfhosted.org>
Message-ID: <1634650439.85.0.645191700863.issue45336@roundup.psfhosted.org>


ed wolf <bq824 at cummins.com> added the comment:

Will ElementTree.write be updated to correct this issue?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45336>
_______________________________________

From report at bugs.python.org  Tue Oct 19 09:36:24 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 13:36:24 +0000
Subject: [issue31882] Cygwin: asyncio and asyncore test suites hang
 indefinitely due to bug in Cygwin
In-Reply-To: <1509109689.46.0.213398074469.issue31882@psf.upfronthosting.co.za>
Message-ID: <1634650584.11.0.846296941775.issue31882@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

See discussion on issue31885.

----------
nosy: +iritkatriel
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31882>
_______________________________________

From report at bugs.python.org  Tue Oct 19 09:38:50 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 13:38:50 +0000
Subject: [issue31885] Cygwin: socket test suites hang indefinitely due to bug
 in Cygwin
In-Reply-To: <1509116163.97.0.213398074469.issue31885@psf.upfronthosting.co.za>
Message-ID: <1634650730.62.0.713894324903.issue31885@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Thanks. Do you know whether anyone is looking at Cygwin support for cpython at the moment? Is there interest in that?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31885>
_______________________________________

From report at bugs.python.org  Tue Oct 19 09:42:01 2021
From: report at bugs.python.org (Manuel)
Date: Tue, 19 Oct 2021 13:42:01 +0000
Subject: [issue45523] Python3 ThreadingHTTPServer fails to send chunked
 encoded response
Message-ID: <1634650921.13.0.397110972299.issue45523@roundup.psfhosted.org>


New submission from Manuel <manuel.bassani at greenorange.it>:

I'm implementing an HTTPServer class that produces a response with transfer-encoding chunked mode.

I'm sending the chunks as described in https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding#chunked_encoding

If I send chunks of length <= 9 bytes the message is received correctly by the client, otherwise when sending chunks of length >= 10 bytes, it seems that some of them are not received and the message remains stuck in the client waiting indefinitely

In attachment an example of the complete code to reproduce the issue, but in short, the following code:

# writing 5 chunks of length 10
for i in range(5):
    text = str(i+1) * 10  # concatenate 10 chars
    chunk = '{0:d}\r\n'.format(len(text)) + text + '\r\n'
    self.wfile.write(chunk.encode(encoding='utf-8'))

# writing close sequence
close_chunk = '0\r\n\r\n'
self.wfile.write(close_chunk.encode(encoding='utf-8'))

Produces:
10\r\n
1111111111\r\n
10\r\n
2222222222\r\n
10\r\n
3333333333\r\n
10\r\n
4444444444\r\n
10\r\n
5555555555\r\n
0\r\n
\r\n

In this case the client hangs several minutes without a response 

But if I use length 9 or less instead for example with

text = str(i+1) * 9

the client receives the correct body and the communication ends correctly (in about 6ms)

The problem persists with both http.server.ThreadingHTTPServer and http.server.HTTPServer
I tried also passing the body as an hard-coded binary string

some version informations:
Python 3.9.2
HTTP Client used: Postman 8.10, curl, Chrome


Thanks a lot for any help
Manuel

----------
files: myserver.py
messages: 404300
nosy: manuel_b
priority: normal
severity: normal
status: open
title: Python3 ThreadingHTTPServer fails to send chunked encoded response
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file50369/myserver.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45523>
_______________________________________

From report at bugs.python.org  Tue Oct 19 09:44:54 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Tue, 19 Oct 2021 13:44: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: <1634651094.12.0.504533239412.issue42064@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:


New changeset 09c04e7f0d26f0006964554b6a0caa5ef7f0bd24 by Erlend Egeberg Aasland in branch 'main':
bpo-42064: Add module backref to `sqlite3` callback context (GH-28242)
https://github.com/python/cpython/commit/09c04e7f0d26f0006964554b6a0caa5ef7f0bd24


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42064>
_______________________________________

From report at bugs.python.org  Tue Oct 19 09:46:58 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Tue, 19 Oct 2021 13:46:58 +0000
Subject: [issue45336] xml.etree.ElementTree.write does not support
 `standalone` option
In-Reply-To: <1633031921.76.0.241035024911.issue45336@roundup.psfhosted.org>
Message-ID: <1634651218.87.0.642857533824.issue45336@roundup.psfhosted.org>


Change by Andrei Kulakov <andrei.avk at gmail.com>:


----------
title: xml.tree.ElementTree.write does not support `standalone` option -> xml.etree.ElementTree.write does not support `standalone` option

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45336>
_______________________________________

From report at bugs.python.org  Tue Oct 19 09:48:29 2021
From: report at bugs.python.org (Erik Bray)
Date: Tue, 19 Oct 2021 13:48:29 +0000
Subject: [issue31885] Cygwin: socket test suites hang indefinitely due to bug
 in Cygwin
In-Reply-To: <1509116163.97.0.213398074469.issue31885@psf.upfronthosting.co.za>
Message-ID: <1634651309.9.0.484590261926.issue31885@roundup.psfhosted.org>


Erik Bray <erik.m.bray at gmail.com> added the comment:

That person was me--I have the keys to a cygwin buildbot, but it's currently not running.  I lost the urgency to make cygwin fully supported, though it's come a long way.  In particular the deprecation of distutils should help nix some of the long-standing issues.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31885>
_______________________________________

From report at bugs.python.org  Tue Oct 19 09:49:49 2021
From: report at bugs.python.org (Erik Bray)
Date: Tue, 19 Oct 2021 13:49:49 +0000
Subject: [issue31882] Cygwin: asyncio and asyncore test suites hang
 indefinitely due to bug in Cygwin
In-Reply-To: <1509109689.46.0.213398074469.issue31882@psf.upfronthosting.co.za>
Message-ID: <1634651389.63.0.0942338395331.issue31882@roundup.psfhosted.org>


Erik Bray <erik.m.bray at gmail.com> added the comment:

To my knowledge this issue is *not* fixed upstream.  However, my PR no doubt needs rebasing.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31882>
_______________________________________

From report at bugs.python.org  Tue Oct 19 09:50:24 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Tue, 19 Oct 2021 13:50:24 +0000
Subject: [issue45336] xml.etree.ElementTree.write does not support
 `standalone` option
In-Reply-To: <1633031921.76.0.241035024911.issue45336@roundup.psfhosted.org>
Message-ID: <1634651424.48.0.435119404627.issue45336@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Ed: I can look into adding it, but not sure when. If you can make the case that minidom and lxml are not suitable workarounds for this, it will be more likely that me or someone else will add this option; but note that as this is a new feature, it will only go into Python 3.11 .

----------
assignee: docs at python -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45336>
_______________________________________

From report at bugs.python.org  Tue Oct 19 09:52:59 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 13:52:59 +0000
Subject: [issue31882] Cygwin: asyncio and asyncore test suites hang
 indefinitely due to bug in Cygwin
In-Reply-To: <1509109689.46.0.213398074469.issue31882@psf.upfronthosting.co.za>
Message-ID: <1634651579.08.0.642215503581.issue31882@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Sorry I thought this was the same issue. 

Note that asyncore is deprecated now.

----------
resolution: out of date -> 
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31882>
_______________________________________

From report at bugs.python.org  Tue Oct 19 10:02:52 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Tue, 19 Oct 2021 14:02:52 +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: <1634652172.08.0.673620331468.issue45113@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

Ah, sorry, I overlooked the flags.
This does beg the question: what else from PyType_Spec will be needed?
I guess we don't want to allow additional slots/methods. (Combining them would be hard anyway; if someone needs them they should make a subclass.) So it seems that flags and ht_module are all that's missing.


Also, note that converting the stdlib to heap types is suspended, pending a PEP. I'd be much happier with adding this if some *other* project needed it.
The Py_TPFLAGS_DISALLOW_INSTANTIATION is very specific; do you have other examples that need this?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Tue Oct 19 10:37:47 2021
From: report at bugs.python.org (Aidan Clark)
Date: Tue, 19 Oct 2021 14:37:47 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
Message-ID: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org>


New submission from Aidan Clark <aidan.b.clark at gmail.com>:

[I believe this is fundamentally a dataclass version of https://bugs.python.org/issue41249]

When using `from __future__ import annotations`, calling get_type_hints on the constructor of a dataclass B which inherits from a dataclass A defined in another module will error if dataclass A has type hints which are not imported in the module where dataclass B is defined.

This is best shown by example, if you have foo.py:

```
from __future__ import annotations

import collections
import dataclasses

@dataclasses.dataclass
class A:
  x: collections.OrderedDict
```

and then in bar.py:

```
from __future__ import annotations

import foo
import dataclasses
import typing

@dataclasses.dataclass
class B(foo.A):
  pass

typing.get_type_hints(B)
```

the final line will raise "NameError: name 'collections' is not defined".


This code will not error if you do either of the following:
  * add `import collections` to bar.py.
  * remove the __future__ annotations import from both files.


I am not confident enough on the internals of dataclass to suggest a fix, but potentially a similar approach to that which solved the TypedDict equivalent https://bugs.python.org/issue41249 would work?

----------
components: Library (Lib)
messages: 404307
nosy: aidan.b.clark, slebedev
priority: normal
severity: normal
status: open
title: Cross-module dataclass inheritance breaks get_type_hints
type: behavior
versions: Python 3.6, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Tue Oct 19 10:38:56 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Tue, 19 Oct 2021 14:38:56 +0000
Subject: [issue45474] [C API] marshal.h must not use FILE* type in the limited
 C API
In-Reply-To: <1634242163.67.0.843815202649.issue45474@roundup.psfhosted.org>
Message-ID: <1634654336.59.0.569452213302.issue45474@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

Nothing from marshal.h is part of the limited API, and nothing from there is exported in the stable ABI DLL.
The entire file should be in `#ifndef Py_LIMITED_API`, rather than just a part.

----------
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45474>
_______________________________________

From report at bugs.python.org  Tue Oct 19 10:41:55 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Tue, 19 Oct 2021 14:41:55 +0000
Subject: [issue45474] [C API] marshal.h must not use FILE* type in the limited
 C API
In-Reply-To: <1634242163.67.0.843815202649.issue45474@roundup.psfhosted.org>
Message-ID: <1634654515.18.0.733166753549.issue45474@roundup.psfhosted.org>


Change by Petr Viktorin <encukou at gmail.com>:


----------
pull_requests: +27328
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/29061

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45474>
_______________________________________

From report at bugs.python.org  Tue Oct 19 10:42:42 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Tue, 19 Oct 2021 14:42:42 +0000
Subject: [issue4304] build mode which fails for build failures in extensions
In-Reply-To: <1226482481.6.0.943122034161.issue4304@psf.upfronthosting.co.za>
Message-ID: <1634654562.13.0.921796826147.issue4304@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

This would be nice.
Too often when hacking on an extension, test pass just because I don't notice there was a compile error and so I'm testing an older version.

----------
nosy: +petr.viktorin

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue4304>
_______________________________________

From report at bugs.python.org  Tue Oct 19 11:01:04 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 19 Oct 2021 15:01:04 +0000
Subject: [issue45434] [C API] Clean-up the Python.h header file
In-Reply-To: <1633982885.76.0.0750854032549.issue45434@roundup.psfhosted.org>
Message-ID: <1634655664.9.0.810845671984.issue45434@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45434>
_______________________________________

From report at bugs.python.org  Tue Oct 19 11:39:36 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 15:39:36 +0000
Subject: [issue14185] Failure to build _dbm with ndbm on Arch Linux
In-Reply-To: <1330801255.84.0.367469513946.issue14185@psf.upfronthosting.co.za>
Message-ID: <1634657976.38.0.167650628025.issue14185@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Python 3.3 is not longer maintained. Please create a new issue if you are having problems building a current version (3.9+).

----------
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue14185>
_______________________________________

From report at bugs.python.org  Tue Oct 19 11:43:58 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Tue, 19 Oct 2021 15:43:58 +0000
Subject: [issue45525] PyType_Spec basicsize/itemsize should allow -1 for
 "inherit"
Message-ID: <1634658238.19.0.273279060126.issue45525@roundup.psfhosted.org>


New submission from Petr Viktorin <encukou at gmail.com>:

For cases where you aren't adding new C-level state, especially if don't have the superclass' struct available, it would be good to allow inheriting basicsize/itemsize from the superclass.

(SuperType->tp_size is not easily usable for the same reason PyType_FromSpecWithBases exists: on MSVC, if SuperType comes from a different DLL, it is not a constant expression.)

----------
messages: 404311
nosy: petr.viktorin
priority: normal
severity: normal
status: open
title: PyType_Spec basicsize/itemsize should allow -1 for "inherit"

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45525>
_______________________________________

From report at bugs.python.org  Tue Oct 19 12:01:48 2021
From: report at bugs.python.org (Alex Waygood)
Date: Tue, 19 Oct 2021 16:01:48 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
In-Reply-To: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org>
Message-ID: <1634659308.07.0.350494362488.issue45524@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

I can't reproduce this on Python 3.8.3, 3.9.6, 3.10.0 or 3.11.0a1+. Which versions of Python have you tried this on? (I'm able to reproduce the `typing.TypedDict` bug on Python 3.8, since the fix was only backported to 3.9, but not this.)

----------
nosy: +AlexWaygood

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Tue Oct 19 12:14:29 2021
From: report at bugs.python.org (Sergei Lebedev)
Date: Tue, 19 Oct 2021 16:14:29 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
In-Reply-To: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org>
Message-ID: <1634660069.44.0.0231576795937.issue45524@roundup.psfhosted.org>


Sergei Lebedev <slebedev at google.com> added the comment:

I think the example has a minor typo. 

The crash is reproducible on 3.9 if the last line in bar.py is

    typing.get_type_hints(B.__init__)

instead of

    typing.get_type_hints(B)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Tue Oct 19 12:23:02 2021
From: report at bugs.python.org (Karthikeyan Singaravelan)
Date: Tue, 19 Oct 2021 16:23:02 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
In-Reply-To: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org>
Message-ID: <1634660582.15.0.144298495532.issue45524@roundup.psfhosted.org>


Change by Karthikeyan Singaravelan <tir.karthi at gmail.com>:


----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Tue Oct 19 12:31:14 2021
From: report at bugs.python.org (Alex Waygood)
Date: Tue, 19 Oct 2021 16:31:14 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
In-Reply-To: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org>
Message-ID: <1634661074.11.0.551135733829.issue45524@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

Thanks @Sergei. With that alteration, I have reproduced this on Python 3.9, 3.10 and 3.11.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Tue Oct 19 12:31:28 2021
From: report at bugs.python.org (Alex Waygood)
Date: Tue, 19 Oct 2021 16:31:28 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
In-Reply-To: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org>
Message-ID: <1634661088.97.0.648117716511.issue45524@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
versions: +Python 3.10, Python 3.11 -Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Tue Oct 19 12:45:35 2021
From: report at bugs.python.org (Mark Dickinson)
Date: Tue, 19 Oct 2021 16:45:35 +0000
Subject: [issue25934] ICC compiler: ICC treats denormal floating point numbers
 as 0.0
In-Reply-To: <1450911743.93.0.393041043786.issue25934@psf.upfronthosting.co.za>
Message-ID: <1634661935.51.0.184459681122.issue25934@roundup.psfhosted.org>


Mark Dickinson <dickinsm at gmail.com> added the comment:

> Closing this as out of date.

SGTM. Thanks.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25934>
_______________________________________

From report at bugs.python.org  Tue Oct 19 12:47:16 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Tue, 19 Oct 2021 16:47:16 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <CALFfu7AzGVtY5VCvCrLWcMhgdXBAVY=Zwp0vt7p-6dLrXE45sg@mail.gmail.com>
Message-ID: <452fb543-4c86-174a-d27a-a727f3986f7c@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 16.10.2021 21:20, Eric Snow wrote:
> 
> On Sat, Oct 16, 2021 at 5:01 AM Marc-Andre Lemburg
> <report at bugs.python.org> wrote:
>> I can try to port PyRun to 3.9 and 3.10 to see whether I run into any issues.
>> Would that help ?
> 
> Yeah, that would totally help.

Ok, I'll start looking into this and post updates here.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Tue Oct 19 12:48:44 2021
From: report at bugs.python.org (Neil Schemenauer)
Date: Tue, 19 Oct 2021 16:48:44 +0000
Subject: [issue45526] Set ADDRESS_BITS to 64 for obmalloc radix tree
Message-ID: <1634662124.91.0.148058700143.issue45526@roundup.psfhosted.org>


New submission from Neil Schemenauer <nas-python at arctrix.com>:

Given this feedback:

https://github.com/python/cpython/pull/14474/files#r725488766

it is perhaps not so safe to assume that only the lower 48 bits of virtual addresses are significant.  I had the idea that Go made similar assumptions but now I'm not sure it does.  There is also a comment in this article about 5-level page tables in Linux:

https://lwn.net/Articles/717293/
https://lwn.net/Articles/717300/

I.e. that Linux does not allocate virtual address space above 47-bit by default.

Setting ADDRESS_BITS to 64 is safer and the performance impact seems small. The virtual memory size of a small Python process goes up a little.  Resident set size doesn't significantly change.  I think the pyperformance changes are just noise.  The pyperformance attached file shows the 3.10 branch with ADDRESS_BITS set to 48 and to 64.

----------
assignee: methane
files: pyperf-compare-addr-64.txt
messages: 404317
nosy: methane, nascheme
priority: normal
severity: normal
stage: patch review
status: open
title: Set ADDRESS_BITS to 64 for obmalloc radix tree
Added file: https://bugs.python.org/file50370/pyperf-compare-addr-64.txt

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45526>
_______________________________________

From report at bugs.python.org  Tue Oct 19 12:49:59 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Tue, 19 Oct 2021 16:49:59 +0000
Subject: [issue45450] Improve syntax error for parenthesized arguments
In-Reply-To: <1634059257.61.0.643840687035.issue45450@roundup.psfhosted.org>
Message-ID: <1634662198.99.0.611283270427.issue45450@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

> Note that the first error is adding invalid outer parens, whereas the second is adding inner parens for sublist.

Yeah, but you can also write:

lambda x, (y, z), w:  None

So is kind of the same error

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45450>
_______________________________________

From report at bugs.python.org  Tue Oct 19 13:02:26 2021
From: report at bugs.python.org (Joe Wells)
Date: Tue, 19 Oct 2021 17:02: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: <1634662946.0.0.169460932183.issue43656@roundup.psfhosted.org>


Joe Wells <bugs-python-org at jbw.link> added the comment:

I would like to request that this bug be repopened and fixed.

I've changed (or at least tried to change, I'm not sure if it will let me) the title of the bug to point out that the failure happens in FrameSummary.__init__.  It does not happen in StackSummary.format.

This problem makes the capture_locals=True feature of TracebackException and StackSummary and the "locals" parameter of FrameSummary unreliable.  If any one of the local variables in any frame on the stack is in an inconsistent state such that repr will raise an exception, the processing of the traceback fails.  This kind of inconsistent state is of course likely to happen during debugging, which is precisely when you would want the capture_locals feature to actually work so you can see what is going wrong.

Just one example of an exception traceback being created with an unsafe local variable value in one of the stack frames is in the following line:

  from _pydecimal import Decimal as D; D(None)

The _pydecimal.Decimal.__new__ method raises an exception when it sees a value it doesn't know how to convert to Decimal.  When it does this, the new object it was creating is left in an inconsistent state missing the _sign attribute.  When you try to inspect the resulting exception traceback with traceback.TracebackException(..., capture_locals=True), this raises an exception.

While I was tracking this bug down, I discovered that the traceback.TracebackException.__init__ method has the same problem: it initializes the _str attribute used by the __str__ method quite late and when it raised an exception before this point, the incompletely initialized TracebackException object caused repr to fail.  There's at least one more class in traceback.py that also has this problem, but I don't remember which one it is.

The cascade of exceptions causing exceptions causing exceptions makes the capture_locals feature difficult to use and debug.

Here is a short snippet that reproduces the bug on Python 3.9.7:

import traceback
class TriggerTracebackBug:
    def __init__(self):
        raise RuntimeError("can't build a TriggerTracebackBug object for some reason")
        self._repr = 'if we reached this line, this object would have a repr result'
    def __repr__(self):
        return self._repr
try:
    TriggerTracebackBug()
except Exception as e:
    # this method call fails because there is a stack frame with a local
    # variable (self) such that repr fails on that variable's value:
    traceback.TracebackException.from_exception(e, capture_locals=True)

It's clear that it is too much to expect every class to implement a safe __repr__ method.  So it also seems clear to me that traceback.FrameSummary.__init__ is the place to fix it.

My suggested fix is to replace this line in the latest Lib/traceback.py:

        self.locals = {k: repr(v) for k, v in locals.items()} if locals else None

with something like this code (written in a somewhat awkward way because that helped while I was debugging it):

        if locals:
            d = {}
            self.locals = d
            for k, v in locals.items():
                try:
                    d[k] = repr(v)
                except Exception:
                    d[k] = '''<an exception was raised while trying to format this local variable's value>'''
        else:
            self.locals = None

I've tested this code in an older version of Python and it fixed the problem for me.

----------
nosy: +jbw
title: StackSummary.format fails if repr(value) fails -> TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Tue Oct 19 13:24:13 2021
From: report at bugs.python.org (Mark Shannon)
Date: Tue, 19 Oct 2021 17:24:13 +0000
Subject: [issue45527] Reduce overhead for cache hits in specialized opcodes.
Message-ID: <1634664253.61.0.347658329299.issue45527@roundup.psfhosted.org>


New submission from Mark Shannon <mark at hotpy.org>:

Every time we get a cache hit in, e.g. LOAD_ATTR_CACHED, we increment the saturating counting. Takes a dependent load and a store, as well as the shift. For fast instructions like BINARY_ADD_FLOAT, this represents a significant portion of work done in the instruction.

If we don't bother to record the hit, we reduce the overhead of fast, specialized instructions.

The cost is that may have re-optimize more often.
For those instructions with high hit-to-miss ratios, which is most, this be barely measurable.
The cost for type unstable and un-optimizable instruction shouldn't be much changed.

Initial experiments show ~1% speedup.

----------
assignee: Mark.Shannon
components: Interpreter Core
messages: 404320
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Reduce overhead for cache hits in specialized opcodes.
type: performance
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45527>
_______________________________________

From report at bugs.python.org  Tue Oct 19 13:34:05 2021
From: report at bugs.python.org (Neil Schemenauer)
Date: Tue, 19 Oct 2021 17:34:05 +0000
Subject: [issue45526] Set ADDRESS_BITS to 64 for obmalloc radix tree
In-Reply-To: <1634662124.91.0.148058700143.issue45526@roundup.psfhosted.org>
Message-ID: <1634664845.67.0.147746736079.issue45526@roundup.psfhosted.org>


Change by Neil Schemenauer <nas-python at arctrix.com>:


----------
keywords: +patch
pull_requests: +27329
pull_request: https://github.com/python/cpython/pull/29062

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45526>
_______________________________________

From report at bugs.python.org  Tue Oct 19 13:38:39 2021
From: report at bugs.python.org (Aidan Clark)
Date: Tue, 19 Oct 2021 17:38:39 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
In-Reply-To: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org>
Message-ID: <1634665119.4.0.194046452671.issue45524@roundup.psfhosted.org>


Aidan Clark <aidan.b.clark at gmail.com> added the comment:

Ah yes, I completely apologize about that typo, the __init__ is definitely needed (serves me right for trying to clean up a repo before posting it).

One other comment to make, perhaps obvious; manually passing a namespace to get_type_hints' `globalns` which contains `collections` does indeed solve the problem (in case anyone else sees this and is blocked). Of course determining the right values to pass is in general difficult for a user (and shouldn't be necessary).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Tue Oct 19 13:42:51 2021
From: report at bugs.python.org (Eric Snow)
Date: Tue, 19 Oct 2021 17:42:51 +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: <1634665371.12.0.443039174318.issue45506@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
pull_requests: +27330
pull_request: https://github.com/python/cpython/pull/29063

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Tue Oct 19 13:43:05 2021
From: report at bugs.python.org (Mark Shannon)
Date: Tue, 19 Oct 2021 17:43:05 +0000
Subject: [issue45527] Reduce overhead for cache hits in specialized opcodes.
In-Reply-To: <1634664253.61.0.347658329299.issue45527@roundup.psfhosted.org>
Message-ID: <1634665385.69.0.544999132188.issue45527@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
nosy: +kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45527>
_______________________________________

From report at bugs.python.org  Tue Oct 19 13:51:50 2021
From: report at bugs.python.org (Brett Cannon)
Date: Tue, 19 Oct 2021 17:51:50 +0000
Subject: [issue35673] Loader for namespace packages
In-Reply-To: <1546781003.0.0.391060889435.issue35673@roundup.psfhosted.org>
Message-ID: <1634665910.08.0.425144351961.issue35673@roundup.psfhosted.org>


Brett Cannon <brett at python.org> added the comment:

Should we register with the ABC or is it time to do proper typing.Protocol classes and have the ABCs inherit from those?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35673>
_______________________________________

From report at bugs.python.org  Tue Oct 19 13:59:09 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Tue, 19 Oct 2021 17:59:09 +0000
Subject: [issue40360] Deprecate lib2to3 (and 2to3) for future removal
In-Reply-To: <1587530454.25.0.44181585934.issue40360@roundup.psfhosted.org>
Message-ID: <1634666349.12.0.665316797026.issue40360@roundup.psfhosted.org>


Change by Gregory P. Smith <greg at krypto.org>:


----------
pull_requests: +27331
pull_request: https://github.com/python/cpython/pull/29064

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40360>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:11:45 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 19 Oct 2021 18:11:45 +0000
Subject: [issue45515] Add reference to zoneinfo in the datetime module
 documetnation
In-Reply-To: <1634582856.08.0.897823851685.issue45515@roundup.psfhosted.org>
Message-ID: <1634667105.81.0.203775076282.issue45515@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27333
pull_request: https://github.com/python/cpython/pull/29066

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45515>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:11:34 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 19 Oct 2021 18:11:34 +0000
Subject: [issue45515] Add reference to zoneinfo in the datetime module
 documetnation
In-Reply-To: <1634582856.08.0.897823851685.issue45515@roundup.psfhosted.org>
Message-ID: <1634667094.48.0.491026027604.issue45515@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +27332
pull_request: https://github.com/python/cpython/pull/29065

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45515>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:18:58 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 18:18:58 +0000
Subject: [issue45449] Document that collections.abc types are subscriptable
In-Reply-To: <1634058701.61.0.841344967504.issue45449@roundup.psfhosted.org>
Message-ID: <1634667538.92.0.717536652221.issue45449@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 7bafa0cf586227987d3d662264d491e3780024b7 by Filipe La?ns in branch 'main':
bpo-45449: add note about PEP 585 in collections.abc's documentation (GH-29047)
https://github.com/python/cpython/commit/7bafa0cf586227987d3d662264d491e3780024b7


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45449>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:18:58 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 19 Oct 2021 18:18:58 +0000
Subject: [issue45449] Document that collections.abc types are subscriptable
In-Reply-To: <1634058701.61.0.841344967504.issue45449@roundup.psfhosted.org>
Message-ID: <1634667538.58.0.88894776927.issue45449@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +27334
pull_request: https://github.com/python/cpython/pull/29067

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45449>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:22:59 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 18:22:59 +0000
Subject: [issue45449] Document that collections.abc types are subscriptable
In-Reply-To: <1634058701.61.0.841344967504.issue45449@roundup.psfhosted.org>
Message-ID: <1634667779.76.0.415483148969.issue45449@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
pull_requests: +27335
pull_request: https://github.com/python/cpython/pull/29068

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45449>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:28:34 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 18:28:34 +0000
Subject: [issue40360] Deprecate lib2to3 (and 2to3) for future removal
In-Reply-To: <1587530454.25.0.44181585934.issue40360@roundup.psfhosted.org>
Message-ID: <1634668114.69.0.767202099894.issue40360@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset fdbdf3f7359832820a11ece4c4b01581004d6fe7 by Gregory P. Smith in branch 'main':
bpo-40360: Make the 2to3 deprecation more obvious. (GH-29064)
https://github.com/python/cpython/commit/fdbdf3f7359832820a11ece4c4b01581004d6fe7


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40360>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:35:38 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 18:35:38 +0000
Subject: [issue45515] Add reference to zoneinfo in the datetime module
 documetnation
In-Reply-To: <1634582856.08.0.897823851685.issue45515@roundup.psfhosted.org>
Message-ID: <1634668538.5.0.814006580632.issue45515@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 8cef526a871695f8df4fac167139bbf3292396db by Miss Islington (bot) in branch '3.10':
bpo-45515: Add zoneinfo to the datetime documentation (GH-29038) (GH-29065)
https://github.com/python/cpython/commit/8cef526a871695f8df4fac167139bbf3292396db


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45515>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:35:59 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 18:35:59 +0000
Subject: [issue45515] Add reference to zoneinfo in the datetime module
 documetnation
In-Reply-To: <1634582856.08.0.897823851685.issue45515@roundup.psfhosted.org>
Message-ID: <1634668559.99.0.104681742336.issue45515@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 76578884c5c727c013cba9d14ced9040b5a0c8a1 by Miss Islington (bot) in branch '3.9':
bpo-45515: Add zoneinfo to the datetime documentation (GH-29038) (GH-29066)
https://github.com/python/cpython/commit/76578884c5c727c013cba9d14ced9040b5a0c8a1


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45515>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:40:37 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 18:40:37 +0000
Subject: [issue42222] Modernize integer test/conversion in randrange()
In-Reply-To: <1604165232.15.0.0916383458838.issue42222@roundup.psfhosted.org>
Message-ID: <1634668837.83.0.244752059129.issue42222@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 574241632bd19e56ed488ee4d8999aefc6a8d7cd by Serhiy Storchaka in branch 'main':
bpo-42222: Improve tests for invalid argument types in randrange() (GH-29021)
https://github.com/python/cpython/commit/574241632bd19e56ed488ee4d8999aefc6a8d7cd


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42222>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:41:37 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 18:41:37 +0000
Subject: [issue45449] Document that collections.abc types are subscriptable
In-Reply-To: <1634058701.61.0.841344967504.issue45449@roundup.psfhosted.org>
Message-ID: <1634668897.61.0.299758818586.issue45449@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 092ec4b9d144c493cb514df0978638fdd2d9622a by Miss Islington (bot) in branch '3.10':
bpo-45449: add note about PEP 585 in collections.abc's documentation (GH-29047) (GH-29067)
https://github.com/python/cpython/commit/092ec4b9d144c493cb514df0978638fdd2d9622a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45449>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:42:18 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Tue, 19 Oct 2021 18:42:18 +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: <1634668938.77.0.681004411028.issue43656@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

related issue: https://bugs.python.org/issue20853

similarly to this, if args cmd is used in pdb in the TestClass __init__ method, `self` will be displayed, which means the TestClass.__str__ or __repr__ will run, lacking any required state set in the __init__ after current line; - causing an exception and pdb quitting.

I wonder if one fix can be applied to both issues. I will think about it. I'll also think if this issue should be reopened.

----------
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:42:17 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 18:42:17 +0000
Subject: [issue42174] shutil.get_terminal_size() returns 0 when run in a pty
In-Reply-To: <1603816351.29.0.440046743483.issue42174@roundup.psfhosted.org>
Message-ID: <1634668937.39.0.0818888237272.issue42174@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 236e301b8ad9b78ee880baf12e98a826113dc59b by Filipe La?ns in branch 'main':
bpo-42174: fallback to sane values if the columns or lines are 0 in get_terminal_size (GH-29046)
https://github.com/python/cpython/commit/236e301b8ad9b78ee880baf12e98a826113dc59b


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42174>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:43:12 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 18:43:12 +0000
Subject: [issue45515] Add reference to zoneinfo in the datetime module
 documetnation
In-Reply-To: <1634582856.08.0.897823851685.issue45515@roundup.psfhosted.org>
Message-ID: <1634668992.24.0.559654957657.issue45515@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45515>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:45:42 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 18:45:42 +0000
Subject: [issue42222] Modernize integer test/conversion in randrange()
In-Reply-To: <1604165232.15.0.0916383458838.issue42222@roundup.psfhosted.org>
Message-ID: <1634669142.56.0.28605620477.issue42222@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
versions: +Python 3.11 -Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42222>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:48:05 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 18:48:05 +0000
Subject: [issue42174] shutil.get_terminal_size() returns 0 when run in a pty
In-Reply-To: <1603816351.29.0.440046743483.issue42174@roundup.psfhosted.org>
Message-ID: <1634669285.53.0.426589013007.issue42174@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

We decided not to backport this to 3.10 nor 3.9 due to the subtle nature of the change.

----------
versions: +Python 3.11 -Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42174>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:48:53 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 18:48:53 +0000
Subject: [issue42174] shutil.get_terminal_size() returns 0 when run in a pty
In-Reply-To: <1603816351.29.0.440046743483.issue42174@roundup.psfhosted.org>
Message-ID: <1634669333.53.0.703143276768.issue42174@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks for the fix, Filipe! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42174>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:49:02 2021
From: report at bugs.python.org (Brett Cannon)
Date: Tue, 19 Oct 2021 18:49:02 +0000
Subject: [issue33277] Deprecate __loader__, __package__,
 and __cached__ on modules
In-Reply-To: <1523656102.14.0.682650639539.issue33277@psf.upfronthosting.co.za>
Message-ID: <1634669342.99.0.613929854436.issue33277@roundup.psfhosted.org>


Change by Brett Cannon <brett at python.org>:


----------
title: Deprecate __loader__, __package__, __file__, and __cached__ on modules -> Deprecate __loader__, __package__, and __cached__ on modules

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33277>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:49:22 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 19 Oct 2021 18:49:22 +0000
Subject: [issue1336] subprocess.Popen hangs when child writes to stderr
In-Reply-To: <1193407452.43.0.999665750675.issue1336@psf.upfronthosting.co.za>
Message-ID: <1634669362.94.0.0316546903132.issue1336@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
nosy:  -vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue1336>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:50:20 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 18:50:20 +0000
Subject: [issue45449] Document that collections.abc types are subscriptable
In-Reply-To: <1634058701.61.0.841344967504.issue45449@roundup.psfhosted.org>
Message-ID: <1634669420.11.0.531455406287.issue45449@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset a18e4e9c15a0be833e01c3892206661fc91e6918 by ?ukasz Langa in branch '3.9':
[3.9] bpo-45449: add note about PEP 585 in collections.abc's documentation (GH-29047) (GH-29068)
https://github.com/python/cpython/commit/a18e4e9c15a0be833e01c3892206661fc91e6918


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45449>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:50:43 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 18:50:43 +0000
Subject: [issue45449] Document that collections.abc types are subscriptable
In-Reply-To: <1634058701.61.0.841344967504.issue45449@roundup.psfhosted.org>
Message-ID: <1634669443.57.0.8771373157.issue45449@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Filipe! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45449>
_______________________________________

From report at bugs.python.org  Tue Oct 19 14:55:44 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Tue, 19 Oct 2021 18:55:44 +0000
Subject: [issue45493] str() and repr() of enum different in Python 3.11 from
 Python <= 3.10
In-Reply-To: <1634381937.08.0.264995167777.issue45493@roundup.psfhosted.org>
Message-ID: <1634669744.0.0.537459863662.issue45493@roundup.psfhosted.org>


Barry A. Warsaw <barry at python.org> added the comment:

I can see why Ethan might be overwhelmed by reverting this change.  I tried to merge in his branch but failed, so I'm chucking that work and will try again.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45493>
_______________________________________

From report at bugs.python.org  Tue Oct 19 15:10:49 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Tue, 19 Oct 2021 19:10:49 +0000
Subject: [issue45436] test_tk.test_configure_type() failed on x86 Gentoo
 Non-Debug with X 3.x
In-Reply-To: <1633984027.59.0.32532195896.issue45436@roundup.psfhosted.org>
Message-ID: <1634670649.22.0.664057975639.issue45436@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
nosy: +epaine

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Tue Oct 19 15:11:15 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Tue, 19 Oct 2021 19:11:15 +0000
Subject: [issue45436] test_tk.test_configure_type() failed on x86 Gentoo
 Non-Debug with X 3.x
In-Reply-To: <1633984027.59.0.32532195896.issue45436@roundup.psfhosted.org>
Message-ID: <1634670675.38.0.555973566707.issue45436@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
keywords: +patch
pull_requests: +27336
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29002

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Tue Oct 19 15:11:36 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 19:11:36 +0000
Subject: [issue45500] Rewrite test_dbm
In-Reply-To: <1634464533.25.0.959205582661.issue45500@roundup.psfhosted.org>
Message-ID: <1634670696.92.0.981164613984.issue45500@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 975b94b9de969777218e96a9950c1dab2dab65a0 by Serhiy Storchaka in branch 'main':
bpo-45500: Rewrite test_dbm (GH-29002)
https://github.com/python/cpython/commit/975b94b9de969777218e96a9950c1dab2dab65a0


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45500>
_______________________________________

From report at bugs.python.org  Tue Oct 19 15:14:41 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 19:14:41 +0000
Subject: [issue45195] test_readline: test_nonascii() failed on aarch64 RHEL8
 Refleaks 3.x
In-Reply-To: <1631618041.01.0.810175030001.issue45195@roundup.psfhosted.org>
Message-ID: <1634670881.32.0.103352880945.issue45195@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 1d8cb01e23ab5fc626d4deda216f9a9a19a644a2 by Miss Islington (bot) in branch '3.8':
bpo-45195: Fix test_readline.test_nonascii() (GH-28329) (GH-28984)
https://github.com/python/cpython/commit/1d8cb01e23ab5fc626d4deda216f9a9a19a644a2


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45195>
_______________________________________

From report at bugs.python.org  Tue Oct 19 15:15:00 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Tue, 19 Oct 2021 19:15:00 +0000
Subject: [issue45436] test_tk.test_configure_type() failed on x86 Gentoo
 Non-Debug with X 3.x
In-Reply-To: <1633984027.59.0.32532195896.issue45436@roundup.psfhosted.org>
Message-ID: <1634670900.44.0.929588757076.issue45436@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

EP, do you have any insight into these issues?  Why does 8.6.11 result in test failures?  Bug in our test or in tk?

----------
nosy: +terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Tue Oct 19 15:15:10 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 19:15:10 +0000
Subject: [issue45310] test_multiprocessing_forkserver:
 test_shared_memory_basics() failed with FileExistsError: [Errno 17] File
 exists: '/test01_tsmb'
In-Reply-To: <1632831738.98.0.525271172358.issue45310@roundup.psfhosted.org>
Message-ID: <1634670910.15.0.407194428897.issue45310@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 7f70ba36706219181546c05363097f732827a081 by Victor Stinner in branch '3.8':
bpo-45310: Fix parrallel shared memory tests (GH-28661) (GH-28979)
https://github.com/python/cpython/commit/7f70ba36706219181546c05363097f732827a081


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45310>
_______________________________________

From report at bugs.python.org  Tue Oct 19 15:15:33 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 19:15:33 +0000
Subject: [issue44849] test_os: test_get_set_inheritable_o_path() failed on
 AMD64 FreeBSD Shared 3.x
In-Reply-To: <1628246446.17.0.0445752107297.issue44849@roundup.psfhosted.org>
Message-ID: <1634670933.71.0.241063334485.issue44849@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 67e10be3fee7c69d4ece26e75a0b7a84dab68ce5 by Miss Islington (bot) in branch '3.8':
bpo-44849: Fix os.set_inheritable() on FreeBSD 14 with O_PATH (GH-27623) (GH-28978)
https://github.com/python/cpython/commit/67e10be3fee7c69d4ece26e75a0b7a84dab68ce5


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44849>
_______________________________________

From report at bugs.python.org  Tue Oct 19 15:24:20 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 19:24: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: <1634671460.58.0.542453934478.issue45494@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset a106343f632a99c8ebb0136fa140cf189b4a6a57 by Pablo Galindo Salgado in branch 'main':
bpo-45494: Fix parser crash when reporting errors involving invalid continuation characters (GH-28993)
https://github.com/python/cpython/commit/a106343f632a99c8ebb0136fa140cf189b4a6a57


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45494>
_______________________________________

From report at bugs.python.org  Tue Oct 19 15:28:23 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 19 Oct 2021 19:28:23 +0000
Subject: [issue45436] test_tk.test_configure_type() failed on x86 Gentoo
 Non-Debug with X 3.x with Tcl/Tk 8.6.11
In-Reply-To: <1633984027.59.0.32532195896.issue45436@roundup.psfhosted.org>
Message-ID: <1634671703.09.0.731314246614.issue45436@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
title: test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x -> test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x with Tcl/Tk 8.6.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Tue Oct 19 15:32:50 2021
From: report at bugs.python.org (Michael Wayne Goodman)
Date: Tue, 19 Oct 2021 19:32:50 +0000
Subject: [issue45528] mmap: constants not listed in the documentation
Message-ID: <1634671970.69.0.866952550683.issue45528@roundup.psfhosted.org>


New submission from Michael Wayne Goodman <goodman.m.w at gmail.com>:

Some constants mentioned in the mmap module documentation are not listed as module contents (i.e., with permalinks), so the mentions do not appear as links and it's not explicit that they are in the mmap module namespace. For instance, ACCESS_READ is referenced but does not link to anything, whereas MAP_PRIVATE links to the MAP_* constants section below showing that it is available as mmap.MAP_PRIVATE.

Constants available but not listed:

* ACCESS_* constants
  - ACCESS_READ
  - ACCESS_WRITE
  - ACCESS_COPY
  - ACCESS_DEFAULT
* PROT_* constants
  - PROT_READ
  - PROT_WRITE
  - PROT_EXEC (this one isn't even mentioned in the docs)
* ALLOCATIONGRANULARITY
* PAGESIZE

These constants are available and unlisted in the documentation for all active versions of Python (except ACCESS_DEFAULT, which is available from 3.7). In addition, none of the MAP_* constants are listed for Python 3.9 and prior, although they all (except MAP_POPULATE) have been available since at least 3.6.

Since these are valid and available constants in the mmap module, can we list them in the documentation for the appropriate versions?

----------
assignee: docs at python
components: Documentation
messages: 404342
nosy: docs at python, goodmami
priority: normal
severity: normal
status: open
title: mmap: constants not listed in the documentation
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45528>
_______________________________________

From report at bugs.python.org  Tue Oct 19 15:42:26 2021
From: report at bugs.python.org (Eric Snow)
Date: Tue, 19 Oct 2021 19:42:26 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <452fb543-4c86-174a-d27a-a727f3986f7c@egenix.com>
Message-ID: <CALFfu7Cf5+updUHxT+WDL84xhzc9GNiRN1fZUNHZO0CZC8-ErA@mail.gmail.com>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

On Tue, Oct 19, 2021 at 10:47 AM Marc-Andre Lemburg
<report at bugs.python.org> wrote:
> Ok, I'll start looking into this and post updates here.

Thanks!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Tue Oct 19 15:44:23 2021
From: report at bugs.python.org (Eric Snow)
Date: Tue, 19 Oct 2021 19:44:23 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1634606071.09.0.130198862188.issue45020@roundup.psfhosted.org>
Message-ID: <CALFfu7B_=ExxDr_uQYeZGkGXeTok1UjCxfn7XT2bm4axEyY25Q@mail.gmail.com>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

On Mon, Oct 18, 2021 at 7:14 PM Guido van Rossum <report at bugs.python.org> wrote:
> Is gh-28940 only for UNIX?

It wasn't meant to be. :(

> I built on Windows with default options (PCbuild\build.bat) and it looks like the frozen modules are used by default even though I am running in the source directory. (I put a printf() call in unmarshal_frozen_code().)

I'll look into this.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Tue Oct 19 15:48:15 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 19:48:15 +0000
Subject: [issue45500] Rewrite test_dbm
In-Reply-To: <1634464533.25.0.959205582661.issue45500@roundup.psfhosted.org>
Message-ID: <1634672895.94.0.00323658016083.issue45500@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
pull_requests: +27337
pull_request: https://github.com/python/cpython/pull/29069

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45500>
_______________________________________

From report at bugs.python.org  Tue Oct 19 16:05:33 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 20:05:33 +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: <1634673933.04.0.0206943467284.issue45494@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
pull_requests: +27338
pull_request: https://github.com/python/cpython/pull/29070

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45494>
_______________________________________

From report at bugs.python.org  Tue Oct 19 16:11:20 2021
From: report at bugs.python.org (Eric Snow)
Date: Tue, 19 Oct 2021 20:11:20 +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: <1634674280.8.0.548734511164.issue45506@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:


New changeset f4b12440cf24d7636755aac5b2645e47713557c7 by Eric Snow in branch 'main':
bpo-45506: Go back to not running most of test_embed in out-of-tree builds. (gh-29063)
https://github.com/python/cpython/commit/f4b12440cf24d7636755aac5b2645e47713557c7


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Tue Oct 19 16:19:42 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 20:19:42 +0000
Subject: [issue25327] Python 3.5 Windows 10 Installation Fails With Corrupt
 Directory Error
In-Reply-To: <1444158929.17.0.958529864841.issue25327@psf.upfronthosting.co.za>
Message-ID: <1634674782.91.0.0903002235138.issue25327@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25327>
_______________________________________

From report at bugs.python.org  Tue Oct 19 16:19:42 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 20:19:42 +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: <1634674782.88.0.413217490794.issue45494@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
pull_requests: +27339
pull_request: https://github.com/python/cpython/pull/29071

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45494>
_______________________________________

From report at bugs.python.org  Tue Oct 19 16:20:45 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 20:20:45 +0000
Subject: [issue25116] It failed to install Py3.5 on win2008R2
In-Reply-To: <1442289223.22.0.363627873073.issue25116@psf.upfronthosting.co.za>
Message-ID: <1634674845.14.0.161856390847.issue25116@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25116>
_______________________________________

From report at bugs.python.org  Tue Oct 19 16:21:07 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 20:21:07 +0000
Subject: [issue45500] Rewrite test_dbm
In-Reply-To: <1634464533.25.0.959205582661.issue45500@roundup.psfhosted.org>
Message-ID: <1634674867.47.0.423876348777.issue45500@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 325b2c223453203b2fa9ce7b9bcebdbef03adf70 by ?ukasz Langa in branch '3.10':
[3.10] bpo-45500: Rewrite test_dbm (GH-29002) (GH-29069)
https://github.com/python/cpython/commit/325b2c223453203b2fa9ce7b9bcebdbef03adf70


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45500>
_______________________________________

From report at bugs.python.org  Tue Oct 19 16:26:21 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 20:26:21 +0000
Subject: [issue25222] 3.5.0 regression - Fatal Python error: Cannot recover
 from stack overflow
In-Reply-To: <1443041934.39.0.663904562199.issue25222@psf.upfronthosting.co.za>
Message-ID: <1634675181.57.0.444354681931.issue25222@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

There was work on recursion in recent versions and the Fatal Error is less likely now. We will not investigate recursion issues on 3.5, so I will close this and request that you create a new issue if you have problem with a current Python version.

----------
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25222>
_______________________________________

From report at bugs.python.org  Tue Oct 19 16:30:48 2021
From: report at bugs.python.org (miss-islington)
Date: Tue, 19 Oct 2021 20:30:48 +0000
Subject: [issue39679] functools: singledispatchmethod doesn't work with
 classmethod
In-Reply-To: <1582053375.25.0.178240077179.issue39679@roundup.psfhosted.org>
Message-ID: <1634675448.57.0.0426661623365.issue39679@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 12.0 -> 13.0
pull_requests: +27340
pull_request: https://github.com/python/cpython/pull/29072

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39679>
_______________________________________

From report at bugs.python.org  Tue Oct 19 16:30:33 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 20:30:33 +0000
Subject: [issue39679] functools: singledispatchmethod doesn't work with
 classmethod
In-Reply-To: <1582053375.25.0.178240077179.issue39679@roundup.psfhosted.org>
Message-ID: <1634675433.06.0.977353065302.issue39679@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset ad6d162e518963711d24c80f1b7d6079bd437584 by Alex Waygood in branch 'main':
bpo-39679: Add tests for classmethod/staticmethod singledispatchmethods (GH-29034)
https://github.com/python/cpython/commit/ad6d162e518963711d24c80f1b7d6079bd437584


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39679>
_______________________________________

From report at bugs.python.org  Tue Oct 19 16:31:22 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 20:31:22 +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: <1634675482.38.0.909349613582.issue45494@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 5c9cab595e56aeb118bff77ece784dbac30b4338 by ?ukasz Langa in branch '3.10':
[3.10] bpo-45494: Fix parser crash when reporting errors involving invalid continuation characters (GH-28993) (GH-29070)
https://github.com/python/cpython/commit/5c9cab595e56aeb118bff77ece784dbac30b4338


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45494>
_______________________________________

From report at bugs.python.org  Tue Oct 19 16:32:24 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 19 Oct 2021 20:32: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: <1634675544.6.0.940498558788.issue42064@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
pull_requests: +27341
pull_request: https://github.com/python/cpython/pull/29073

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42064>
_______________________________________

From report at bugs.python.org  Tue Oct 19 16:32:56 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 19 Oct 2021 20:32:56 +0000
Subject: [issue25355] Windows installer does not add py.exe launcher to "App
 Paths" key
In-Reply-To: <1444403177.17.0.586172886506.issue25355@psf.upfronthosting.co.za>
Message-ID: <1634675576.48.0.741336231511.issue25355@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

Somewhat deliberate. We moved to properly support side-by-side installs, which can't be done with this key - App Paths would end up out of sync with PATH... almost instantly, really. (However, the Windows Store package manages this correctly in line with its PATH management, so they won't get out of sync.)

However, the py.exe launcher could be added there instead, as it is managed separately from the Python install so there's only ever one. It also handles the file association and drop handler, so it would make sense to set it here too.

The registry key would have to be added to the launcher MSI, somewhere under Tools/msi. Probably also needs a keypath registry key under its own location to be able to manage this properly - there should be other examples available.

----------
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
title: Windows 3.5 installer does not add python to "App Paths" key -> Windows installer does not add py.exe launcher to "App Paths" key
type:  -> enhancement
versions: +Python 3.11 -Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25355>
_______________________________________

From report at bugs.python.org  Tue Oct 19 16:48:29 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 20:48:29 +0000
Subject: [issue45500] Rewrite test_dbm
In-Reply-To: <1634464533.25.0.959205582661.issue45500@roundup.psfhosted.org>
Message-ID: <1634676509.93.0.69169250852.issue45500@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
pull_requests: +27342
pull_request: https://github.com/python/cpython/pull/29074

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45500>
_______________________________________

From report at bugs.python.org  Tue Oct 19 16:52:59 2021
From: report at bugs.python.org (Neil Schemenauer)
Date: Tue, 19 Oct 2021 20:52:59 +0000
Subject: [issue45521] obmalloc radix tree typo in code
In-Reply-To: <1634621878.99.0.975140050244.issue45521@roundup.psfhosted.org>
Message-ID: <1634676779.58.0.877033174534.issue45521@roundup.psfhosted.org>


Neil Schemenauer <nas-python at arctrix.com> added the comment:

I have not yet been able to reproduce methane's crash.  My guess it it's not related.

An explanation of what I think the impact of this bug is:

The radix tree is used to determine if memory is from obmalloc or from the system malloc (i.e return value from address_in_range()).  WIth ADDRESS_BITS set to 48, we ignore the top 16 bits of addresses.  The next 10 bits are supposed to be the index into the top level node array for the radix tree.  Due to the bug, we mask those and only use the bottom 8 of those 10.  So, if you have virtual addresses that span more than that 8 bit range, we will index into the wrong node.  That means address_in_range() could give the wrong answer.  Which means you might try to free memory with the wrong malloc.

I think this is likely to be triggered only if you allocate a massive amount of memory, like 70 TB.  However, triggering it would depend on how the kernel maps virtual memory to the Python process.  I.e. there might be a wierd OS that gives pages at 0x7f0000000000 and then right after pages at 0x3f0000000000.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45521>
_______________________________________

From report at bugs.python.org  Tue Oct 19 17:05:36 2021
From: report at bugs.python.org (Ned Deily)
Date: Tue, 19 Oct 2021 21:05:36 +0000
Subject: [issue45436] test_tk.test_configure_type() failed on x86 Gentoo
 Non-Debug with X 3.x with Tcl/Tk 8.6.11
In-Reply-To: <1633984027.59.0.32532195896.issue45436@roundup.psfhosted.org>
Message-ID: <1634677536.66.0.295315533007.issue45436@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
pull_requests:  -27336

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Tue Oct 19 17:11:23 2021
From: report at bugs.python.org (Ned Deily)
Date: Tue, 19 Oct 2021 21:11:23 +0000
Subject: [issue45436] test_tk.test_configure_type() failed on x86 Gentoo
 Non-Debug with X 3.x with Tcl/Tk 8.6.11
In-Reply-To: <1633984027.59.0.32532195896.issue45436@roundup.psfhosted.org>
Message-ID: <1634677883.79.0.37354803541.issue45436@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

There are similar test failures on macOS with the current Tk 8.6.11.1 on both 3.10 and 3.11.

----------
nosy: +ned.deily
stage: patch review -> needs patch
versions: +Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Tue Oct 19 17:24:19 2021
From: report at bugs.python.org (Michael Wayne Goodman)
Date: Tue, 19 Oct 2021 21:24:19 +0000
Subject: [issue45528] mmap: constants not listed in the documentation
In-Reply-To: <1634671970.69.0.866952550683.issue45528@roundup.psfhosted.org>
Message-ID: <1634678659.01.0.745241220173.issue45528@roundup.psfhosted.org>


Change by Michael Wayne Goodman <goodman.m.w at gmail.com>:


----------
keywords: +patch
pull_requests: +27343
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29075

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45528>
_______________________________________

From report at bugs.python.org  Tue Oct 19 17:24:39 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 19 Oct 2021 21:24:39 +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: <1634678679.31.0.0766073003302.issue45436@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
title: test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x with Tcl/Tk 8.6.11 -> test_tk.test_configure_type() fails with Tcl/Tk 8.6.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Tue Oct 19 17:26:07 2021
From: report at bugs.python.org (Clay Massok)
Date: Tue, 19 Oct 2021 21:26:07 +0000
Subject: [issue45529] checking any object for attr "get" always returns True
 with `hasattr`
Message-ID: <1634678767.24.0.869931041778.issue45529@roundup.psfhosted.org>


New submission from Clay Massok <m.c.massok at gmail.com>:

Any time you use `hasattr` to check if a dict has the attr "get", it returns true.

Uploaded `.py` file has bug example.

----------
components: macOS
files: bug.py
messages: 404353
nosy: m.c.massok, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: checking any object for attr "get" always returns True with `hasattr`
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file50371/bug.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45529>
_______________________________________

From report at bugs.python.org  Tue Oct 19 17:28:37 2021
From: report at bugs.python.org (Josh Rosenberg)
Date: Tue, 19 Oct 2021 21:28:37 +0000
Subject: [issue45520] Frozen dataclass deep copy doesn't work with __slots__
In-Reply-To: <1634599102.35.0.694436062352.issue45520@roundup.psfhosted.org>
Message-ID: <1634678917.75.0.508428359028.issue45520@roundup.psfhosted.org>


Josh Rosenberg <shadowranger+python at gmail.com> added the comment:

You're right that in non-dataclass scenarios, you'd just use __slots__.

The slots=True thing was necessary for any case where any of the dataclass's attributes have default values (my_int: int = 0), or are defined with fields (my_list: list = field(default_factory=list)). The problem is that __slots__ is implemented by, after the class definition ends, creating descriptors on the class to access the data stored at known offsets in the underlying PyObject structure. Those descriptors themselves being class attributes means that when the type definition machinery tries to use __slots__ to create them, it finds conflicting class attributes (the defaults/fields) that already exist and explodes.

Adding support for slots=True means it does two things:

1. It completely defines the class without slots, extracts the stuff it needs to make the dataclass separately, then deletes it from the class definition namespace and makes a *new* class with __slots__ defined (so no conflict occurs)
2. It checks if the dataclass is also frozen, and applies alternate __getstate__/__setstate__ methods that are compatible with a frozen, slotted dataclass

#2 is what fixes this bug (while #1 makes it possible to use the full range of dataclass features without sacrificing the ability to use __slots__). If you need this to work in 3.9, you could borrow the 3.10 implementations that make this work for frozen dataclasses to explicitly define __getstate__/__setstate__ for your frozen slotted dataclasses:

def __getstate__(self):
    return [getattr(self, f.name) for f in fields(self)]


def __setstate__(self, state):
    for field, value in zip(fields(self), state):
        # use setattr because dataclass may be frozen
        object.__setattr__(self, field.name, value)

I'm not closing this since backporting just the fix for frozen slotted dataclasses (without backporting the full slots=True functionality that's a new feature) is possibly within scope for a bugfix release of 3.9 (it wouldn't change the behavior of working code, and fixes broken code that might reasonably be expected to work).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45520>
_______________________________________

From report at bugs.python.org  Tue Oct 19 17:32:03 2021
From: report at bugs.python.org (Ned Deily)
Date: Tue, 19 Oct 2021 21:32:03 +0000
Subject: [issue45529] checking any object for attr "get" always returns True
 with `hasattr`
In-Reply-To: <1634678767.24.0.869931041778.issue45529@roundup.psfhosted.org>
Message-ID: <1634679123.41.0.0697213576192.issue45529@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

That is expected behavior. "get" is a method of "dict".

>>> payload = {}
>>> dir(payload)
['__class__', '__class_getitem__', '__contains__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__ior__', '__iter__', '__le__', '__len__', '__lt__', '__ne__', '__new__', '__or__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__ror__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'clear', 'copy', 'fromkeys', 'get', 'items', 'keys', 'pop', 'popitem', 'setdefault', 'update', 'values']
>>> hasattr(payload, "keys")
True


https://docs.python.org/3/library/stdtypes.html#dict.get

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45529>
_______________________________________

From report at bugs.python.org  Tue Oct 19 17:33:27 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 21:33:27 +0000
Subject: [issue11173] Undocumented public APIs in Python 3.2
In-Reply-To: <1297351155.94.0.957592646254.issue11173@psf.upfronthosting.co.za>
Message-ID: <1634679207.87.0.451603690937.issue11173@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

PyAST_CompileEx was removed in 3.10 and PyType_FromSpec, PyStructSequence_* are documented now.

PyThread_acquire_lock_timed is not, but I understand this is deliberate.

I think this is complete, so I'll close this if nobody will object.

----------
nosy: +iritkatriel
resolution:  -> fixed
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11173>
_______________________________________

From report at bugs.python.org  Tue Oct 19 17:33:16 2021
From: report at bugs.python.org (Michael Wayne Goodman)
Date: Tue, 19 Oct 2021 21:33:16 +0000
Subject: [issue45528] mmap: constants not listed in the documentation
In-Reply-To: <1634671970.69.0.866952550683.issue45528@roundup.psfhosted.org>
Message-ID: <1634679196.13.0.332400133879.issue45528@roundup.psfhosted.org>


Michael Wayne Goodman <goodman.m.w at gmail.com> added the comment:

I have added a draft PR on GitHub that adds the lists of constants. As mentioned in the PR, there are a few things that I think could be added before merging:

1. Update descriptions in mmap.mmap, and maybe the intro, to link to relevant sections.

2. Verify the availability of some constants. I only have access to a Unix system, so I cannot easily check if, e.g., the PROT_* constants are unavailable on Windows, or just unused.

3. Provide descriptions for ALLOCATIONGRANULARITY and PAGESIZE. As I understand, allocations occur in chunks at the size of ALLOCATIONGRANULARITY on Windows and PAGESIZE on Unix, although (presumably for portability) mmap.ALLOCATIONGRANULARITY is set to be equal to mmap.PAGESIZE on Unix systems. So does mmap.PAGESIZE have any use on Windows?

I'm not an expert of the low-level implementation of mmap, so I appreciate any help with the above (particularly (2) and (3)).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45528>
_______________________________________

From report at bugs.python.org  Tue Oct 19 17:39:29 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 21:39:29 +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: <1634679569.14.0.421330947175.issue45494@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Note: this *does* fail on 3.9, too. Even if it doesn't crash the production build, it does fail an assertion in a pydebug build:


test_error_offset_continuation_characters (test.test_exceptions.ExceptionTests) ... Assertion failed: (!_PyErr_Occurred(tstate)), function _PyObject_Call, file Objects/call.c, line 261.
Fatal Python error: Aborted

Current thread 0x00000001184d1dc0 (most recent call first):
  File "/private/tmp/cpy/Lib/test/test_exceptions.py", line 187 in check
  File "/private/tmp/cpy/Lib/test/test_exceptions.py", line 198 in test_error_offset_continuation_characters

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45494>
_______________________________________

From report at bugs.python.org  Tue Oct 19 17:41:29 2021
From: report at bugs.python.org (Tim Peters)
Date: Tue, 19 Oct 2021 21:41:29 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
Message-ID: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>


New submission from Tim Peters <tim at python.org>:

The code could typically be faster if it did what its comments imply it does: skip the expense of PyObject_RichCompareBool() entirely for the first pair of tuple elements. It actually always calls PyObject_RichCompareBool() on the first pair, and only if that says "not equal" does it use the faster ms->tuple_elem_compare to resolve "ok, so it's less than?".

Instead it could do the first pair before, and entirely apart from, the loop, along the lines of:

- Use ms->tuple_elem_compare to see whether u[0] < v[0]. If so, or if an error, we're done.

- Use ms->tuple_elem_compare to see whether v[0] < u[0]. If so, or if an error, we're done.

Else we can assume u[0] == v[0], and go on to compare u[1:] to v[1:] via a trivial variation of the current code.

In cases where the first pair does resolve it (common!), replacing a PyObject_RichCompareBool() with a ms->tuple_elem_compare can be significantly faster overall.

----------
components: Interpreter Core
messages: 404360
nosy: tim.peters
priority: normal
severity: normal
stage: needs patch
status: open
title: Improve listobject.c's unsafe_tuple_compare()
type: performance
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Tue Oct 19 17:44:08 2021
From: report at bugs.python.org (Tim Peters)
Date: Tue, 19 Oct 2021 21:44:08 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634679848.33.0.907474791236.issue45530@roundup.psfhosted.org>


Tim Peters <tim at python.org> added the comment:

FYI, this is fallout from a StackOverflow mystery:

https://stackoverflow.com/questions/69468552/efficiency-of-sorting-by-multiple-keys-in-python/69610671#

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:07:17 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 22:07:17 +0000
Subject: [issue39679] functools: singledispatchmethod doesn't work with
 classmethod
In-Reply-To: <1582053375.25.0.178240077179.issue39679@roundup.psfhosted.org>
Message-ID: <1634681237.74.0.558676672861.issue39679@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset c15ba304f35362470e29ea5626fed28366bc9571 by Miss Islington (bot) in branch '3.10':
bpo-39679: Add tests for classmethod/staticmethod singledispatchmethods (GH-29034) (GH-29072)
https://github.com/python/cpython/commit/c15ba304f35362470e29ea5626fed28366bc9571


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39679>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:08:15 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 22:08:15 +0000
Subject: [issue39679] functools: singledispatchmethod doesn't work with
 classmethod
In-Reply-To: <1582053375.25.0.178240077179.issue39679@roundup.psfhosted.org>
Message-ID: <1634681295.18.0.0514766983588.issue39679@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks for the new tests, Alex. Not closing this just yet because maybe we find a way to fix it in 3.9.8+.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39679>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:08:57 2021
From: report at bugs.python.org (Tim Peters)
Date: Tue, 19 Oct 2021 22:08:57 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634681337.62.0.706016282775.issue45530@roundup.psfhosted.org>


Tim Peters <tim at python.org> added the comment:

The attached tupsort.py gives a simple. focused example. Typical output on my box:

float       3.10
(float,)   11.75
[float]    25.68

It's sorting a large list of floats. In the first line the list contains plain floats. In the second line, each float was wrapped in a 1-tuple. In the last line, wrapped in a singleton list.

Essentially any overhead of any kind is more expensive than merely comparing two floats in HW, so overhead is approximately everything here.  The tuple and list comparison functions are very similar, and the large advantage of "(float,)" over "[float]" is mostly due to that unsafe_tuple_compare() uses one less PyObject_RichCompareBool() call to resolve each compare (assuming that all floats in the list are distinct, which I didn't check, but is almost certainly the case).

Getting rid of its other PyObject_RichCompareBool() should yield another nice speed boost.

The pattern is worth addressing because tuples are routinely used as key= arguments to achieve multi-key sorting.

----------
Added file: https://bugs.python.org/file50372/tupsort.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:09:30 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 22:09:30 +0000
Subject: [issue26155] 3.5.1 installer issue on Win 7 32 bit
In-Reply-To: <1453213607.65.0.0758375238655.issue26155@psf.upfronthosting.co.za>
Message-ID: <1634681370.7.0.481824136358.issue26155@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26155>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:09:26 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Tue, 19 Oct 2021 22:09:26 +0000
Subject: [issue35673] Loader for namespace packages
In-Reply-To: <1546781003.0.0.391060889435.issue35673@roundup.psfhosted.org>
Message-ID: <1634681366.7.0.585100773805.issue35673@roundup.psfhosted.org>


Barry A. Warsaw <barry at python.org> added the comment:

I don't know.  What benefit would be gained?  That should probably be a separate issue/PR in either case.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35673>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:09:47 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 22:09:47 +0000
Subject: [issue28983] Windows: Python 3.5.2 won't install on my computer
In-Reply-To: <1481840742.78.0.554470867064.issue28983@psf.upfronthosting.co.za>
Message-ID: <1634681387.25.0.731690410521.issue28983@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28983>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:11:59 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 22:11:59 +0000
Subject: [issue24343] Installing 3.4.3 gives error codes 2503 and 2502 on
 windows 8
In-Reply-To: <1433147321.07.0.242833893345.issue24343@psf.upfronthosting.co.za>
Message-ID: <1634681519.57.0.863909839535.issue24343@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24343>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:18:10 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 22:18:10 +0000
Subject: [issue26631] Unable to install Python 3.5.1 on Windows 10 - Error
 0x80070643: Failed to install MSI package.
In-Reply-To: <1458771798.71.0.333968276616.issue26631@psf.upfronthosting.co.za>
Message-ID: <1634681890.3.0.385246669838.issue26631@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26631>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:19:38 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 22:19:38 +0000
Subject: [issue25625] "chdir" Contex manager for pathlib
In-Reply-To: <1447523143.32.0.921942004004.issue25625@psf.upfronthosting.co.za>
Message-ID: <1634681978.5.0.811793589635.issue25625@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 3592980f9122ab0d9ed93711347742d110b749c2 by Filipe La?ns in branch 'main':
bpo-25625: add contextlib.chdir (GH-28271)
https://github.com/python/cpython/commit/3592980f9122ab0d9ed93711347742d110b749c2


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25625>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:19:44 2021
From: report at bugs.python.org (Zachary Ware)
Date: Tue, 19 Oct 2021 22:19:44 +0000
Subject: [issue20983] Python 3.4 'repair' Windows installation does not
 install pip & setuptools packages
In-Reply-To: <1395248368.62.0.321132661018.issue20983@psf.upfronthosting.co.za>
Message-ID: <1634681984.98.0.411625074814.issue20983@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:

The installer system for v3.4 and before has long since been retired.

----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20983>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:21:48 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Tue, 19 Oct 2021 22:21:48 +0000
Subject: [issue25625] "chdir" Contex manager for pathlib
In-Reply-To: <1447523143.32.0.921942004004.issue25625@psf.upfronthosting.co.za>
Message-ID: <1634682108.32.0.96647893418.issue25625@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks for perservering, Filipe! ? ? ? 

Per Steering Council decision, the context manager is approved: https://github.com/python/steering-council/issues/77

----------
resolution: rejected -> fixed
versions: +Python 3.11 -Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25625>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:23:37 2021
From: report at bugs.python.org (Zachary Ware)
Date: Tue, 19 Oct 2021 22:23:37 +0000
Subject: [issue28584] ICC compiler check is too permissive
In-Reply-To: <1478035366.63.0.90573648053.issue28584@psf.upfronthosting.co.za>
Message-ID: <1634682217.13.0.911460401551.issue28584@roundup.psfhosted.org>


Change by Zachary Ware <zachary.ware at gmail.com>:


----------
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28584>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:24:59 2021
From: report at bugs.python.org (Zachary Ware)
Date: Tue, 19 Oct 2021 22:24:59 +0000
Subject: [issue39293] Windows 10 64-bit needs reboot after install
In-Reply-To: <1578690694.46.0.197073018811.issue39293@roundup.psfhosted.org>
Message-ID: <1634682299.24.0.852475593934.issue39293@roundup.psfhosted.org>


Change by Zachary Ware <zachary.ware at gmail.com>:


----------
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39293>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:32:06 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 22:32:06 +0000
Subject: [issue31875] Error 0x80070642: Failed to install MSI package.
In-Reply-To: <1509027387.81.0.213398074469.issue31875@psf.upfronthosting.co.za>
Message-ID: <1634682726.0.0.462104010155.issue31875@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
components: +Windows -Installation
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31875>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:36:33 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 22:36:33 +0000
Subject: [issue41603] Compilation issue 3.8.5 with Redhat 7.8 and gcc version
 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
In-Reply-To: <1597966827.71.0.80485708689.issue41603@roundup.psfhosted.org>
Message-ID: <1634682993.55.0.866652537809.issue41603@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
nosy: +vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41603>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:39:06 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 22:39:06 +0000
Subject: [issue37981] Can't install Python 3.7.4 x64 on Win 8.1
In-Reply-To: <1567097284.11.0.163984980296.issue37981@roundup.psfhosted.org>
Message-ID: <1634683146.58.0.846692324876.issue37981@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37981>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:39:43 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 19 Oct 2021 22:39:43 +0000
Subject: [issue41603] Compilation issue 3.8.5 with Redhat 7.8 and gcc version
 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
In-Reply-To: <1597966827.71.0.80485708689.issue41603@roundup.psfhosted.org>
Message-ID: <1634683183.07.0.475080173452.issue41603@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Python 3.8 is no longer supported. Can you reproduce the issue with Python 3.11? I fixed bugs like this one in the meanwhile.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41603>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:42:09 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 22:42:09 +0000
Subject: [issue28576] Uninstalling Py352 x86 with /uninstall option does not
 remove prepended paths
In-Reply-To: <1477982054.01.0.242793753337.issue28576@psf.upfronthosting.co.za>
Message-ID: <1634683329.82.0.671893116362.issue28576@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28576>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:44:16 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 19 Oct 2021 22:44:16 +0000
Subject: [issue31875] Error 0x80070642: Failed to install MSI package.
In-Reply-To: <1509027387.81.0.213398074469.issue31875@psf.upfronthosting.co.za>
Message-ID: <1634683456.53.0.864481734665.issue31875@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

We'd also need the other log files from %TEMP% in this case, but I suspect we're not going to get them now.

The associated PR is not related to this bug.

----------
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31875>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:46:47 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 22:46:47 +0000
Subject: [issue24873] Add "full cleanup" checkbox to uninstaller
In-Reply-To: <1439668873.0.0.348804017402.issue24873@psf.upfronthosting.co.za>
Message-ID: <1634683607.16.0.353519763109.issue24873@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
versions: +Python 3.11 -Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24873>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:47:38 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 19 Oct 2021 22:47:38 +0000
Subject: [issue11173] Undocumented public APIs in Python 3.2
In-Reply-To: <1297351155.94.0.957592646254.issue11173@psf.upfronthosting.co.za>
Message-ID: <1634683658.24.0.218141025374.issue11173@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> I think this is complete, so I'll close this if nobody will object.

I concur, please close it ;-)

----------
status: pending -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11173>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:49:16 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 22:49:16 +0000
Subject: [issue11173] Undocumented public APIs in Python 3.2
In-Reply-To: <1297351155.94.0.957592646254.issue11173@psf.upfronthosting.co.za>
Message-ID: <1634683756.24.0.688367037429.issue11173@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11173>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:50:50 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 22:50:50 +0000
Subject: [issue37274] Scripts folder is empty in python 3.7.3 for windows.
In-Reply-To: <1560487852.05.0.608471969466.issue37274@roundup.psfhosted.org>
Message-ID: <1634683850.15.0.103544534745.issue37274@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

There was no reply to followup questions so we can't do anything about this. Also 3.7 is no longer in maintenance.

Please create a new issue if you are having problems with a current (>= 3.9) version of Python.

----------
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37274>
_______________________________________

From report at bugs.python.org  Tue Oct 19 18:59:59 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 22:59:59 +0000
Subject: [issue31011] Users (except from the one who installed) not able to
 see python in add remove programs.
In-Reply-To: <1500901180.63.0.497561130002.issue31011@psf.upfronthosting.co.za>
Message-ID: <1634684399.45.0.400377001877.issue31011@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
components: +Windows -Installation
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31011>
_______________________________________

From report at bugs.python.org  Tue Oct 19 19:00:07 2021
From: report at bugs.python.org (Martin Panter)
Date: Tue, 19 Oct 2021 23:00:07 +0000
Subject: [issue45523] Python3 ThreadingHTTPServer fails to send chunked
 encoded response
In-Reply-To: <1634650921.13.0.397110972299.issue45523@roundup.psfhosted.org>
Message-ID: <1634684407.43.0.450355991448.issue45523@roundup.psfhosted.org>


Martin Panter <vadmium+py at gmail.com> added the comment:

Looks like you forgot to encode the length of ten in hexadecimal.

I don't think the HTTP server module has any special handling for chunked responses, so this up to the user and isn't a bug in Python.

----------
nosy: +martin.panter
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45523>
_______________________________________

From report at bugs.python.org  Tue Oct 19 19:03:28 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 23:03:28 +0000
Subject: [issue34036] ModuleNotFoundError: No module named '_ctypes' when
 install Python 3.7 on Linux
In-Reply-To: <1530645048.53.0.56676864532.issue34036@psf.upfronthosting.co.za>
Message-ID: <1634684608.65.0.366817162179.issue34036@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

3.7 is no longer maintained. Please create a new issue if you are still having this problem with a current version of python (3.9+).

----------
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34036>
_______________________________________

From report at bugs.python.org  Tue Oct 19 19:04:25 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 23:04:25 +0000
Subject: [issue38704] Prevent installation on unsupported Windows versions
In-Reply-To: <1572983678.12.0.905160936522.issue38704@roundup.psfhosted.org>
Message-ID: <1634684665.32.0.567023856615.issue38704@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
versions: +Python 3.11 -Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38704>
_______________________________________

From report at bugs.python.org  Tue Oct 19 19:05:18 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 23:05:18 +0000
Subject: [issue39490] Python Uninstaller fails to clean up the old path
 variables when uninstalling
In-Reply-To: <1580329145.11.0.630511319021.issue39490@roundup.psfhosted.org>
Message-ID: <1634684718.81.0.822238889295.issue39490@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
components: +Windows -Installation
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39490>
_______________________________________

From report at bugs.python.org  Tue Oct 19 19:05:56 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 23:05:56 +0000
Subject: [issue39490] Python Uninstaller fails to clean up the old path
 variables when uninstalling
In-Reply-To: <1580329145.11.0.630511319021.issue39490@roundup.psfhosted.org>
Message-ID: <1634684756.69.0.490570449552.issue39490@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Actually I don't know if this is a windows issue, the report doesn't say.

----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39490>
_______________________________________

From report at bugs.python.org  Tue Oct 19 19:08:21 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 23:08:21 +0000
Subject: [issue34737] Python upgrade with SYSTEM account uninstalls python
In-Reply-To: <1537364674.32.0.956365154283.issue34737@psf.upfronthosting.co.za>
Message-ID: <1634684901.31.0.00481002775605.issue34737@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34737>
_______________________________________

From report at bugs.python.org  Tue Oct 19 19:16:44 2021
From: report at bugs.python.org (Mark Shannon)
Date: Tue, 19 Oct 2021 23:16:44 +0000
Subject: [issue44525] Implement CALL_FUNCTION adaptive interpreter
 optimizations
In-Reply-To: <1624890138.2.0.824780513801.issue44525@roundup.psfhosted.org>
Message-ID: <1634685404.42.0.626147911239.issue44525@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:


New changeset 3163e68c342434db37c69669017f96a4bb2d5f13 by Ken Jin in branch 'main':
bpo-44525: Specialize ``CALL_FUNCTION`` for C function calls (GH-26934)
https://github.com/python/cpython/commit/3163e68c342434db37c69669017f96a4bb2d5f13


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44525>
_______________________________________

From report at bugs.python.org  Tue Oct 19 19:18:17 2021
From: report at bugs.python.org (STINNER Victor)
Date: Tue, 19 Oct 2021 23:18:17 +0000
Subject: [issue45459] Limited API support for Py_buffer
In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>
Message-ID: <1634685497.56.0.495606740541.issue45459@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Maybe a PEP is needed to collect usages of the Py_buffer API and check if the ABI is future proof. A PEP may help to discuss with other projects which currently consume this API.

I suggest to start with the smallest possible API and then slowly extend it. It's too easy to make mistakes :-( Once it's added to the stable ABI, it will be really hard to change it.

For example, PyBuffer.format is a "char*", but who owns the string? For a stable ABI, I would suggest to duplicate the string.

For shape, stripes and suboffsets arrays, I would also suggest to allocate these arrays on the heap people to ensure that it cannot be modified from the outside.

In your PR, PyBuffer_GetLayout() gives indirectly access to the internal Py_buffer structure members and allows to modify them. One way is to avoid this issue is to return a *copy* of these arrays.

I would prefer to require to call "Set" functions to modify a Py_buffer to ensure that a buffer always remains consistency.


> PyBuffer_NewEx(PyObject *obj, void *buf,  Py_ssize_t len, Py_ssize_t itemsize, int readonly, int ndim, char *format, Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t *suboffsets, void *internal)

This API looks like PyCode_New() which was broken *often* so it looks like a bad pattern for a stable ABI.

Maybe PyBuffer_New() + many Set() functions would be more future proof.

But I don't know which Py_buffer members are mandatory to have a "valid" buffer.

What if tomorrow we add new members. Will it be possible to initalize them to a reasonable default value?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Tue Oct 19 19:25:44 2021
From: report at bugs.python.org (Finite State Machine)
Date: Tue, 19 Oct 2021 23:25:44 +0000
Subject: [issue45531] field "mro" behaves strangely in dataclass
Message-ID: <1634685944.1.0.123359424978.issue45531@roundup.psfhosted.org>


New submission from Finite State Machine <python at state-machine.ca>:

The following Python script:

    from dataclasses import dataclass

    @dataclass
    class A:
        mro: object
        x: object

Results in the following unexpected exception:

    Traceback (most recent call last):
      File "/Users/dsuffling/.pyenv/versions/3.10.0/lib/python3.10/runpy.py", line 196, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "/Users/dsuffling/.pyenv/versions/3.10.0/lib/python3.10/runpy.py", line 86, in _run_code
        exec(code, run_globals)
      File "/Users/dsuffling/names/junk.py", line 6, in <module>
        class A:
      File "/Users/dsuffling/.pyenv/versions/3.10.0/lib/python3.10/dataclasses.py", line 1178, in dataclass
        return wrap(cls)
      File "/Users/dsuffling/.pyenv/versions/3.10.0/lib/python3.10/dataclasses.py", line 1169, in wrap
        return _process_class(cls, init, repr, eq, order, unsafe_hash,
      File "/Users/dsuffling/.pyenv/versions/3.10.0/lib/python3.10/dataclasses.py", line 1019, in _process_class
        _init_fn(all_init_fields,
      File "/Users/dsuffling/.pyenv/versions/3.10.0/lib/python3.10/dataclasses.py", line 540, in _init_fn
        raise TypeError(f'non-default argument {f.name!r} '
    TypeError: non-default argument 'x' follows default argument


The name of the first attribute ('mro') is critical; without it the problem does not occur.

It appears that 'mro' is somehow interacting with the 'mro' attribute of the 'type' object.

This issue has been verified to occur with CPython 3.10.0.

----------
components: Library (Lib)
messages: 404378
nosy: finite-state-machine
priority: normal
severity: normal
status: open
title: field "mro" behaves strangely in dataclass
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45531>
_______________________________________

From report at bugs.python.org  Tue Oct 19 19:28:31 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 19 Oct 2021 23:28:31 +0000
Subject: [issue21969] WindowsPath constructor does not check for invalid
 characters
In-Reply-To: <1405214403.71.0.545456092847.issue21969@psf.upfronthosting.co.za>
Message-ID: <1634686111.41.0.612185382994.issue21969@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
type:  -> enhancement
versions: +Python 3.11 -Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21969>
_______________________________________

From report at bugs.python.org  Tue Oct 19 19:30:53 2021
From: report at bugs.python.org (Eryk Sun)
Date: Tue, 19 Oct 2021 23:30:53 +0000
Subject: [issue25355] Windows installer does not add py.exe launcher to "App
 Paths" key
In-Reply-To: <1444403177.17.0.586172886506.issue25355@psf.upfronthosting.co.za>
Message-ID: <1634686253.72.0.515835010133.issue25355@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

> IMO, this makes it the 'system' Python.

"App Paths" entries can be used like versioned symlinks in POSIX. For example, an "App Paths" entry for "python3.exe" can refer to a particular installation's "python.exe". That said, "App Paths" is only used by the shell API, not CreateProcessW(). The potential for inconsistency and confusion is a significant downside. 

> the py.exe launcher could be added there instead

Python's installer puts the launcher in either the Windows directory or a directory that's in PATH, so there's really no need for an "App Paths" entry. 

> Windows Store package manages this correctly in line with its 
> PATH management

The store app adds a user "App Paths" entry for the versioned executable name, such as "python3.10.exe". Unfortunately, when searching PATH and "App Paths", the shell API only tries to append ".exe" if the name doesn't already have an extension. Thus running "python3.10" from the Win+R dialog fails, but running "python3.10.exe" succeeds. To work around this, one can add a second "App Paths" entry for the name without ".exe", e.g. "python3.10".

The store app doesn't add "App Paths" entries for "python.exe" and "python3.exe". It's probably for the best, particularly for "python.exe". Entries in "App Paths" take precedence over PATH in the Win+R dialog, but CMD's `start` and PowerShell's `start-process` always search PATH first.

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25355>
_______________________________________

From report at bugs.python.org  Tue Oct 19 19:37:23 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Tue, 19 Oct 2021 23:37:23 +0000
Subject: [issue45531] field "mro" behaves strangely in dataclass
In-Reply-To: <1634685944.1.0.123359424978.issue45531@roundup.psfhosted.org>
Message-ID: <1634686643.31.0.747955873232.issue45531@roundup.psfhosted.org>


Change by Eric V. Smith <eric at trueblade.com>:


----------
assignee:  -> eric.smith
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45531>
_______________________________________

From report at bugs.python.org  Tue Oct 19 19:40:13 2021
From: report at bugs.python.org (Ezio Melotti)
Date: Tue, 19 Oct 2021 23:40:13 +0000
Subject: [issue45532] Replace 'default' with 'main' as default in sys.version
Message-ID: <1634686813.85.0.311990959144.issue45532@roundup.psfhosted.org>


New submission from Ezio Melotti <ezio.melotti at gmail.com>:

sys.version returns '3.10.0 (default, Oct  5 2021, 23:49:26) [GCC 10.2.1 20210110]'

'default' is supposed to represent the name of the branch, and it's been there since the HG days: https://github.com/python/cpython/blob/fc64c351c7757f0ebdb7da65cb74871e494a2add/Modules/getbuildinfo.c#L44

When the code was updated for Git in #27593, the default remained the same: https://github.com/python/cpython/blob/bb3e0c240bc60fe08d332ff5955d54197f79751c/Modules/getbuildinfo.c#L44

The default should be updated to 'main'.

Note that _Py_gitidentifier is supposed to return meaningful values while building from within a git checkout -- when it fails to do so the default value is used.  This can also be tested through sys._git (which returns ('CPython', '', '')), but at the moment I can't build from a git checkout and verify that _Py_gitidentifier returns the correct branch.  If not, a separate issue should be created.

----------
components: Interpreter Core
messages: 404380
nosy: ezio.melotti
priority: normal
severity: normal
stage: test needed
status: open
title: Replace 'default' with 'main' as default in sys.version
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45532>
_______________________________________

From report at bugs.python.org  Tue Oct 19 19:42:39 2021
From: report at bugs.python.org (Tim Peters)
Date: Tue, 19 Oct 2021 23:42:39 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634686959.97.0.733297340596.issue45530@roundup.psfhosted.org>


Change by Tim Peters <tim at python.org>:


----------
keywords: +patch
pull_requests: +27345
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29076

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Tue Oct 19 19:49:38 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Tue, 19 Oct 2021 23:49:38 +0000
Subject: [issue45531] field "mro" behaves strangely in dataclass
In-Reply-To: <1634685944.1.0.123359424978.issue45531@roundup.psfhosted.org>
Message-ID: <1634687378.78.0.701298599859.issue45531@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

I agree on your analysis. You'll get the same error on any name that type defines (like __class__), but "mro" looks like the only one without dunders.

I'm not sure the best way to fix this. I'll give it some thought.

Another problem is that assigning a default value breaks the .mro() call:

@dataclass
class A:
    mro: object = 3

>>> A.mro()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'int' object is not callable

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45531>
_______________________________________

From report at bugs.python.org  Tue Oct 19 19:57:59 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 19 Oct 2021 23:57:59 +0000
Subject: [issue25355] Windows installer does not add py.exe launcher to "App
 Paths" key
In-Reply-To: <1444403177.17.0.586172886506.issue25355@psf.upfronthosting.co.za>
Message-ID: <1634687879.79.0.430821087084.issue25355@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

> The store app doesn't add "App Paths" entries for "python.exe" and "python3.exe".

You're right, it's not following the aliases, but the actual executable. For 3.7, we had them as "python.exe", but from 3.8 they became "python3.8.exe" with a "python.exe" alias (python3.exe was always an alias). And since the App Path entries refer directly to the executable under "Program Files", you can (still!) only actually run them if you've also got the alias enabled.

You can test this by opening "Manage App Execution Aliases", disabling "python3.10.exe", and then pressing Win+R and launching "python3.10.exe". Re-enable the alias and it will run.

I believe it should follow aliases, since that's the only way the current logic works. I've already reported the bug that you can't launch without the global alias being enabled, and was told that it's "by design" and "better for users". But I'll see if I can find the owner of the feature and encourage them to fix it again.

> Python's installer puts the launcher in either the Windows directory or a directory that's in PATH, so there's really no need for an "App Paths" entry.

I believe there are some scenarios that search App Paths for "registered apps", but we already handle Open With just fine and I can't think what else matters, so you're probably right.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25355>
_______________________________________

From report at bugs.python.org  Tue Oct 19 20:48:37 2021
From: report at bugs.python.org (Tim Peters)
Date: Wed, 20 Oct 2021 00:48:37 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634690917.87.0.611536586417.issue45530@roundup.psfhosted.org>


Change by Tim Peters <tim at python.org>:


----------
assignee:  -> tim.peters

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Tue Oct 19 21:32:51 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 20 Oct 2021 01:32:51 +0000
Subject: [issue45532] Replace 'default' with 'main' as default in sys.version
In-Reply-To: <1634686813.85.0.311990959144.issue45532@roundup.psfhosted.org>
Message-ID: <1634693571.67.0.361594233723.issue45532@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45532>
_______________________________________

From report at bugs.python.org  Tue Oct 19 21:32:59 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 20 Oct 2021 01:32:59 +0000
Subject: [issue45532] Replace 'default' with 'main' as default in sys.version
In-Reply-To: <1634686813.85.0.311990959144.issue45532@roundup.psfhosted.org>
Message-ID: <1634693579.5.0.582612579285.issue45532@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

+1

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45532>
_______________________________________

From report at bugs.python.org  Tue Oct 19 21:39:43 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 20 Oct 2021 01:39:43 +0000
Subject: [issue45532] Replace 'default' with 'main' as default in sys.version
In-Reply-To: <1634686813.85.0.311990959144.issue45532@roundup.psfhosted.org>
Message-ID: <1634693983.01.0.279595373508.issue45532@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
keywords: +easy (C)

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45532>
_______________________________________

From report at bugs.python.org  Tue Oct 19 22:07:06 2021
From: report at bugs.python.org (Zachary Ware)
Date: Wed, 20 Oct 2021 02:07:06 +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: <1634695626.25.0.464803527368.issue45436@roundup.psfhosted.org>


Change by Zachary Ware <zachary.ware at gmail.com>:


----------
nosy: +zach.ware
nosy_count: 6.0 -> 7.0
pull_requests: +27346
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29077

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Tue Oct 19 22:11:06 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Wed, 20 Oct 2021 02:11:06 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634695866.64.0.713071091838.issue45530@roundup.psfhosted.org>


Change by Raymond Hettinger <raymond.hettinger at gmail.com>:


----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Tue Oct 19 22:12:43 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 20 Oct 2021 02:12:43 +0000
Subject: [issue45532] Replace 'default' with 'main' as default in sys.version
In-Reply-To: <1634686813.85.0.311990959144.issue45532@roundup.psfhosted.org>
Message-ID: <1634695963.22.0.0262924207243.issue45532@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

> youknowone

Do you want to take a look?

----------
nosy: +youknowone

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45532>
_______________________________________

From report at bugs.python.org  Tue Oct 19 22:13:25 2021
From: report at bugs.python.org (Zachary Ware)
Date: Wed, 20 Oct 2021 02:13:25 +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: <1634696005.8.0.738125040436.issue45436@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:

AFAICT, this is just a couple of tests that are testing something that's no longer an error, though anyone with deeper knowledge is more than welcome to disagree with my diagnosis :).  I've posted PR29077 to fix the tests.

Ned and ?ukasz, will you want this backported to security branches to fix the buildbot(s)?

----------
nosy: +lukasz.langa
versions: +Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Tue Oct 19 22:13:50 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Wed, 20 Oct 2021 02:13:50 +0000
Subject: [issue33277] Deprecate __loader__, __package__,
 and __cached__ on modules
In-Reply-To: <1523656102.14.0.682650639539.issue33277@psf.upfronthosting.co.za>
Message-ID: <1634696030.68.0.158775891057.issue33277@roundup.psfhosted.org>


Change by Barry A. Warsaw <barry at python.org>:


----------
keywords: +patch
pull_requests: +27347
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/29078

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33277>
_______________________________________

From report at bugs.python.org  Tue Oct 19 22:14:03 2021
From: report at bugs.python.org (Stefan Pochmann)
Date: Wed, 20 Oct 2021 02:14:03 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634696043.76.0.090939966244.issue45530@roundup.psfhosted.org>


Stefan Pochmann <stefan.pochmann at gmail.com> added the comment:

That's how Elliot did it in the original proposal: https://bugs.python.org/issue28685

Back then you pointed out that "Else we can assume u[0] == v[0]" isn't true for float('nan') values:
https://github.com/python/cpython/pull/582#issuecomment-285838656
https://github.com/python/cpython/pull/582#issuecomment-285841789

If you sort objects that always return True for both `<` and `==`, this would also have the opposite problem, considering tuple u smaller than v when it shouldn't.

That said, maybe the function could be optimized for known "well-behaving" types?

----------
nosy: +Stefan Pochmann

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Tue Oct 19 22:50:27 2021
From: report at bugs.python.org (Tim Peters)
Date: Wed, 20 Oct 2021 02:50:27 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634698227.5.0.486098777633.issue45530@roundup.psfhosted.org>


Tim Peters <tim at python.org> added the comment:

Stefan, I have scant memory of ever caring, but, if I did, I got over it ;-) 

>>> math.nan == math.nan
False
>>> {math.nan : 5}[math.nan]
5

That is, PyObject_RichCompareBool() takes object identity as overriding __eq__; that's why the dict lookup works. But this one doesn't:

>>> {math.nan : 5}[float("nan")]
... Traceback (most recent call last):
KeyError: nan

Although that may change too.

I used to care a little, but not at all anymore. There's no sense trying to _make_ sense of what sorting could possibly mean in the absence of a total ordering.

> If you sort objects that always return True for both `<` and `==`,

A case of "garbage in, garbage out" to me.

> this would also have the opposite problem, considering tuple u smaller
> than v when it shouldn't.

What justifies "shouldn't"? If u[0] < v[0], then by the definition of lexicographic ordering, u < v. But if u[0] == v[0], which apparently is _also_ the case, then the same definition says the ordering of u and v is inherited from the ordering of u[1:] and v[1:]. There's no principled way of declaring one of those possibly contradicting definitions "the right one".

> That said, maybe the function could be optimized for
> known "well-behaving" types?

A type is well-behaving to me if and only if it implements a total ordering. If a type doesn't, what you get is an implementation accident, and code relying on any specific accident is inherently buggy.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Tue Oct 19 22:54:51 2021
From: report at bugs.python.org (Zachary Ware)
Date: Wed, 20 Oct 2021 02:54:51 +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: <1634698491.18.0.914538751382.issue45436@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:


New changeset 4fe454c6f54b0948af67b53af6c2f35af6377e69 by Zachary Ware in branch 'main':
bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077)
https://github.com/python/cpython/commit/4fe454c6f54b0948af67b53af6c2f35af6377e69


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Tue Oct 19 22:54:52 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 20 Oct 2021 02:54:52 +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: <1634698492.32.0.946083986669.issue45436@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 8.0 -> 9.0
pull_requests: +27348
pull_request: https://github.com/python/cpython/pull/29080

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Tue Oct 19 22:54:53 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 20 Oct 2021 02:54:53 +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: <1634698493.64.0.984487425831.issue45436@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27349
pull_request: https://github.com/python/cpython/pull/29081

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Tue Oct 19 22:59:59 2021
From: report at bugs.python.org (Zachary Ware)
Date: Wed, 20 Oct 2021 02:59:59 +0000
Subject: [issue38371] Tkinter: deprecate the split() method
In-Reply-To: <1570203221.73.0.664458057352.issue38371@roundup.psfhosted.org>
Message-ID: <1634698799.75.0.405308443741.issue38371@roundup.psfhosted.org>


Change by Zachary Ware <zachary.ware at gmail.com>:


----------
nosy: +zach.ware
nosy_count: 2.0 -> 3.0
pull_requests: +27350
pull_request: https://github.com/python/cpython/pull/29082

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38371>
_______________________________________

From report at bugs.python.org  Tue Oct 19 23:19:02 2021
From: report at bugs.python.org (Stefan Pochmann)
Date: Wed, 20 Oct 2021 03:19:02 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634699942.71.0.484590711002.issue45530@roundup.psfhosted.org>


Stefan Pochmann <stefan.pochmann at gmail.com> added the comment:

> What justifies "shouldn't"?

I based that on your old comments. Looked like tuple comparison results in sorting shouldn't differ from tuple comparison results elsewhere. I had actually proposed this exact method in a comment under your stackoverflow answer, but deleted it when I found that it had been discussed and discarded back then. But if it feels ok now, then good :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Tue Oct 19 23:20:13 2021
From: report at bugs.python.org (Zachary Ware)
Date: Wed, 20 Oct 2021 03:20:13 +0000
Subject: [issue37815] 'Make Test' error while trying to install Python 3.7.4
 on Linux Mint
In-Reply-To: <1565484153.44.0.516842692215.issue37815@roundup.psfhosted.org>
Message-ID: <1634700013.6.0.930455655086.issue37815@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:

I can't reproduce this on Pop_OS! 20.04 with libreadline-gplv2-dev, so I'm going to assume it's been fixed somewhere along the way.  If anyone else can still reproduce with up-to-date versions of everything involved, please post the relevant versions and steps taken to reproduce the test failure.

----------
nosy: +zach.ware
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37815>
_______________________________________

From report at bugs.python.org  Tue Oct 19 23:34:31 2021
From: report at bugs.python.org (Zachary Ware)
Date: Wed, 20 Oct 2021 03:34:31 +0000
Subject: [issue38371] Tkinter: deprecate the split() method
In-Reply-To: <1570203221.73.0.664458057352.issue38371@roundup.psfhosted.org>
Message-ID: <1634700871.56.0.425743523081.issue38371@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:


New changeset 085ccb0f177988065dbe9ef4c5cda434560066bc by Zachary Ware in branch 'main':
bpo-38371: Remove remaining use of tk.split from bigmem tcl test (GH-29082)
https://github.com/python/cpython/commit/085ccb0f177988065dbe9ef4c5cda434560066bc


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38371>
_______________________________________

From report at bugs.python.org  Tue Oct 19 23:39:38 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Wed, 20 Oct 2021 03:39:38 +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: <1634701178.87.0.818461803913.issue43656@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Joe:

I would argue that it should be expected that every object instantiated from a class should have a safe __repr__, because you will have logging and if a __repr__ is broken in some rare circumstances, it may bring down your production system in the worst case. 

Additionally, if you have some logic that handles error conditions and logs respective objects, and some of these objects have a broken __repr__, you may run into a situation where you have a rare bug, and as you use the logs to debug it, you will not be able to tell which object was involved because you will only see the traceback from the __repr__. You may have to wait for the rare bug to occur again to determine the cause.

To me it seems that this request is more for convenience of interactive debugging, which should not be a priority over system functional robustness and logging robustness.

In view of this, your example should be changed to something like:

class TriggerTracebackBug:
    _repr = None
    def __init__(self):
        raise RuntimeError("can't build a TriggerTracebackBug object for some reason")
        self._repr = 'if we reached this line, this object would have a repr result'
    def __repr__(self):
        return f'<Myclass: {self._repr}>'

----------
nosy: +kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Wed Oct 20 00:07:03 2021
From: report at bugs.python.org (Tim Peters)
Date: Wed, 20 Oct 2021 04:07:03 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634702823.46.0.00936560017318.issue45530@roundup.psfhosted.org>


Tim Peters <tim at python.org> added the comment:

Stefan, I looked at that old PR and can't find anywhere I suggested that he change the unsafe_tuple_compare() logic. I just _asked_ him "I'm curious about what the patched Python prints for this program:".

And, in fact, that program showed that CPython was _already_ inconsistent with how NaNs were treated during tuple comparison (object identity overriding float.__eq__).

In any case, no, I have no problem at all with inferring "x == y" from "not (x < y) and not (y < x)".

Curious factoid: in [x, y].sort(), CPython never asks "x < y?". Because that's irrelevant ;-) The list is already sorted if and only if "not (y < x)". Which is how "x <= y" is spelled, because the implementation promises to do only "<" comparisons.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Wed Oct 20 01:29:55 2021
From: report at bugs.python.org (Stefan Pochmann)
Date: Wed, 20 Oct 2021 05:29:55 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634707795.8.0.583820033559.issue45530@roundup.psfhosted.org>


Stefan Pochmann <stefan.pochmann at gmail.com> added the comment:

I misinterpreted you then, sorry. I guess also because Elliot shortly after retrated from the approach, saying he "rewrote unsafe_tuple_compare to move the less-than after the equality testing, to make sure it's 100% consistent".

I'd say the inconsistency the program showed was different. Yes, the xs got sorted differently than the ys, but the xs differed from the ys. The proposed method would change comparisons of *the same* tuples. You'd for example no longer have "sorted(tuples) == [min(tuples), max(tuples)]" for a list of two tuples.

Also curious factoid: I recently saw a case where despite the "only <" promise, sorting caused an "x > y" comparison (because "y < x" wasn't implemented).

(tiny note: tupsort.py does "range(2", should be "range(1" I think)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Wed Oct 20 02:10:28 2021
From: report at bugs.python.org (Tim Peters)
Date: Wed, 20 Oct 2021 06:10:28 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634710228.61.0.858319133246.issue45530@roundup.psfhosted.org>


Tim Peters <tim at python.org> added the comment:

> Elliot shortly after retrated from the approach, saying he
> rewrote unsafe_tuple_compare to move the less-than after
> the equality testing, to make sure it's 100% consistent".

I remember at the time having no idea what he meant by that comment - and I still have no idea ;-)

> The proposed method would change comparisons of *the same* tuples.
> You'd for example no longer have
> "sorted(tuples) == [min(tuples), max(tuples)]"
> for a list of two tuples.

Since very little is defined about the result of sorted() in the absence of a total ordering (just that it's _some_ permutation of the original), that's not surprising. It's already the case anyway (using the released 3.10.0):

>>> ts = [(float("nan"), 1), (float("nan"), 1.0)]
>>> sorted(ts) == [min(ts), max(ts)]
False

> I recently saw a case where despite the "only <" promise, sorting
> caused an "x > y" comparison (because "y < x" wasn't implemented).

Sorting itself never asks for __gt__, only __lt__. What the _rest_ of the language does to implement __lt__ is out of sorting's control. For example, tuple.__lt__ and list.__lt__ go on to invoke __eq__ on contained elements. A more general subsystem in the language falls back on x.__gt__(y) if y.__lt__(x) isn't implemented. Sorting has no control over any of that.

> tupsort.py does "range(2", should be "range(1" I think)

Good catch - thanks! Repaired now :-)

----------
Added file: https://bugs.python.org/file50373/tupsort.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Wed Oct 20 02:49:39 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Wed, 20 Oct 2021 06:49:39 +0000
Subject: [issue42092] test_host_resolution_bad_address does not always fail as
 expected
In-Reply-To: <1603142542.04.0.682089318313.issue42092@roundup.psfhosted.org>
Message-ID: <1634712579.9.0.975086396316.issue42092@roundup.psfhosted.org>


Barry A. Warsaw <barry at python.org> added the comment:

Woot!  I finally figured out the problem and how to fix it.  It has nothing to do with Python and everything to do with AT&T.  They run a service called DNS Error Assist, quoting:

"Sometimes we enter a wrong search word, or a wrong web address, or maybe the website we want is no longer in service. If this happens, the DNS Error Assist service automatically searches for similar or related terms and presents you some results that may be useful for you. Otherwise, you?ll get a ?No results found? error message."

Turning this off is buried in AT&T's site.  I found some outdated recommendations on the web, but here's what worked for me (as of the date of this comment).

Log in to your AT&T portal, search for "Privacy" and click on the link that says "Privacy in Support".  This takes you to a page that describes AT&T's privacy policies, and gives you a link to "Go" to your privacy settings.

>From there you should see two sections, one that says "Control how we communicate with you" and one that says "Control how we use your data".  Select DNS Error Assist and disable that.  You'll need to wait a few minutes for it to take effect, but then you'll get none of those bogus resolutions.

While you're at it, you might want to review your other privacy settings.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
versions:  -Python 3.10, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42092>
_______________________________________

From report at bugs.python.org  Wed Oct 20 02:53:42 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Wed, 20 Oct 2021 06:53:42 +0000
Subject: [issue42092] test_host_resolution_bad_address does not always fail as
 expected
In-Reply-To: <1603142542.04.0.682089318313.issue42092@roundup.psfhosted.org>
Message-ID: <1634712822.61.0.325071056834.issue42092@roundup.psfhosted.org>


Change by Barry A. Warsaw <barry at python.org>:


----------
pull_requests: +27351
pull_request: https://github.com/python/cpython/pull/29085

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42092>
_______________________________________

From report at bugs.python.org  Wed Oct 20 03:16:00 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 07:16:00 +0000
Subject: [issue45522] Allow to build Python without freelists
In-Reply-To: <1634641564.68.0.977403045358.issue45522@roundup.psfhosted.org>
Message-ID: <1634714160.28.0.921629372587.issue45522@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
pull_requests: +27352
pull_request: https://github.com/python/cpython/pull/29086

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45522>
_______________________________________

From report at bugs.python.org  Wed Oct 20 03:21:20 2021
From: report at bugs.python.org (Stefan Pochmann)
Date: Wed, 20 Oct 2021 07:21:20 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634714480.54.0.862343175608.issue45530@roundup.psfhosted.org>


Stefan Pochmann <stefan.pochmann at gmail.com> added the comment:

Ok, I agree, the change only possibly "breaks" expectations that were already broken (including my naive sorted-vs-minmax).

Yes, I know sort itself only asks `<` (I've actually read most of its code and all its documentation). That's why I was irritated for a moment when I saw a `>`.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Wed Oct 20 03:57:12 2021
From: report at bugs.python.org (Yavor Atov)
Date: Wed, 20 Oct 2021 07:57:12 +0000
Subject: [issue45533] loop.sock_connect doesn't resolve the address parameter
 on Windows
Message-ID: <1634716632.31.0.427704063338.issue45533@roundup.psfhosted.org>


New submission from Yavor Atov <yavor.atov at gmail.com>:

>From https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.sock_connect :

Changed in version 3.5.2: address no longer needs to be resolved. sock_connect will try to check if the address is already resolved by calling socket.inet_pton(). If not, loop.getaddrinfo() will be used to resolve the address.

This used to be true in Python 3.7, but in the newer versions, no resolution is done. It could be seen in the source code - the loop implementation is changed and the new one doesn't resolve the address.

https://github.com/python/cpython/blob/085ccb0f177988065dbe9ef4c5cda434560066bc/Lib/asyncio/proactor_events.py#L703

https://github.com/python/cpython/blob/085ccb0f177988065dbe9ef4c5cda434560066bc/Lib/asyncio/windows_events.py#L576

----------
components: asyncio
messages: 404398
nosy: YAtOff, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: loop.sock_connect doesn't resolve the address parameter on Windows
type: behavior
versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45533>
_______________________________________

From report at bugs.python.org  Wed Oct 20 04:06:54 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 20 Oct 2021 08:06:54 +0000
Subject: [issue45500] Rewrite test_dbm
In-Reply-To: <1634464533.25.0.959205582661.issue45500@roundup.psfhosted.org>
Message-ID: <1634717214.26.0.101776867808.issue45500@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset d46b2217d13bbcf8145da8c12a487ba775d6f162 by ?ukasz Langa in branch '3.9':
[3.9] bpo-45500: Rewrite test_dbm (GH-29002) (GH-29074)
https://github.com/python/cpython/commit/d46b2217d13bbcf8145da8c12a487ba775d6f162


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45500>
_______________________________________

From report at bugs.python.org  Wed Oct 20 04:19:21 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 08:19:21 +0000
Subject: [issue45459] Limited API support for Py_buffer
In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>
Message-ID: <1634717961.46.0.965277995693.issue45459@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

All memory is owned by the exporter object. The exporter (aka producer) is the Python type that implements Py_bf_getbuffer and Py_bf_releasebuffer. In majority of cases the exporter doesn't have to set shape, strides, and suboffsets. They are used in special cases, e.g. multidimensional arrays with custom layout. For example they can be used to convert TIFF images from strides big endian format to a NumPy array in little endian format.

It's up to the exporter's Py_bf_getbuffer to decide how it fills shape, strides, and suboffsets, too. For example an exporter could allocate format, shape, strides, and suboffsets on the heap and assign pointers in its getbuffer function and store a hint in the ``internal`` field of Py_buffer. Its releasebuffer function then checks ``internal`` field and performs de-allocations. We must not copy fields. This would break the API.

It would be a bad idea to return copies in PyBuffer_GetLayout(). Consumers have to get the layout every time they access a specific item in the buffer in order to calculate the offset. I'd rather define the arguments as "const". The documentation already states that e.g. "The shape array is read-only for the consumer.".

It is highly unlikely that we will ever have to extend the Py_buffer interface. It is already extremely versatile and can encode complex formats. You can even express the layout of a TIFF image of float32 CMYK in planar configuration (one array of 32bit floats cyan, followed by an array of magenta, then an array of yellow, and finally an array of contrast).

PS: I have removed PyBuffer_NewEx() function. It did not make sense any sense.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Wed Oct 20 04:29:13 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 20 Oct 2021 08:29:13 +0000
Subject: [issue45500] Rewrite test_dbm
In-Reply-To: <1634464533.25.0.959205582661.issue45500@roundup.psfhosted.org>
Message-ID: <1634718553.97.0.17044071553.issue45500@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Thanks ?ukasz and Dong-hee Na.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45500>
_______________________________________

From report at bugs.python.org  Wed Oct 20 04:30:16 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 08:30:16 +0000
Subject: [issue45459] Limited API support for Py_buffer
In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>
Message-ID: <1634718616.19.0.151642689263.issue45459@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

A consumer will use the APIs:

---
Py_buffer *view;
int ndim;
const char *format;
const Py_ssize_t *shape, *strides, *suboffsets;
void *buf;

view = PyBuffer_New();
PyObject_GetBuffer(obj, view, flags);
ndim = PyBuffer_GetLayout(&format, &shape, &strides, &suboffsets);
buf = PyBuffer_GetPointer(view, [...]);
PyBuffer_Free(view); // also calls PyBuffer_Release()
---


The API functions PyBuffer_FillInfo(), PyBuffer_FillInfoEx(), and PyBuffer_GetInternal() are for exporters (producers)-only. The exporter uses the PyBuffer_FillInfo*() in its Py_bf_getbuffer function to fill the view. It may use PyBuffer_GetInternal() in its Py_bf_releasebuffer function to access the internal field and to release additional resources.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Wed Oct 20 04:44:09 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 20 Oct 2021 08:44:09 +0000
Subject: [issue45459] Limited API support for Py_buffer
In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>
Message-ID: <1634719449.25.0.687606577427.issue45459@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I do not like requirement to allocate Py_buffer on the heap. It adds an overhead. Common case in CPython code is:

Py_buffer view;
void *buf;
Py_ssize_t len;

PyObject_GetBuffer(obj, &view, PyBUF_SIMPLE);
buf = view.buf;
len = view.len;
// no other fields are used
PyBuffer_Release(&view);

And I want to keep it as simple and efficient as it can be.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Wed Oct 20 04:47:54 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 08:47:54 +0000
Subject: [issue45459] Limited API support for Py_buffer
In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>
Message-ID: <1634719674.33.0.982412887451.issue45459@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

CPython internals can still use allocation on the stack. Only stable ABI extensions have to use allocation on the heap.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Wed Oct 20 04:57:27 2021
From: report at bugs.python.org (Aritra Sarkar)
Date: Wed, 20 Oct 2021 08:57:27 +0000
Subject: [issue45534] Failing test_exceptions and test_threading
Message-ID: <1634720247.23.0.923721814231.issue45534@roundup.psfhosted.org>


New submission from Aritra Sarkar <aritra1911 at yahoo.com>:

While running `make test` on Python 3.11.0a1, I get this:


== Tests result: FAILURE ==

411 tests OK.

2 tests failed:
    test_exceptions test_threading

14 tests skipped:
    test_devpoll test_gdb test_ioctl test_kqueue test_msilib
    test_ossaudiodev test_startfile test_tix test_tk test_ttk_guionly
    test_winconsoleio test_winreg test_winsound test_zipfile64
0:06:19 load avg: 5.05
0:06:19 load avg: 5.05 Re-running failed tests in verbose mode
0:06:19 load avg: 5.05 Re-running test_exceptions in verbose mode (matching: test_name_error_suggestions_do_not_trigger_for_too_many_locals)
test_name_error_suggestions_do_not_trigger_for_too_many_locals (test.test_exceptions.NameErrorTests) ... test test_exceptions failed
FAIL

======================================================================
FAIL: test_name_error_suggestions_do_not_trigger_for_too_many_locals (test.test_exceptions.NameErrorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/aritra/local/build/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1843, in test_name_error_suggestions_do_not_trigger_for_too_many_locals
    self.assertNotIn("a1", err.getvalue())
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'a1' unexpectedly found in 'Traceback (most recent call last):\n  File "/home/aritra/local/build/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1838, in test_name_error_suggestions_do_not_trigger_for_too_many_locals\n
  f()\n    ^^^\n  File "/home/aritra/local/build/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1835, in f\n    print(a0)\n          ^^\nNameError: name \'a0\' is not defined\n'

----------------------------------------------------------------------
Ran 1 test in 0.006s

FAILED (failures=1)
0:06:19 load avg: 5.05 Re-running test_threading in verbose mode (matching: test_recursion_limit)
test_recursion_limit (test.test_threading.ThreadingExceptionTests) ... test test_threading failed
FAIL

======================================================================
FAIL: test_recursion_limit (test.test_threading.ThreadingExceptionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/aritra/local/build/Python-3.11.0a1/Lib/test/test_threading.py", line 1290, in test_recursion_limit
    self.assertEqual(p.returncode, 0, "Unexpected error: " + stderr.decode())
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: -11 != 0 : Unexpected error:

----------------------------------------------------------------------
Ran 1 test in 0.161s

FAILED (failures=1)
2 tests failed again:
    test_exceptions test_threading

== Tests result: FAILURE then FAILURE ==

411 tests OK.

2 tests failed:
    test_exceptions test_threading

14 tests skipped:
    test_devpoll test_gdb test_ioctl test_kqueue test_msilib
    test_ossaudiodev test_startfile test_tix test_tk test_ttk_guionly
    test_winconsoleio test_winreg test_winsound test_zipfile64

2 re-run tests:
    test_exceptions test_threading

Total duration: 6 min 19 sec
Tests result: FAILURE then FAILURE




Also here are the CFLAGS I used during the build:

probook $ echo $CFLAGS
-Wall -Wextra -g -O0 -std=c99

----------
components: Tests
messages: 404405
nosy: aritra1911
priority: normal
severity: normal
status: open
title: Failing test_exceptions and test_threading
type: crash
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45534>
_______________________________________

From report at bugs.python.org  Wed Oct 20 04:59:18 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Wed, 20 Oct 2021 08:59:18 +0000
Subject: [issue43239] PyCFunction_New is not exported with PyAPI_FUNC
In-Reply-To: <1613491672.14.0.339809223416.issue43239@roundup.psfhosted.org>
Message-ID: <1634720358.83.0.608802997636.issue43239@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

It seems to me that this issue can be closed as fixed. Do you have further PR's for this, Petr?

----------
nosy: +erlendaasland
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43239>
_______________________________________

From report at bugs.python.org  Wed Oct 20 05:11:36 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 09:11:36 +0000
Subject: [issue45534] Failing test_exceptions and test_threading
In-Reply-To: <1634720247.23.0.923721814231.issue45534@roundup.psfhosted.org>
Message-ID: <1634721096.63.0.170174185807.issue45534@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Which system are you testing on?

----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45534>
_______________________________________

From report at bugs.python.org  Wed Oct 20 05:33:07 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Wed, 20 Oct 2021 09:33:07 +0000
Subject: [issue45474] [C API] marshal.h must not use FILE* type in the limited
 C API
In-Reply-To: <1634242163.67.0.843815202649.issue45474@roundup.psfhosted.org>
Message-ID: <1634722387.26.0.443154663023.issue45474@roundup.psfhosted.org>


Change by Petr Viktorin <encukou at gmail.com>:


----------
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45474>
_______________________________________

From report at bugs.python.org  Wed Oct 20 05:32:18 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 20 Oct 2021 09:32:18 +0000
Subject: [issue45474] [C API] marshal.h must not use FILE* type in the limited
 C API
In-Reply-To: <1634242163.67.0.843815202649.issue45474@roundup.psfhosted.org>
Message-ID: <1634722338.04.0.580047124358.issue45474@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 98fa3b53e2aecc5ecec64a921bc9cf4f9d07ac75 by Petr Viktorin in branch 'main':
bpo-45474: Exclude all of marshal.h if Py_LIMITED_API is defined (GH-29061)
https://github.com/python/cpython/commit/98fa3b53e2aecc5ecec64a921bc9cf4f9d07ac75


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45474>
_______________________________________

From report at bugs.python.org  Wed Oct 20 05:33:05 2021
From: report at bugs.python.org (Alex Waygood)
Date: Wed, 20 Oct 2021 09:33:05 +0000
Subject: [issue39679] functools: singledispatchmethod doesn't work with
 classmethod
In-Reply-To: <1582053375.25.0.178240077179.issue39679@roundup.psfhosted.org>
Message-ID: <1634722385.21.0.647746798171.issue39679@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
pull_requests: +27353
pull_request: https://github.com/python/cpython/pull/29087

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39679>
_______________________________________

From report at bugs.python.org  Wed Oct 20 05:42:35 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 20 Oct 2021 09:42:35 +0000
Subject: [issue45459] Limited API support for Py_buffer
In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>
Message-ID: <1634722955.91.0.203918130664.issue45459@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

That would be an unfair advantage. If we want people to use the limited API we should not make it much slower than the non-limited API.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Wed Oct 20 05:44:59 2021
From: report at bugs.python.org (youknowone)
Date: Wed, 20 Oct 2021 09:44:59 +0000
Subject: [issue45532] Replace 'default' with 'main' as default in sys.version
In-Reply-To: <1634686813.85.0.311990959144.issue45532@roundup.psfhosted.org>
Message-ID: <1634723099.7.0.904114786473.issue45532@roundup.psfhosted.org>


youknowone <jeong at youknowone.org> added the comment:

Thanks! I will look in it

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45532>
_______________________________________

From report at bugs.python.org  Wed Oct 20 05:46:21 2021
From: report at bugs.python.org (Aritra Sarkar)
Date: Wed, 20 Oct 2021 09:46:21 +0000
Subject: [issue45534] Failing test_exceptions and test_threading
In-Reply-To: <1634720247.23.0.923721814231.issue45534@roundup.psfhosted.org>
Message-ID: <1634723181.02.0.0139211097665.issue45534@roundup.psfhosted.org>


Aritra Sarkar <aritra1911 at yahoo.com> added the comment:

Linux on x86_64 hardware:

probook $ uname -a
Linux probook 5.14.12-arch1-1 #1 SMP PREEMPT Wed, 13 Oct 2021 16:58:16 +0000 x86_64 GNU/Linux


GCC version:

probook $ gcc --version
gcc (GCC) 11.1.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


GNU Binutils version:

probook $ ld --version
GNU ld (GNU Binutils) 2.36.1
Copyright (C) 2021 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45534>
_______________________________________

From report at bugs.python.org  Wed Oct 20 05:46:38 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 20 Oct 2021 09:46:38 +0000
Subject: [issue45532] Replace 'default' with 'main' as default in sys.version
In-Reply-To: <1634686813.85.0.311990959144.issue45532@roundup.psfhosted.org>
Message-ID: <1634723198.0.0.591820707803.issue45532@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

> Note that _Py_gitidentifier is supposed to return meaningful values while building from within a git checkout 

'3.11.0a1+ (heads/main:3163e68c34, Oct 20 2021, 18:39:18) [Clang 12.0.0 (clang-1200.0.32.29)]

FYI, it retrieves branch information well

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45532>
_______________________________________

From report at bugs.python.org  Wed Oct 20 05:55:36 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 09:55:36 +0000
Subject: [issue27357] Suggestions for Windows installer UI improvements
In-Reply-To: <1466438028.41.0.887417379593.issue27357@psf.upfronthosting.co.za>
Message-ID: <1634723736.2.0.0391149136687.issue27357@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
title: Enhancing the Windows installer -> Suggestions for Windows installer UI improvements

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27357>
_______________________________________

From report at bugs.python.org  Wed Oct 20 05:56:17 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 09:56:17 +0000
Subject: [issue12653] Provide accelerators for all buttons in Windows
 installers
In-Reply-To: <1311935783.8.0.769443256699.issue12653@psf.upfronthosting.co.za>
Message-ID: <1634723777.64.0.694988413131.issue12653@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue12653>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:03:38 2021
From: report at bugs.python.org (Stefan Pochmann)
Date: Wed, 20 Oct 2021 10:03:38 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634724218.1.0.242114999385.issue45530@roundup.psfhosted.org>


Stefan Pochmann <stefan.pochmann at gmail.com> added the comment:

Hmm. What do you think about using "<" inside the loop for the remaining tuple elements as well? It's even less likely that both the first and the second elements are equal.

When the second elements differ, this saves 0.5 PyObject_RichCompareBool (average 1.5 "<" instead of one "==" and one "<").

When the second elements are equal, this costs 1 PyObject_RichCompareBool more (two "<" instead of one "==").

That's fewer PyObject_RichCompareBool calls if they're equal less than 1/3 of the time.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:03:40 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 10:03:40 +0000
Subject: [issue45534] Failing test_exceptions and test_threading
In-Reply-To: <1634720247.23.0.923721814231.issue45534@roundup.psfhosted.org>
Message-ID: <1634724220.25.0.699983457106.issue45534@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45534>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:04:06 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 10:04:06 +0000
Subject: [issue45534] Failing test_exceptions and test_threading
In-Reply-To: <1634720247.23.0.923721814231.issue45534@roundup.psfhosted.org>
Message-ID: <1634724246.01.0.0192466422329.issue45534@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
type: crash -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45534>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:10:09 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 20 Oct 2021 10:10:09 +0000
Subject: [issue45531] field "mro" behaves strangely in dataclass
In-Reply-To: <1634685944.1.0.123359424978.issue45531@roundup.psfhosted.org>
Message-ID: <1634724609.46.0.751030343741.issue45531@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

In Enum it is just implicitly forbidden:

>>> from enum import *
>>> class A(Enum):
...   mro = 1
...   x = 2
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/serhiy/py/cpython/Lib/enum.py", line 430, in __new__
    raise ValueError('Invalid enum member name: {0}'.format(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Invalid enum member name: mro

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45531>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:15:49 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 10:15:49 +0000
Subject: [issue37516] test_asyncio logs: Unknown child process
In-Reply-To: <1562446464.35.0.966251927477.issue37516@roundup.psfhosted.org>
Message-ID: <1634724949.94.0.599548039675.issue37516@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Closing as there isn't enough information and there was no reply to followup questions.  Also 3.8 is no longer maintained. 

Please create a new issue with more information if you are still seeing a problem in a current version of python (3.9+).

----------
nosy: +iritkatriel
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37516>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:20:34 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 10:20:34 +0000
Subject: [issue3778] python uninstaller leave registry entries
In-Reply-To: <1220562494.43.0.987039023455.issue3778@psf.upfronthosting.co.za>
Message-ID: <1634725234.85.0.397882680203.issue3778@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
nosy: +steve.dower

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue3778>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:24:59 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 10:24:59 +0000
Subject: [issue24807] compileall can cause Python installation to fail
In-Reply-To: <1438856901.35.0.951815503778.issue24807@psf.upfronthosting.co.za>
Message-ID: <1634725499.43.0.118814047797.issue24807@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

2.7 is no longer being maintained and the installer has been completely rewritten in the meantime.

Please create a new issue if you are having problems with a current version of python (3.9+).  Ideally in this case, also include more information about which system you are using and step to reproduce the problem.

----------
components: +Tests -Installation
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24807>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:26:20 2021
From: report at bugs.python.org (Ram Rachum)
Date: Wed, 20 Oct 2021 10:26:20 +0000
Subject: [issue12653] Provide accelerators for all buttons in Windows
 installers
In-Reply-To: <1311935783.8.0.769443256699.issue12653@psf.upfronthosting.co.za>
Message-ID: <1634725580.58.0.558843829647.issue12653@roundup.psfhosted.org>


Ram Rachum <ram at rachum.com> added the comment:

I confirmed now in the 3.10 installer on Windows that accelerators are working. Thank you!

----------
resolution: out of date -> fixed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue12653>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:27:14 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 10:27:14 +0000
Subject: [issue18083] _sysconfigdata.py is installed in an arch-independent
 directory
In-Reply-To: <1369758893.79.0.620751759494.issue18083@psf.upfronthosting.co.za>
Message-ID: <1634725634.6.0.576429386679.issue18083@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18083>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:31:07 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Wed, 20 Oct 2021 10:31:07 +0000
Subject: [issue45459] Limited API support for Py_buffer
In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>
Message-ID: <1634725867.5.0.193033502081.issue45459@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

No. Limited API is generally not as performant as the non-limited one. It is even documented this way: https://docs.python.org/3/c-api/stable.html#limited-api-scope-and-performance

We should not make it *much* slower, but code that can take advantage of implementation details can always be faster. Max speed should not be a concern in the limited API.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:33:17 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Wed, 20 Oct 2021 10:33:17 +0000
Subject: [issue45534] Failing test_exceptions and test_threading
In-Reply-To: <1634720247.23.0.923721814231.issue45534@roundup.psfhosted.org>
Message-ID: <1634725997.11.0.971082627369.issue45534@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Unfortunately I am unable to reproduce this failure :(

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45534>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:35:06 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 20 Oct 2021 10:35:06 +0000
Subject: [issue45535] Enum's dir() does not contain inherited members
Message-ID: <1634726106.14.0.525814954361.issue45535@roundup.psfhosted.org>


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

For example:

>>> from enum import *
>>> class E(IntEnum):
...     x = 1
... 
>>> dir(E)
['__class__', '__doc__', '__members__', '__module__', 'x']
>>> E.from_bytes
<built-in method from_bytes of EnumType object at 0x559d47415ce0>
>>> E.to_bytes
<method 'to_bytes' of 'int' objects>
>>> E.numerator
<attribute 'numerator' of 'int' objects>
>>> E.__add__
<slot wrapper '__add__' of 'int' objects>

There are methods and attributes inherited from int, but they are not shown in dir(). As result they are absent in help() and completion does not work for them.

----------
components: Library (Lib)
messages: 404420
nosy: barry, eli.bendersky, ethan.furman, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Enum's dir() does not contain inherited members
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45535>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:40:01 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Wed, 20 Oct 2021 10:40:01 +0000
Subject: [issue45525] PyType_Spec basicsize/itemsize should allow -1 for
 "inherit"
In-Reply-To: <1634658238.19.0.273279060126.issue45525@roundup.psfhosted.org>
Message-ID: <1634726401.7.0.388693985399.issue45525@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

Hm, after sleeping on it, I think I filed this too soon.
If you don't have the superclass's C memory layout (and you can't add new C-level state), it's not likely that you want to define a class in C.

I can construct theoretical cases where it might be useful, but IMO it should wait for an *actual* motivating use case. (The one I had was making a specific C-API test a bit easier to write, which is very weak.)

No need to have this sit on CPython's TODO list. I'll close this and let someone reopen (or file a new issue) if they actually need it.

----------
resolution:  -> postponed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45525>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:40:24 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 10:40:24 +0000
Subject: [issue45536] Verify OpenSSL APIs in configure script
Message-ID: <1634726424.89.0.265888702362.issue45536@roundup.psfhosted.org>


New submission from Christian Heimes <lists at cheimes.de>:

In thread [1] Robin Becker requested to check for working OpenSSL in configure script. With reasonable effort it is possible to probe for basic APIs such as minimum SSL and EVP interface.

[1] https://mail.python.org/archives/list/python-dev at python.org/thread/IIFABHN7DOTCXMRQ72SLJSU4VDWRM2HB/

----------
assignee: christian.heimes
components: Build, SSL
messages: 404422
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: Verify OpenSSL APIs in configure script
type: enhancement
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45536>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:43:04 2021
From: report at bugs.python.org (Ken Jin)
Date: Wed, 20 Oct 2021 10:43:04 +0000
Subject: [issue45527] Reduce overhead for cache hits in specialized opcodes.
In-Reply-To: <1634664253.61.0.347658329299.issue45527@roundup.psfhosted.org>
Message-ID: <1634726584.51.0.486492342521.issue45527@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

Strong +1 from me.

Not to mention some instructions don't even need to read the _PyAdaptiveEntry apart from recording cache hits, so that's one more dependent load and store too.

Extremely cheap instructions off the top of my head:
- BINARY_SUBSCR
- LOAD_METHOD
- LOAD_GLOBAL
- LOAD_ATTR

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45527>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:46:43 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 10:46:43 +0000
Subject: [issue45536] Verify OpenSSL APIs in configure script
In-Reply-To: <1634726424.89.0.265888702362.issue45536@roundup.psfhosted.org>
Message-ID: <1634726803.23.0.573146793124.issue45536@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
keywords: +patch
pull_requests: +27354
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29088

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45536>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:54:07 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 20 Oct 2021 10:54:07 +0000
Subject: [issue45340] Lazily create dictionaries for plain Python objects
In-Reply-To: <1633087277.57.0.188806648124.issue45340@roundup.psfhosted.org>
Message-ID: <1634727247.43.0.72026914729.issue45340@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:

Josh, please reopen if you have more to add.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45340>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:56:27 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 20 Oct 2021 10:56:27 +0000
Subject: [issue44525] Implement CALL_FUNCTION adaptive interpreter
 optimizations
In-Reply-To: <1624890138.2.0.824780513801.issue44525@roundup.psfhosted.org>
Message-ID: <1634727387.9.0.671222792327.issue44525@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
pull_requests: +27355
pull_request: https://github.com/python/cpython/pull/29033

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44525>
_______________________________________

From report at bugs.python.org  Wed Oct 20 06:59:50 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 10:59:50 +0000
Subject: [issue20768] pyconfig.h #defines macros in global namespace
In-Reply-To: <1393337010.57.0.329094843269.issue20768@psf.upfronthosting.co.za>
Message-ID: <1634727590.44.0.513688057402.issue20768@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20768>
_______________________________________

From report at bugs.python.org  Wed Oct 20 07:02:48 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 11:02:48 +0000
Subject: [issue45536] Verify OpenSSL APIs in configure script
In-Reply-To: <1634726424.89.0.265888702362.issue45536@roundup.psfhosted.org>
Message-ID: <1634727768.96.0.901845076453.issue45536@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Example output:

$ ./configure
checking whether compiling and linking against OpenSSL works... yes
checking for --with-openssl-rpath... 
checking whether OpenSSL provides required APIs... yes

$ ./configure --with-openssl=/home/heimes/dev/python/multissl/openssl/3.0.0
checking for openssl/ssl.h in /home/heimes/dev/python/multissl/openssl/3.0.0... yes
checking whether compiling and linking against OpenSSL works... yes
checking for --with-openssl-rpath... 
checking whether OpenSSL provides required APIs... yes

$ ./configure --with-openssl=/home/heimes/dev/python/multissl/openssl/1.0.2u
checking for openssl/ssl.h in /home/heimes/dev/python/multissl/openssl/1.0.2u... yes
checking whether compiling and linking against OpenSSL works... yes
checking for --with-openssl-rpath... 
checking whether OpenSSL provides required APIs... no

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45536>
_______________________________________

From report at bugs.python.org  Wed Oct 20 07:07:29 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 11:07:29 +0000
Subject: [issue21613] Installer for mac doesn't store the installation location
In-Reply-To: <1401461821.06.0.907126667727.issue21613@psf.upfronthosting.co.za>
Message-ID: <1634728049.1.0.651583023965.issue21613@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
type: behavior -> enhancement
versions: +Python 3.11 -Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21613>
_______________________________________

From report at bugs.python.org  Wed Oct 20 07:09:52 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 11:09:52 +0000
Subject: [issue27374] Cygwin: Makefile does not install DLL import library
In-Reply-To: <1466695238.23.0.601958974473.issue27374@psf.upfronthosting.co.za>
Message-ID: <1634728192.81.0.473572493569.issue27374@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

See also Issue19241.

----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27374>
_______________________________________

From report at bugs.python.org  Wed Oct 20 07:09:56 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 11:09:56 +0000
Subject: [issue19241] MINGW: install import library
In-Reply-To: <1381661724.71.0.909185396021.issue19241@psf.upfronthosting.co.za>
Message-ID: <1634728196.1.0.452388898419.issue19241@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

See also Issue27374.

----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19241>
_______________________________________

From report at bugs.python.org  Wed Oct 20 07:45:54 2021
From: report at bugs.python.org (Aritra Sarkar)
Date: Wed, 20 Oct 2021 11:45:54 +0000
Subject: [issue45534] Failing test_exceptions and test_threading
In-Reply-To: <1634720247.23.0.923721814231.issue45534@roundup.psfhosted.org>
Message-ID: <1634730354.76.0.296880649261.issue45534@roundup.psfhosted.org>


Aritra Sarkar <aritra1911 at yahoo.com> added the comment:

I should've given the configuration options I've used as well. They are
as follows:

probook $ ./configure --prefix=/opt/python \
> --with-openssl=/opt/openssl \
> --with-openssl-rpath=/opt/openssl/lib \
> --with-openssl-rpath=/opt/openssl/lib64 \
> --with-ssl-default-suites=openssl \
> --enable-optimizations

----------
type: behavior -> crash

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45534>
_______________________________________

From report at bugs.python.org  Wed Oct 20 07:47:48 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 20 Oct 2021 11:47:48 +0000
Subject: [issue37295] Possible optimizations for math.comb()
In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org>
Message-ID: <1634730468.86.0.407730927351.issue37295@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Divide-and-conquer approach works pretty well for larger n.

For results slightly out of the 64-bit range:

$ ./python -m pyperf timeit -s 'from math import comb' 'comb(63, 31)'
Mean +- std dev: 2.80 us +- 0.14 us -> 388 ns +- 19 ns: 7.22x faster

$ ./python -m pyperf timeit -s 'from math import comb' 'comb(111, 15)'
Mean +- std dev: 1.24 us +- 0.06 us -> 215 ns +- 18 ns: 5.76x faster

$ ./python -m pyperf timeit -s 'from math import comb' 'comb(1450, 7)'
Mean +- std dev: 654 ns +- 45 ns -> 178 ns +- 13 ns: 3.67x faster

$ ./python -m pyperf timeit -s 'from math import comb' 'comb(3329023, 3)'
Mean +- std dev: 276 ns +- 15 ns -> 175 ns +- 11 ns: 1.58x faster


For very large n:

$ ./python -m pyperf timeit 'from math import comb' 'comb(2**100, 2**10)'
Mean +- std dev: 26.2 ms +- 1.7 ms -> 3.21 ms +- 0.20 ms: 8.16x faster

$ ./python -m pyperf timeit 'from math import comb' 'comb(2**1000, 2**10)'
Mean +- std dev: 704 ms +- 15 ms -> 103 ms +- 5 ms: 6.85x faster


And it is faster than using factorial:

$ ./python -m pyperf timeit -s 'from math import comb' 'comb(100_000, 50_000)'
Mean +- std dev: 1.61 sec +- 0.02 sec -> 177 ms +- 9 ms: 9.12x faster

$ ./python -m pyperf timeit -s 'from math import factorial as fact' 'fact(100_000) // (fact(50_000)*fact(50_000))'
Mean +- std dev: 507 ms +- 20 ms


math.perm() can benefit from reusing the same code:

$ ./python -m pyperf timeit -s 'from math import perm' 'perm(63, 31)'
Mean +- std dev: 1.35 us +- 0.07 us -> 1.18 us +- 0.06 us: 1.15x faster

$ ./python -m pyperf timeit -s 'from math import perm' 'perm(111, 15)'
Mean +- std dev: 601 ns +- 35 ns -> 563 ns +- 28 ns: 1.07x faster

$ ./python -m pyperf timeit -s 'from math import perm' 'perm(2**100, 2**10)'
Mean +- std dev: 5.96 ms +- 0.29 ms -> 2.32 ms +- 0.12 ms: 2.57x faster

$ ./python -m pyperf timeit -s 'from math import perm' 'perm(2**1000, 2**10)'
Mean +- std dev: 486 ms +- 14 ms -> 95.7 ms +- 4.2 ms: 5.08x faster

$ ./python -m pyperf timeit -s 'from math import perm' 'perm(100_000, 50_000)'
Mean +- std dev: 639 ms +- 23 ms -> 66.6 ms +- 3.2 ms: 9.60x faster


Even in worst cases it is almost as fast as factorial:

$ ./python -m pyperf timeit -s 'from math import perm' 'perm(100_000, 100_000)'
Mean +- std dev: 2.55 sec +- 0.02 sec -> 187 ms +- 8 ms: 13.66x faster

$ ./python -m pyperf timeit -s 'from math import factorial' 'factorial(100_000)'
Mean +- std dev: 142 ms +- 7 ms

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37295>
_______________________________________

From report at bugs.python.org  Wed Oct 20 07:49:52 2021
From: report at bugs.python.org (Finite State Machine)
Date: Wed, 20 Oct 2021 11:49:52 +0000
Subject: [issue45531] field "mro" behaves strangely in dataclass
In-Reply-To: <1634685944.1.0.123359424978.issue45531@roundup.psfhosted.org>
Message-ID: <1634730592.65.0.51874534698.issue45531@roundup.psfhosted.org>


Finite State Machine <python at state-machine.ca> added the comment:

For what it's worth, I think a sensible exception message solves this problem. While it would be nice to be able to use a field called 'mro', that's an enhancement; the misleading exception message is a bug.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45531>
_______________________________________

From report at bugs.python.org  Wed Oct 20 07:50:46 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 11:50:46 +0000
Subject: [issue45534] Failing test_exceptions and test_threading
In-Reply-To: <1634720247.23.0.923721814231.issue45534@roundup.psfhosted.org>
Message-ID: <1634730646.39.0.36610307871.issue45534@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Crash typically refers to a segfault or hang in c code, not an exception. Please don't change the type again.

----------
type: crash -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45534>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:01:30 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Wed, 20 Oct 2021 12:01:30 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <452fb543-4c86-174a-d27a-a727f3986f7c@egenix.com>
Message-ID: <1b8c02e2-987c-66e1-9bce-a637a557b8b3@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 19.10.2021 18:47, Marc-Andre Lemburg wrote:
> 
>> On Sat, Oct 16, 2021 at 5:01 AM Marc-Andre Lemburg
>> <report at bugs.python.org> wrote:
>>> I can try to port PyRun to 3.9 and 3.10 to see whether I run into any issues.
>>> Would that help ?
>>
>> Yeah, that would totally help.
> 
> Ok, I'll start looking into this and post updates here.

I have PyRun mostly working with Python 3.9. Still need to add a few
new C modules, but the basics work.

No changes were necessary to Tools/freeze/. The PGO build complains
about test_embed not working - no surprise there. I'll patch the suite
to ignore the test.

BTW: Why is test_embed even used for the PGO target ?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:04:52 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:04:52 +0000
Subject: [issue45537] Cygwin is unsupported - close all open issues and list
 them here.
Message-ID: <1634731492.2.0.646251570361.issue45537@roundup.psfhosted.org>


New submission from Irit Katriel <iritkatriel at gmail.com>:

There isn't currently a maintainer for cpython on Cygwin, which by PEP 11 means it is no longer supported.

There are open issues (some with patches) from aborted attempts to support it in the past. They will be closed as duplicates of this issue, so that they can be easily accessible in the future in case someone commits to support Cygwin.

----------
messages: 404433
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: Cygwin is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45537>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:05:42 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:05:42 +0000
Subject: [issue27374] Cygwin: Makefile does not install DLL import library
In-Reply-To: <1466695238.23.0.601958974473.issue27374@psf.upfronthosting.co.za>
Message-ID: <1634731542.71.0.453807755701.issue27374@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Cygwin is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27374>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:06:19 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:06:19 +0000
Subject: [issue31882] Cygwin: asyncio and asyncore test suites hang
 indefinitely due to bug in Cygwin
In-Reply-To: <1509109689.46.0.213398074469.issue31882@psf.upfronthosting.co.za>
Message-ID: <1634731579.07.0.575159640149.issue31882@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
status: open -> closed
superseder:  -> Cygwin is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31882>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:08:08 2021
From: report at bugs.python.org (Aritra Sarkar)
Date: Wed, 20 Oct 2021 12:08:08 +0000
Subject: [issue45534] Failing test_exceptions and test_threading
In-Reply-To: <1634720247.23.0.923721814231.issue45534@roundup.psfhosted.org>
Message-ID: <1634731688.69.0.800657849267.issue45534@roundup.psfhosted.org>


Aritra Sarkar <aritra1911 at yahoo.com> added the comment:

Test results from another machine, running an Intel Pentium Dual Core:


== Tests result: FAILURE ==

412 tests OK.

1 test failed:
    test_exceptions

14 tests skipped:
    test_devpoll test_gdb test_ioctl test_kqueue test_msilib
    test_ossaudiodev test_startfile test_tix test_tk test_ttk_guionly
    test_winconsoleio test_winreg test_winsound test_zipfile64
0:18:40 load avg: 2.91
0:18:40 load avg: 2.91 Re-running failed tests in verbose mode
0:18:40 load avg: 2.91 Re-running test_exceptions in verbose mode (matching: test_name_error_suggestions_do_not_trigger_for_too_many_locals)
test_name_error_suggestions_do_not_trigger_for_too_many_locals (test.test_exceptions.NameErrorTests) ... test test_exceptions failed
FAIL

======================================================================
FAIL: test_name_error_suggestions_do_not_trigger_for_too_many_locals (test.test_exceptions.NameErrorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ray/local/build/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1843, in test_name_error_suggestions_do_not_trigger_for_too_many_locals
    self.assertNotIn("a1", err.getvalue())
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'a1' unexpectedly found in 'Traceback (most recent call last):\n  File "/home/ray/local/build/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1838, in test_name_error_suggestions_do_not_trigger_for_too_many_locals\n    f()\n    ^^^\n  File "/home/ray/local/build/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1835, in f\n    print(a0)\n          ^^\nNameError: name \'a0\' is not defined\n'

----------------------------------------------------------------------
Ran 1 test in 0.008s

FAILED (failures=1)
1 test failed again:
    test_exceptions

== Tests result: FAILURE then FAILURE ==

412 tests OK.

1 test failed:
    test_exceptions

14 tests skipped:
    test_devpoll test_gdb test_ioctl test_kqueue test_msilib
    test_ossaudiodev test_startfile test_tix test_tk test_ttk_guionly
    test_winconsoleio test_winreg test_winsound test_zipfile64

1 re-run test:
    test_exceptions

Total duration: 18 min 40 sec
Tests result: FAILURE then FAILURE
make: *** [Makefile:1318: test] Error 2



Here only `test_exceptions` fails. The previous report was from an Intel
Core i5.


System info:

$ uname -a
Linux archeract 5.15.0-rc6-archeract #1 SMP Mon Oct 18 14:15:15 IST 2021 x86_64 GNU/Linux

$ gcc --version
gcc (GCC) 11.1.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ ld --version
GNU ld (GNU Binutils) 2.36.1
Copyright (C) 2021 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

$ echo $CC
/usr/bin/gcc

$ echo $CFLAGS
-Wall -Wextra -g -O0 -std=c99

$ echo $LDFLAGS
-L/opt/openssl/lib -L/opt/openssl/lib64 -Wl,-rpath,/opt/openssl/lib -Wl,-rpath,/opt/openssl/lib64

----------
type: behavior -> crash

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45534>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:09:21 2021
From: report at bugs.python.org (Aritra Sarkar)
Date: Wed, 20 Oct 2021 12:09:21 +0000
Subject: [issue45534] Failing test_exceptions and test_threading
In-Reply-To: <1634720247.23.0.923721814231.issue45534@roundup.psfhosted.org>
Message-ID: <1634731761.02.0.255395812042.issue45534@roundup.psfhosted.org>


Change by Aritra Sarkar <aritra1911 at yahoo.com>:


----------
type: crash -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45534>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:10:21 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:10:21 +0000
Subject: [issue32243] Tests that set aggressive switch interval hang in Cygwin
 on a VM
In-Reply-To: <1512657533.84.0.213398074469.issue32243@psf.upfronthosting.co.za>
Message-ID: <1634731821.15.0.0896741824205.issue32243@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Cygwin is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32243>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:11:02 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 20 Oct 2021 12:11:02 +0000
Subject: [issue37295] Possible optimizations for math.comb()
In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org>
Message-ID: <1634731862.35.0.949000355933.issue37295@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27356
pull_request: https://github.com/python/cpython/pull/29090

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37295>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:10:50 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:10:50 +0000
Subject: [issue28459] _pyio module broken on Cygwin / setmode not usable
In-Reply-To: <1476701892.4.0.598393414511.issue28459@psf.upfronthosting.co.za>
Message-ID: <1634731850.17.0.756200282818.issue28459@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Cygwin is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28459>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:12:28 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:12:28 +0000
Subject: [issue41374] socket.TCP_* no longer available with cygwin 3.1.6+
In-Reply-To: <1595490704.07.0.649120374256.issue41374@roundup.psfhosted.org>
Message-ID: <1634731948.49.0.514533127494.issue41374@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Cygwin is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41374>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:14:48 2021
From: report at bugs.python.org (Aritra Sarkar)
Date: Wed, 20 Oct 2021 12:14:48 +0000
Subject: [issue45534] Failing test_exceptions and test_threading
In-Reply-To: <1634720247.23.0.923721814231.issue45534@roundup.psfhosted.org>
Message-ID: <1634732088.47.0.653492362558.issue45534@roundup.psfhosted.org>


Aritra Sarkar <aritra1911 at yahoo.com> added the comment:

> Crash typically refers to a segfault or hang in c code, not an exception. Please don't change the type again.

I hadn't noticed that it was changed and I didn't refresh the page.
Hence everytime I sent a message, it automatically changed it back to
crash. Apologies!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45534>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:16:44 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:16:44 +0000
Subject: [issue45534] Failing test_exceptions and test_threading
In-Reply-To: <1634720247.23.0.923721814231.issue45534@roundup.psfhosted.org>
Message-ID: <1634732204.22.0.66970286668.issue45534@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

No worries! Thanks for the additional info.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45534>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:18:05 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:18:05 +0000
Subject: [issue45537] Cygwin is unsupported - close all open issues and list
 them here.
In-Reply-To: <1634731492.2.0.646251570361.issue45537@roundup.psfhosted.org>
Message-ID: <1634732285.27.0.278106731205.issue45537@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

There isn't currently a maintainer for cpython on Cygwin, which by PEP 11 means it is not supported.

There are open issues (some with patches) from aborted attempts to support it in the past. They will be closed as duplicates of this issue, so that they can be easily accessible in the future in case someone commits to support Cygwin.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45537>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:18:17 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:18:17 +0000
Subject: [issue45537] Cygwin is unsupported - close all open issues and list
 them here.
In-Reply-To: <1634732285.27.0.278106731205.issue45537@roundup.psfhosted.org>
Message-ID: <1634732297.22.0.744413166262.issue45537@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
Removed message: https://bugs.python.org/msg404433

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45537>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:19:16 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:19:16 +0000
Subject: [issue1244861] Enable os.startfile and webbrowser.WindowsDefault on
 Cygwin
Message-ID: <1634732356.26.0.900288006754.issue1244861@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Cygwin is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue1244861>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:19:58 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:19:58 +0000
Subject: [issue2233] Makefile.pre.in contains extra slash before $(DESTDIR)
 which can cause Cygwin build to fail
In-Reply-To: <1204652870.95.0.330326965123.issue2233@psf.upfronthosting.co.za>
Message-ID: <1634732398.48.0.74720855258.issue2233@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Cygwin is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2233>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:20:33 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:20:33 +0000
Subject: [issue4802] detect_tkinter for cygwin
In-Reply-To: <1230840510.49.0.878061128691.issue4802@psf.upfronthosting.co.za>
Message-ID: <1634732433.64.0.854666071995.issue4802@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Cygwin is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue4802>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:21:19 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:21:19 +0000
Subject: [issue32835] Add documention mentioning that Cygwin isn't fully
 compatible
In-Reply-To: <1518469943.71.0.467229070634.issue32835@psf.upfronthosting.co.za>
Message-ID: <1634732479.03.0.537142152502.issue32835@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> rejected
stage: needs patch -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32835>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:22:50 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:22:50 +0000
Subject: [issue35503] os.path.islink() works with cygwin installation but not
 python.org
In-Reply-To: <1544822182.17.0.788709270274.issue35503@psf.upfronthosting.co.za>
Message-ID: <1634732570.36.0.452988138238.issue35503@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

2.7 is no longer maintained. Please create a new issue if you have this problem with a current python version (3.9+).

----------
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35503>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:25:52 2021
From: report at bugs.python.org (Erik Bray)
Date: Wed, 20 Oct 2021 12:25:52 +0000
Subject: [issue45537] Cygwin is unsupported - close all open issues and list
 them here.
In-Reply-To: <1634732285.27.0.278106731205.issue45537@roundup.psfhosted.org>
Message-ID: <1634732752.78.0.675295709644.issue45537@roundup.psfhosted.org>


Change by Erik Bray <erik.m.bray at gmail.com>:


----------
keywords: +patch
nosy: +erik.bray
nosy_count: 1.0 -> 2.0
pull_requests: +27357
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14013

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45537>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:31:25 2021
From: report at bugs.python.org (Zackery Spytz)
Date: Wed, 20 Oct 2021 12:31:25 +0000
Subject: [issue45537] Cygwin is unsupported - close all open issues and list
 them here.
In-Reply-To: <1634732285.27.0.278106731205.issue45537@roundup.psfhosted.org>
Message-ID: <1634733085.2.0.106946437928.issue45537@roundup.psfhosted.org>


Change by Zackery Spytz <zspytz at gmail.com>:


----------
nosy: +ZackerySpytz
nosy_count: 2.0 -> 3.0
pull_requests: +27358
pull_request: https://github.com/python/cpython/pull/21649

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45537>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:32:02 2021
From: report at bugs.python.org (Erik Bray)
Date: Wed, 20 Oct 2021 12:32:02 +0000
Subject: [issue45537] Cygwin is unsupported - close all open issues and list
 them here.
In-Reply-To: <1634732285.27.0.278106731205.issue45537@roundup.psfhosted.org>
Message-ID: <1634733122.02.0.128687236158.issue45537@roundup.psfhosted.org>


Change by Erik Bray <erik.m.bray at gmail.com>:


----------
pull_requests: +27359
pull_request: https://github.com/python/cpython/pull/4149

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45537>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:35:32 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:35:32 +0000
Subject: [issue45538] MinGW is unsupported - close all open issues and list
 them here.
Message-ID: <1634733332.39.0.633564936685.issue45538@roundup.psfhosted.org>


New submission from Irit Katriel <iritkatriel at gmail.com>:

There isn't currently a maintainer for cpython on MinGW, which by PEP 11 means it is not supported.

There are open issues (some with patches) from aborted attempts to support it in the past. They will be closed as duplicates of this issue, so that they can be easily accessible in the future in case someone commits to support MinGW.

----------
messages: 404439
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45538>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:38:05 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:38:05 +0000
Subject: [issue18486] mingw: dynamic loading support
In-Reply-To: <1374093111.95.0.0778484284701.issue18486@psf.upfronthosting.co.za>
Message-ID: <1634733485.4.0.637395374469.issue18486@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18486>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:39:09 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 12:39:09 +0000
Subject: [issue1566331] Bad behaviour in <ossaudio audio device>.obuf*
Message-ID: <1634733549.37.0.650888388637.issue1566331@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Does the issue still affect supported Python and Linux versions? Majority of distros are using pipewire or pulseaudio these days.

----------
nosy: +christian.heimes
status: open -> pending
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue1566331>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:40:31 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:40:31 +0000
Subject: [issue18653] mingw-meta: build core modules
In-Reply-To: <1375619720.06.0.766677441218.issue18653@psf.upfronthosting.co.za>
Message-ID: <1634733631.49.0.827694549532.issue18653@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18653>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:40:56 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:40:56 +0000
Subject: [issue15315] Can't build Python extension with mingw32 on Windows
In-Reply-To: <1341895923.16.0.599445307566.issue15315@psf.upfronthosting.co.za>
Message-ID: <1634733656.62.0.000167551048095.issue15315@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15315>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:41:20 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:41:20 +0000
Subject: [issue18634] mingw find import library
In-Reply-To: <1375471005.24.0.423283634636.issue18634@psf.upfronthosting.co.za>
Message-ID: <1634733680.66.0.715748298975.issue18634@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18634>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:41:53 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:41:53 +0000
Subject: [issue6335] Add support for mingw
In-Reply-To: <1245849042.65.0.399048729588.issue6335@psf.upfronthosting.co.za>
Message-ID: <1634733713.02.0.625895767736.issue6335@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue6335>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:42:30 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:42:30 +0000
Subject: [issue17592] mingw: configure MACHDEP and platform for build
In-Reply-To: <1364759010.97.0.879569753757.issue17592@psf.upfronthosting.co.za>
Message-ID: <1634733750.1.0.772325481818.issue17592@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17592>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:43:49 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:43:49 +0000
Subject: [issue19241] MINGW: install import library
In-Reply-To: <1381661724.71.0.909185396021.issue19241@psf.upfronthosting.co.za>
Message-ID: <1634733829.93.0.830458483157.issue19241@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19241>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:45:04 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:45:04 +0000
Subject: [issue17598] mingw: init system calls
In-Reply-To: <1364759885.17.0.0266392857932.issue17598@psf.upfronthosting.co.za>
Message-ID: <1634733904.43.0.329117407394.issue17598@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17598>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:45:34 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:45:34 +0000
Subject: [issue17602] mingw: default sys.path calculations for windows
 platforms
In-Reply-To: <1364760613.75.0.604084743865.issue17602@psf.upfronthosting.co.za>
Message-ID: <1634733934.96.0.868112225306.issue17602@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17602>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:45:49 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:45:49 +0000
Subject: [issue18485] mingw: configure for shared build
In-Reply-To: <1374092492.69.0.0184006927142.issue18485@psf.upfronthosting.co.za>
Message-ID: <1634733949.5.0.298850174057.issue18485@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18485>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:46:01 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:46:01 +0000
Subject: [issue17600] mingw: build-in windows modules (winreg)
In-Reply-To: <1364760067.55.0.47312643971.issue17600@psf.upfronthosting.co.za>
Message-ID: <1634733961.01.0.783497463779.issue17600@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17600>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:46:32 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:46:32 +0000
Subject: [issue17590] mingw: translate gcc internal defines to python platform
 specific defines
In-Reply-To: <1364758799.57.0.261822298653.issue17590@psf.upfronthosting.co.za>
Message-ID: <1634733992.29.0.253397738775.issue17590@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17590>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:46:47 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:46:47 +0000
Subject: [issue17594] mingw: preset configure defaults
In-Reply-To: <1364759209.12.0.183871965153.issue17594@psf.upfronthosting.co.za>
Message-ID: <1634734007.4.0.183029546774.issue17594@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17594>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:47:10 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:47:10 +0000
Subject: [issue18500] mingw: detect winsock2 and setup _socket module
In-Reply-To: <1374179669.42.0.252427857289.issue18500@psf.upfronthosting.co.za>
Message-ID: <1634734030.12.0.877699958364.issue18500@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18500>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:47:41 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 12:47:41 +0000
Subject: [issue5993] python produces zombie in webbrowser.open
In-Reply-To: <1242014278.58.0.774883846907.issue5993@psf.upfronthosting.co.za>
Message-ID: <1634734061.94.0.750453906053.issue5993@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Are Python 3.9 to 3.11 still affected by the issue?

The webbrowser module now uses subprocess.Popen() to start browsers. The subprocess module calls wait() and performs additional cleanup to prevent zombies.

----------
nosy: +christian.heimes
status: open -> pending
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.6, Python 2.7, Python 3.1, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue5993>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:48:03 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:48:03 +0000
Subject: [issue4709] Mingw-w64 and python on windows x64
In-Reply-To: <1229849614.64.0.683517411932.issue4709@psf.upfronthosting.co.za>
Message-ID: <1634734083.5.0.231061315523.issue4709@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue4709>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:48:33 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:48:33 +0000
Subject: [issue17597] mingw: Allow Objects/exceptions.c to include "errmap.h"
In-Reply-To: <1364759799.81.0.998386094022.issue17597@psf.upfronthosting.co.za>
Message-ID: <1634734113.74.0.118337775927.issue17597@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17597>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:48:51 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:48:51 +0000
Subject: [issue18631] mingw: setup msvcrt and _winapi modules
In-Reply-To: <1375467097.24.0.168691156888.issue18631@psf.upfronthosting.co.za>
Message-ID: <1634734131.91.0.44469420167.issue18631@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18631>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:48:52 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 12:48:52 +0000
Subject: [issue7757] sys.path is incorrect when prefix is ""
In-Reply-To: <1264178776.01.0.552667161926.issue7757@psf.upfronthosting.co.za>
Message-ID: <1634734132.97.0.472114175941.issue7757@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

This is a very old bug report. Python has changed a lot in the past decade. Please reopen the bug if you still can reproduce the issue with Python 3.9 or newer.

----------
nosy: +christian.heimes
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue7757>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:49:14 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:49:14 +0000
Subject: [issue17604] mingw: use main() to start execution
In-Reply-To: <1364760973.75.0.319025813954.issue17604@psf.upfronthosting.co.za>
Message-ID: <1634734154.64.0.0858193151242.issue17604@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17604>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:49:03 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:49:03 +0000
Subject: [issue18495] mingw: ignore main program for frozen scripts
In-Reply-To: <1374178220.38.0.0504340051034.issue18495@psf.upfronthosting.co.za>
Message-ID: <1634734143.45.0.473934129227.issue18495@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18495>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:49:32 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:49:32 +0000
Subject: [issue19242] MINGW: generalization of posix installation in distutils
In-Reply-To: <1381661829.44.0.682603781281.issue19242@psf.upfronthosting.co.za>
Message-ID: <1634734172.56.0.928058520953.issue19242@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19242>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:49:45 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:49:45 +0000
Subject: [issue19244] MINGW: use replace instead rename to avoid failure on
 windows
In-Reply-To: <1381662169.98.0.886605409124.issue19244@psf.upfronthosting.co.za>
Message-ID: <1634734185.69.0.935089444592.issue19244@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19244>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:51:03 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:51:03 +0000
Subject: [issue17595] mingw: configure largefile support for windows builds
In-Reply-To: <1364759469.4.0.971782294906.issue17595@psf.upfronthosting.co.za>
Message-ID: <1634734263.66.0.182242736389.issue17595@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17595>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:51:01 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 12:51:01 +0000
Subject: [issue7406] int arithmetic relies on C signed overflow behaviour
In-Reply-To: <1259495783.96.0.0738564373709.issue7406@psf.upfronthosting.co.za>
Message-ID: <1634734261.6.0.326257856171.issue7406@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Python 2 is no longer supported. Python 3's _PyLong_Add() function doesn't rely on overflow.

----------
nosy: +christian.heimes
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue7406>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:51:15 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:51:15 +0000
Subject: [issue17601] mingw: determine if pwdmodule should be used
In-Reply-To: <1364760268.61.0.961516146376.issue17601@psf.upfronthosting.co.za>
Message-ID: <1634734275.35.0.599501022582.issue17601@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17601>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:51:26 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:51:26 +0000
Subject: [issue18487] mingw implement exec prefix
In-Reply-To: <1374093705.74.0.166827931169.issue18487@psf.upfronthosting.co.za>
Message-ID: <1634734286.89.0.863321195414.issue18487@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18487>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:51:38 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:51:38 +0000
Subject: [issue18496] mingw: setup exclude termios module
In-Reply-To: <1374178317.83.0.753467697868.issue18496@psf.upfronthosting.co.za>
Message-ID: <1634734298.49.0.119930066096.issue18496@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18496>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:51:52 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:51:52 +0000
Subject: [issue18498] mingw: setup select module
In-Reply-To: <1374178586.07.0.280642289771.issue18498@psf.upfronthosting.co.za>
Message-ID: <1634734312.44.0.781620218062.issue18498@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18498>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:52:11 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:52:11 +0000
Subject: [issue18630] mingw: exclude unix only modules
In-Reply-To: <1375466884.41.0.796204643285.issue18630@psf.upfronthosting.co.za>
Message-ID: <1634734331.8.0.454330252485.issue18630@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18630>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:52:11 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 12:52:11 +0000
Subject: [issue7938] makesetup interprets macros -DA=B as a Make variable
 definition
In-Reply-To: <1266281072.48.0.268109023834.issue7938@psf.upfronthosting.co.za>
Message-ID: <1634734331.1.0.0190810911876.issue7938@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue7938>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:52:36 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:52:36 +0000
Subject: [issue18638] mingw: generalization of posix build in sysconfig.py
In-Reply-To: <1375472521.36.0.980902141673.issue18638@psf.upfronthosting.co.za>
Message-ID: <1634734356.88.0.185286661099.issue18638@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18638>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:52:25 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:52:25 +0000
Subject: [issue18633] mingw: use Mingw32CCompiler as default compiler for
 mingw* build
In-Reply-To: <1375469702.92.0.916914527806.issue18633@psf.upfronthosting.co.za>
Message-ID: <1634734345.26.0.618535920186.issue18633@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18633>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:52:47 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 12:52:47 +0000
Subject: [issue17318] xml.sax and xml.dom fetch DTDs by default
In-Reply-To: <1362012637.97.0.538376803739.issue17318@psf.upfronthosting.co.za>
Message-ID: <1634734367.92.0.515376114234.issue17318@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

I'm closing this as duplicate.

----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> XML vulnerabilities in Python

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17318>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:52:58 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:52:58 +0000
Subject: [issue18632] mingw: build extensions with GCC
In-Reply-To: <1375467327.02.0.323723692344.issue18632@psf.upfronthosting.co.za>
Message-ID: <1634734378.85.0.232847118715.issue18632@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18632>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:52:48 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:52:48 +0000
Subject: [issue18641] mingw: customize site
In-Reply-To: <1375473125.37.0.800889135942.issue18641@psf.upfronthosting.co.za>
Message-ID: <1634734368.63.0.372777610917.issue18641@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18641>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:53:16 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:53:16 +0000
Subject: [issue19243] MINGW: support stdcall without underscore
In-Reply-To: <1381662020.61.0.491449073615.issue19243@psf.upfronthosting.co.za>
Message-ID: <1634734396.22.0.716739836807.issue19243@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19243>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:53:36 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:53:36 +0000
Subject: [issue18497] mingw: setup _multiprocessing module
In-Reply-To: <1374178460.6.0.189052379472.issue18497@psf.upfronthosting.co.za>
Message-ID: <1634734416.96.0.31616292318.issue18497@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18497>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:54:04 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:54:04 +0000
Subject: [issue17605] mingw-meta: build interpeter core
In-Reply-To: <1364762524.12.0.901415822586.issue17605@psf.upfronthosting.co.za>
Message-ID: <1634734444.35.0.58925060039.issue17605@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17605>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:53:52 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:53:52 +0000
Subject: [issue19245] mingw-meta: installation
In-Reply-To: <1381662360.07.0.972595151036.issue19245@psf.upfronthosting.co.za>
Message-ID: <1634734432.75.0.0342138230954.issue19245@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19245>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:53:55 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 12:53:55 +0000
Subject: [issue1760357] ZipFile.write fails with bad modification time
Message-ID: <1634734435.42.0.989891396855.issue1760357@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.6, Python 2.7, Python 3.1, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue1760357>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:54:39 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:54:39 +0000
Subject: [issue10504] Trivial mingw compile fixes
In-Reply-To: <1290432020.95.0.401711712349.issue10504@psf.upfronthosting.co.za>
Message-ID: <1634734479.06.0.93791673592.issue10504@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue10504>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:55:11 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:55:11 +0000
Subject: [issue6672] Add Mingw recognition to pyport.h to allow building
 extensions
In-Reply-To: <1249820690.51.0.767085753138.issue6672@psf.upfronthosting.co.za>
Message-ID: <1634734511.23.0.151945079139.issue6672@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue6672>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:55:41 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:55:41 +0000
Subject: [issue28271] [MinGW] Can't compile _ctypes/callproc.c - SEH not
 supported by MinGW
In-Reply-To: <1474807064.66.0.0836341319322.issue28271@psf.upfronthosting.co.za>
Message-ID: <1634734541.04.0.482324664572.issue28271@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28271>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:55:51 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:55:51 +0000
Subject: [issue28270] [MinGW] Can't compile Modules/posixmodule.c by MinGW -
 several macro are missed
In-Reply-To: <1474804221.68.0.944652457277.issue28270@psf.upfronthosting.co.za>
Message-ID: <1634734551.96.0.651521830112.issue28270@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28270>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:57:34 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:57:34 +0000
Subject: [issue17148] mingw: nt thread model detection
In-Reply-To: <1360190170.63.0.398498965196.issue17148@psf.upfronthosting.co.za>
Message-ID: <1634734654.92.0.072717824651.issue17148@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17148>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:59:07 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:59:07 +0000
Subject: [issue10615] Trivial mingw compile fixes
In-Reply-To: <1291380362.46.0.195053370852.issue10615@psf.upfronthosting.co.za>
Message-ID: <1634734747.12.0.681907746843.issue10615@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue10615>
_______________________________________

From report at bugs.python.org  Wed Oct 20 08:59:58 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 12:59:58 +0000
Subject: [issue37801] Compilation on MINGW64 fails (CODESET,wcstok,...)
In-Reply-To: <1565351601.24.0.515340331062.issue37801@roundup.psfhosted.org>
Message-ID: <1634734798.05.0.992354074162.issue37801@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37801>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:00:42 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 13:00:42 +0000
Subject: [issue28267] [MinGW] Crash at start when compiled by MinGW for 64-bit
 Windows using PC/pyconfig.h
In-Reply-To: <1474796748.74.0.791284991149.issue28267@psf.upfronthosting.co.za>
Message-ID: <1634734842.07.0.698606592462.issue28267@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> MinGW is unsupported - close all open issues and list them here.

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28267>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:12:39 2021
From: report at bugs.python.org (Joe Wells)
Date: Wed, 20 Oct 2021 13:12:39 +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: <1634735559.56.0.934063833715.issue43656@roundup.psfhosted.org>


Joe Wells <bugs-python-org at jbw.link> added the comment:

Here are my thoughts inspired by Andrei's insightful comments.

1. In response to the major issue Andrei raises, I agree that it is desirable that repr would never raise an exception.  The reasons Andrei mentions seem quite correct to me.  However, I think the only practical way to make that change would be the change the code of the repr builtin.  (Expecting the authors of every class in all Python code ever written to make sure that their __repr__ method will never raise an exception is unrealistic.)

The bug that is the topic of the issue in this bug report can be fixed by merely handling exceptions raised by one particular call to repr in the code of FrameSummary.__init__.  That change can only affect code that uses the traceback module to get nicer tracebacks, and only if the capture_locals=True feature is requested

Changing the implementation of the repr builtin could conceivably cause unexpected problems for lots of deployed 3rd party code during normal use, because repr is widely used in deployed code, and hence more care and thought is needed.  In contrast, changing FrameSummary.__init__ as I propose in this bug report will only affect code using the capture_locals=True feature of the traceback module, and is likely to make such code more reliable because right now that feature is failure-prone due to this bug.

So I propose that making repr never raise exceptions should be a different bug.  This bug does not need to wait for that bug to be fixed.

2. In response to a minor point of Andrei, I would like to mention that I encountered this because I had given students a coursework template containing this code:

import traceback, sys

def format_exception_chunks(exception):
    return (traceback.TracebackException.from_exception(exception, capture_locals=True).format())

def print_exception(_ignored_type, exception, _ignored_traceback):
    for chunk in format_exception_chunks(exception):
        print(chunk, file=sys.stderr, end="")

# This change to sys.excepthook adds local variables to stack traces.
sys.excepthook = print_exception

This had the unfortunate effect that when a class constructor decided that it did not like its arguments, the students were overwhelmed by a baffling cascade of exception tracebacks.  So while this was indeed ?for convenience of interactive debugging?, it had the actual effect of making it nearly impossible for these beginner Python programmers to do any debugging at all.  The overall effect of this bug is that it makes it potentially unwise to routinely rely on the capture_locals=True feature.  A feature that could be useful for beginners actually makes it worse for them.

3. In response to Andrei's suggested change to my minimal example to reproduce the bug, I have a few comments.  First, his minimal example is just as good as mine for reproducing the bug.  Second, my example is inspired by the two classes I mention whose constructors trigger the bug: both of them do it by leaving the incompletely initialized object missing an attribute that repr depends on, so they both raise a missing attribute exception when an attempt is made to print the incompletely initialized object.  I suspect this is a quite common pattern in deployed Python code.  I suspect that people have not made efforts to avoid this pattern because it only triggers a bug when exception tracebacks are investigated, because the only reference to the incompletely initialized object is in the stack frame of the constructor method (either __new__ or __init__) which in turn is only referenced from the traceback.  Third, my example deliberately has as little code as possible in the __repr__ method to convey the key issue.  Fourth, one of these two examples (mine or Andrei's) should go into the unit tests when the bug is fixed.

4. I notice that the code of unittest.util.safe_repr gives an example of how to use object.__repr__(obj) to get something formatted for an object whose normal __repr__ method has raised an exception.  So I alter my recommended fix to the following:

        if locals:
            d = {}
            self.locals = d
            for k, v in locals.items():
                try:
                    d[k] = repr(v)
                except Exception:
                    d[k] = '<repr failed for ' + object.__repr__(v) + '>'
        else:
            self.locals = None

5. Can someone please change the Stage of this issue to something other than ?resolved? and the Resolution of this issue to something other than ?not a bug??

I hope these comments are helpful and this bug gets somehow fixed.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:15:17 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 13:15:17 +0000
Subject: [issue18100] socket.sendall() cannot send buffers of 2GB or more
In-Reply-To: <1369918582.13.0.605373457603.issue18100@psf.upfronthosting.co.za>
Message-ID: <1634735717.86.0.0867282251663.issue18100@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

The issue is fixed in Python 3 by commit f72006f4429975a9d221e046e43dabd4f41eda23

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18100>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:18:07 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 13:18:07 +0000
Subject: [issue14527] How to link with a non-system libffi?
In-Reply-To: <1333851935.11.0.629390980004.issue14527@psf.upfronthosting.co.za>
Message-ID: <1634735887.95.0.482020019942.issue14527@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
type:  -> enhancement
versions: +Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue14527>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:20:44 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 13:20:44 +0000
Subject: [issue45477] configure script cannot detect float word ordering on
 linux
In-Reply-To: <1634246393.25.0.871269149475.issue45477@roundup.psfhosted.org>
Message-ID: <1634736044.76.0.141794870772.issue45477@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Please upload and attach the .o file to this bug. I need to see the content of the file.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45477>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:23:53 2021
From: report at bugs.python.org (Sourish Basu)
Date: Wed, 20 Oct 2021 13:23:53 +0000
Subject: [issue45477] configure script cannot detect float word ordering on
 linux
In-Reply-To: <1634246393.25.0.871269149475.issue45477@roundup.psfhosted.org>
Message-ID: <1634736233.06.0.296899831915.issue45477@roundup.psfhosted.org>


Sourish Basu <sourish.basu at gmail.com> added the comment:

conftest.c attached

----------
Added file: https://bugs.python.org/file50375/conftest.c

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45477>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:23:38 2021
From: report at bugs.python.org (Sourish Basu)
Date: Wed, 20 Oct 2021 13:23:38 +0000
Subject: [issue45477] configure script cannot detect float word ordering on
 linux
In-Reply-To: <1634246393.25.0.871269149475.issue45477@roundup.psfhosted.org>
Message-ID: <1634736218.14.0.797049467591.issue45477@roundup.psfhosted.org>


Sourish Basu <sourish.basu at gmail.com> added the comment:

conftest.o attached

----------
Added file: https://bugs.python.org/file50374/conftest.o

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45477>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:38:36 2021
From: report at bugs.python.org (Thomas Grainger)
Date: Wed, 20 Oct 2021 13:38:36 +0000
Subject: [issue25625] "chdir" Contex manager for pathlib
In-Reply-To: <1447523143.32.0.921942004004.issue25625@psf.upfronthosting.co.za>
Message-ID: <1634737116.32.0.892229801761.issue25625@roundup.psfhosted.org>


Change by Thomas Grainger <tagrain at gmail.com>:


----------
nosy: +graingert
nosy_count: 10.0 -> 11.0
pull_requests: +27360
pull_request: https://github.com/python/cpython/pull/29091

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25625>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:39:03 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 20 Oct 2021 13:39:03 +0000
Subject: [issue45527] Reduce overhead for cache hits in specialized opcodes.
In-Reply-To: <1634664253.61.0.347658329299.issue45527@roundup.psfhosted.org>
Message-ID: <1634737143.74.0.608418270135.issue45527@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
keywords: +patch
pull_requests: +27361
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29092

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45527>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:43:31 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 13:43:31 +0000
Subject: [issue45477] configure script cannot detect float word ordering on
 linux
In-Reply-To: <1634246393.25.0.871269149475.issue45477@roundup.psfhosted.org>
Message-ID: <1634737411.21.0.518784658539.issue45477@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Your conftest.o does not contain the magic string "seesnoon". Either ICC uses a different serialization format or your CFLAGS optimize the value away.

Please run 

   icc -c -o conftest_unoptimized.o conftest.c

and upload "conftest_unoptimized.o".

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45477>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:45:41 2021
From: report at bugs.python.org (Steve Dower)
Date: Wed, 20 Oct 2021 13:45:41 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633463037.19.0.965519087659.issue45382@roundup.psfhosted.org>
Message-ID: <1634737541.34.0.768093927508.issue45382@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

All that said, if we're going to shell out to "ver", we may as well try "wmic os get Caption,Version /value" first and parse its output. For me, it looks like the below (with a number of blank lines around it):

Caption=Microsoft Windows 10 Enterprise
Version=10.0.19043

I would assume the output is in MBCS, and there doesn't appear to be an option to change that - the "/locale" option appears to influence translations, rather than encoding.

We'd still want the "ver" fallback I think. The wmic command is deprecated in favour of PowerShell commands, which means we would have to implement native calls to get equivalent functionality. But I expect neither cmd.exe nor wmic.exe will actually disappear for a long time.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:46:25 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Wed, 20 Oct 2021 13:46: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: <1634737585.68.0.635685952631.issue43656@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Joe: when I ran your code sample with modification I posted previously, I don't get any errors. Can you try running it?

By the way my point was not that builtin __repr__ should be modified to never raise exceptions (which would not help in this case), but rather that users should try to write classes that can be safely repr()'ed with the __repr__ they have defined on the class.

I agree that this case is hard for new users to debug, but it indicates to the user that if a class and its __repr__ are implemented in this way, it can lead to more serious issue in production.

Possibly this can be improved by making a documentation update to https://docs.python.org/3/reference/datamodel.html?highlight=__repr__#object.__repr__  ?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:48:35 2021
From: report at bugs.python.org (Beier Liu)
Date: Wed, 20 Oct 2021 13:48:35 +0000
Subject: [issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC
In-Reply-To: <1540110172.83.0.788709270274.issue35037@psf.upfronthosting.co.za>
Message-ID: <1634737715.92.0.418305085137.issue35037@roundup.psfhosted.org>


Change by Beier Liu <imbenliu at gmail.com>:


----------
keywords: +patch
nosy: +Beier Liu
nosy_count: 7.0 -> 8.0
pull_requests: +27362
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19326

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35037>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:49:31 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 13:49:31 +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: <1634737771.13.0.0798686305182.issue45436@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Zach, yes, at least to 3.10, 3.9, and 3.8 please.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:50:07 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 20 Oct 2021 13:50:07 +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: <1634737807.32.0.0566950020269.issue45436@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27363
pull_request: https://github.com/python/cpython/pull/29093

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:50:35 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 13:50:35 +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: <1634737835.34.0.819312348492.issue45436@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 15cd7a7f9edcc121f273ae1d8007128282f8f85f by Miss Islington (bot) in branch '3.9':
bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077) (GH-29081)
https://github.com/python/cpython/commit/15cd7a7f9edcc121f273ae1d8007128282f8f85f


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:50:36 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 13:50:36 +0000
Subject: [issue40167] Cython files don't compile on Mingw-w64 64-bit
In-Reply-To: <1585883513.89.0.776539669318.issue40167@roundup.psfhosted.org>
Message-ID: <1634737836.21.0.810658270057.issue40167@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40167>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:51:11 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 13:51:11 +0000
Subject: [issue25625] "chdir" Contex manager for pathlib
In-Reply-To: <1447523143.32.0.921942004004.issue25625@psf.upfronthosting.co.za>
Message-ID: <1634737871.25.0.733566968426.issue25625@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset a774285e7d3e63c24dbaaee0b0d9e59ded5c49bf by Thomas Grainger in branch 'main':
bpo-25625: [doc] fix async/aync typo (GH-29091)
https://github.com/python/cpython/commit/a774285e7d3e63c24dbaaee0b0d9e59ded5c49bf


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25625>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:54:03 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Wed, 20 Oct 2021 13:54: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: <1634738043.37.0.141307470403.issue43656@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Joe: I've looked at https://bugs.python.org/issue39228 again and I see there was consensus to reject this idea, please take a look at the discussion there.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Wed Oct 20 09:58:09 2021
From: report at bugs.python.org (Joe Wells)
Date: Wed, 20 Oct 2021 13:58:09 +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: <1634738289.87.0.955238992283.issue43656@roundup.psfhosted.org>


Joe Wells <bugs-python-org at jbw.link> added the comment:

I'm sorry Andrei: I misread your alteration of my example and misunderstood its purpose.

For anyone else reading these messages: In my most recent comment above, please ignore the part of my comment about Andrei's example.

So yes, Andrei, that is how people should write their code!  Your code does not trigger the bug because it is written in a better way.  Agreed completely.

However, this bug still needs fixed because it is currently not possible to use the capture_locals=True feature of the traceback module when debugging code written by people who do not follow Andrei's example of best practice.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:06:40 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Wed, 20 Oct 2021 14:06:40 +0000
Subject: [issue45531] field "mro" behaves strangely in dataclass
In-Reply-To: <1634685944.1.0.123359424978.issue45531@roundup.psfhosted.org>
Message-ID: <1634738800.15.0.504964221918.issue45531@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

I think the only other thing that could be done is to have a special test for "default is type.mro", and if so, don't assume it's a default value. Which means that you could never actually use:

@dataclass
class A:
   mro: object = type.mro

But it's probably best to just disallow a field named "mro". Which is unfortunate, but such is life. It's a shame mro isn't a builtin, so we could do mro(A) instead of A.mro().

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45531>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:08:25 2021
From: report at bugs.python.org (desbma)
Date: Wed, 20 Oct 2021 14:08:25 +0000
Subject: [issue25625] "chdir" Contex manager for pathlib
In-Reply-To: <1447523143.32.0.921942004004.issue25625@psf.upfronthosting.co.za>
Message-ID: <1634738905.06.0.399364722467.issue25625@roundup.psfhosted.org>


Change by desbma <dutch109 at gmail.com>:


----------
nosy:  -desbma

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25625>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:08:43 2021
From: report at bugs.python.org (Sourish Basu)
Date: Wed, 20 Oct 2021 14:08:43 +0000
Subject: [issue45477] configure script cannot detect float word ordering on
 linux
In-Reply-To: <1634246393.25.0.871269149475.issue45477@roundup.psfhosted.org>
Message-ID: <1634738923.75.0.486787528072.issue45477@roundup.psfhosted.org>


Sourish Basu <sourish.basu at gmail.com> added the comment:

conftest_unoptimized.o uploaded

----------
Added file: https://bugs.python.org/file50376/conftest_unoptimized.o

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45477>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:08:51 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 14:08:51 +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: <1634738931.51.0.790867061696.issue45436@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 2ce38167000fef3a71f1783acdda2a2cf7a2df39 by Miss Islington (bot) in branch '3.8':
bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077) (GH-29093)
https://github.com/python/cpython/commit/2ce38167000fef3a71f1783acdda2a2cf7a2df39


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:21:07 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 14:21:07 +0000
Subject: [issue45464] TypeError when inheriting from both OSError and
 AttributeError
In-Reply-To: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
Message-ID: <1634739667.9.0.224155456053.issue45464@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
nosy: +lukasz.langa
nosy_count: 5.0 -> 6.0
pull_requests: +27364
pull_request: https://github.com/python/cpython/pull/29094

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45464>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:22:08 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Wed, 20 Oct 2021 14:22:08 +0000
Subject: [issue45311] Threading Semaphore and BoundedSemaphore release method
 implementation improvement
In-Reply-To: <1632835923.15.0.15993520004.issue45311@roundup.psfhosted.org>
Message-ID: <1634739728.93.0.191654121363.issue45311@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Besart: with the current code, if there's a valueError when releasing a thread, it will be retried again n times, with your change, n waiting threads will be released, even if some of them fail with ValueError.

I don't know enough about threading module to say if this change should be made.

----------
nosy: +andrei.avk

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45311>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:22:32 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Wed, 20 Oct 2021 14:22:32 +0000
Subject: [issue45311] Threading Semaphore and BoundedSemaphore release method
 implementation improvement
In-Reply-To: <1632835923.15.0.15993520004.issue45311@roundup.psfhosted.org>
Message-ID: <1634739752.04.0.4058010669.issue45311@roundup.psfhosted.org>


Change by Andrei Kulakov <andrei.avk at gmail.com>:


----------
nosy: +kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45311>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:25:06 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 20 Oct 2021 14:25:06 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <1b8c02e2-987c-66e1-9bce-a637a557b8b3@egenix.com>
Message-ID: <CALFfu7COWtRcKv-_rKDbb8MOpA0__0MWti5dLXF3macrN1Vb8w@mail.gmail.com>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

On Wed, Oct 20, 2021 at 6:01 AM Marc-Andre Lemburg
<report at bugs.python.org> wrote:
> I have PyRun mostly working with Python 3.9.
> ...
> No changes were necessary to Tools/freeze/.

Great!  Thanks for getting to that so quickly.  Are you going to take
a look at 3.10 after you're happy with 3.9?

> BTW: Why is test_embed even used for the PGO target ?

Perhaps I've missed something, but I'm not clear on why PGO would be a
problem for test_embed.  Are you talking about a specific test in
test_embed?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:25:32 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 14:25:32 +0000
Subject: [issue45477] configure script cannot detect float word ordering on
 linux
In-Reply-To: <1634246393.25.0.871269149475.issue45477@roundup.psfhosted.org>
Message-ID: <1634739932.87.0.614696599603.issue45477@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

One of your optimization flags breaks the AX_C_FLOAT_WORDS_BIGENDIAN macro. The optimized object file does not have seesnoon in its data section.

$ objdump -x conftest.o conftest_unoptimized.o 

conftest.o:     file format elf64-x86-64
conftest.o
architecture: i386:x86-64, flags 0x00000011:
HAS_RELOC, HAS_SYMS
start address 0x0000000000000000

Sections:
Idx Name          Size      VMA               LMA               File off  Algn
  0 __ildata      000004eb  0000000000000000  0000000000000000  00000118  2**0
                  CONTENTS, READONLY, EXCLUDE
  1 .data         00000008  0000000000000000  0000000000000000  00000608  2**3
                  CONTENTS, ALLOC, LOAD, RELOC, DATA
  2 .note.GNU-stack 00000000  0000000000000000  0000000000000000  00000610  2**0
                  CONTENTS, READONLY
SYMBOL TABLE:
0000000000000000 l    df *ABS*  0000000000000000 conftest.c
0000000000000000 l    d  __ildata       0000000000000000 __ildata
0000000000000000 l    d  .data  0000000000000000 .data
0000000000000000 l    d  .note.GNU-stack        0000000000000000 .note.GNU-stack
0000000000000000 g     O .data  0000000000000008 d
0000000000000000         *UND*  0000000000000000 __must_be_linked_with_icc_or_xild


RELOCATION RECORDS FOR [.data]:
OFFSET           TYPE              VALUE 
0000000000000000 R_X86_64_64       __must_be_linked_with_icc_or_xild



conftest_unoptimized.o:     file format elf64-x86-64
conftest_unoptimized.o
architecture: i386:x86-64, flags 0x00000010:
HAS_SYMS
start address 0x0000000000000000

Sections:
Idx Name          Size      VMA               LMA               File off  Algn
  0 .data         00000008  0000000000000000  0000000000000000  000000f8  2**3
                  CONTENTS, ALLOC, LOAD, DATA
  1 .bss          00000000  0000000000000000  0000000000000000  00000100  2**2
                  ALLOC
  2 .text         00000000  0000000000000000  0000000000000000  00000100  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  3 .note.GNU-stack 00000000  0000000000000000  0000000000000000  00000100  2**0
                  CONTENTS, READONLY
SYMBOL TABLE:
0000000000000000 l    df *ABS*  0000000000000000 conftest.c
0000000000000000 l    d  .data  0000000000000000 .data
0000000000000000 l    d  .bss   0000000000000000 .bss
0000000000000000 l    d  .text  0000000000000000 .text
0000000000000000 l    d  .note.GNU-stack        0000000000000000 .note.GNU-stack
0000000000000000 g     O .data  0000000000000008 d



$ readelf -x .data conftest.o conftest_unoptimized.o 

File: conftest.o

Hex dump of section '.data':
 NOTE: This section has relocations against it, but these have NOT been applied to this dump.
  0x00000000 00000000 00000000                   ........


File: conftest_unoptimized.o

Hex dump of section '.data':
  0x00000000 73656573 6e6f6f6e                   seesnoon

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45477>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:27:19 2021
From: report at bugs.python.org (Joe Wells)
Date: Wed, 20 Oct 2021 14:27:19 +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: <1634740039.25.0.280235387937.issue43656@roundup.psfhosted.org>


Joe Wells <bugs-python-org at jbw.link> added the comment:

Andrei, thanks very much for the pointer to bug/issue https://bugs.python.org/issue39228.  I had not noticed the earlier comment by Irit pointing to that bug.  (Is there some way to merge bugs so that someone visiting one of the bugs will see the merged stream of comments?)

The remarks in that bug are precisely why my recommended fix has this line:

                    d[k] = '<repr failed for ' + object.__repr__(v) + '>'

instead of this:

                    d[k] = object.__repr__(v)

Does this not meet the concern expressed there?  Something that would more thoroughly meet that would be the following:

        if locals:
            d = {}
            self.locals = d
            for k, v in locals.items():
                try:
                    d[k] = repr(v)
                except Exception as e:
                    d[k] = '<repr failed with exception ' + object.__repr__(e) + ' for object ' + object.__repr__(v) + '>'
        else:
            self.locals = None

I use object.__repr__ instead of repr because when repr(v) has already failed it is likely that repr(e) on the exception e would also be likely to fail.  Although we could also try repr(e) first to see if it raises an exception.

Your suggested reaction to this bug (documenting Python best practice) is something that should be done regardless.  I completely agree.  Unfortunately, better documentation of how to write good Python does not address the point of this bug which is that debugging tools should not fail when used to debug buggy code.  The purpose of a debugging tool is to help with badly written code, not to work only with well written code.  Right now the capture_locals=True feature is not safe to use without wrapping it with an exception handler.  As a result of this bug, I have been forced to rewrite this:

def format_exception_chunks(exception):
    return (traceback.TracebackException.from_exception(exception, capture_locals=True).format())

to instead be this:

def format_exception_chunks(exception):
    try:
        tbe = (traceback.TracebackException
               . from_exception(exception, capture_locals=True))
        return tbe.format()
    except Exception:
        pass
    # the traceback module fails to catch exceptions that occur when
    # formatting local variables' values, so we retry without
    # requesting the local variables.
    try:
        tbe = traceback.TracebackException.from_exception(exception)
        return ('WARNING: Exceptions were raised while trying to'
                ' format exception traceback with local variable'
                ' values,\n'
                'so the exception traceback was formatted without'
                ' local variable values.\n',
                *tbe.format())
    except Exception:
        return ('WARNING: Exceptions were raised while trying to format'
                ' exception traceback,\n'
                'so no formatted traceback information is being'
                ' provided.\n',)

My argument is that it is better to fix the bug once in traceback.py instead of every user of the capture_locals=True feature having to discover the hard way (with hours of painful bug investigation) that they need to write lots of exception handling and bug workarounds around their use of the capture_locals=True feature.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:31:02 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 14:31:02 +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: <1634740262.67.0.52155422751.issue45436@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset b8dbb3a7f96718dddb8bed31130f421316213dc5 by Miss Islington (bot) in branch '3.10':
bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077) (GH-29080)
https://github.com/python/cpython/commit/b8dbb3a7f96718dddb8bed31130f421316213dc5


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:35:36 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 20 Oct 2021 14:35:36 +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: <1634740536.83.0.636426025704.issue45436@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27365
pull_request: https://github.com/python/cpython/pull/29003

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:36:12 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 20 Oct 2021 14:36:12 +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: <1634740572.6.0.329771414425.issue45436@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27366
pull_request: https://github.com/python/cpython/pull/28986

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:36:37 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 14:36:37 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634740597.14.0.443034826202.issue45229@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 8d6740f489fca67a44de165d29d9e0ad86285779 by Serhiy Storchaka in branch 'main':
bpo-45229: Make doctest tests discoverable (GH-28986)
https://github.com/python/cpython/commit/8d6740f489fca67a44de165d29d9e0ad86285779


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:36:37 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 20 Oct 2021 14:36:37 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634740597.33.0.404732132598.issue45229@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
message_count: 30.0 -> 31.0
pull_requests: +27367
pull_request: https://github.com/python/cpython/pull/29095

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:36:42 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 20 Oct 2021 14:36:42 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634740602.05.0.16995037864.issue45229@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27368
pull_request: https://github.com/python/cpython/pull/29096

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:36:49 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Wed, 20 Oct 2021 14:36:49 +0000
Subject: [issue40777] _datetimemodule.c:3328:16: error: initializer element is
 not constant
In-Reply-To: <1590486941.4.0.263574761351.issue40777@roundup.psfhosted.org>
Message-ID: <1634740609.76.0.971416273068.issue40777@roundup.psfhosted.org>


Change by Petr Viktorin <encukou at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40777>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:38:02 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Wed, 20 Oct 2021 14:38:02 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <CALFfu7COWtRcKv-_rKDbb8MOpA0__0MWti5dLXF3macrN1Vb8w@mail.gmail.com>
Message-ID: <6986df3a-f5cf-786c-6483-20440d7311b2@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 20.10.2021 16:25, Eric Snow wrote:
> 
> Eric Snow <ericsnowcurrently at gmail.com> added the comment:
> 
> On Wed, Oct 20, 2021 at 6:01 AM Marc-Andre Lemburg
> <report at bugs.python.org> wrote:
>> I have PyRun mostly working with Python 3.9.
>> ...
>> No changes were necessary to Tools/freeze/.
> 
> Great!  Thanks for getting to that so quickly.  Are you going to take
> a look at 3.10 after you're happy with 3.9?

Yes, 3.10 is next, once I have 3.9 ironed out. And then I'll give
3.11 a try.

>> BTW: Why is test_embed even used for the PGO target ?
> 
> Perhaps I've missed something, but I'm not clear on why PGO would be a
> problem for test_embed.  Are you talking about a specific test in
> test_embed?

Sorry, I wasn't clear. PGO is not a problem for test_embed. I just
wonder why the test_embed tests are run for creating the PGO profile
files. test_embed is far from being a regular work load for Python
applications.

Well, I guess using the test suite for PGO is questionable anyway.
It's just that we don't have anything else handy to create those
profiles at Python build time :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:44:16 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 14:44:16 +0000
Subject: [issue40645] Use OpenSSL's HMAC API
In-Reply-To: <1589641291.33.0.635001105595.issue40645@roundup.psfhosted.org>
Message-ID: <1634741056.89.0.014906541669.issue40645@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40645>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:46:13 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Wed, 20 Oct 2021 14:46:13 +0000
Subject: [issue44351] distutils.sysconfig.parse_makefile() regression in
 Python 3.10
In-Reply-To: <1623178801.93.0.611041567501.issue44351@roundup.psfhosted.org>
Message-ID: <1634741173.1.0.937568233699.issue44351@roundup.psfhosted.org>


Change by Petr Viktorin <encukou at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44351>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:47:17 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Wed, 20 Oct 2021 14:47:17 +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: <1634741237.83.0.756967290163.issue43656@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Joe: I understand your point but my concern is that this creates an impression for the users that Python is tolerant of failing __repr__'s, while that's not the case at all.

I agree that if StackSummary was only used for interactive debugging, there would be a stronger case for it to nicely handle failed __repr__; but I think the more important use for it is non-interactive.

The argument on the other issue was that exceptions should bubble up and we can't assume that user wants them silenced, that's the decision for user to make. I agree with that; -- and your proposed change does not address it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:49:14 2021
From: report at bugs.python.org (Ken Jin)
Date: Wed, 20 Oct 2021 14:49:14 +0000
Subject: [issue45311] Threading Semaphore and BoundedSemaphore release method
 implementation improvement
In-Reply-To: <1632835923.15.0.15993520004.issue45311@roundup.psfhosted.org>
Message-ID: <1634741354.86.0.117364250583.issue45311@roundup.psfhosted.org>


Change by Ken Jin <kenjin4096 at gmail.com>:


----------
nosy: +pitrou, serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45311>
_______________________________________

From report at bugs.python.org  Wed Oct 20 10:57:34 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 20 Oct 2021 14:57:34 +0000
Subject: [issue45464] TypeError when inheriting from both OSError and
 AttributeError
In-Reply-To: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
Message-ID: <1634741854.9.0.967710338572.issue45464@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

More specific would be "Inheriting from multiple exceptions may fail due to instance layout conflicts. Such conflicts may depend on the Python version."  This would effectively say "Don't bother reporting layout conflicts -- we know about them and they are not bugs." while not discouraging reports of other problems.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45464>
_______________________________________

From report at bugs.python.org  Wed Oct 20 11:08:43 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 20 Oct 2021 15:08:43 +0000
Subject: [issue44525] Implement CALL_FUNCTION adaptive interpreter
 optimizations
In-Reply-To: <1624890138.2.0.824780513801.issue44525@roundup.psfhosted.org>
Message-ID: <1634742523.77.0.650115863047.issue44525@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:


New changeset 8863a0fcc5f04ab7c3428e713917831f9b1deb18 by Mark Shannon in branch 'main':
bpo-44525: Specialize simple Python calls. (GH-29033)
https://github.com/python/cpython/commit/8863a0fcc5f04ab7c3428e713917831f9b1deb18


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44525>
_______________________________________

From report at bugs.python.org  Wed Oct 20 11:11:42 2021
From: report at bugs.python.org (E. Paine)
Date: Wed, 20 Oct 2021 15:11:42 +0000
Subject: [issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11
In-Reply-To: <1633984027.59.0.32532195896.issue45436@roundup.psfhosted.org>
Message-ID: <1634742702.92.0.0601611796435.issue45436@roundup.psfhosted.org>


E. Paine <xepaine13 at gmail.com> added the comment:

I suspect this is a bug with Tk. `-compound` accepting the empty string is not documented and the valid Ttk compound values listed in the source do not include it (https://github.com/tcltk/tk/blob/57451473/generic/ttk/ttkInit.c#L34-L37 - ignore the NULL at the end, this is required by `Tcl_GetIndexFromObjStruct`: https://github.com/tcltk/tcl/blob/e78868d6/generic/tclIndexObj.c#L187-L191). I therefore assume it must be a regression with one of the changes that was made to `Ttk_GetCompoundFromObj` between 8.6.10 and 8.6.11. I will investigate further and report it to the Tk team.

I have not fully investigated the issue with `test_configure_type` reported here and in bpo-43139, but again, the empty string is not documented as being valid.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Wed Oct 20 11:15:36 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 20 Oct 2021 15:15:36 +0000
Subject: [issue37295] Possible optimizations for math.comb()
In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org>
Message-ID: <1634742936.72.0.963275877317.issue37295@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

And with optimization of math.perm() for small arguments:

$ ./python -m pyperf timeit -s 'from math import perm' 'perm(30, 14)'
Mean +- std dev: 524 ns +- 43 ns -> 66.7 ns +- 4.6 ns: 7.85x faster

$ ./python -m pyperf timeit -s 'from math import perm' 'perm(31, 14)'
Mean +- std dev: 522 ns +- 26 ns -> 127 ns +- 6 ns: 4.09x faster

$ ./python -m pyperf timeit -s 'from math import perm' 'perm(568, 7)'
Mean +- std dev: 318 ns +- 19 ns -> 62.9 ns +- 3.7 ns: 5.05x faster

$ ./python -m pyperf timeit -s 'from math import perm' 'perm(569, 7)'
Mean +- std dev: 311 ns +- 14 ns -> 114 ns +- 7 ns: 2.73x faster

$ ./python -m pyperf timeit -s 'from math import perm' 'perm(63, 31)'
Mean +- std dev: 1.36 us +- 0.08 us -> 263 ns +- 14 ns: 5.17x faster

$ ./python -m pyperf timeit -s 'from math import perm' 'perm(111, 15)'
Mean +- std dev: 595 ns +- 27 ns -> 126 ns +- 7 ns: 4.71x faster

----------
versions: +Python 3.8, Python 3.9 -Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37295>
_______________________________________

From report at bugs.python.org  Wed Oct 20 11:18:15 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 20 Oct 2021 15:18:15 +0000
Subject: [issue33277] Deprecate __loader__, __package__,
 and __cached__ on modules
In-Reply-To: <1523656102.14.0.682650639539.issue33277@psf.upfronthosting.co.za>
Message-ID: <1634743095.12.0.425981888156.issue33277@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

(Not sure how I missed this issue.)

The spec identifies how a module should be loaded (or how it was loaded and should be reloaded).  We should be careful to preserve that identify and not invite uses to modify the spec after (or while) the module is loaded.  PEP 451 talks about the difference a little, but I'm pretty sure it came up in more detail in discussions about the PEP at that time.

IIRC, originally PEP 451 made ModuleSpec immutable and there was a mutable version of it for use by finders that had a mechanism to "freeze" it.  (We dialed that back because it was mostly unnecessary extra complexity.)

As to the module attrs, I agree about which are unnecessary and which must stay (__name__, __file__, __path__).  __name__ and spec.name don't always match (e.g. for __main__).  Likewise for __file__ and spec.origin (e.g. frozen stdlib modules).

Regarding __path__, it is the only attr that has an impact on import behavior (other than reload) after the module is loaded, e.g. when finding submodules.  As noted, users sometimes modify it to affect that behavior. 
 We want the spec to preserve the information used when the module was loaded, so __path__ and how it's used by the import machinery should stay the same.

FWIW, I've also seen cases where __loader__ is overwritten to facilitate different reload behavior, but don't remember if I've seen that lately (and don't remember offhand if that even worked after PEP 451).  Regardless, I'm not convinced some other solution wouldn't be better to address that use case if needed (e.g. add "reload_loader" to ModuleSpec with this use case in mind).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33277>
_______________________________________

From report at bugs.python.org  Wed Oct 20 11:18:42 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 15:18:42 +0000
Subject: [issue45536] Verify OpenSSL APIs in configure script
In-Reply-To: <1634726424.89.0.265888702362.issue45536@roundup.psfhosted.org>
Message-ID: <1634743122.82.0.05756780912.issue45536@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:


New changeset 81520fe677d15cc7f9af5140bc5f9eca8409ad90 by Christian Heimes in branch 'main':
bpo-45536: Check OpenSSL APIs in configure (GH-29088)
https://github.com/python/cpython/commit/81520fe677d15cc7f9af5140bc5f9eca8409ad90


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45536>
_______________________________________

From report at bugs.python.org  Wed Oct 20 11:18:43 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 20 Oct 2021 15:18:43 +0000
Subject: [issue45536] Verify OpenSSL APIs in configure script
In-Reply-To: <1634726424.89.0.265888702362.issue45536@roundup.psfhosted.org>
Message-ID: <1634743123.02.0.227379201439.issue45536@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +27369
pull_request: https://github.com/python/cpython/pull/29099

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45536>
_______________________________________

From report at bugs.python.org  Wed Oct 20 11:28:20 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 20 Oct 2021 15:28:20 +0000
Subject: [issue33277] Deprecate __loader__, __package__,
 and __cached__ on modules
In-Reply-To: <1523656102.14.0.682650639539.issue33277@psf.upfronthosting.co.za>
Message-ID: <1634743700.56.0.0230444450409.issue33277@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

+1 on a proxy (with read-only attrs) for everything but __name__, __file__, and __path__ (which can all be different than the spec).  Ideally __name__ and __file__ would be read-only too but they'd have to be stored somewhere other than the spec (e.g. on the proxy or module object).  __path__ could be similarly proxied but would at the least have to be mutable.

The nice thing about such attrs is they wouldn't show up in the module's __dict__, assuming they are properties.

The only catch I see is where the module's code sets one of the attrs.  Would the proxy (or import machinery) pick those up, or maybe for some of them emit a warning or fail?

We could also skip the proxy and add the properties to ModuleType directly, no?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33277>
_______________________________________

From report at bugs.python.org  Wed Oct 20 11:32:49 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 20 Oct 2021 15:32:49 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <6986df3a-f5cf-786c-6483-20440d7311b2@egenix.com>
Message-ID: <CALFfu7Cp7RYnHkz0opD_XCwZTb6Qv2hn0_1pCsXPBLbNSKBc3w@mail.gmail.com>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

On Wed, Oct 20, 2021 at 8:38 AM Marc-Andre Lemburg
<report at bugs.python.org> wrote:
> Yes, 3.10 is next, once I have 3.9 ironed out. And then I'll give 3.11 a try.

Thanks!

> Sorry, I wasn't clear. PGO is not a problem for test_embed. I just
> wonder why the test_embed tests are run for creating the PGO profile
> files. test_embed is far from being a regular work load for Python
> applications.
>
> Well, I guess using the test suite for PGO is questionable anyway.
> It's just that we don't have anything else handy to create those
> profiles at Python build time :-)

Ah, that makes sense.  I expect we don't do anything more complex than
run the whole suite.  There have been discussions in the past about
alternate workloads, but clearly nothing came of that.  I suppose a
comprehensive suite of high-level, (relatively) long-running
benchmarks that cover the community's primary Python workloads would
be ideal, but we don't have anything like that (yet).  I suppose this
is something we could discuss elsewhere. :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Wed Oct 20 11:46:44 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 20 Oct 2021 15:46:44 +0000
Subject: [issue45536] Verify OpenSSL APIs in configure script
In-Reply-To: <1634726424.89.0.265888702362.issue45536@roundup.psfhosted.org>
Message-ID: <1634744804.05.0.0683410893109.issue45536@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 5537b9f10510735447bea81079ac586f46decf20 by Miss Islington (bot) in branch '3.10':
bpo-45536: Check OpenSSL APIs in configure (GH-29088)
https://github.com/python/cpython/commit/5537b9f10510735447bea81079ac586f46decf20


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45536>
_______________________________________

From report at bugs.python.org  Wed Oct 20 11:47:53 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 15:47:53 +0000
Subject: [issue45536] Verify OpenSSL APIs in configure script
In-Reply-To: <1634726424.89.0.265888702362.issue45536@roundup.psfhosted.org>
Message-ID: <1634744873.59.0.778208685633.issue45536@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45536>
_______________________________________

From report at bugs.python.org  Wed Oct 20 11:52:30 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Wed, 20 Oct 2021 15:52:30 +0000
Subject: [issue30076] Opcode names BUILD_MAP_UNPACK_WITH_CALL and
 BUILD_TUPLE_UNPACK_WITH_CALL are too long
In-Reply-To: <1492277239.5.0.348724747458.issue30076@psf.upfronthosting.co.za>
Message-ID: <1634745150.76.0.594894069145.issue30076@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Sure.

----------
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30076>
_______________________________________

From report at bugs.python.org  Wed Oct 20 11:52:58 2021
From: report at bugs.python.org (Jirka Marsik)
Date: Wed, 20 Oct 2021 15:52:58 +0000
Subject: [issue45539] Negative lookaround assertions sometimes leak capture
 groups
Message-ID: <1634745178.86.0.213773355439.issue45539@roundup.psfhosted.org>


New submission from Jirka Marsik <jiri.marsik at oracle.com>:

When you have capture groups inside a negative lookaround assertion, the strings captured by those capture groups can sometimes survive the failure of the assertion and feature in the returned Match object.

Here it is illustrated with lookbehinds and lookaheads:

>>> re.search(r"(?<!(a)c)de", "abde").group(1)
'a'
>>> re.search(r"(?!(a)c)ab", "ab").group(1)
'a'

Even though the search for the expression '(a)c' fails when trying to match 'c', the string 'a' is still reported as having been successfully matched by capture group 1. The expected behavior would be for the capture group 1 to not have a match.

Because of the following reasons, I believe this behavior is not intentional and is the result of Python not cleaning up after the asserted subexpression fails (e.g. by running the asserted subexpression in a new stack frame).

1) This behavior is not being systematically enforced.
   We can observe this behavior only in certain cases. Modifying the expression to use the branching operator `|` inside the asserted subexpression leads to the expected behavior.

>>> re.search(r"(?<!(a)c|(a)d)de", "abde").group(1) is None
True
>>> re.search(r"(?!(a)c|(a)d)ab", "ab").group(1) is None
True

2) Other languages do not leak capture groups from negative lookarounds.

   Node.js (ECMAScript):

> /(?<!(a)c)de/.exec("abde")[1]
undefined
> /(?!(a)c)ab/.exec("ab")[1]
undefined
> /(?<!(a)c|(a)d)de/.exec("abde")[1]
undefined
> /(?!(a)c|(a)d)ab/.exec("ab")[1]
undefined

   MRI (Ruby):

irb(main):001:0> /(?<!(a)c)de/.match("abde")[1]
<unsupported>
irb(main):002:0> /(?!(a)c)ab/.match("ab")[1]
=> #<MatchData "ab" 1:nil>
irb(main):003:0> /(?<!(a)c|(a)d)de/.match("abde")[1]
<unsupported>
irb(main):004:0> /(?!(a)c|(a)d)ab/.match("ab")[1]
=> #<MatchData "ab" 1:nil 2:nil>

  JShell (Java):

jshell> Matcher m = java.util.regex.Pattern.compile("(?<!(a)c)de").matcher("abde")
jshell> m.find()
jshell> m.group(1)
$3 ==> null
jshell> Matcher m = java.util.regex.Pattern.compile("(?<!(a)c|(a)d)de").matcher("abde")
jshell> m.find()
jshell> m.group(1)
$6 ==> null
jshell> Matcher m = java.util.regex.Pattern.compile("(?!(a)c)ab").matcher("ab")
m ==> java.util.regex.Matcher[pattern=(?!(a)c)ab region=0,2 lastmatch=]
jshell> m.find()
jshell> m.group(1)
$9 ==> null
jshell> Matcher m = java.util.regex.Pattern.compile("(?!(a)c|(a)d)ab").matcher("ab")
m ==> java.util.regex.Matcher[pattern=(?!(a)c|(a)d)ab region=0,2 lastmatch=]
jshell> m.find()
jshell> m.group(1)
$12 ==> null

3) Not leaking capture groups from negative lookarounds is symmetric to how capture groups are treated in failed matches.
   When regular expression engines fail to match a regular expression, they do not provide a partial match object that contains the state of capture groups at the time when when the matcher failed. Instead, the state of the matcher is discarded and some bottom value is returned (None, null or undefined). Similarly, one would expect nested subexpressions to behave the same way, so that capture groups from failed match attempts are discarded.

----------
components: Regular Expressions
messages: 404479
nosy: ezio.melotti, jirkamarsik, mrabarnett
priority: normal
severity: normal
status: open
title: Negative lookaround assertions sometimes leak capture groups
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45539>
_______________________________________

From report at bugs.python.org  Wed Oct 20 11:57:30 2021
From: report at bugs.python.org (Ken Jin)
Date: Wed, 20 Oct 2021 15:57:30 +0000
Subject: [issue42280] The list of standard generic collections is incomplete
In-Reply-To: <1604688598.04.0.446732481114.issue42280@roundup.psfhosted.org>
Message-ID: <1634745450.99.0.570720949714.issue42280@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

I concur with Guido to close this.

----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42280>
_______________________________________

From report at bugs.python.org  Wed Oct 20 11:59:52 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Wed, 20 Oct 2021 15:59:52 +0000
Subject: [issue42115] Caching infrastructure for the evaluation loop:
 specialised opcodes
In-Reply-To: <1603336898.74.0.366564812208.issue42115@roundup.psfhosted.org>
Message-ID: <1634745592.2.0.414938366916.issue42115@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Closing this as we have been implementing this idea already with the adaptative interpreter

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42115>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:02:12 2021
From: report at bugs.python.org (Ken Jin)
Date: Wed, 20 Oct 2021 16:02:12 +0000
Subject: [issue43257] get_type_hints evaluates class variables before type
 hints
In-Reply-To: <1613674389.7.0.662545627223.issue43257@roundup.psfhosted.org>
Message-ID: <1634745732.9.0.247289211268.issue43257@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

Rejecting this since annotations are expressions that have side effects (so anti-patterns are discouraged). If you *really* want this, I suspect str: "str"="asdf" or using `from __future__ import annotations` will work.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43257>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:03:49 2021
From: report at bugs.python.org (Ken Jin)
Date: Wed, 20 Oct 2021 16:03:49 +0000
Subject: [issue44156] [subinterpreters] Replace static string caches with
 subinterpreter-compatible alternatives
In-Reply-To: <1621244065.25.0.526859274821.issue44156@roundup.psfhosted.org>
Message-ID: <1634745829.24.0.87689825083.issue44156@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

I'll open separate issues for other similar changes.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44156>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:05:03 2021
From: report at bugs.python.org (youknowone)
Date: Wed, 20 Oct 2021 16:05:03 +0000
Subject: [issue45532] Replace 'default' with 'main' as default in sys.version
In-Reply-To: <1634686813.85.0.311990959144.issue45532@roundup.psfhosted.org>
Message-ID: <1634745903.56.0.853528821396.issue45532@roundup.psfhosted.org>


Change by youknowone <jeong at youknowone.org>:


----------
keywords: +patch
pull_requests: +27370
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/29100

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45532>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:08:01 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 16:08:01 +0000
Subject: [issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) <=
 sizeof(long)
In-Reply-To: <1202068724.99.0.704404319493.issue2005@psf.upfronthosting.co.za>
Message-ID: <1634746081.76.0.139299698688.issue2005@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

The issue has been languishing for 8 years. I'm closing it as "fixed".

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2005>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:11:45 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 16:11:45 +0000
Subject: [issue18737] Get virtual subclasses of an ABC
In-Reply-To: <1376485993.36.0.633495217077.issue18737@psf.upfronthosting.co.za>
Message-ID: <1634746305.78.0.829418546532.issue18737@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

My feature request has been around for 8 years without any progress. I don't even recall why I needed the feature in the first place.

----------
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18737>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:14:35 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 16:14:35 +0000
Subject: [issue19259] Provide Python implementation of
 operator.compare_digest()
In-Reply-To: <1381750256.83.0.263124716214.issue19259@psf.upfronthosting.co.za>
Message-ID: <1634746475.81.0.460613880416.issue19259@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

There is no agreement where to put the function. In the past seven years nobody else has requested a pure Python implementation, too. I'm closing my feature request as rejected.

----------
resolution:  -> rejected
stage: needs patch -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19259>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:15:24 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 16:15:24 +0000
Subject: [issue27292] Warn users that os.urandom() prior to 3.6 can return
 insecure values
In-Reply-To: <1465639674.0.0.865291084778.issue27292@psf.upfronthosting.co.za>
Message-ID: <1634746524.9.0.146094757925.issue27292@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

2.7 and 3.5 are no longer supported

----------
nosy: +christian.heimes
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27292>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:16:56 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 16:16:56 +0000
Subject: [issue17405] Add _Py_memset_s() to securely clear memory
In-Reply-To: <1363107252.29.0.782882608.issue17405@psf.upfronthosting.co.za>
Message-ID: <1634746616.83.0.251337384064.issue17405@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

There haven't been any activity on this feature request for eight years. I'm no longer interested to implement my feature request. Closing...

----------
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17405>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:18:20 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 20 Oct 2021 16:18:20 +0000
Subject: [issue37505] Early auditing broken
In-Reply-To: <1562328479.24.0.514484433383.issue37505@roundup.psfhosted.org>
Message-ID: <1634746700.53.0.599175985169.issue37505@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
versions: +Python 3.10, Python 3.11 -Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37505>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:24:00 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Wed, 20 Oct 2021 16:24:00 +0000
Subject: [issue42092] test_host_resolution_bad_address does not always fail as
 expected
In-Reply-To: <1603142542.04.0.682089318313.issue42092@roundup.psfhosted.org>
Message-ID: <1634747040.56.0.416913278634.issue42092@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

Rule #1 for home users:  Never use your ISPs DNS.  Always configure a reputable one in your router.  If you can't control your router, configure your computer to ignore the router's DNS.

Classic best in breed non-ISP servers exist: 8.8.8.8 (google), 9.9.9.9 (quad9), 1.1.1.1 (cloudflare?), etc.

ISPs often monetize DNS in nefarious ways.  If they control the router they can even decide to have it subvert those settings as DNS is unencrypted UDP so it can be redirected/intercepted/modified.  Avoiding that requires using DoH or DoT (DNS over HTTPS/TLS) but configuring that is way beyond what I'm capable of quipping in a box this small. :)

----------
nosy: +gregory.p.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42092>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:24:43 2021
From: report at bugs.python.org (Hai Shi)
Date: Wed, 20 Oct 2021 16:24:43 +0000
Subject: [issue44532] multi subinterpreters use _PyStructSequence_InitType
 failed.
In-Reply-To: <1624949622.19.0.942644638958.issue44532@roundup.psfhosted.org>
Message-ID: <1634747083.85.0.751482109631.issue44532@roundup.psfhosted.org>


Hai Shi <shihai1991 at 126.com> added the comment:

> In _PyStructSequence_InitType, it will check type is initialized.
  It's a internal C API :)

> when type already been initialized, should return 0 rather than throw exception.
  The another solution is to check the type status before calling _PyStructSequence_InitType().

----------
nosy: +shihai1991

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44532>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:28:15 2021
From: report at bugs.python.org (Ken Jin)
Date: Wed, 20 Oct 2021 16:28:15 +0000
Subject: [issue42115] Caching infrastructure for the evaluation loop:
 specialised opcodes
In-Reply-To: <1603336898.74.0.366564812208.issue42115@roundup.psfhosted.org>
Message-ID: <1634747295.32.0.165126484203.issue42115@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

For future reference, the following opcodes specialized via the PEP 659 specializing adaptive interpreter:

- LOAD_GLOBAL Issue44338
- LOAD_ATTR Issue44337
- STORE_ATTR Issue44826 (2% faster pyperformance)
- BINARY_SUBSCR Issue26280 (2% faster pyperformance)
- LOAD_METHOD Issue44889 (2% faster pyperformance)
- CALL_FUNCTION Issue44525 (2% faster pyperformance)
- BINARY_ADD Issue44945 (1% faster pyperformance)
- BINARY_MULTIPLY Issue45367 (10% faster nbody, 0% faster pyperformance)

Combined instructions:
Issue44900 (2% faster pyperformance)

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42115>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:32:36 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 16:32:36 +0000
Subject: [issue41374] socket.TCP_* no longer available with cygwin 3.1.6+
In-Reply-To: <1595490704.07.0.649120374256.issue41374@roundup.psfhosted.org>
Message-ID: <1634747556.55.0.538582635185.issue41374@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41374>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:34:15 2021
From: report at bugs.python.org (Hai Shi)
Date: Wed, 20 Oct 2021 16:34:15 +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: <1634747655.75.0.183521598856.issue45113@roundup.psfhosted.org>


Hai Shi <shihai1991 at 126.com> added the comment:

>Ah, sorry, I overlooked the flags.
 It's Okay.

>This does beg the question: what else from PyType_Spec will be needed?
I guess we don't want to allow additional slots/methods.
 +1.

>Also, note that converting the stdlib to heap types is suspended, pending a PEP.
 Can I do something for this pending PEP?

> The Py_TPFLAGS_DISALLOW_INSTANTIATION is very specific; do you have other examples that need this?
  I only find this bpo-44532 :( I guess the outside user will use it MAYBE.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:35:05 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Wed, 20 Oct 2021 16:35:05 +0000
Subject: [issue45315] `PyType_FromSpec` does not copy the name
In-Reply-To: <1632861906.82.0.496996210358.issue45315@roundup.psfhosted.org>
Message-ID: <1634747705.33.0.409999972465.issue45315@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

> the simplest solution is calling `type_set_name`, even if that runs some unnecessary checks.

Unfortunately this won't work, because it sets ht_name to the same value as tp_name. For historical reasons, the two can be different (and often are) for types created with PyType_From*Spec*.

I haven't found a way to fix this issue without adding yet another pointer to the PyHeapTypeObject struct.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45315>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:37:57 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Wed, 20 Oct 2021 16:37:57 +0000
Subject: [issue45315] `PyType_FromSpec` does not copy the name
In-Reply-To: <1632861906.82.0.496996210358.issue45315@roundup.psfhosted.org>
Message-ID: <1634747877.89.0.291723488425.issue45315@roundup.psfhosted.org>


Change by Petr Viktorin <encukou at gmail.com>:


----------
keywords: +patch
pull_requests: +27371
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29103

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45315>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:51:18 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 16:51:18 +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: <1634748678.09.0.467689441145.issue45494@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 88f4ec88e282bf861f0af2d237e9fe28fbc8deac by ?ukasz Langa in branch '3.9':
[3.9] bpo-45494: Fix parser crash when reporting errors involving invalid continuation characters (GH-28993) (#29071)
https://github.com/python/cpython/commit/88f4ec88e282bf861f0af2d237e9fe28fbc8deac


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45494>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:52:31 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 16:52:31 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634748751.21.0.558694010198.issue45229@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 65de808811f93793599209f74bb1bab3ad399b17 by Miss Islington (bot) in branch '3.10':
bpo-45229: Make doctest tests discoverable (GH-28986) (GH-29095)
https://github.com/python/cpython/commit/65de808811f93793599209f74bb1bab3ad399b17


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:52:45 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 16:52:45 +0000
Subject: [issue45229] Always use unittest for collecting tests in regrtests
In-Reply-To: <1631863872.14.0.108756439349.issue45229@roundup.psfhosted.org>
Message-ID: <1634748765.86.0.986176293483.issue45229@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 919268316582c6ac47960c2e5dd2ee1682371494 by Miss Islington (bot) in branch '3.9':
bpo-45229: Make doctest tests discoverable (GH-28986) (GH-29096)
https://github.com/python/cpython/commit/919268316582c6ac47960c2e5dd2ee1682371494


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45229>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:53:29 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 16:53:29 +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: <1634748809.08.0.432025681971.issue45494@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks for the fix, Pablo! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45494>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:54:36 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 16:54:36 +0000
Subject: [issue45464] TypeError when inheriting from both OSError and
 AttributeError
In-Reply-To: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
Message-ID: <1634748876.29.0.115225223206.issue45464@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset dff0b713436e286bb1afdd7c6f3093c8e8db16dd by ?ukasz Langa in branch 'main':
bpo-45464: [doc] Explain that subclassing multiple exceptions is fragile (GH-29094)
https://github.com/python/cpython/commit/dff0b713436e286bb1afdd7c6f3093c8e8db16dd


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45464>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:54:39 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 20 Oct 2021 16:54:39 +0000
Subject: [issue45464] TypeError when inheriting from both OSError and
 AttributeError
In-Reply-To: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
Message-ID: <1634748879.23.0.185734512544.issue45464@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +27372
pull_request: https://github.com/python/cpython/pull/29104

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45464>
_______________________________________

From report at bugs.python.org  Wed Oct 20 12:54:43 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 20 Oct 2021 16:54:43 +0000
Subject: [issue45464] TypeError when inheriting from both OSError and
 AttributeError
In-Reply-To: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
Message-ID: <1634748883.09.0.624295246357.issue45464@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27373
pull_request: https://github.com/python/cpython/pull/29105

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45464>
_______________________________________

From report at bugs.python.org  Wed Oct 20 13:09:12 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 20 Oct 2021 17:09:12 +0000
Subject: [issue45532] Replace 'default' with 'main' as default in sys.version
In-Reply-To: <1634686813.85.0.311990959144.issue45532@roundup.psfhosted.org>
Message-ID: <1634749752.84.0.0678792499013.issue45532@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset d2cd5eef0c3fc0431bfe3fc24b4c020ebfcf8aad by Jeong YunWon in branch 'main':
bpo-45532: Replace 'default' with 'main' as default in sys.version (GH-29100)
https://github.com/python/cpython/commit/d2cd5eef0c3fc0431bfe3fc24b4c020ebfcf8aad


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45532>
_______________________________________

From report at bugs.python.org  Wed Oct 20 13:09:18 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 20 Oct 2021 17:09:18 +0000
Subject: [issue45532] Replace 'default' with 'main' as default in sys.version
In-Reply-To: <1634686813.85.0.311990959144.issue45532@roundup.psfhosted.org>
Message-ID: <1634749758.01.0.391457093578.issue45532@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27375
pull_request: https://github.com/python/cpython/pull/29107

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45532>
_______________________________________

From report at bugs.python.org  Wed Oct 20 13:09:13 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 20 Oct 2021 17:09:13 +0000
Subject: [issue45532] Replace 'default' with 'main' as default in sys.version
In-Reply-To: <1634686813.85.0.311990959144.issue45532@roundup.psfhosted.org>
Message-ID: <1634749753.56.0.0761643703307.issue45532@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27374
pull_request: https://github.com/python/cpython/pull/29106

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45532>
_______________________________________

From report at bugs.python.org  Wed Oct 20 13:09:33 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Wed, 20 Oct 2021 17:09:33 +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: <1634749773.55.0.0949201321317.issue45494@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
pull_requests: +27376
pull_request: https://github.com/python/cpython/pull/29108

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45494>
_______________________________________

From report at bugs.python.org  Wed Oct 20 13:11:23 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Wed, 20 Oct 2021 17:11:23 +0000
Subject: [issue45540] module.__package__ and module.__spec__.parent have
 different semantics
Message-ID: <1634749883.54.0.793446044283.issue45540@roundup.psfhosted.org>


New submission from Barry A. Warsaw <barry at python.org>:

TL;DR module.__spec__.parent is read-only but module.__package__ is r/w despite documentation that implies that these two attributes should be identical, and various issues that focus on migrating from direct module attributes to ModuleSpec attributes.

bpo-33277 and bpo-21762

Maybe we should relax the restriction on module.__spec__.parent so that it's writeable just like module.__package__.

See also: 

https://docs.python.org/3/reference/import.html?highlight=__loader__#package__

https://docs.python.org/3/library/types.html?highlight=__loader__#types.ModuleType.__package__

----------
components: Interpreter Core
messages: 404500
nosy: barry
priority: normal
severity: normal
status: open
title: module.__package__ and module.__spec__.parent have different semantics
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45540>
_______________________________________

From report at bugs.python.org  Wed Oct 20 13:11:39 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Wed, 20 Oct 2021 17:11:39 +0000
Subject: [issue45540] module.__package__ and module.__spec__.parent have
 different semantics
In-Reply-To: <1634749883.54.0.793446044283.issue45540@roundup.psfhosted.org>
Message-ID: <1634749899.05.0.191873029993.issue45540@roundup.psfhosted.org>


Change by Barry A. Warsaw <barry at python.org>:


----------
nosy: +brett.cannon, eric.snow

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45540>
_______________________________________

From report at bugs.python.org  Wed Oct 20 13:15:07 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 17:15:07 +0000
Subject: [issue41374] socket.TCP_* no longer available with cygwin 3.1.6+
In-Reply-To: <1595490704.07.0.649120374256.issue41374@roundup.psfhosted.org>
Message-ID: <1634750107.4.0.949265048265.issue41374@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:


New changeset d8e181925123ab1fd3dfcad3b29325b2b0ff704b by Zackery Spytz in branch 'main':
bpo-41374: Remove obsolete exclusion of netinet/tcp.h on Cygwin (GH-21649)
https://github.com/python/cpython/commit/d8e181925123ab1fd3dfcad3b29325b2b0ff704b


----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41374>
_______________________________________

From report at bugs.python.org  Wed Oct 20 13:15:24 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 17:15:24 +0000
Subject: [issue41374] socket.TCP_* no longer available with cygwin 3.1.6+
In-Reply-To: <1595490704.07.0.649120374256.issue41374@roundup.psfhosted.org>
Message-ID: <1634750124.67.0.154997201612.issue41374@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41374>
_______________________________________

From report at bugs.python.org  Wed Oct 20 13:15:19 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 17:15:19 +0000
Subject: [issue41374] socket.TCP_* no longer available with cygwin 3.1.6+
In-Reply-To: <1595490704.07.0.649120374256.issue41374@roundup.psfhosted.org>
Message-ID: <1634750119.29.0.867754950813.issue41374@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> fixed
status: open -> closed
superseder: Cygwin is unsupported - close all open issues and list them here. -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41374>
_______________________________________

From report at bugs.python.org  Wed Oct 20 13:18:31 2021
From: report at bugs.python.org (Lenin Kennedy)
Date: Wed, 20 Oct 2021 17:18:31 +0000
Subject: [issue45541] Broken Link in asyncio library Docs
Message-ID: <1634750311.24.0.287730141067.issue45541@roundup.psfhosted.org>


New submission from Lenin Kennedy <leninek24 at gmail.com>:

Priority: Low

In the asyncio page (https://docs.python.org/3/library/asyncio.html), 
in the bullet points of "set of high-level APIs to:", 

link to "perform network IO and IPC;" is (https://docs.python.org/3/library/asyncio-stream.html#asyncio-streams).

Here "#ayncio-streams" header does not exist.

Possible fix-
Change the hyperlink to (https://docs.python.org/3/library/asyncio-stream.html#streams)

----------
components: asyncio
messages: 404502
nosy: asvetlov, coderlens, yselivanov
priority: normal
severity: normal
status: open
title: Broken Link in asyncio library Docs
type: enhancement
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45541>
_______________________________________

From report at bugs.python.org  Wed Oct 20 13:25:22 2021
From: report at bugs.python.org (Lenin Kennedy)
Date: Wed, 20 Oct 2021 17:25:22 +0000
Subject: [issue45541] Broken Link in asyncio library Docs
In-Reply-To: <1634750311.24.0.287730141067.issue45541@roundup.psfhosted.org>
Message-ID: <1634750722.77.0.895891138225.issue45541@roundup.psfhosted.org>


Lenin Kennedy <leninek24 at gmail.com> added the comment:

Sorry, not a bug. Found out it's actually how the python docs works.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45541>
_______________________________________

From report at bugs.python.org  Wed Oct 20 13:41:49 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 20 Oct 2021 17:41:49 +0000
Subject: [issue45532] Replace 'default' with 'main' as default in sys.version
In-Reply-To: <1634686813.85.0.311990959144.issue45532@roundup.psfhosted.org>
Message-ID: <1634751709.28.0.902351921155.issue45532@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 696a89fef81f8229ebff9c32dfd36921c04f0890 by Miss Islington (bot) in branch '3.10':
bpo-45532: Replace 'default' with 'main' as default in sys.version (GH-29100)
https://github.com/python/cpython/commit/696a89fef81f8229ebff9c32dfd36921c04f0890


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45532>
_______________________________________

From report at bugs.python.org  Wed Oct 20 13:45:13 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 20 Oct 2021 17:45:13 +0000
Subject: [issue45532] Replace 'default' with 'main' as default in sys.version
In-Reply-To: <1634686813.85.0.311990959144.issue45532@roundup.psfhosted.org>
Message-ID: <1634751913.89.0.983461931526.issue45532@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 1249ce7c6c0ac7a99a72e6e7b8b10dd64158c386 by Miss Islington (bot) in branch '3.9':
bpo-45532: Replace 'default' with 'main' as default in sys.version (GH-29100)
https://github.com/python/cpython/commit/1249ce7c6c0ac7a99a72e6e7b8b10dd64158c386


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45532>
_______________________________________

From report at bugs.python.org  Wed Oct 20 13:55:32 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Wed, 20 Oct 2021 17:55:32 +0000
Subject: [issue45532] Replace 'default' with 'main' as default in sys.version
In-Reply-To: <1634686813.85.0.311990959144.issue45532@roundup.psfhosted.org>
Message-ID: <1634752532.45.0.81285009341.issue45532@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

Thank you Ezio and youknowone :)

----------
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45532>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:19:37 2021
From: report at bugs.python.org (Steve Dower)
Date: Wed, 20 Oct 2021 18:19:37 +0000
Subject: [issue3778] python uninstaller leave registry entries
In-Reply-To: <1220562494.43.0.987039023455.issue3778@psf.upfronthosting.co.za>
Message-ID: <1634753977.8.0.56191264264.issue3778@roundup.psfhosted.org>


Change by Steve Dower <steve.dower at python.org>:


----------
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue3778>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:25:08 2021
From: report at bugs.python.org (Steve Dower)
Date: Wed, 20 Oct 2021 18:25:08 +0000
Subject: [issue39490] Python Uninstaller fails to clean up the old path
 variables when uninstalling
In-Reply-To: <1580329145.11.0.630511319021.issue39490@roundup.psfhosted.org>
Message-ID: <1634754308.23.0.640606035197.issue39490@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

It seems like it is, however, it sounds like the OP didn't restart PowerShell after the uninstall or reinstall, which is necessary (though not mentioned, but given it would usually be missed including text to that effect wouldn't have any impact anyway).

Basically, the installer correctly sends the system-wide notification that it has updated environment variables. PowerShell ignores it (quite correctly), which means we can't do anything to fix it.

----------
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39490>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:25:33 2021
From: report at bugs.python.org (Maja)
Date: Wed, 20 Oct 2021 18:25:33 +0000
Subject: [issue45542] Using multiple comparison operators can cause
 performance issues
Message-ID: <1634754333.52.0.650287816276.issue45542@roundup.psfhosted.org>


New submission from Maja <mavioko7 at gmail.com>:

For example:

    def f(x):
        return 1 < x < 3

will be slower than:

    def f(x):
        return 1 < x and x < 3

The first function will generate following bytecode:

              0 LOAD_CONST               1 (1)
              2 LOAD_FAST                0 (x)
              4 DUP_TOP
              6 ROT_THREE
              8 COMPARE_OP               0 (<)
             10 JUMP_IF_FALSE_OR_POP    18
             12 LOAD_CONST               2 (3)
             14 COMPARE_OP               0 (<)
             16 RETURN_VALUE
        >>   18 ROT_TWO
             20 POP_TOP
             22 RETURN_VALUE

Performs unnecessary stack operations: duplicates x, rotates 3 items for no reason, then re-rotates 2 items and pops a value. This is fine if the value in the middle was more complex and needed to be duplicated rather than recalculated, which would be definitely slower, but for simpler values like names or constants, it's actually bad. The bytecode for the first function should look the same as second one which is:

              0 LOAD_CONST               1 (1)
              2 LOAD_FAST                0 (x)
              4 COMPARE_OP               0 (<)
              6 JUMP_IF_TRUE_OR_POP     14
              8 LOAD_FAST                0 (x)
             10 LOAD_CONST               2 (3)
             12 COMPARE_OP               0 (<)
        >>   14 RETURN_VALUE

----------
components: Interpreter Core
messages: 404508
nosy: akuvfx
priority: normal
severity: normal
status: open
title: Using multiple comparison operators can cause performance issues
type: performance
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45542>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:27:04 2021
From: report at bugs.python.org (Brett Cannon)
Date: Wed, 20 Oct 2021 18:27:04 +0000
Subject: [issue35673] Loader for namespace packages
In-Reply-To: <1546781003.0.0.391060889435.issue35673@roundup.psfhosted.org>
Message-ID: <1634754424.72.0.548189778201.issue35673@roundup.psfhosted.org>


Brett Cannon <brett at python.org> added the comment:

> What benefit would be gained?

The ABCs are broader than what the import system actually requires due to their helper methods. So for typing purposes they are actually not a perfect fit.

> That should probably be a separate issue/PR in either case.

https://bugs.python.org/issue38782 and I was trying to rope you into doing the work. ?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35673>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:29:39 2021
From: report at bugs.python.org (Maja)
Date: Wed, 20 Oct 2021 18:29:39 +0000
Subject: [issue45542] Using multiple comparison operators can cause
 performance issues
In-Reply-To: <1634754333.52.0.650287816276.issue45542@roundup.psfhosted.org>
Message-ID: <1634754579.48.0.876543274957.issue45542@roundup.psfhosted.org>


Change by Maja <mavioko7 at gmail.com>:


----------
keywords: +patch
pull_requests: +27377
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29109

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45542>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:31:51 2021
From: report at bugs.python.org (Brett Cannon)
Date: Wed, 20 Oct 2021 18:31:51 +0000
Subject: [issue33277] Deprecate __loader__, __package__,
 and __cached__ on modules
In-Reply-To: <1523656102.14.0.682650639539.issue33277@psf.upfronthosting.co.za>
Message-ID: <1634754711.34.0.506263533319.issue33277@roundup.psfhosted.org>


Brett Cannon <brett at python.org> added the comment:

> The spec identifies how a module should be loaded (or how it was loaded and should be reloaded).  We should be careful to preserve that identify and not invite uses to modify the spec after (or while) the module is loaded.

But they may want to modify it to influence reloading. There's a discussion somewhere where I talked about this with Nick and he agreed with me that trying to keep specs like receipts and all of these other attributes as mutable values had not really panned out after all of these years.

> +1 on a proxy (with read-only attrs) for everything but __name__, __file__, and __path__ (which can all be different than the spec).

I'm -1 on a proxy as that doesn't simplify the situation. Having (nearly) duplicate attributes is confusing and I have yet to see it benefit anyone.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33277>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:32:32 2021
From: report at bugs.python.org (Brett Cannon)
Date: Wed, 20 Oct 2021 18:32:32 +0000
Subject: [issue45540] module.__package__ and module.__spec__.parent have
 different semantics
In-Reply-To: <1634749883.54.0.793446044283.issue45540@roundup.psfhosted.org>
Message-ID: <1634754752.02.0.889126248544.issue45540@roundup.psfhosted.org>


Brett Cannon <brett at python.org> added the comment:

I say make it writable.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45540>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:38:42 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 20 Oct 2021 18:38:42 +0000
Subject: [issue45540] module.__package__ and module.__spec__.parent have
 different semantics
In-Reply-To: <1634749883.54.0.793446044283.issue45540@roundup.psfhosted.org>
Message-ID: <CALFfu7BAy=ZcbwzCcz51vayyRFPm-xvKJFEzo66ir4JnbjBtEg@mail.gmail.com>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

On Wed, Oct 20, 2021 at 11:11 AM Barry A. Warsaw <report at bugs.python.org> wrote:
> Maybe we should relax the restriction on module.__spec__.parent so that it's writeable just like module.__package__.

Hmm, I hadn't realized __package__ is used in __import__().  That
makes things messier.

Regardless, I expect the primary reason __package__ is writable is
because modules have never had any read-only attrs.

The more important question now is, when is __package__ ever modified?
 I can think of 2 cases:

1. legacy (pre-451) importers set it when they load the module
2. someone wants to customize the import system without writing an importer

With the latter, specifically they are trying to change how the module
is reloaded or submodules are imported.  In that case there should
probably be an explicit way to do so without having to hack the import
machinery.

My only concern with any support/encouragement for modifying the spec
after import is it results in less confidence about how the module was
imported originally.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45540>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:41:54 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 20 Oct 2021 18:41:54 +0000
Subject: [issue35673] Loader for namespace packages
In-Reply-To: <1546929666.71.0.476675486712.issue35673@roundup.psfhosted.org>
Message-ID: <CALFfu7DEU3pS2PZ7UnDHX8jix4U0=O97q25v=-EFOXf2J3f2UA@mail.gmail.com>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

On Mon, Jan 7, 2019 at 11:41 PM Eric V. Smith <report at bugs.python.org> wrote:
> Namespace packages (PEP 420) predate ModuleSpec (PEP 451). So, I think this probably happened when 451 was implemented. Maybe Eric Snow recalls?

PEP 451 talks about this a little
(https://www.python.org/dev/peps/pep-0451/#namespace-packages):

"""
Currently a path entry finder may return (None, portions) from
find_loader() to indicate it found part
of a possible namespace package. To achieve the same effect,
find_spec() must return a spec with
"loader" set to None (a.k.a. not set) and with
submodule_search_locations set to the same portions
as would have been provided by find_loader(). It's up to PathFinder
how to handle such specs.
"""

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35673>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:48:10 2021
From: report at bugs.python.org (Joe Wells)
Date: Wed, 20 Oct 2021 18:48:10 +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: <1634755690.84.0.322866834694.issue43656@roundup.psfhosted.org>


Joe Wells <bugs-python-org at jbw.link> added the comment:

In the hopes of convincing someone to install a fix to this bug, I will mention a few additional points.

When I mention ?the capture_locals feature?, I mean calls of the form traceback.TracebackException(..., capture_locals=True) and traceback.StackSummary.extract(..., capture_locals=True).

1. Right now, the capture_locals feature is unreliable.  If any frame on the entire stack has a single local variable for which repr raises an exception, the user gets no information whatsoever back for the entire stack except for that exception, and that exception does not identify the offending stack frame or local variable.  Also, every use of the capture_locals feature must be inside a try-except statement.

2. The exceptions raised by the capture_locals feature will often be junk exceptions carrying no useful information.  The meaning of these exceptions will often be ?there is an incompletely initialized object in a variable somewhere on the stack?.  Because this is a fairly normal state of affairs, this will often not be useful information.

3. Although it is a excellent idea to encourage Python coders to ensure that __repr__ method never raise exceptions, it seems unlikely this will cause many __repr__ methods to be fixed in the near future.  My impression is that __repr__ methods that raise exceptions on incompletely initialized objects are common.  One reason for this might be that authors of __repr__ methods rarely suffer from this problem personally, because they will generally supply correct arguments to their own class constructors, and even when they don't (e.g., while building unit tests), they are unlikely to try to format to strings all the local variable values on the stack in the exception traceback.

4. Right now, the caller of traceback.FrameSummary(..., locals=x) needs to go through the entire dict x and for every value v in x test whether repr(v) raises an exception and if so either remove the key/value pair or change the value to something which can be safely repr-ed.  Then FrameSummary.__init__ will repeat this work and run repr on every value in x again.  So using FrameSummary safely requires duplicating the work, i.e., running repr on every value in the dict both before and during the call to FrameSummary.

5. Anyone who is using the capture_locals feature on an exception traceback has already caught an exception, and therefore decided not to let that exception ?bubble up?.  Their attempts to log or otherwise cope with the exception will be spoiled by the capture_locals feature raising an unrelated exception.  This is even worse when the exception raised by the capture_locals feature is a junk exception that merely indicates there is an incompletely initialized object on the stack.  This is likely to happen because exceptions will often happen during the initialization of an object.

6. The most recent suggested fix does in fact report the extra repr exception discovered by the capture_locals feature in the string that represents the local variable's value.  The main effect of the current code propagating this repr exception is to make it harder to deal with the original exception.

I hope these points are useful.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:49:03 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 18:49:03 +0000
Subject: [issue45320] Remove deprecated inspect functions
In-Reply-To: <1632918150.03.0.388631628057.issue45320@roundup.psfhosted.org>
Message-ID: <1634755743.98.0.146269732592.issue45320@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset d89fb9a5a610a257014d112bdceef73d7df14082 by Hugo van Kemenade in branch 'main':
bpo-45320: Remove long-deprecated inspect methods (GH-28618)
https://github.com/python/cpython/commit/d89fb9a5a610a257014d112bdceef73d7df14082


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45320>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:49:31 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 18:49:31 +0000
Subject: [issue45320] Remove deprecated inspect functions
In-Reply-To: <1632918150.03.0.388631628057.issue45320@roundup.psfhosted.org>
Message-ID: <1634755771.62.0.422237901808.issue45320@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Hugo! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45320>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:50:13 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 18:50:13 +0000
Subject: [issue45464] TypeError when inheriting from both OSError and
 AttributeError
In-Reply-To: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
Message-ID: <1634755813.92.0.991612648388.issue45464@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset b2a989995e6b725c5c957927127832fd3fcecfa2 by Miss Islington (bot) in branch '3.10':
bpo-45464: [doc] Explain that subclassing multiple exceptions is fragile (GH-29094) (GH-29104)
https://github.com/python/cpython/commit/b2a989995e6b725c5c957927127832fd3fcecfa2


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45464>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:50:12 2021
From: report at bugs.python.org (Joseph Riddle)
Date: Wed, 20 Oct 2021 18:50:12 +0000
Subject: [issue44174] Unclear meaning of _Private__names in enum docs.
In-Reply-To: <1621394869.98.0.78361930377.issue44174@roundup.psfhosted.org>
Message-ID: <1634755812.46.0.202760418825.issue44174@roundup.psfhosted.org>


Joseph Riddle <joeriddles10 at gmail.com> added the comment:

_Private__names seems to no longer exist in the Python 3.11 documentation.

https://docs.python.org/3.11/library/enum.html#private-names

It appears to have been removed in this PR https://github.com/python/cpython/pull/23748/files

Should this issue be updated to remove Python 3.11 from the Versions?

----------
nosy: +joeriddles

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44174>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:50:32 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 18:50:32 +0000
Subject: [issue45464] TypeError when inheriting from both OSError and
 AttributeError
In-Reply-To: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
Message-ID: <1634755832.23.0.304897883601.issue45464@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 427ab124b3e9a54602b6f1d073a8e073159c0b51 by Miss Islington (bot) in branch '3.9':
bpo-45464: [doc] Explain that subclassing multiple exceptions is fragile (GH-29094) (GH-29105)
https://github.com/python/cpython/commit/427ab124b3e9a54602b6f1d073a8e073159c0b51


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45464>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:51:34 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 18:51:34 +0000
Subject: [issue45464] TypeError when inheriting from both OSError and
 AttributeError
In-Reply-To: <1634155516.92.0.207915157302.issue45464@roundup.psfhosted.org>
Message-ID: <1634755894.41.0.311652850463.issue45464@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Marking this as "wont fix" since only documentation was updated. Thanks for reporting, Marek!

----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45464>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:53:55 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 18:53:55 +0000
Subject: [issue45527] Reduce overhead for cache hits in specialized opcodes.
In-Reply-To: <1634664253.61.0.347658329299.issue45527@roundup.psfhosted.org>
Message-ID: <1634756035.89.0.774437318375.issue45527@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset bc85eb7a4f16e9e2b6fb713be2466ebb132fd7f2 by Mark Shannon in branch 'main':
bpo-45527: Don't count cache hits, just misses. (GH-29092)
https://github.com/python/cpython/commit/bc85eb7a4f16e9e2b6fb713be2466ebb132fd7f2


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45527>
_______________________________________

From report at bugs.python.org  Wed Oct 20 14:54:51 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 18:54:51 +0000
Subject: [issue45527] Reduce overhead for cache hits in specialized opcodes.
In-Reply-To: <1634664253.61.0.347658329299.issue45527@roundup.psfhosted.org>
Message-ID: <1634756091.47.0.0721211459411.issue45527@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Mark! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45527>
_______________________________________

From report at bugs.python.org  Wed Oct 20 15:54:50 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 19:54:50 +0000
Subject: [issue45192] The tempfile._infer_return_type function cannot infer
 the type of os.PathLike objects.
In-Reply-To: <1631598244.07.0.518019074651.issue45192@roundup.psfhosted.org>
Message-ID: <1634759690.48.0.110290763831.issue45192@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 6270d3eeaf17b50abc4f8f4d97790d66179638e4 by Kyungmin Lee in branch 'main':
bpo-45192: Fix a bug that infers the type of an os.PathLike[bytes] object as str (GH-28323)
https://github.com/python/cpython/commit/6270d3eeaf17b50abc4f8f4d97790d66179638e4


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45192>
_______________________________________

From report at bugs.python.org  Wed Oct 20 15:54:51 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 20 Oct 2021 19:54:51 +0000
Subject: [issue45192] The tempfile._infer_return_type function cannot infer
 the type of os.PathLike objects.
In-Reply-To: <1631598244.07.0.518019074651.issue45192@roundup.psfhosted.org>
Message-ID: <1634759691.97.0.918619790971.issue45192@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27378
pull_request: https://github.com/python/cpython/pull/29111

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45192>
_______________________________________

From report at bugs.python.org  Wed Oct 20 15:54:56 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 20 Oct 2021 19:54:56 +0000
Subject: [issue45192] The tempfile._infer_return_type function cannot infer
 the type of os.PathLike objects.
In-Reply-To: <1631598244.07.0.518019074651.issue45192@roundup.psfhosted.org>
Message-ID: <1634759696.09.0.933118512867.issue45192@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27379
pull_request: https://github.com/python/cpython/pull/29112

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45192>
_______________________________________

From report at bugs.python.org  Wed Oct 20 16:13:09 2021
From: report at bugs.python.org (Ethan Furman)
Date: Wed, 20 Oct 2021 20:13:09 +0000
Subject: [issue44174] Unclear meaning of _Private__names in enum docs.
In-Reply-To: <1621394869.98.0.78361930377.issue44174@roundup.psfhosted.org>
Message-ID: <1634760789.31.0.365580227091.issue44174@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:

It has been moved to the tutorial (links are at the top of the Enum page).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44174>
_______________________________________

From report at bugs.python.org  Wed Oct 20 16:25:07 2021
From: report at bugs.python.org (Ethan Furman)
Date: Wed, 20 Oct 2021 20:25:07 +0000
Subject: [issue42517] Enum: do not convert private names into members
In-Reply-To: <1606774653.87.0.704564487827.issue42517@roundup.psfhosted.org>
Message-ID: <1634761507.15.0.705649436609.issue42517@roundup.psfhosted.org>


Change by Ethan Furman <ethan at stoneleaf.us>:


----------
pull_requests: +27380
pull_request: https://github.com/python/cpython/pull/29113

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42517>
_______________________________________

From report at bugs.python.org  Wed Oct 20 17:01:44 2021
From: report at bugs.python.org (Justin Furuness)
Date: Wed, 20 Oct 2021 21:01:44 +0000
Subject: [issue45520] Frozen dataclass deep copy doesn't work with __slots__
In-Reply-To: <1634678917.75.0.508428359028.issue45520@roundup.psfhosted.org>
Message-ID: <CANDi=9HFU20f5vUDvr7e_CGMhT6S5_Pi7EtP7XFhf8mcU6kBNg@mail.gmail.com>


Justin Furuness <jfuruness at gmail.com> added the comment:

Thank you for the in-depth explanation. That all makes sense to me, I have
run into the __slots__ with defaults issues before, I'll be sure to try out
these fixes. I appreciate you taking the time.

Thanks,
Justin

On Tue, Oct 19, 2021 at 5:28 PM Josh Rosenberg <report at bugs.python.org>
wrote:

>
> Josh Rosenberg <shadowranger+python at gmail.com> added the comment:
>
> You're right that in non-dataclass scenarios, you'd just use __slots__.
>
> The slots=True thing was necessary for any case where any of the
> dataclass's attributes have default values (my_int: int = 0), or are
> defined with fields (my_list: list = field(default_factory=list)). The
> problem is that __slots__ is implemented by, after the class definition
> ends, creating descriptors on the class to access the data stored at known
> offsets in the underlying PyObject structure. Those descriptors themselves
> being class attributes means that when the type definition machinery tries
> to use __slots__ to create them, it finds conflicting class attributes (the
> defaults/fields) that already exist and explodes.
>
> Adding support for slots=True means it does two things:
>
> 1. It completely defines the class without slots, extracts the stuff it
> needs to make the dataclass separately, then deletes it from the class
> definition namespace and makes a *new* class with __slots__ defined (so no
> conflict occurs)
> 2. It checks if the dataclass is also frozen, and applies alternate
> __getstate__/__setstate__ methods that are compatible with a frozen,
> slotted dataclass
>
> #2 is what fixes this bug (while #1 makes it possible to use the full
> range of dataclass features without sacrificing the ability to use
> __slots__). If you need this to work in 3.9, you could borrow the 3.10
> implementations that make this work for frozen dataclasses to explicitly
> define __getstate__/__setstate__ for your frozen slotted dataclasses:
>
> def __getstate__(self):
>     return [getattr(self, f.name) for f in fields(self)]
>
>
> def __setstate__(self, state):
>     for field, value in zip(fields(self), state):
>         # use setattr because dataclass may be frozen
>         object.__setattr__(self, field.name, value)
>
> I'm not closing this since backporting just the fix for frozen slotted
> dataclasses (without backporting the full slots=True functionality that's a
> new feature) is possibly within scope for a bugfix release of 3.9 (it
> wouldn't change the behavior of working code, and fixes broken code that
> might reasonably be expected to work).
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue45520>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45520>
_______________________________________

From report at bugs.python.org  Wed Oct 20 17:05:33 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Wed, 20 Oct 2021 21:05:33 +0000
Subject: [issue35673] Loader for namespace packages
In-Reply-To: <1546781003.0.0.391060889435.issue35673@roundup.psfhosted.org>
Message-ID: <1634763933.81.0.697801856127.issue35673@roundup.psfhosted.org>


Barry A. Warsaw <barry at python.org> added the comment:


New changeset 876fc7fcec9a79a11546b7588d3683a5ccb4d31c by Barry Warsaw in branch 'main':
bpo-35673: Add a public alias for namespace package __loader__ attribute (#29049)
https://github.com/python/cpython/commit/876fc7fcec9a79a11546b7588d3683a5ccb4d31c


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35673>
_______________________________________

From report at bugs.python.org  Wed Oct 20 17:07:21 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Wed, 20 Oct 2021 21:07:21 +0000
Subject: [issue38782] Convert importlib.abc to use typing.Protocol
In-Reply-To: <1573598860.27.0.897323663705.issue38782@roundup.psfhosted.org>
Message-ID: <1634764041.26.0.902581611877.issue38782@roundup.psfhosted.org>


Change by Barry A. Warsaw <barry at python.org>:


----------
nosy: +barry

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38782>
_______________________________________

From report at bugs.python.org  Wed Oct 20 17:08:27 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Wed, 20 Oct 2021 21:08:27 +0000
Subject: [issue35673] Loader for namespace packages
In-Reply-To: <1546781003.0.0.391060889435.issue35673@roundup.psfhosted.org>
Message-ID: <1634764107.27.0.100792729642.issue35673@roundup.psfhosted.org>


Change by Barry A. Warsaw <barry at python.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35673>
_______________________________________

From report at bugs.python.org  Wed Oct 20 17:09:31 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Wed, 20 Oct 2021 21:09:31 +0000
Subject: [issue35673] Loader for namespace packages
In-Reply-To: <1634754424.72.0.548189778201.issue35673@roundup.psfhosted.org>
Message-ID: <6E8E6C59-E2FE-4BCC-8246-C144D406DE8E@python.org>


Barry A. Warsaw <barry at python.org> added the comment:

On Oct 20, 2021, at 11:27, Brett Cannon <report at bugs.python.org> wrote:
> 
>> That should probably be a separate issue/PR in either case.
> 
> https://bugs.python.org/issue38782 and I was trying to rope you into doing the work. ?

Ha!  You should have nosied me then :D - but anyway I?m following that ticket now so we?ll see.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35673>
_______________________________________

From report at bugs.python.org  Wed Oct 20 17:25:20 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 21:25:20 +0000
Subject: [issue45192] The tempfile._infer_return_type function cannot infer
 the type of os.PathLike objects.
In-Reply-To: <1631598244.07.0.518019074651.issue45192@roundup.psfhosted.org>
Message-ID: <1634765120.0.0.262942448649.issue45192@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset d33fae7105aaea7c376b5455fd1f8de802ca2542 by Miss Islington (bot) in branch '3.9':
bpo-45192: Fix a bug that infers the type of an os.PathLike[bytes] object as str (GH-28323) (GH-29112)
https://github.com/python/cpython/commit/d33fae7105aaea7c376b5455fd1f8de802ca2542


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45192>
_______________________________________

From report at bugs.python.org  Wed Oct 20 17:27:38 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 20 Oct 2021 21:27:38 +0000
Subject: [issue45192] The tempfile._infer_return_type function cannot infer
 the type of os.PathLike objects.
In-Reply-To: <1631598244.07.0.518019074651.issue45192@roundup.psfhosted.org>
Message-ID: <1634765258.96.0.863722274053.issue45192@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 64e83c711eb371d60fce64cae074c4d3311f6ece by Miss Islington (bot) in branch '3.10':
bpo-45192: Fix a bug that infers the type of an os.PathLike[bytes] object as str (GH-28323) (GH-29111)
https://github.com/python/cpython/commit/64e83c711eb371d60fce64cae074c4d3311f6ece


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45192>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:05:10 2021
From: report at bugs.python.org (Lee Bosch)
Date: Wed, 20 Oct 2021 22:05:10 +0000
Subject: [issue45543] IDLE shell Windows EOL <CR>
Message-ID: <1634767510.09.0.775917285757.issue45543@roundup.psfhosted.org>


New submission from Lee Bosch <harsh at harshness.net>:

The IDLE shell for Windows doesn't respect carriage returns in output strings.

When using a '\r' as sep, end or as part of the output strings, IDLE ignores it and I get linear output rather than each successive line printing over the previous output.  The same code works as expected in a conventional Windows shell (i.e. COMMAND).

----------
assignee: terry.reedy
components: IDLE
messages: 404530
nosy: harshness, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE shell Windows EOL <CR>
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45543>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:26:33 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:26:33 +0000
Subject: [issue45544] Close 2to3 issues and list them here
Message-ID: <1634768793.61.0.522219525915.issue45544@roundup.psfhosted.org>


New submission from Irit Katriel <iritkatriel at gmail.com>:

2to3 is deprecated. All open issues will now being closed as duplicates of this issue, in case someone needs this list in the future.

----------
messages: 404531
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45544>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:28:52 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:28:52 +0000
Subject: [issue40360] Deprecate lib2to3 (and 2to3) for future removal
In-Reply-To: <1587530454.25.0.44181585934.issue40360@roundup.psfhosted.org>
Message-ID: <1634768932.4.0.147287042264.issue40360@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Created issue45544 to close all open issues and list them there.

----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40360>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:34:55 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:34:55 +0000
Subject: [issue9273] 2to3 to simultaneously do code and doctests
In-Reply-To: <1279295325.63.0.00955742679892.issue9273@psf.upfronthosting.co.za>
Message-ID: <1634769295.58.0.416491767059.issue9273@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue9273>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:36:26 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:36:26 +0000
Subject: [issue13332] execfile fixer produces code that does not close the file
In-Reply-To: <1320322292.48.0.851588051991.issue13332@psf.upfronthosting.co.za>
Message-ID: <1634769386.93.0.469412631068.issue13332@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue13332>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:36:58 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:36:58 +0000
Subject: [issue2470] Need fixer for dl (removed) -> ctypes module
In-Reply-To: <1206339875.66.0.189262293555.issue2470@psf.upfronthosting.co.za>
Message-ID: <1634769418.59.0.891219725289.issue2470@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2470>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:37:18 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:37:18 +0000
Subject: [issue12864] 2to3 creates illegal code on import a.b inside a package
In-Reply-To: <1314741561.82.0.752843827348.issue12864@psf.upfronthosting.co.za>
Message-ID: <1634769438.4.0.500497123211.issue12864@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue12864>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:37:42 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:37:42 +0000
Subject: [issue11195] next fixer fooled by trailing characters
In-Reply-To: <1297447317.1.0.237374543357.issue11195@psf.upfronthosting.co.za>
Message-ID: <1634769462.3.0.828471204818.issue11195@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11195>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:37:49 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:37:49 +0000
Subject: [issue1034] [patch] Add 2to3 support for displaying warnings as
 Python comments
In-Reply-To: <1188181252.17.0.123349198402.issue1034@psf.upfronthosting.co.za>
Message-ID: <1634769469.67.0.212263562423.issue1034@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage: test needed -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue1034>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:39:23 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:39:23 +0000
Subject: [issue20867] fix_import in 2to3 adds spurious relative import
 (windows)
In-Reply-To: <1394226870.23.0.999785649945.issue20867@psf.upfronthosting.co.za>
Message-ID: <1634769563.05.0.652377429555.issue20867@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20867>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:40:46 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:40:46 +0000
Subject: [issue11195] next fixer fooled by trailing characters
In-Reply-To: <1297447317.1.0.237374543357.issue11195@psf.upfronthosting.co.za>
Message-ID: <1634769646.11.0.0877891544252.issue11195@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11195>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:40:51 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:40:51 +0000
Subject: [issue12864] 2to3 creates illegal code on import a.b inside a package
In-Reply-To: <1314741561.82.0.752843827348.issue12864@psf.upfronthosting.co.za>
Message-ID: <1634769651.15.0.541468065336.issue12864@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue12864>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:40:39 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:40:39 +0000
Subject: [issue1034] [patch] Add 2to3 support for displaying warnings as
 Python comments
In-Reply-To: <1188181252.17.0.123349198402.issue1034@psf.upfronthosting.co.za>
Message-ID: <1634769639.15.0.271139139875.issue1034@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue1034>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:41:03 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:41:03 +0000
Subject: [issue13332] execfile fixer produces code that does not close the file
In-Reply-To: <1320322292.48.0.851588051991.issue13332@psf.upfronthosting.co.za>
Message-ID: <1634769663.72.0.50975931535.issue13332@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue13332>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:40:57 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:40:57 +0000
Subject: [issue2470] Need fixer for dl (removed) -> ctypes module
In-Reply-To: <1206339875.66.0.189262293555.issue2470@psf.upfronthosting.co.za>
Message-ID: <1634769657.62.0.117090162903.issue2470@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2470>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:41:18 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:41:18 +0000
Subject: [issue9273] 2to3 to simultaneously do code and doctests
In-Reply-To: <1279295325.63.0.00955742679892.issue9273@psf.upfronthosting.co.za>
Message-ID: <1634769678.72.0.62637257222.issue9273@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> works for me

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue9273>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:42:25 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:42:25 +0000
Subject: [issue45544] Close 2to3 issues and list them here
In-Reply-To: <1634768793.61.0.522219525915.issue45544@roundup.psfhosted.org>
Message-ID: <1634769745.5.0.0416727468266.issue45544@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

2to3 is deprecated. All open issues will now being closed with this as superseder, in case someone will need the list of those issues in the future.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45544>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:42:32 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:42:32 +0000
Subject: [issue45544] Close 2to3 issues and list them here
In-Reply-To: <1634769745.5.0.0416727468266.issue45544@roundup.psfhosted.org>
Message-ID: <1634769752.19.0.309010347155.issue45544@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
Removed message: https://bugs.python.org/msg404531

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45544>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:43:27 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:43:27 +0000
Subject: [issue9273] 2to3 to simultaneously do code and doctests
In-Reply-To: <1279295325.63.0.00955742679892.issue9273@psf.upfronthosting.co.za>
Message-ID: <1634769807.2.0.302384427258.issue9273@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: works for me -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue9273>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:44:35 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:44:35 +0000
Subject: [issue15890] lib2to3 pickles created with wrong permissions
In-Reply-To: <1347215226.9.0.69518719078.issue15890@psf.upfronthosting.co.za>
Message-ID: <1634769875.9.0.996305479086.issue15890@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15890>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:44:58 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:44:58 +0000
Subject: [issue7162] 2to3 does not convert __builtins__.file
In-Reply-To: <1255814979.41.0.0993610579435.issue7162@psf.upfronthosting.co.za>
Message-ID: <1634769898.77.0.0303978730342.issue7162@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue7162>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:45:13 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:45:13 +0000
Subject: [issue22425] 2to3 import fixer writes dotted_as_names into
 import_as_names
In-Reply-To: <1410901227.13.0.545813784004.issue22425@psf.upfronthosting.co.za>
Message-ID: <1634769913.08.0.258848759317.issue22425@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22425>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:45:21 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:45:21 +0000
Subject: [issue20742] 2to3 zip fixer doesn't fix for loops.
In-Reply-To: <1393153907.74.0.496388533035.issue20742@psf.upfronthosting.co.za>
Message-ID: <1634769921.08.0.201777154764.issue20742@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20742>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:45:46 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:45:46 +0000
Subject: [issue11276] 2to3: imports fixer doesn't update references to modules
 specified without attributes
In-Reply-To: <1298320370.6.0.707528298714.issue11276@psf.upfronthosting.co.za>
Message-ID: <1634769946.14.0.417636705114.issue11276@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11276>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:46:00 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:46:00 +0000
Subject: [issue19111] 2to3 should remove from future_builtins import *
In-Reply-To: <1380379953.79.0.934483665034.issue19111@psf.upfronthosting.co.za>
Message-ID: <1634769960.34.0.245943069194.issue19111@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19111>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:46:23 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:46:23 +0000
Subject: [issue12873] 2to3 incorrectly handles multi-line imports from
 __future__
In-Reply-To: <1314827841.27.0.752701109449.issue12873@psf.upfronthosting.co.za>
Message-ID: <1634769983.59.0.361315659489.issue12873@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue12873>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:46:35 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:46:35 +0000
Subject: [issue25527] Invalid (... and confusing) warning raised by 2to3
 regarding repeat
In-Reply-To: <1446371398.34.0.43007110205.issue25527@psf.upfronthosting.co.za>
Message-ID: <1634769995.17.0.846558167583.issue25527@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25527>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:47:17 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:47:17 +0000
Subject: [issue27855] 2to3: Wrong code output w/ has_key without trailing space
In-Reply-To: <1472083893.01.0.491707564074.issue27855@psf.upfronthosting.co.za>
Message-ID: <1634770037.19.0.593920455.issue27855@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27855>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:46:55 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:46:55 +0000
Subject: [issue13253] 2to3 fix_renames renames sys.maxint only in imports
In-Reply-To: <1319437552.82.0.780264952493.issue13253@psf.upfronthosting.co.za>
Message-ID: <1634770015.16.0.517341618265.issue13253@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue13253>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:47:43 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:47:43 +0000
Subject: [issue9621] Graphviz output for 2to3 fixer patterns
In-Reply-To: <1281973199.06.0.194769344976.issue9621@psf.upfronthosting.co.za>
Message-ID: <1634770063.03.0.694718210379.issue9621@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue9621>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:47:54 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:47:54 +0000
Subject: [issue22294] 2to3 consuming_calls:  len, min, max, zip, map, reduce, 
 filter, dict, xrange
In-Reply-To: <1409226181.07.0.476582309368.issue22294@psf.upfronthosting.co.za>
Message-ID: <1634770074.02.0.129580529505.issue22294@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22294>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:49:46 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:49:46 +0000
Subject: [issue35417] Double parenthesis in print function running 2to3 in
 already correct call
In-Reply-To: <1544004619.56.0.788709270274.issue35417@psf.upfronthosting.co.za>
Message-ID: <1634770186.54.0.840454261517.issue35417@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35417>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:49:56 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:49:56 +0000
Subject: [issue35708] lib2to3 failed to convert as refactor's fixes not
 search.pyc files
In-Reply-To: <1547136482.81.0.227627171679.issue35708@roundup.psfhosted.org>
Message-ID: <1634770196.32.0.544894585372.issue35708@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35708>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:50:30 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:50:30 +0000
Subject: [issue33338] [lib2to3] Synchronize token.py and tokenize.py with the
 standard library
In-Reply-To: <1524445496.4.0.682650639539.issue33338@psf.upfronthosting.co.za>
Message-ID: <1634770230.93.0.771133618833.issue33338@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33338>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:50:46 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:50:46 +0000
Subject: [issue33991] lib2to3 should parse f-strings
In-Reply-To: <1530224164.23.0.56676864532.issue33991@psf.upfronthosting.co.za>
Message-ID: <1634770246.71.0.314379282065.issue33991@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33991>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:51:05 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:51:05 +0000
Subject: [issue30099] Lib2to3 fails with unreadable pickle file
In-Reply-To: <1492559879.72.0.671474641555.issue30099@psf.upfronthosting.co.za>
Message-ID: <1634770265.41.0.798576745321.issue30099@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30099>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:51:16 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:51:16 +0000
Subject: [issue29141] error in 2to3
In-Reply-To: <1483452268.26.0.428258207401.issue29141@psf.upfronthosting.co.za>
Message-ID: <1634770276.42.0.627099714559.issue29141@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29141>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:50:54 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:50:54 +0000
Subject: [issue31143] lib2to3 requires source files for fixes
In-Reply-To: <1502199820.45.0.266789530898.issue31143@psf.upfronthosting.co.za>
Message-ID: <1634770254.9.0.667828266823.issue31143@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31143>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:51:55 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:51:55 +0000
Subject: [issue41110] 2to3 reports some files as both not changing and having
 been modified
In-Reply-To: <1593060415.61.0.690471186098.issue41110@roundup.psfhosted.org>
Message-ID: <1634770315.3.0.388736003689.issue41110@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41110>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:52:24 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:52:24 +0000
Subject: [issue44259] lib2to3 does not accept "exec" as name
In-Reply-To: <1622197167.25.0.926188011866.issue44259@roundup.psfhosted.org>
Message-ID: <1634770344.28.0.190241933499.issue44259@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44259>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:53:12 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:53:12 +0000
Subject: [issue30238] 2to3 doesn't detect or fix Exception indexing
In-Reply-To: <1493753516.03.0.383972145792.issue30238@psf.upfronthosting.co.za>
Message-ID: <1634770392.41.0.885647455814.issue30238@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
stage: test needed -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30238>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:53:31 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:53:31 +0000
Subject: [issue12611] 2to3 crashes when converting doctest using reduce()
In-Reply-To: <1311349982.31.0.854147036767.issue12611@psf.upfronthosting.co.za>
Message-ID: <1634770411.05.0.583005311546.issue12611@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue12611>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:53:44 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:53:44 +0000
Subject: [issue41185] lib2to3 generation of pickle files is racy
In-Reply-To: <1593619544.94.0.691494373061.issue41185@roundup.psfhosted.org>
Message-ID: <1634770424.72.0.473990457931.issue41185@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41185>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:53:56 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:53:56 +0000
Subject: [issue40697] add fissix as a lib2to3 alternative
In-Reply-To: <1589970118.75.0.588225923307.issue40697@roundup.psfhosted.org>
Message-ID: <1634770436.28.0.0116100241953.issue40697@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40697>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:54:45 2021
From: report at bugs.python.org (Jeremy)
Date: Wed, 20 Oct 2021 22:54:45 +0000
Subject: [issue45545] chdir __exit__ is not safe
Message-ID: <1634770485.18.0.358610816486.issue45545@roundup.psfhosted.org>


New submission from Jeremy <ucodery at gmail.com>:

The way that contextlib.chdir currently restores the old working directory, an exception is raised if the program was already close to or beyond a system's PATH_MAX. The context manager has no issue crafting the path in __enter__ because os.getcwd() can return a path that is longer than PATH_MAX, but when used in __exit__ os.chdir() cannot use a path that long.

I think an __exit__ should be as cautious as possible to not raise as the exception can occur far away from where the context manager was created. Its also doesn't reflect the programmer actually using the context manager incorrectly as they might not have any control or care where the process was started, yet if it happened to already be at a deep path when launched, any use of chdir anywhere would cause exceptions.

I have tested this on macOS 11.13 using APFS but I am sure it would also fail on other macs and Linuxes. I don't know about Windows. Note I originally created this test as a patch to Lib/tests/test_contextlib.py but libregrtest uses os.getcwd() in its runner and that disrupts the traceback and misidentifies the cause of failure. Test file:

```python
import os
import shutil
from contextlib import chdir


def test_long_path():
    # NAME_MAX of 255
    long_filename = "_".join(["testdir"]*32)
    long_path_end = startingwd = os.getcwd()
    try:
        # I thought this would have to be 16, i.e. a path length over 4096, PATH_MAX
        # but seemingly just crossing 1050 is enough to fail
        for _ in range(4):
            os.mkdir(long_filename)
            os.chdir(long_filename)
            long_path_end = os.path.join(long_path_end, long_filename)
        os.mkdir(long_filename)
        long_path_end = os.path.join(long_path_end, long_filename)
        with chdir(long_filename):
            #self.assertEqual(os.getcwd(), long_path_end)
            assert os.getcwd() == long_path_end
            print("passed")
    finally:
        shutil.rmtree(os.path.join(startingwd, long_filename), ignore_errors=True)


test_long_path()
```

And output:
```
$ ./python.exe ./test_chdir.py
passed
Traceback (most recent call last):
  File "/Users/ucodery/git/cpython/./test_chdir.py", line 27, in <module>
    test_long_path()
    ^^^^^^^^^^^^^^^^
  File "/Users/ucodery/git/cpython/./test_chdir.py", line 19, in test_long_path
    with chdir(long_filename):
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ucodery/git/cpython/Lib/contextlib.py", line 781, in __exit__
    os.chdir(self._old_cwd.pop())
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 63] File name too long: '/Users/ucodery/git/cpython/testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir/testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir/testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir/testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir_testdir'
```

----------
files: test_chdir.py
messages: 404534
nosy: ucodery
priority: normal
severity: normal
status: open
title: chdir __exit__ is not safe
type: behavior
versions: Python 3.11
Added file: https://bugs.python.org/file50377/test_chdir.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:55:19 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:55:19 +0000
Subject: [issue38032] lib2to3 doesn't parse Python 3 identifiers containing
 non-spacing marks
In-Reply-To: <1567639302.72.0.55214965787.issue38032@roundup.psfhosted.org>
Message-ID: <1634770519.56.0.110738108292.issue38032@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38032>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:55:32 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:55:32 +0000
Subject: [issue40547] 2to3 raise can silently remove code from old 2.4 string
 exceptions
In-Reply-To: <1588869434.41.0.260360648069.issue40547@roundup.psfhosted.org>
Message-ID: <1634770532.78.0.191942772291.issue40547@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40547>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:55:43 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:55:43 +0000
Subject: [issue39683] 2to3 fix_exitfunc suggests duplicated import of atexit
 module
In-Reply-To: <1582078726.23.0.378327205623.issue39683@roundup.psfhosted.org>
Message-ID: <1634770543.68.0.919597327472.issue39683@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39683>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:55:58 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:55:58 +0000
Subject: [issue39670] 2to3 fix_apply tries to fix user-defined apply function
 calls
In-Reply-To: <1582017039.66.0.352808121621.issue39670@roundup.psfhosted.org>
Message-ID: <1634770558.12.0.873227320169.issue39670@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39670>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:56:10 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:56:10 +0000
Subject: [issue39290] lib2to3.fixes.fix_import: support imports_as_name in
 traverse_imports
In-Reply-To: <1578676607.69.0.963910000582.issue39290@roundup.psfhosted.org>
Message-ID: <1634770570.82.0.618516143065.issue39290@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39290>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:56:40 2021
From: report at bugs.python.org (Samuel Tatasurya)
Date: Wed, 20 Oct 2021 22:56:40 +0000
Subject: [issue45544] Close 2to3 issues and list them here
In-Reply-To: <1634769745.5.0.0416727468266.issue45544@roundup.psfhosted.org>
Message-ID: <1634770600.71.0.855880796411.issue45544@roundup.psfhosted.org>


Change by Samuel Tatasurya <tatasurya.samuel at gmail.com>:


----------
keywords: +patch
nosy: +samtatasurya
nosy_count: 1.0 -> 2.0
pull_requests: +27381
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/17096

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45544>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:56:56 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:56:56 +0000
Subject: [issue38681] 2to3 Conversion Result using BlankLine() can be
 Syntactically Incorrect
In-Reply-To: <1572851567.83.0.781319798867.issue38681@roundup.psfhosted.org>
Message-ID: <1634770616.5.0.117869198952.issue38681@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38681>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:57:09 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:57:09 +0000
Subject: [issue19510] lib2to3.fixes.fix_import gets confused if implicit
 relative imports and absolute imports are on the same line
In-Reply-To: <1383697659.1.0.717023788788.issue19510@psf.upfronthosting.co.za>
Message-ID: <1634770629.82.0.552613520111.issue19510@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19510>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:57:25 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:57:25 +0000
Subject: [issue5664] 2to3 wont convert Cookie.Cookie properly
In-Reply-To: <1238642568.2.0.229238012255.issue5664@psf.upfronthosting.co.za>
Message-ID: <1634770645.57.0.0327350505191.issue5664@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue5664>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:57:44 2021
From: report at bugs.python.org (Aldwin Pollefeyt)
Date: Wed, 20 Oct 2021 22:57:44 +0000
Subject: [issue45544] Close 2to3 issues and list them here
In-Reply-To: <1634769745.5.0.0416727468266.issue45544@roundup.psfhosted.org>
Message-ID: <1634770664.79.0.144399071115.issue45544@roundup.psfhosted.org>


Change by Aldwin Pollefeyt <aldwinaldwin at gmail.com>:


----------
nosy: +aldwinaldwin
nosy_count: 2.0 -> 3.0
pull_requests: +27382
pull_request: https://github.com/python/cpython/pull/15268

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45544>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:58:02 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:58:02 +0000
Subject: [issue37654] 2to3 no-ops on embeddable distribution
In-Reply-To: <1563823079.34.0.179597137003.issue37654@roundup.psfhosted.org>
Message-ID: <1634770682.03.0.0957792401535.issue37654@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37654>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:58:48 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:58:48 +0000
Subject: [issue13272] 2to3 fix_renames doesn't rename
 string.lowercase/uppercase/letters
In-Reply-To: <1319700425.9.0.635731429373.issue13272@psf.upfronthosting.co.za>
Message-ID: <1634770728.73.0.192162595387.issue13272@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue13272>
_______________________________________

From report at bugs.python.org  Wed Oct 20 18:59:08 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 22:59:08 +0000
Subject: [issue18477] fix_import (2to3 fixer) is not case-sensitive
In-Reply-To: <1374009050.19.0.500947498255.issue18477@psf.upfronthosting.co.za>
Message-ID: <1634770748.77.0.453519878611.issue18477@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: test needed -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18477>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:00:15 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 20 Oct 2021 23:00:15 +0000
Subject: [issue45543] IDLE shell Windows EOL <CR>
In-Reply-To: <1634767510.09.0.775917285757.issue45543@roundup.psfhosted.org>
Message-ID: <1634770815.52.0.43582955313.issue45543@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

The current behavior is documented in Help => IDLE Help "User output in Shell".

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45543>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:00:55 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:00:55 +0000
Subject: [issue12613] itertools fixer fails
In-Reply-To: <1311353372.31.0.101702308601.issue12613@psf.upfronthosting.co.za>
Message-ID: <1634770855.91.0.339503588047.issue12613@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue12613>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:01:20 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:01:20 +0000
Subject: [issue12942] Shebang line fixer for 2to3
In-Reply-To: <1315531684.56.0.727993232351.issue12942@psf.upfronthosting.co.za>
Message-ID: <1634770880.39.0.994656724977.issue12942@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: test needed -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue12942>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:01:46 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:01:46 +0000
Subject: [issue11056] 2to3 fails for inner __metaclass__ class definition
In-Reply-To: <1296295646.41.0.555218890155.issue11056@psf.upfronthosting.co.za>
Message-ID: <1634770906.93.0.46311323945.issue11056@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11056>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:02:09 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Wed, 20 Oct 2021 23:02:09 +0000
Subject: [issue45542] Using multiple comparison operators can cause
 performance issues
In-Reply-To: <1634754333.52.0.650287816276.issue45542@roundup.psfhosted.org>
Message-ID: <1634770929.38.0.975224660926.issue45542@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

The PR changes behavior slightly:

def f():
    class A:
        def __lt__(self, other):
            nonlocal x
            x += 100
            return True
    a = A()
    x = 1
    print(a < x < 10)
    x = 1
    print(a < x and x < 10)

### Before ###
>>> f()
True
False

### After ###
>>> f()
False
False


So strictly speaking, this would be backwards-incompatible. But morally, I am not totally sure.

----------
nosy: +Dennis Sweeney

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45542>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:03:20 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:03:20 +0000
Subject: [issue8029] bug in 2to3 dealing with "print FOO,
 " followed by "sys.stdout.write('')"
In-Reply-To: <1267312123.13.0.138693680363.issue8029@psf.upfronthosting.co.za>
Message-ID: <1634771000.6.0.552175402594.issue8029@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue8029>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:03:54 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Wed, 20 Oct 2021 23:03:54 +0000
Subject: [issue36313] error: [Errno 13] Permission denied:
 '/usr/local/lib/python3.7/lib2to3/Grammar3.7.2.final.0.pickle'
In-Reply-To: <1552727034.93.0.0772389993988.issue36313@roundup.psfhosted.org>
Message-ID: <1634771034.3.0.954521038146.issue36313@roundup.psfhosted.org>


Change by Gregory P. Smith <greg at krypto.org>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Source installation sets incorrect permissions for Grammar3.2.3.final.0.pickle

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36313>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:04:38 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:04:38 +0000
Subject: [issue43678] TypeError: get() got an unexpected keyword argument
 'vars'
In-Reply-To: <1617200134.2.0.498319587361.issue43678@roundup.psfhosted.org>
Message-ID: <1634771078.81.0.447118640098.issue43678@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43678>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:05:14 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:05:14 +0000
Subject: [issue6899] Base.replace breaks tree
In-Reply-To: <1252831841.16.0.893335369907.issue6899@psf.upfronthosting.co.za>
Message-ID: <1634771114.0.0.763442783609.issue6899@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue6899>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:06:02 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:06:02 +0000
Subject: [issue39154] "utf8" not always a synonym for "utf-8" in lib2to3
In-Reply-To: <1577641682.29.0.16123079146.issue39154@roundup.psfhosted.org>
Message-ID: <1634771162.92.0.653923077246.issue39154@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: test needed -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39154>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:05:39 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:05:39 +0000
Subject: [issue2350] 'exceptions' import fixer
In-Reply-To: <1205781728.94.0.172904523331.issue2350@psf.upfronthosting.co.za>
Message-ID: <1634771139.08.0.931449323449.issue2350@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2350>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:06:33 2021
From: report at bugs.python.org (Romuald Brunet)
Date: Wed, 20 Oct 2021 23:06:33 +0000
Subject: [issue45544] Close 2to3 issues and list them here
In-Reply-To: <1634769745.5.0.0416727468266.issue45544@roundup.psfhosted.org>
Message-ID: <1634771193.01.0.958562036194.issue45544@roundup.psfhosted.org>


Change by Romuald Brunet <romuald.brunet at gmail.com>:


----------
nosy: +Romuald
nosy_count: 3.0 -> 4.0
pull_requests: +27383
pull_request: https://github.com/python/cpython/pull/16826

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45544>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:06:48 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:06:48 +0000
Subject: [issue17393] stdlib import mistaken for local by import_fixer
In-Reply-To: <1362946974.63.0.419293411414.issue17393@psf.upfronthosting.co.za>
Message-ID: <1634771208.73.0.040172157564.issue17393@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17393>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:07:11 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:07:11 +0000
Subject: [issue35282] Add a return value to lib2to3.refactor.refactor_file and
 refactor_dir
In-Reply-To: <1542742451.18.0.788709270274.issue35282@psf.upfronthosting.co.za>
Message-ID: <1634771231.79.0.475807980529.issue35282@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35282>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:07:27 2021
From: report at bugs.python.org (Martin DeMello)
Date: Wed, 20 Oct 2021 23:07:27 +0000
Subject: [issue45544] Close 2to3 issues and list them here
In-Reply-To: <1634769745.5.0.0416727468266.issue45544@roundup.psfhosted.org>
Message-ID: <1634771247.75.0.250476026041.issue45544@roundup.psfhosted.org>


Change by Martin DeMello <martindemello at gmail.com>:


----------
nosy: +martindemello
nosy_count: 4.0 -> 5.0
pull_requests: +27384
pull_request: https://github.com/python/cpython/pull/10618

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45544>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:07:56 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:07:56 +0000
Subject: [issue12771] 2to3 -d adds extra whitespace
In-Reply-To: <1313593187.97.0.649094225681.issue12771@psf.upfronthosting.co.za>
Message-ID: <1634771276.7.0.184160402097.issue12771@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: test needed -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue12771>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:09:41 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Wed, 20 Oct 2021 23:09:41 +0000
Subject: [issue15317] Source installation sets incorrect permissions for
 Grammar3.2.3.final.0.pickle
In-Reply-To: <1341904877.85.0.287783743443.issue15317@psf.upfronthosting.co.za>
Message-ID: <1634771381.43.0.425849328924.issue15317@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

workaround: don't run make as root.  run configure & make in a user account and only run your final make install as root after that.  (sudo make install or whatnot)

2to3 and lib2to3 are deprecated so this won't be getting fixed (though it's more of a Makefile issue)

----------
nosy: +gregory.p.smith
resolution:  -> wont fix
stage:  -> resolved
status: pending -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15317>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:10:57 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:10:57 +0000
Subject: [issue10954] csv.reader/writer to raise exception if mode is binary
 or newline is not ''
In-Reply-To: <1295519548.77.0.698015070506.issue10954@psf.upfronthosting.co.za>
Message-ID: <1634771457.04.0.225961834034.issue10954@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue10954>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:11:45 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:11:45 +0000
Subject: [issue37709] CSVReader ignores dialect.lineterminator
In-Reply-To: <1564428728.47.0.33259508348.issue37709@roundup.psfhosted.org>
Message-ID: <1634771505.07.0.453495001697.issue37709@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37709>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:11:51 2021
From: report at bugs.python.org (Ethan Furman)
Date: Wed, 20 Oct 2021 23:11:51 +0000
Subject: [issue42517] Enum: do not convert private names into members
In-Reply-To: <1606774653.87.0.704564487827.issue42517@roundup.psfhosted.org>
Message-ID: <1634771511.22.0.13581467713.issue42517@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:


New changeset 9733c9651afad84ab2f010e9e68b7c03976ea9f3 by Ethan Furman in branch '3.9':
[3.9] bpo-42517: [ENUM] update docs for changes coming in 3.11 (GH-29113)
https://github.com/python/cpython/commit/9733c9651afad84ab2f010e9e68b7c03976ea9f3


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42517>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:12:50 2021
From: report at bugs.python.org (Eric Cousineau)
Date: Wed, 20 Oct 2021 23:12:50 +0000
Subject: [issue45546] Unable to pickle enum with nested frozen dataclass?
Message-ID: <1634771570.81.0.651443279732.issue45546@roundup.psfhosted.org>


New submission from Eric Cousineau <eric.cousineau at tri.global>:

I seem cannot pickle enum values from an enum class w/ a nested frozen dataclass.

I can pickle a field from a normal class w/ a nested frozen dataclass, and I can pickle a field from an enum with a top-level frozen dataclass - perhaps it's some interplay with `__qualname__` and `enum.py`?.

See attached file for sample test.
I checked on 3.6.9, 3.9.7, and 3.10.0.

Looked around, couldn't easily find existing issue for this.

----------
components: Library (Lib)
files: enum_test.py
messages: 404539
nosy: Eric Cousineau
priority: normal
severity: normal
status: open
title: Unable to pickle enum with nested frozen dataclass?
type: behavior
versions: Python 3.10, Python 3.6, Python 3.9
Added file: https://bugs.python.org/file50378/enum_test.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45546>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:14:20 2021
From: report at bugs.python.org (=?utf-8?b?R8O2a2hhbiDDlnp0w7xyaw==?=)
Date: Wed, 20 Oct 2021 23:14:20 +0000
Subject: [issue36481] telnetlib process_rawq() callback
In-Reply-To: <1553911873.53.0.089397149063.issue36481@roundup.psfhosted.org>
Message-ID: <1634771660.45.0.281221858522.issue36481@roundup.psfhosted.org>


Change by G?khan ?zt?rk <gokhan at eg-ozturk.com>:


----------
versions: +Python 3.11 -Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36481>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:15:10 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Wed, 20 Oct 2021 23:15:10 +0000
Subject: [issue45547] Modenize the importlib loaders
Message-ID: <1634771710.27.0.594592936094.issue45547@roundup.psfhosted.org>


New submission from Filipe La?ns <lains at riseup.net>:

ResourceLoader[1] is deprecated in favor of ResourceReader, which itself is surpassed by TraversableResources.

Would it make sense to replace ResourceLoader usages with ResourceReader in the importlib loaders?
And perhaps, would it make sense to replace them with the files()/Traversable protocol instead?

IMO this could simplify the code a bit, but that's subjective I guess, and better re-use the bytecode caching mechanism in SourceLoader, by providing an equivalent based on files()/Traversable instead.

This could also help push to add support for non filesystem based loaders in other parts of the code, like py_compile, which currently only supports operations on the filesystem.

Is this something we are interested in -- modernizing the importlib loaders with, arguably, better abstractions -- or do we want to keep the old protocols around?

[1] https://docs.python.org/3/library/importlib.html#importlib.abc.ResourceLoader

----------
messages: 404540
nosy: FFY00, barry, brett.cannon, eric.snow, jaraco, ncoghlan
priority: normal
severity: normal
status: open
title: Modenize the importlib loaders

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45547>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:15:17 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:15:17 +0000
Subject: [issue40051] Dead link in
 help(lib2to3/idlelib/turtledemo/tkinter.sub/test_*/?)
In-Reply-To: <1585026386.04.0.352572849659.issue40051@roundup.psfhosted.org>
Message-ID: <1634771717.06.0.909919862009.issue40051@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
components: +2to3 (2.x to 3.x conversion tool) -Documentation, Library (Lib)
resolution:  -> wont fix
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40051>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:15:56 2021
From: report at bugs.python.org (Eric Cousineau)
Date: Wed, 20 Oct 2021 23:15:56 +0000
Subject: [issue45546] Unable to pickle enum with nested frozen dataclass?
In-Reply-To: <1634771570.81.0.651443279732.issue45546@roundup.psfhosted.org>
Message-ID: <1634771756.0.0.781593797244.issue45546@roundup.psfhosted.org>


Eric Cousineau <eric.cousineau at tri.global> added the comment:

Ah, forgot to include error message:

```
<class '__main__.Works1'>
<enum 'Works2'>
<enum 'DoesNotWork'>
E
...
_pickle.PicklingError: Can't pickle <class '__main__.DoesNotWork.NestedValue2'>: it's not the same object as __main__.DoesNotWork.NestedValue2
```

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45546>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:17:12 2021
From: report at bugs.python.org (Ethan Furman)
Date: Wed, 20 Oct 2021 23:17:12 +0000
Subject: [issue44559] Enum: revert to 3.9
In-Reply-To: <1625363304.74.0.624005694289.issue44559@roundup.psfhosted.org>
Message-ID: <1634771832.48.0.550709144422.issue44559@roundup.psfhosted.org>


Change by Ethan Furman <ethan at stoneleaf.us>:


----------
pull_requests: +27385
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29114

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44559>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:21:55 2021
From: report at bugs.python.org (Aldwin Pollefeyt)
Date: Wed, 20 Oct 2021 23:21:55 +0000
Subject: [issue45544] Close 2to3 issues and list them here
In-Reply-To: <1634769745.5.0.0416727468266.issue45544@roundup.psfhosted.org>
Message-ID: <1634772115.83.0.700763569008.issue45544@roundup.psfhosted.org>


Change by Aldwin Pollefeyt <aldwinaldwin at gmail.com>:


----------
pull_requests: +27386
pull_request: https://github.com/python/cpython/pull/14835

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45544>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:22:15 2021
From: report at bugs.python.org (Zachary Ware)
Date: Wed, 20 Oct 2021 23:22:15 +0000
Subject: [issue40051] Dead link in
 help(idlelib/turtledemo/tkinter.sub/test_*/?)
In-Reply-To: <1585026386.04.0.352572849659.issue40051@roundup.psfhosted.org>
Message-ID: <1634772135.82.0.554686270244.issue40051@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:

This one got caught up in the purge of 2to3 issues, but it's about more than just 2to3.  Reopening.

----------
components: +Documentation, Library (Lib) -2to3 (2.x to 3.x conversion tool)
nosy: +zach.ware
resolution: wont fix -> 
stage: resolved -> needs patch
status: closed -> open
superseder: Close 2to3 issues and list them here -> 
title: Dead link in help(lib2to3/idlelib/turtledemo/tkinter.sub/test_*/?) -> Dead link in help(idlelib/turtledemo/tkinter.sub/test_*/?)
versions: +Python 3.11 -Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40051>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:22:29 2021
From: report at bugs.python.org (Paulo Henrique Silva)
Date: Wed, 20 Oct 2021 23:22:29 +0000
Subject: [issue45544] Close 2to3 issues and list them here
In-Reply-To: <1634769745.5.0.0416727468266.issue45544@roundup.psfhosted.org>
Message-ID: <1634772149.88.0.536830740838.issue45544@roundup.psfhosted.org>


Change by Paulo Henrique Silva <ph.silva at gmail.com>:


----------
nosy: +phsilva
nosy_count: 5.0 -> 6.0
pull_requests: +27387
pull_request: https://github.com/python/cpython/pull/18654

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45544>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:23:10 2021
From: report at bugs.python.org (Aldwin Pollefeyt)
Date: Wed, 20 Oct 2021 23:23:10 +0000
Subject: [issue45544] Close 2to3 issues and list them here
In-Reply-To: <1634769745.5.0.0416727468266.issue45544@roundup.psfhosted.org>
Message-ID: <1634772190.68.0.705872620866.issue45544@roundup.psfhosted.org>


Change by Aldwin Pollefeyt <aldwinaldwin at gmail.com>:


----------
pull_requests: +27388
pull_request: https://github.com/python/cpython/pull/15249

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45544>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:23:30 2021
From: report at bugs.python.org (Ashley Whetter)
Date: Wed, 20 Oct 2021 23:23:30 +0000
Subject: [issue45544] Close 2to3 issues and list them here
In-Reply-To: <1634769745.5.0.0416727468266.issue45544@roundup.psfhosted.org>
Message-ID: <1634772210.96.0.935467766468.issue45544@roundup.psfhosted.org>


Change by Ashley Whetter <ashley at awhetter.co.uk>:


----------
nosy: +AWhetter
nosy_count: 6.0 -> 7.0
pull_requests: +27389
pull_request: https://github.com/python/cpython/pull/21296

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45544>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:25:24 2021
From: report at bugs.python.org (Vadim Pushtaev)
Date: Wed, 20 Oct 2021 23:25:24 +0000
Subject: [issue45544] Close 2to3 issues and list them here
In-Reply-To: <1634769745.5.0.0416727468266.issue45544@roundup.psfhosted.org>
Message-ID: <1634772324.03.0.702564705814.issue45544@roundup.psfhosted.org>


Change by Vadim Pushtaev <pushtaev.vm at gmail.com>:


----------
nosy: +Vadim Pushtaev
nosy_count: 7.0 -> 8.0
pull_requests: +27390
pull_request: https://github.com/python/cpython/pull/24244

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45544>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:25:15 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Wed, 20 Oct 2021 23:25:15 +0000
Subject: [issue45547] Modernize the importlib loaders
In-Reply-To: <1634771710.27.0.594592936094.issue45547@roundup.psfhosted.org>
Message-ID: <1634772315.09.0.946850143086.issue45547@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
title: Modenize the importlib loaders -> Modernize the importlib loaders

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45547>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:27:02 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:27:02 +0000
Subject: [issue45544] Close 2to3 issues and list them here
In-Reply-To: <1634769745.5.0.0416727468266.issue45544@roundup.psfhosted.org>
Message-ID: <1634772422.05.0.846020755036.issue45544@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45544>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:27:43 2021
From: report at bugs.python.org (Eric Cousineau)
Date: Wed, 20 Oct 2021 23:27:43 +0000
Subject: [issue45546] Unable to pickle enum with nested frozen dataclass?
In-Reply-To: <1634771570.81.0.651443279732.issue45546@roundup.psfhosted.org>
Message-ID: <1634772463.43.0.0723453655608.issue45546@roundup.psfhosted.org>


Eric Cousineau <eric.cousineau at tri.global> added the comment:

Thinking on it some more, I the current `Enum` metaclass doesn't distinguish between nested class and normal field, so it wraps it, thus why `pickle` gets confused.

Perhaps it's possible to recognize this case - the class w/ `__qualname__` can be checked to see if it's nested.

If so, then options are (a) skip wrapping the field, (b) failing fast, or (c) "no fix"?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45546>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:31:58 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:31:58 +0000
Subject: [issue39747] test_os debug assertion failure
In-Reply-To: <1582608989.67.0.495966477974.issue39747@roundup.psfhosted.org>
Message-ID: <1634772718.1.0.873524312834.issue39747@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
stage:  -> resolved
status: pending -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39747>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:32:56 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:32:56 +0000
Subject: [issue8508] 2to3 fixer for gettext's .ugettext
In-Reply-To: <1272034086.61.0.0547716106043.issue8508@psf.upfronthosting.co.za>
Message-ID: <1634772776.37.0.578331423973.issue8508@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: pending -> closed
superseder:  -> Close 2to3 issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue8508>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:33:35 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:33:35 +0000
Subject: [issue27491] Errors when building with UNICODE character set
In-Reply-To: <1468301219.72.0.359104811522.issue27491@psf.upfronthosting.co.za>
Message-ID: <1634772815.85.0.0474625336439.issue27491@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> out of date
stage:  -> resolved
status: pending -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27491>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:34:08 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 20 Oct 2021 23:34:08 +0000
Subject: [issue33347] zlibmodule undefined reference
In-Reply-To: <1524567960.98.0.682650639539.issue33347@psf.upfronthosting.co.za>
Message-ID: <1634772848.52.0.459941995267.issue33347@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> out of date
stage:  -> resolved
status: pending -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33347>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:37:10 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 20 Oct 2021 23:37: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: <1634773030.25.0.543818266955.issue40051@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

As the title suggested, this is a generic help(module) issue that involves several library modules, including idlelib.  It just happened to be reported for 2to3.  For example, the generated text for 
  import idlelib; help(idlelib)
includes
  MODULE REFERENCE
    https://docs.python.org/3.11/library/idlelib.html
It should be .../idle.html.

The holdup is that I was not then willing to unilaterally decide which of the 3 possible solutions I listed should be pursued.  Maybe just 3, maybe a mix of 1 and 3.

----------
components:  -Documentation
nosy:  -zach.ware
stage: needs patch -> test needed
title: Dead link in help(idlelib/turtledemo/tkinter.sub/test_*/?) -> Give proper link in help(idlelib/turtledemo/tkinter.sub/test_*/?)
versions:  -Python 3.10, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40051>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:49:35 2021
From: report at bugs.python.org (Tim Peters)
Date: Wed, 20 Oct 2021 23:49:35 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634773775.93.0.8165644534.issue45530@roundup.psfhosted.org>


Tim Peters <tim at python.org> added the comment:

It's rare that an optimization is a _pure_ win. Some cases win, others lose. There's almost never "a proof" of net gain ending with "QED".

Of course it's dead easy to construct examples where "many duplicates in the first tuple position" rules, and even easy to construct realistic examples.

But, as you already said in the SO report, in those cases it's a better idea to do multiple single-key sorts instead of a single multiple-keys-in-a-tuple sort. The base sorting algorithm can exploit duplicates in a single-key sort - indeed, the more duplicates there are, the more benefit it can get.

The sorting HOWTO could do a service by discussing this for CPython's sorting algorithm - it's not obvious, and can have major effects.

In the meantime, I'm only aiming to speed tuple keys for cases where they're well-suited to begin with: the first tuple elements _are_ mostly distinct. Giving up a significant win for the relative handful of people who know how to exploit the algorithm is not worth it, to me, to avoid making suboptimal uses even less optimal.

I'm more a pragmatist than a Utopian :-;

Extending the idea to positions beyond the first is dubious on those grounds: if the first tuple positions in fact often match, then the optimization has already backfired. Time to admit defeat then, not double down on failed arrogance ;-)

One idea I'm playing with: keep track of how often, during a tuple-key sort, a compare _is_ resolved by the first elements. Then adjust `unsafe_tuple_compare()` to switch to "the other" approach when "the current" approach isn't working out.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:57:37 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 20 Oct 2021 23:57:37 +0000
Subject: [issue43678] TypeError: get() got an unexpected keyword argument
 'vars'
In-Reply-To: <1617200134.2.0.498319587361.issue43678@roundup.psfhosted.org>
Message-ID: <1634774257.82.0.0501281954716.issue43678@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I presume something like this:
>>> {}.get(vars=1)
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    {}.get(vars=1)
TypeError: get() takes no keyword arguments  # 3.8+

Report is 3.7.

----------
nosy: +terry.reedy
resolution: rejected -> not a bug

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43678>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:58:49 2021
From: report at bugs.python.org (Brett Cannon)
Date: Wed, 20 Oct 2021 23:58:49 +0000
Subject: [issue45548] Update Modules/Setup
Message-ID: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>


New submission from Brett Cannon <brett at python.org>:

`Modules/Setup` is currently incomplete/broken. Some things are completely missing from it, while others won't work if you uncomment them in the file.

When trying to compile a completely static CPython interpreter I ran into the following issues:

- _weakref is listed twice
- _testcapi can't be statically compiled
- math/cmath conflict with a build rule in Makefile.pre.in
- _dbm needs more logic/comments (at least on macOS)
- nis needs more logic/comments (at least on macOS)

And the following modules are completely missing from the file:
- _ctypes
- _decimal
- _lsprof
- _lzma
- _multiprocessing
- _opcode
- _posixshmem
- _queue
- _scproxy
- _sqlite3
- _testbuffer
- _testipmortmultiple
- _testmultiphase
- _uuid
- xxsubinterpreters
- xxtestfuzz
- ossaudiodev
- xxlimited
- xxlimited_35

----------
assignee: brett.cannon
components: Build
messages: 404548
nosy: brett.cannon
priority: low
severity: normal
status: open
title: Update Modules/Setup
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Wed Oct 20 19:59:39 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Wed, 20 Oct 2021 23:59:39 +0000
Subject: [issue43678] TypeError: get() got an unexpected keyword argument
 'vars'
In-Reply-To: <1617200134.2.0.498319587361.issue43678@roundup.psfhosted.org>
Message-ID: <1634774379.89.0.248904024948.issue43678@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
type:  -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43678>
_______________________________________

From report at bugs.python.org  Wed Oct 20 20:01:46 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 00:01:46 +0000
Subject: [issue23902] let exception react to being raised or the setting of
 magic properties (like __cause__) within Python
In-Reply-To: <1428610708.13.0.662863454956.issue23902@psf.upfronthosting.co.za>
Message-ID: <1634774506.8.0.464647012675.issue23902@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

> It seems sufficient to call a magic method on the exception immediately after these the traceback/cause/context parameters have been set while it is being raised


What should happen if this callback raises an exception?

----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23902>
_______________________________________

From report at bugs.python.org  Wed Oct 20 20:03:48 2021
From: report at bugs.python.org (Brett Cannon)
Date: Thu, 21 Oct 2021 00:03:48 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1634774628.8.0.354769299433.issue45548@roundup.psfhosted.org>


Change by Brett Cannon <brett at python.org>:


----------
keywords: +patch
pull_requests: +27391
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29115

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Wed Oct 20 20:03:53 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Thu, 21 Oct 2021 00:03:53 +0000
Subject: [issue45545] chdir __exit__ is not safe
In-Reply-To: <1634770485.18.0.358610816486.issue45545@roundup.psfhosted.org>
Message-ID: <1634774633.77.0.988690819714.issue45545@roundup.psfhosted.org>


Barry A. Warsaw <barry at python.org> added the comment:

Does this mean that CWD could be in a directory that you couldn't chdir() back into?

----------
nosy: +barry

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Wed Oct 20 20:11:29 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Thu, 21 Oct 2021 00:11:29 +0000
Subject: [issue45540] module.__package__ and module.__spec__.parent have
 different semantics
In-Reply-To: <CALFfu7BAy=ZcbwzCcz51vayyRFPm-xvKJFEzo66ir4JnbjBtEg@mail.gmail.com>
Message-ID: <18C8915B-689A-49E5-BE0B-33C389540A87@python.org>


Barry A. Warsaw <barry at python.org> added the comment:

On Oct 20, 2021, at 11:38, Eric Snow <report at bugs.python.org> wrote:
> 
> Regardless, I expect the primary reason __package__ is writable is
> because modules have never had any read-only attrs.

So historical accident mostly.

> The more important question now is, when is __package__ ever modified?
> I can think of 2 cases:
> 
> 1. legacy (pre-451) importers set it when they load the module
> 2. someone wants to customize the import system without writing an importer
> 
> With the latter, specifically they are trying to change how the module
> is reloaded or submodules are imported.  In that case there should
> probably be an explicit way to do so without having to hack the import
> machinery.
> 
> My only concern with any support/encouragement for modifying the spec
> after import is it results in less confidence about how the module was
> imported originally.

I guess a question to answer then is whether we philosophically want the module attributes to be equivalent to the spec attributes.  And by equivalent, I mean enforced to be exactly so, and thus a proxy.  To me, the duplication is a wart that we should migrate away from so there?s only one place for these attributes, and that should be the spec.

Here is the mapping we currently describe in the docs:

mod.__name__ === __spec__.name
mod.__package__ === __spec__.parent
mod.__loader__ === __spec__.loader
mod.__file__ === __spec__.origin
mod.__path__ === __spec__.submodule_search_locations
mod.__cached__ === __spec__.cached

But right now, they don?t have to stay in sync, and I don?t think it?s reasonable to put the onus on the user to keep them in sync, because it?s unclear what code uses which attribute.  Okay, so you can just set them both to be safe, but then you can?t do that with __spec__.parent/__package__

This is what leads me to think that having a proxy to keep them in sync and relaxing the read-only restriction is the path forward, even if writing __package__ doesn?t make sense.  It also seems like the easier way to keep backward compatibility, rather than enforcing read-only on __package__ to match __spec__.parent.

So the question is less about whether this is useful than whether it will break things if they write to it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45540>
_______________________________________

From report at bugs.python.org  Wed Oct 20 20:15:09 2021
From: report at bugs.python.org (Jeremy)
Date: Thu, 21 Oct 2021 00:15:09 +0000
Subject: [issue45545] chdir __exit__ is not safe
In-Reply-To: <1634770485.18.0.358610816486.issue45545@roundup.psfhosted.org>
Message-ID: <1634775309.25.0.801776698459.issue45545@roundup.psfhosted.org>


Jeremy <ucodery at gmail.com> added the comment:

Yes, precisely. Besides being an unreachable long abs path, it might have been deleted since last visited. I?m working on a few more odd test cases.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Wed Oct 20 20:17:40 2021
From: report at bugs.python.org (Tim Peters)
Date: Thu, 21 Oct 2021 00:17:40 +0000
Subject: [issue45542] Using multiple comparison operators can cause
 performance issues
In-Reply-To: <1634754333.52.0.650287816276.issue45542@roundup.psfhosted.org>
Message-ID: <1634775460.84.0.834236778697.issue45542@roundup.psfhosted.org>


Tim Peters <tim at python.org> added the comment:

I think Dennis's example is fatal: from section 6.10 ("Comparisons"):

"""
Comparisons can be chained arbitrarily, e.g., `x < y <= z` is equivalent to `x < y and y <= z`, except that y is evaluated only once (but in both cases z is not evaluated at all when x < y is found to be false).
"""

So doing LOAD_FAST twice on x (in `1 < x < 3`) is prohibited by the language definition. Doesn't matter to this whether it's plain `x` or `f(x)` where `f()` is some arbitrary function: the object the middle comparand signifies is fixed at whatever it was when the the first comparison is evaluated.

----------
nosy: +tim.peters

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45542>
_______________________________________

From report at bugs.python.org  Wed Oct 20 20:17:50 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Thu, 21 Oct 2021 00:17:50 +0000
Subject: [issue33277] Deprecate __loader__, __package__,
 and __cached__ on modules
In-Reply-To: <1634754711.34.0.506263533319.issue33277@roundup.psfhosted.org>
Message-ID: <EF8C5F76-4A9D-43C3-B752-5F4D1C6104B0@python.org>


Barry A. Warsaw <barry at python.org> added the comment:

On Oct 20, 2021, at 11:31, Brett Cannon <report at bugs.python.org> wrote:
> 
>> +1 on a proxy (with read-only attrs) for everything but __name__, __file__, and __path__ (which can all be different than the spec).
> 
> I'm -1 on a proxy as that doesn't simplify the situation. Having (nearly) duplicate attributes is confusing and I have yet to see it benefit anyone.

If we don?t implement a proxy to enforce equivalence, then we shouldn?t say as such in the documentation.  And we should be much clearer about what the purpose of the spec is versus the module attributes.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33277>
_______________________________________

From report at bugs.python.org  Wed Oct 20 20:20:43 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Thu, 21 Oct 2021 00:20:43 +0000
Subject: [issue33277] Deprecate __loader__, __package__,
 and __cached__ on modules
In-Reply-To: <1634743095.12.0.425981888156.issue33277@roundup.psfhosted.org>
Message-ID: <DD4BD9D5-C9E3-41CA-94BF-38C76ABEA1F4@python.org>


Barry A. Warsaw <barry at python.org> added the comment:

On Oct 20, 2021, at 08:18, Eric Snow <report at bugs.python.org> wrote:

> The spec identifies how a module should be loaded (or how it was loaded and should be reloaded).  We should be careful to preserve that identify and not invite uses to modify the spec after (or while) the module is loaded.  PEP 451 talks about the difference a little, but I'm pretty sure it came up in more detail in discussions about the PEP at that time.

It?s frankly not good enough to capture the *intent* of these attributes in a PEP.  We need to be clear in the documentation about their purpose and we need to be clear about when to use or set either the module attribute or the spec attribute.  The current situation is ambiguous and possibly misleading.  But maybe it?s ?just? a documentation issue?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33277>
_______________________________________

From report at bugs.python.org  Wed Oct 20 20:24:06 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Thu, 21 Oct 2021 00:24:06 +0000
Subject: [issue33277] Deprecate __loader__, __package__,
 and __cached__ on modules
In-Reply-To: <1634743700.56.0.0230444450409.issue33277@roundup.psfhosted.org>
Message-ID: <9DA8E456-CBD6-4413-BE0C-5F3462CE14A9@python.org>


Barry A. Warsaw <barry at python.org> added the comment:

On Oct 20, 2021, at 08:28, Eric Snow <report at bugs.python.org> wrote:
> 
> The only catch I see is where the module's code sets one of the attrs.  Would the proxy (or import machinery) pick those up, or maybe for some of them emit a warning or fail?
> 
> We could also skip the proxy and add the properties to ModuleType directly, no?

My initial idea was to proxy from the ModuleType to the ModuleSpec and I started down that path, but hacking in C is much more painful than experimenting in Python, so that?s why I did my WIP branch (i.e. just to play with the feasibility of it).

Thus I had planned to keep the actual attribute values in the ModuleSpec and essentially implement a getattro and setattro in the ModuleType that proxied sets and gets to the ModuleSpec.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33277>
_______________________________________

From report at bugs.python.org  Wed Oct 20 20:25:14 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Thu, 21 Oct 2021 00:25:14 +0000
Subject: [issue45545] chdir __exit__ is not safe
In-Reply-To: <1634775309.25.0.801776698459.issue45545@roundup.psfhosted.org>
Message-ID: <3A6BCFB6-F7BE-4F04-A162-B0561B1196C1@python.org>


Barry A. Warsaw <barry at python.org> added the comment:

> Yes, precisely. Besides being an unreachable long abs path, it might have been deleted since last visited. I?m working on a few more odd test cases.

Ah, the deleted case.  Sounds like LBYL wouldn?t work in that case then. :(

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Wed Oct 20 20:31:31 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Thu, 21 Oct 2021 00:31:31 +0000
Subject: [issue45546] Unable to pickle enum with nested frozen dataclass?
In-Reply-To: <1634771570.81.0.651443279732.issue45546@roundup.psfhosted.org>
Message-ID: <1634776291.16.0.857676340283.issue45546@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

I get an error with 3.8.10, but not on the main branch (3.11). I don't have other versions handy to test.

Removing 3.6, as it's no longer getting bug fixes, and this doesn't look like a security issue.

----------
nosy: +eric.smith
versions:  -Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45546>
_______________________________________

From report at bugs.python.org  Wed Oct 20 20:34:58 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 21 Oct 2021 00:34:58 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1634776498.46.0.0209526074669.issue45548@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset dd86f63b551c8c255c6d8082c02f35608d294db9 by Brett Cannon in branch 'main':
bpo-45548: add some missing entries to `Modules/Setup` (GH-29115)
https://github.com/python/cpython/commit/dd86f63b551c8c255c6d8082c02f35608d294db9


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Wed Oct 20 20:38:35 2021
From: report at bugs.python.org (Brett Cannon)
Date: Thu, 21 Oct 2021 00:38:35 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1634776715.1.0.0240290906669.issue45548@roundup.psfhosted.org>


Brett Cannon <brett at python.org> added the comment:

Status is now:

- math/cmath conflict with a build rule in Makefile.pre.in
- _dbm needs more logic/comments (at least on macOS)
- nis needs more logic/comments (at least on macOS)

And the following modules are completely missing from the file:
- _bz2
- _ctypes
- _decimal
- _multiprocessing
- _posixshmem
- _scproxy
- _sqlite3
- _uuid

----------
stage: patch review -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Wed Oct 20 20:45:08 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Thu, 21 Oct 2021 00:45: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: <1634777108.74.0.969731655044.issue45546@roundup.psfhosted.org>


Change by Eric V. Smith <eric at trueblade.com>:


----------
nosy: +ethan.furman

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45546>
_______________________________________

From report at bugs.python.org  Wed Oct 20 21:25:46 2021
From: report at bugs.python.org (Daniel Lenski)
Date: Thu, 21 Oct 2021 01:25:46 +0000
Subject: [issue30238] 2to3 doesn't detect or fix Exception indexing
In-Reply-To: <1493753516.03.0.383972145792.issue30238@psf.upfronthosting.co.za>
Message-ID: <1634779546.17.0.279024738594.issue30238@roundup.psfhosted.org>


Daniel Lenski <dlenski at gmail.com> added the comment:

Why was this closed?

As I wrote in a previous comment, this situation can be automatically identified and addressed via static analysis in the vastly-predominant case, where the Exception object is assigned via an `exception ... as exc:` clause.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30238>
_______________________________________

From report at bugs.python.org  Wed Oct 20 22:22:18 2021
From: report at bugs.python.org (Ethan Furman)
Date: Thu, 21 Oct 2021 02:22:18 +0000
Subject: [issue45546] Unable to pickle enum with nested frozen dataclass?
In-Reply-To: <1634771570.81.0.651443279732.issue45546@roundup.psfhosted.org>
Message-ID: <1634782938.84.0.575134226221.issue45546@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:

I'm confused -- your initial report talks about pickling fields, but your tests are pickling the entire class... what am I missing?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45546>
_______________________________________

From report at bugs.python.org  Wed Oct 20 22:48:47 2021
From: report at bugs.python.org (Ethan Furman)
Date: Thu, 21 Oct 2021 02:48:47 +0000
Subject: [issue44559] Enum: revert to 3.9
In-Reply-To: <1625363304.74.0.624005694289.issue44559@roundup.psfhosted.org>
Message-ID: <1634784527.19.0.970316910393.issue44559@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:


New changeset 2a9ab75af32b1ee9f210ae2a0718990687d0f79d by Ethan Furman in branch '3.10':
bpo-44559: [Enum] restore fixes lost in 3.9 reversion (GH-29114)
https://github.com/python/cpython/commit/2a9ab75af32b1ee9f210ae2a0718990687d0f79d


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44559>
_______________________________________

From report at bugs.python.org  Wed Oct 20 23:12:43 2021
From: report at bugs.python.org (Damien George)
Date: Thu, 21 Oct 2021 03:12:43 +0000
Subject: [issue43683] Handle generator (and coroutine) state in the bytecode.
In-Reply-To: <1617209103.34.0.926095267338.issue43683@roundup.psfhosted.org>
Message-ID: <1634785963.46.0.318422441995.issue43683@roundup.psfhosted.org>


Damien George <damien.p.george at gmail.com> added the comment:

It looks like this change introduced a subtle, and maybe intended (?), behavioural change.

Consider (from MicroPython's test suite):

def f():
    n = 0 
    while True:
        n = yield n + 1 
        print(n)

g = f()
try:
    g.send(1)
except TypeError:
    print("caught")

print(g.send(None))
print(g.send(100))
print(g.send(200))

This used to work prior to commit b37181e69209746adc2119c471599a1ea5faa6c8.  But after that commit it fails on the print(g.send(None)) because the generator is now stopped.

----------
nosy: +dpgeorge

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43683>
_______________________________________

From report at bugs.python.org  Wed Oct 20 23:15:25 2021
From: report at bugs.python.org (Ethan Furman)
Date: Thu, 21 Oct 2021 03:15:25 +0000
Subject: [issue44174] Unclear meaning of _Private__names in enum docs.
In-Reply-To: <1621394869.98.0.78361930377.issue44174@roundup.psfhosted.org>
Message-ID: <1634786125.38.0.983077106644.issue44174@roundup.psfhosted.org>


Change by Ethan Furman <ethan at stoneleaf.us>:


----------
keywords: +patch
pull_requests: +27392
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29116

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44174>
_______________________________________

From report at bugs.python.org  Wed Oct 20 23:32:18 2021
From: report at bugs.python.org (Ethan Furman)
Date: Thu, 21 Oct 2021 03:32:18 +0000
Subject: [issue44174] Unclear meaning of _Private__names in enum docs.
In-Reply-To: <1621394869.98.0.78361930377.issue44174@roundup.psfhosted.org>
Message-ID: <1634787138.81.0.483680584855.issue44174@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:


New changeset 7c4d96103c4e16161e9aed9a584c9857d0674099 by Ethan Furman in branch 'main':
bpo-44174: [Enum] add reference to name mangling (GH-29116)
https://github.com/python/cpython/commit/7c4d96103c4e16161e9aed9a584c9857d0674099


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44174>
_______________________________________

From report at bugs.python.org  Wed Oct 20 23:49:37 2021
From: report at bugs.python.org (Ethan Furman)
Date: Thu, 21 Oct 2021 03:49:37 +0000
Subject: [issue44174] Unclear meaning of _Private__names in enum docs.
In-Reply-To: <1621394869.98.0.78361930377.issue44174@roundup.psfhosted.org>
Message-ID: <1634788177.74.0.588667672962.issue44174@roundup.psfhosted.org>


Change by Ethan Furman <ethan at stoneleaf.us>:


----------
pull_requests: +27393
pull_request: https://github.com/python/cpython/pull/29117

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44174>
_______________________________________

From report at bugs.python.org  Thu Oct 21 00:48:00 2021
From: report at bugs.python.org (Benjamin Peterson)
Date: Thu, 21 Oct 2021 04:48:00 +0000
Subject: [issue30238] 2to3 doesn't detect or fix Exception indexing
In-Reply-To: <1493753516.03.0.383972145792.issue30238@psf.upfronthosting.co.za>
Message-ID: <1634791680.66.0.500510490951.issue30238@roundup.psfhosted.org>


Benjamin Peterson <benjamin at python.org> added the comment:

See the superseding issue; 2to3 is deprecated and headed towards deletion.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30238>
_______________________________________

From report at bugs.python.org  Thu Oct 21 00:56:05 2021
From: report at bugs.python.org (Martin)
Date: Thu, 21 Oct 2021 04:56: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: <1634792165.01.0.731168113891.issue43656@roundup.psfhosted.org>


Martin <martin.schroeder at nerdluecht.de> added the comment:

Thanks, Joe, this is a very good summary of all the problems.

Another idea to fix this could be an additional parameter "repr=repr" to StackSummary.extract. This way, the default behavior is not changed, but the user is allowed to supply their own repr (safe_repr for example).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Thu Oct 21 00:56:17 2021
From: report at bugs.python.org (Eryk Sun)
Date: Thu, 21 Oct 2021 04:56:17 +0000
Subject: [issue45545] chdir __exit__ is not safe
In-Reply-To: <1634770485.18.0.358610816486.issue45545@roundup.psfhosted.org>
Message-ID: <1634792177.13.0.807964548979.issue45545@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

> # I thought this would have to be 16, i.e. a path length over 4096, PATH_MAX
> # but seemingly just crossing 1050 is enough to fail

If os.pathconf() and PC_PATH_MAX are supported, the maximum allowed length of an absolute path is os.pathconf('/', os.pathconf_names['PC_PATH_MAX']). I think it also depends on the mounted filesystems that the path traverses.

If os.chdir is in os.supports_fd, the context manager can use dirfd = os.open(os.getcwd(), os.O_RDONLY). Using an fd should also work around the deleted directory case, though POSIX doesn't specify whether fchdir() succeeds in this case. It does in Linux, and the resulting state is the same as deleting the current working directory.

In Windows, SetCurrentDirectoryW() resolves the full path. So the result from os.getcwd() should always work with os.chdir(). The context manager could prevent the original directory from getting deleted by opening it without delete sharing (e.g. via _winapi.CreateFile). Though it may be more reasonable to just let it fail to restore the original working directory.

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Thu Oct 21 01:52:51 2021
From: report at bugs.python.org (Tomer Vromen)
Date: Thu, 21 Oct 2021 05:52:51 +0000
Subject: [issue41698] io.[Text]IOBase.seek doesn't take keyword parameter -
 revisited
In-Reply-To: <1599096760.67.0.528727675431.issue41698@roundup.psfhosted.org>
Message-ID: <1634795571.7.0.351953153602.issue41698@roundup.psfhosted.org>


Tomer Vromen <tomerv at gmail.com> added the comment:

Just wanted to add that I encountered this today, went to file a ticket, and found this one. I'm fine with either style of documentation.

----------
nosy: +tomerv

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41698>
_______________________________________

From report at bugs.python.org  Thu Oct 21 02:26:59 2021
From: report at bugs.python.org (Kreusada)
Date: Thu, 21 Oct 2021 06:26:59 +0000
Subject: [issue44019] operator.call/operator.__call__
In-Reply-To: <1620051840.28.0.198895693226.issue44019@roundup.psfhosted.org>
Message-ID: <1634797619.56.0.832130013396.issue44019@roundup.psfhosted.org>


Change by Kreusada <kreusadaprojects at gmail.com>:


----------
nosy: +Kreusada
nosy_count: 7.0 -> 8.0
pull_requests: +27394
pull_request: https://github.com/python/cpython/pull/29110

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44019>
_______________________________________

From report at bugs.python.org  Thu Oct 21 02:45:27 2021
From: report at bugs.python.org (Antony Lee)
Date: Thu, 21 Oct 2021 06:45:27 +0000
Subject: [issue44019] operator.call/operator.__call__
In-Reply-To: <1620051840.28.0.198895693226.issue44019@roundup.psfhosted.org>
Message-ID: <1634798727.74.0.386266248982.issue44019@roundup.psfhosted.org>


Change by Antony Lee <anntzer.lee at gmail.com>:


----------
nosy:  -Antony.Lee

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44019>
_______________________________________

From report at bugs.python.org  Thu Oct 21 02:51:36 2021
From: report at bugs.python.org (Besart Dollma)
Date: Thu, 21 Oct 2021 06:51:36 +0000
Subject: [issue45311] Threading Semaphore and BoundedSemaphore release method
 implementation improvement
In-Reply-To: <1632835923.15.0.15993520004.issue45311@roundup.psfhosted.org>
Message-ID: <1634799096.97.0.886533175223.issue45311@roundup.psfhosted.org>


Besart Dollma <besi7dollma at gmail.com> added the comment:

This is another illogical behaviour, if I am trying to release 5 threads, and I fail the releasing the first one, why should I try the first one 5 times?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45311>
_______________________________________

From report at bugs.python.org  Thu Oct 21 04:42:59 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 21 Oct 2021 08:42:59 +0000
Subject: [issue45311] Threading Semaphore and BoundedSemaphore release method
 implementation improvement
In-Reply-To: <1632835923.15.0.15993520004.issue45311@roundup.psfhosted.org>
Message-ID: <1634805779.63.0.406181476996.issue45311@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

This code was added in bpo-10978. Raymond, what are your thoughts?

----------
nosy: +rhettinger
versions: +Python 3.11 -Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45311>
_______________________________________

From report at bugs.python.org  Thu Oct 21 04:47:20 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Thu, 21 Oct 2021 08:47:20 +0000
Subject: [issue44220] PyStructSequence_UnnamedField unavailable on Windows
In-Reply-To: <1621813200.62.0.269776219006.issue44220@roundup.psfhosted.org>
Message-ID: <1634806040.58.0.713193821235.issue44220@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:


New changeset 2cbf50e8126905b57ba9d0d5aa4e238c817d5a03 by Ken Jin in branch 'main':
bpo-44220: Export PyStructSequence_UnnamedField in the limited API (GH-26331)
https://github.com/python/cpython/commit/2cbf50e8126905b57ba9d0d5aa4e238c817d5a03


----------
nosy: +petr.viktorin

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44220>
_______________________________________

From report at bugs.python.org  Thu Oct 21 04:59:47 2021
From: report at bugs.python.org (Almog Mishraki)
Date: Thu, 21 Oct 2021 08:59:47 +0000
Subject: [issue45549] Seek in file object didn't treat all paths of exceptions
Message-ID: <1634806787.57.0.83503988126.issue45549@roundup.psfhosted.org>


New submission from Almog Mishraki <mog7599 at gmail.com>:

Hi
I detailed everything in the file I've upload.
Thanks in advanced

----------
components: Library (Lib)
files: Python - file Bug.txt
messages: 404573
nosy: mog7599
priority: normal
severity: normal
status: open
title: Seek in file object didn't treat all paths of exceptions
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/file50379/Python - file Bug.txt

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45549>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:06:51 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Thu, 21 Oct 2021 09:06:51 +0000
Subject: [issue44220] PyStructSequence_UnnamedField unavailable on Windows
In-Reply-To: <1621813200.62.0.269776219006.issue44220@roundup.psfhosted.org>
Message-ID: <1634807211.83.0.712020192886.issue44220@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

It should be available in python3x.dll (e.g. pyhon310.dll).
It  is  not  available in python3.dll  (the stable ABI), until Python 3.11.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11 -Python 3.7, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44220>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:31:00 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:31:00 +0000
Subject: [issue28533] Replace asyncore
In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za>
Message-ID: <1634808660.58.0.531862414789.issue28533@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

asyncore, asynchat and smtpd are all deprecated now, for removal in 3.12.

While the tests are not blocking their removal (we can move them to test.support) it would still be better to rewrite these tests.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28533>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:36:48 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:36:48 +0000
Subject: [issue28533] Replace asyncore/asynchat/smptd in tests
In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za>
Message-ID: <1634809008.69.0.886418225821.issue28533@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
assignee: aeros -> 
components: +Tests
nosy: +asvetlov
title: Replace asyncore -> Replace asyncore/asynchat/smptd in tests
versions: +Python 3.11 -Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28533>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:42:07 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 21 Oct 2021 09:42:07 +0000
Subject: [issue45542] Using multiple comparison operators can cause
 performance issues
In-Reply-To: <1634754333.52.0.650287816276.issue45542@roundup.psfhosted.org>
Message-ID: <1634809327.9.0.446593548582.issue45542@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Agree with Tim.

The idea of optimizing stack manipulation operations for constants is interesting, but is it common enough case to justify the compiler complication?

See also rejected issue27236.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45542>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:46:30 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Thu, 21 Oct 2021 09:46:30 +0000
Subject: [issue45315] `PyType_FromSpec` does not copy the name
In-Reply-To: <1632861906.82.0.496996210358.issue45315@roundup.psfhosted.org>
Message-ID: <1634809590.41.0.655137198765.issue45315@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:


New changeset 8a310dd5f4242b5d28013c1905c6573477e3b957 by Petr Viktorin in branch 'main':
bpo-45315: PyType_FromSpec: Copy spec->name and have the type own the memory for its name (GH-29103)
https://github.com/python/cpython/commit/8a310dd5f4242b5d28013c1905c6573477e3b957


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45315>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:55:48 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:55:48 +0000
Subject: [issue45538] MinGW is unsupported - close all open issues and list
 them here.
In-Reply-To: <1634733332.39.0.633564936685.issue45538@roundup.psfhosted.org>
Message-ID: <1634810148.11.0.735142530958.issue45538@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45538>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:56:03 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:56:03 +0000
Subject: [issue45537] Cygwin is unsupported - close all open issues and list
 them here.
In-Reply-To: <1634732285.27.0.278106731205.issue45537@roundup.psfhosted.org>
Message-ID: <1634810163.84.0.53982270114.issue45537@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45537>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:56:34 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:56:34 +0000
Subject: [issue4802] detect_tkinter for cygwin
In-Reply-To: <1230840510.49.0.878061128691.issue4802@psf.upfronthosting.co.za>
Message-ID: <1634810194.72.0.114715531326.issue4802@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue4802>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:56:48 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:56:48 +0000
Subject: [issue1244861] Enable os.startfile and webbrowser.WindowsDefault on
 Cygwin
Message-ID: <1634810208.38.0.0954359977984.issue1244861@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue1244861>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:56:42 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:56:42 +0000
Subject: [issue2233] Makefile.pre.in contains extra slash before $(DESTDIR)
 which can cause Cygwin build to fail
In-Reply-To: <1204652870.95.0.330326965123.issue2233@psf.upfronthosting.co.za>
Message-ID: <1634810202.57.0.0470206916075.issue2233@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2233>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:57:27 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:57:27 +0000
Subject: [issue32243] Tests that set aggressive switch interval hang in Cygwin
 on a VM
In-Reply-To: <1512657533.84.0.213398074469.issue32243@psf.upfronthosting.co.za>
Message-ID: <1634810247.66.0.606732385171.issue32243@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32243>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:57:21 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:57:21 +0000
Subject: [issue28459] _pyio module broken on Cygwin / setmode not usable
In-Reply-To: <1476701892.4.0.598393414511.issue28459@psf.upfronthosting.co.za>
Message-ID: <1634810241.03.0.223327240365.issue28459@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28459>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:57:42 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:57:42 +0000
Subject: [issue27374] Cygwin: Makefile does not install DLL import library
In-Reply-To: <1466695238.23.0.601958974473.issue27374@psf.upfronthosting.co.za>
Message-ID: <1634810262.02.0.427484019535.issue27374@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27374>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:57:36 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:57:36 +0000
Subject: [issue31882] Cygwin: asyncio and asyncore test suites hang
 indefinitely due to bug in Cygwin
In-Reply-To: <1509109689.46.0.213398074469.issue31882@psf.upfronthosting.co.za>
Message-ID: <1634810256.0.0.0475549633764.issue31882@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31882>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:59:02 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:59:02 +0000
Subject: [issue18486] mingw: dynamic loading support
In-Reply-To: <1374093111.95.0.0778484284701.issue18486@psf.upfronthosting.co.za>
Message-ID: <1634810342.0.0.358588007671.issue18486@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18486>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:59:08 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:59:08 +0000
Subject: [issue18653] mingw-meta: build core modules
In-Reply-To: <1375619720.06.0.766677441218.issue18653@psf.upfronthosting.co.za>
Message-ID: <1634810348.77.0.92733735286.issue18653@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18653>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:59:14 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:59:14 +0000
Subject: [issue15315] Can't build Python extension with mingw32 on Windows
In-Reply-To: <1341895923.16.0.599445307566.issue15315@psf.upfronthosting.co.za>
Message-ID: <1634810354.43.0.331245548714.issue15315@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15315>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:59:20 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:59:20 +0000
Subject: [issue18634] mingw find import library
In-Reply-To: <1375471005.24.0.423283634636.issue18634@psf.upfronthosting.co.za>
Message-ID: <1634810360.3.0.365169451825.issue18634@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18634>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:59:36 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:59:36 +0000
Subject: [issue19241] MINGW: install import library
In-Reply-To: <1381661724.71.0.909185396021.issue19241@psf.upfronthosting.co.za>
Message-ID: <1634810376.16.0.256971625296.issue19241@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19241>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:59:25 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:59:25 +0000
Subject: [issue6335] Add support for mingw
In-Reply-To: <1245849042.65.0.399048729588.issue6335@psf.upfronthosting.co.za>
Message-ID: <1634810365.62.0.308607500336.issue6335@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue6335>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:59:42 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:59:42 +0000
Subject: [issue17598] mingw: init system calls
In-Reply-To: <1364759885.17.0.0266392857932.issue17598@psf.upfronthosting.co.za>
Message-ID: <1634810382.28.0.901891176196.issue17598@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17598>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:59:54 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:59:54 +0000
Subject: [issue18485] mingw: configure for shared build
In-Reply-To: <1374092492.69.0.0184006927142.issue18485@psf.upfronthosting.co.za>
Message-ID: <1634810394.15.0.223898929833.issue18485@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18485>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:00:02 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:00:02 +0000
Subject: [issue17600] mingw: build-in windows modules (winreg)
In-Reply-To: <1364760067.55.0.47312643971.issue17600@psf.upfronthosting.co.za>
Message-ID: <1634810402.06.0.333445687036.issue17600@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17600>
_______________________________________

From report at bugs.python.org  Thu Oct 21 05:59:48 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 09:59:48 +0000
Subject: [issue17602] mingw: default sys.path calculations for windows
 platforms
In-Reply-To: <1364760613.75.0.604084743865.issue17602@psf.upfronthosting.co.za>
Message-ID: <1634810388.79.0.374513647215.issue17602@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17602>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:00:08 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:00:08 +0000
Subject: [issue17590] mingw: translate gcc internal defines to python platform
 specific defines
In-Reply-To: <1364758799.57.0.261822298653.issue17590@psf.upfronthosting.co.za>
Message-ID: <1634810407.99.0.272124991766.issue17590@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17590>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:00:13 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:00:13 +0000
Subject: [issue17594] mingw: preset configure defaults
In-Reply-To: <1364759209.12.0.183871965153.issue17594@psf.upfronthosting.co.za>
Message-ID: <1634810413.64.0.819422233311.issue17594@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17594>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:00:38 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:00:38 +0000
Subject: [issue18631] mingw: setup msvcrt and _winapi modules
In-Reply-To: <1375467097.24.0.168691156888.issue18631@psf.upfronthosting.co.za>
Message-ID: <1634810438.05.0.599665474348.issue18631@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18631>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:00:32 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:00:32 +0000
Subject: [issue17597] mingw: Allow Objects/exceptions.c to include "errmap.h"
In-Reply-To: <1364759799.81.0.998386094022.issue17597@psf.upfronthosting.co.za>
Message-ID: <1634810432.44.0.0513780007184.issue17597@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17597>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:00:25 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:00:25 +0000
Subject: [issue4709] Mingw-w64 and python on windows x64
In-Reply-To: <1229849614.64.0.683517411932.issue4709@psf.upfronthosting.co.za>
Message-ID: <1634810425.43.0.532758659876.issue4709@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue4709>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:00:48 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:00:48 +0000
Subject: [issue17604] mingw: use main() to start execution
In-Reply-To: <1364760973.75.0.319025813954.issue17604@psf.upfronthosting.co.za>
Message-ID: <1634810448.45.0.811327048003.issue17604@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17604>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:00:20 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:00:20 +0000
Subject: [issue18500] mingw: detect winsock2 and setup _socket module
In-Reply-To: <1374179669.42.0.252427857289.issue18500@psf.upfronthosting.co.za>
Message-ID: <1634810420.58.0.865732958525.issue18500@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18500>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:00:43 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:00:43 +0000
Subject: [issue18495] mingw: ignore main program for frozen scripts
In-Reply-To: <1374178220.38.0.0504340051034.issue18495@psf.upfronthosting.co.za>
Message-ID: <1634810443.31.0.150720270865.issue18495@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18495>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:00:53 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:00:53 +0000
Subject: [issue19242] MINGW: generalization of posix installation in distutils
In-Reply-To: <1381661829.44.0.682603781281.issue19242@psf.upfronthosting.co.za>
Message-ID: <1634810453.43.0.898949105836.issue19242@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19242>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:00:59 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:00:59 +0000
Subject: [issue19244] MINGW: use replace instead rename to avoid failure on
 windows
In-Reply-To: <1381662169.98.0.886605409124.issue19244@psf.upfronthosting.co.za>
Message-ID: <1634810459.45.0.14632115248.issue19244@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19244>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:01:04 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:01:04 +0000
Subject: [issue17595] mingw: configure largefile support for windows builds
In-Reply-To: <1364759469.4.0.971782294906.issue17595@psf.upfronthosting.co.za>
Message-ID: <1634810464.34.0.393584665054.issue17595@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17595>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:01:10 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:01:10 +0000
Subject: [issue17601] mingw: determine if pwdmodule should be used
In-Reply-To: <1364760268.61.0.961516146376.issue17601@psf.upfronthosting.co.za>
Message-ID: <1634810470.93.0.0339787595268.issue17601@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17601>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:01:22 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:01:22 +0000
Subject: [issue18496] mingw: setup exclude termios module
In-Reply-To: <1374178317.83.0.753467697868.issue18496@psf.upfronthosting.co.za>
Message-ID: <1634810482.01.0.704107256865.issue18496@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18496>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:01:34 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:01:34 +0000
Subject: [issue18630] mingw: exclude unix only modules
In-Reply-To: <1375466884.41.0.796204643285.issue18630@psf.upfronthosting.co.za>
Message-ID: <1634810494.64.0.744453859642.issue18630@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18630>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:01:15 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:01:15 +0000
Subject: [issue18487] mingw implement exec prefix
In-Reply-To: <1374093705.74.0.166827931169.issue18487@psf.upfronthosting.co.za>
Message-ID: <1634810475.99.0.875502193628.issue18487@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18487>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:01:28 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:01:28 +0000
Subject: [issue18498] mingw: setup select module
In-Reply-To: <1374178586.07.0.280642289771.issue18498@psf.upfronthosting.co.za>
Message-ID: <1634810488.33.0.518451846687.issue18498@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18498>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:01:45 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:01:45 +0000
Subject: [issue18638] mingw: generalization of posix build in sysconfig.py
In-Reply-To: <1375472521.36.0.980902141673.issue18638@psf.upfronthosting.co.za>
Message-ID: <1634810505.24.0.0558449380856.issue18638@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18638>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:01:51 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:01:51 +0000
Subject: [issue18641] mingw: customize site
In-Reply-To: <1375473125.37.0.800889135942.issue18641@psf.upfronthosting.co.za>
Message-ID: <1634810511.62.0.0420946458029.issue18641@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18641>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:01:39 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:01:39 +0000
Subject: [issue18633] mingw: use Mingw32CCompiler as default compiler for
 mingw* build
In-Reply-To: <1375469702.92.0.916914527806.issue18633@psf.upfronthosting.co.za>
Message-ID: <1634810499.74.0.739431010629.issue18633@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18633>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:02:03 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:02:03 +0000
Subject: [issue19243] MINGW: support stdcall without underscore
In-Reply-To: <1381662020.61.0.491449073615.issue19243@psf.upfronthosting.co.za>
Message-ID: <1634810523.44.0.760631556302.issue19243@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19243>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:01:57 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:01:57 +0000
Subject: [issue18632] mingw: build extensions with GCC
In-Reply-To: <1375467327.02.0.323723692344.issue18632@psf.upfronthosting.co.za>
Message-ID: <1634810517.97.0.501145576876.issue18632@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18632>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:02:09 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:02:09 +0000
Subject: [issue18497] mingw: setup _multiprocessing module
In-Reply-To: <1374178460.6.0.189052379472.issue18497@psf.upfronthosting.co.za>
Message-ID: <1634810529.36.0.694745689461.issue18497@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18497>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:02:13 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:02:13 +0000
Subject: [issue19245] mingw-meta: installation
In-Reply-To: <1381662360.07.0.972595151036.issue19245@psf.upfronthosting.co.za>
Message-ID: <1634810533.81.0.502148301255.issue19245@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19245>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:02:57 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:02:57 +0000
Subject: [issue17605] mingw-meta: build interpeter core
In-Reply-To: <1364762524.12.0.901415822586.issue17605@psf.upfronthosting.co.za>
Message-ID: <1634810577.15.0.419872080964.issue17605@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17605>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:03:48 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:03:48 +0000
Subject: [issue10504] Trivial mingw compile fixes
In-Reply-To: <1290432020.95.0.401711712349.issue10504@psf.upfronthosting.co.za>
Message-ID: <1634810628.11.0.312116356409.issue10504@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue10504>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:03:53 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:03:53 +0000
Subject: [issue6672] Add Mingw recognition to pyport.h to allow building
 extensions
In-Reply-To: <1249820690.51.0.767085753138.issue6672@psf.upfronthosting.co.za>
Message-ID: <1634810633.78.0.366610053938.issue6672@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue6672>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:04:10 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:04:10 +0000
Subject: [issue28271] [MinGW] Can't compile _ctypes/callproc.c - SEH not
 supported by MinGW
In-Reply-To: <1474807064.66.0.0836341319322.issue28271@psf.upfronthosting.co.za>
Message-ID: <1634810650.25.0.0960951577577.issue28271@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28271>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:04:21 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:04:21 +0000
Subject: [issue17148] mingw: nt thread model detection
In-Reply-To: <1360190170.63.0.398498965196.issue17148@psf.upfronthosting.co.za>
Message-ID: <1634810661.28.0.566862628437.issue17148@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17148>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:04:16 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:04:16 +0000
Subject: [issue28270] [MinGW] Can't compile Modules/posixmodule.c by MinGW -
 several macro are missed
In-Reply-To: <1474804221.68.0.944652457277.issue28270@psf.upfronthosting.co.za>
Message-ID: <1634810656.54.0.169421192386.issue28270@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28270>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:04:47 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Thu, 21 Oct 2021 10:04:47 +0000
Subject: [issue45315] `PyType_FromSpec` does not copy the name
In-Reply-To: <1632861906.82.0.496996210358.issue45315@roundup.psfhosted.org>
Message-ID: <1634810687.13.0.381814622758.issue45315@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

Since the fix changes the size of PyObject, it can't be backported.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45315>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:04:33 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:04:33 +0000
Subject: [issue37801] Compilation on MINGW64 fails (CODESET,wcstok,...)
In-Reply-To: <1565351601.24.0.515340331062.issue37801@roundup.psfhosted.org>
Message-ID: <1634810673.64.0.562059306835.issue37801@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37801>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:04:27 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:04:27 +0000
Subject: [issue10615] Trivial mingw compile fixes
In-Reply-To: <1291380362.46.0.195053370852.issue10615@psf.upfronthosting.co.za>
Message-ID: <1634810667.02.0.480094914689.issue10615@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue10615>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:04:38 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 10:04:38 +0000
Subject: [issue28267] [MinGW] Crash at start when compiled by MinGW for 64-bit
 Windows using PC/pyconfig.h
In-Reply-To: <1474796748.74.0.791284991149.issue28267@psf.upfronthosting.co.za>
Message-ID: <1634810678.49.0.532221651255.issue28267@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution: duplicate -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28267>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:05:56 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 21 Oct 2021 10:05:56 +0000
Subject: [issue44019] operator.call/operator.__call__
In-Reply-To: <1620051840.28.0.198895693226.issue44019@roundup.psfhosted.org>
Message-ID: <1634810756.46.0.540038520928.issue44019@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset a53456e587c2e935e7e77170d57960e8c80d8a4d by Kreus Amredes in branch 'main':
bpo-44019: Add operator.call() to __all__ for the operator module (GH-29110)
https://github.com/python/cpython/commit/a53456e587c2e935e7e77170d57960e8c80d8a4d


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44019>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:16:53 2021
From: report at bugs.python.org (Mark Shannon)
Date: Thu, 21 Oct 2021 10:16:53 +0000
Subject: [issue45550] Increase the information content and robustness of
 tp_version_tag.
Message-ID: <1634811413.15.0.703765256195.issue45550@roundup.psfhosted.org>


New submission from Mark Shannon <mark at hotpy.org>:

Currently, we use the `tp_version_tag` as a proxy for the state of a class when specializing.
When we have issued 2**32 tags, we stop issuing tags. This prevents specializing of classes that need a new tag.

We can make a few enhancements:

1. Reserve the low 2**M (M probably 4 or 5) values for special classes. This would allow us to perform some type checks efficiently in a multiple-interpreter environment.
`PyLongCheck_Exact(ob)` is currently `Py_TYPE(ob) == &PyLong_Type` but could become `Py_TYPE(ob)->tp_version_tag == PY_INT_VERSION_TAG`. No need to access the interpreter state.

2. Reserve the low 2**N (N somewhere in range 10 to 16) for builtin classes. Maybe split this into immutable and mutable. 
We often need to load the version tag, this would save another load from tp_flags to check for builtin-ness and (im)mutability.

3. Add a modified count to the type struct. When this reaches a threshold, no longer issue tags for this class.
This would prevent pathological classes consuming millions of tags. Only needs 16 bits.

The reason we want power of two boundaries is so that we can test multiple types at once.
E.g. T1 and T2 are both "special" if `(T1->tp_version_tag | T2->tp_version_tag) < 2**M`

----------
assignee: Mark.Shannon
components: Interpreter Core
messages: 404580
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Increase the information content and robustness of tp_version_tag.
type: performance
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45550>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:19:38 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 21 Oct 2021 10:19:38 +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: <1634811578.36.0.335367154762.issue34451@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 8.0 -> 9.0
pull_requests: +27395
pull_request: https://github.com/python/cpython/pull/29119

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34451>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:19:29 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Thu, 21 Oct 2021 10:19:29 +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: <1634811569.0.0.720696862697.issue34451@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:


New changeset 5a14f71fe869d4a62dcdeb9a8fbbb5884c75060c by Thomas in branch 'main':
bpo-34451: Document prompt and output toggle feature in html tutorial (GH-27105)
https://github.com/python/cpython/commit/5a14f71fe869d4a62dcdeb9a8fbbb5884c75060c


----------
nosy: +petr.viktorin

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34451>
_______________________________________

From report at bugs.python.org  Thu Oct 21 06:20:18 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 21 Oct 2021 10:20:18 +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: <1634811618.03.0.863356900334.issue34451@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27396
pull_request: https://github.com/python/cpython/pull/29120

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34451>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:16:47 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 11:16:47 +0000
Subject: [issue17067] Examples in documentation for 3.x in 23.1.3.4. Deferred
 translations are rather weak
In-Reply-To: <1359407746.0.0.0107296426233.issue17067@psf.upfronthosting.co.za>
Message-ID: <1634815007.86.0.0541355992708.issue17067@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

I can't find DeferredTranslation in the current codebase, and in any case the response from 8 years ago seems to be leaning towards reject.

----------
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17067>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:18:06 2021
From: report at bugs.python.org (Andrzej Kubaszek)
Date: Thu, 21 Oct 2021 11:18:06 +0000
Subject: [issue45551] EmailMessage utf-8 folding error
Message-ID: <1634815086.56.0.391780385462.issue45551@roundup.psfhosted.org>


New submission from Andrzej Kubaszek <kubaszek at prz.edu.pl>:

email.message - EmailMessage Error
Missing white space after folding on ','

msg['To'] = 'Ab ?<abc at def.com>,Ab ?<abc at def.com>,Ab ?<abc at def.com>,Ab ?<abc at def.com>'

print(msg.as_string())
'''
To: Ab =?utf-8?q?=C4=86?=<abc at def.com>,Ab =?utf-8?q?=C4=86?=<abc at def.com>,
Ab =?utf-8?q?=C4=86?=<abc at def.com>,Ab =?utf-8?q?=C4=86?=<abc at def.com>
Subject: EmailMessage Error. Missing white space after folding on ",".
 https://www.ietf.org/rfc/rfc2822.txt , 2.2.3. Long Header Fields
'''

----------
components: email
files: ERROR_folding_in_EmailMessage.py
messages: 404583
nosy: andrzejQ, barry, r.david.murray
priority: normal
severity: normal
status: open
title: EmailMessage utf-8 folding error
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file50380/ERROR_folding_in_EmailMessage.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45551>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:19:39 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 11:19:39 +0000
Subject: [issue45552] Close asyncore/asynchat/smtpd issues and list them here
Message-ID: <1634815179.56.0.671714542902.issue45552@roundup.psfhosted.org>


New submission from Irit Katriel <iritkatriel at gmail.com>:

asyncore/asynchat/smtpd are deprecated and will no longer be maintained. All open issues will now being closed with this as superseder, in case someone will need the list of those issues in the future.

----------
components: Library (Lib)
messages: 404584
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: Close asyncore/asynchat/smtpd  issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45552>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:21:28 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 11:21:28 +0000
Subject: [issue37721] smtpd: staling connect
In-Reply-To: <1564501290.13.0.408923844386.issue37721@roundup.psfhosted.org>
Message-ID: <1634815288.46.0.417573573236.issue37721@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close asyncore/asynchat/smtpd  issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37721>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:22:22 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 21 Oct 2021 11:22:22 +0000
Subject: [issue44019] operator.call/operator.__call__
In-Reply-To: <1620051840.28.0.198895693226.issue44019@roundup.psfhosted.org>
Message-ID: <1634815342.75.0.733502936752.issue44019@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

test___all__ was not supposed to fail with the missing "call" in operator.__all__?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44019>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:23:10 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 11:23:10 +0000
Subject: [issue21531] doc: asyncore does not support UDP
In-Reply-To: <1400470101.73.0.899149180495.issue21531@psf.upfronthosting.co.za>
Message-ID: <1634815390.54.0.902227679824.issue21531@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close asyncore/asynchat/smtpd  issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21531>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:24:39 2021
From: report at bugs.python.org (Isaac Boukris)
Date: Thu, 21 Oct 2021 11:24:39 +0000
Subject: [issue45552] Close asyncore/asynchat/smtpd issues and list them here
In-Reply-To: <1634815179.56.0.671714542902.issue45552@roundup.psfhosted.org>
Message-ID: <1634815479.72.0.165870330152.issue45552@roundup.psfhosted.org>


Change by Isaac Boukris <iboukris at gmail.com>:


----------
keywords: +patch
nosy: +Isaac Boukris
nosy_count: 1.0 -> 2.0
pull_requests: +27397
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/11770

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45552>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:24:48 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 11:24:48 +0000
Subject: [issue35913] asyncore: allow handling of half closed connections
In-Reply-To: <1549468264.52.0.429414559636.issue35913@roundup.psfhosted.org>
Message-ID: <1634815488.69.0.20947099518.issue35913@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close asyncore/asynchat/smtpd  issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35913>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:25:12 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 11:25:12 +0000
Subject: [issue29151] test_asyncore.TestAPI_UseIPv4Select /
 test_asyncore.TestAPI_UseIPv6Select fails test_handle_close_after_conn_broken
In-Reply-To: <1483532525.73.0.454850752566.issue29151@psf.upfronthosting.co.za>
Message-ID: <1634815512.26.0.913624298418.issue29151@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close asyncore/asynchat/smtpd  issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29151>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:26:38 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 11:26:38 +0000
Subject: [issue15982] asyncore.dispatcher does not handle windows socket error
 code correctly (namely WSAEWOULDBLOCK 10035)
In-Reply-To: <1348139570.15.0.496741951323.issue15982@psf.upfronthosting.co.za>
Message-ID: <1634815598.21.0.20448144217.issue15982@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder: asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK -> Close asyncore/asynchat/smtpd  issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15982>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:27:22 2021
From: report at bugs.python.org (Roundup Robot)
Date: Thu, 21 Oct 2021 11:27:22 +0000
Subject: [issue45552] Close asyncore/asynchat/smtpd issues and list them here
In-Reply-To: <1634815179.56.0.671714542902.issue45552@roundup.psfhosted.org>
Message-ID: <1634815642.4.0.0732022341981.issue45552@roundup.psfhosted.org>


Change by Roundup Robot <devnull at psf.upfronthosting.co.za>:


----------
nosy: +python-dev
nosy_count: 2.0 -> 3.0
pull_requests: +27398
pull_request: https://github.com/python/cpython/pull/2707

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45552>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:27:33 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 11:27:33 +0000
Subject: [issue30931] Race condition in asyncore may access the wrong
 dispatcher
In-Reply-To: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za>
Message-ID: <1634815653.58.0.107648267243.issue30931@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close asyncore/asynchat/smtpd  issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30931>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:28:49 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 11:28:49 +0000
Subject: [issue17925] asynchat.async_chat.initiate_send : del deque[0] is not
 safe
In-Reply-To: <1367934356.3.0.498041746077.issue17925@psf.upfronthosting.co.za>
Message-ID: <1634815729.53.0.230484981643.issue17925@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close asyncore/asynchat/smtpd  issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17925>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:30:12 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 11:30:12 +0000
Subject: [issue24397] Test asynchat makes wrong assumptions
In-Reply-To: <1433611943.2.0.834798500483.issue24397@psf.upfronthosting.co.za>
Message-ID: <1634815812.7.0.359477809918.issue24397@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close asyncore/asynchat/smtpd  issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24397>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:31:21 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 11:31:21 +0000
Subject: [issue13372] handle_close called twice in poll2
In-Reply-To: <1320773533.14.0.440579615875.issue13372@psf.upfronthosting.co.za>
Message-ID: <1634815881.83.0.226247442485.issue13372@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close asyncore/asynchat/smtpd  issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue13372>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:24:48 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 11:24:48 +0000
Subject: [issue35913] asyncore: allow handling of half closed connections
In-Reply-To: <1549468264.52.0.429414559636.issue35913@roundup.psfhosted.org>
Message-ID: <1634815488.69.0.20947099518.issue35913@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
superseder:  -> Close asyncore/asynchat/smtpd  issues and list them here

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35913>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:44:49 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 11:44:49 +0000
Subject: [issue45552] Close asyncore/asynchat/smtpd issues and list them here
In-Reply-To: <1634815179.56.0.671714542902.issue45552@roundup.psfhosted.org>
Message-ID: <1634816689.16.0.53503493679.issue45552@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45552>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:57:32 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 21 Oct 2021 11:57:32 +0000
Subject: [issue18276] posixpath.c:_fd_converter() should use
 PyObject_AsFileDescriptor()
In-Reply-To: <1371813162.19.0.902104537883.issue18276@psf.upfronthosting.co.za>
Message-ID: <1634817452.54.0.366801231338.issue18276@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Victor, do we want to support "with open("somefile") as f: os.chmod(f, 0o644)"? The feature request has been languishing for 8 years.

----------
status: open -> pending
versions: +Python 3.11 -Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18276>
_______________________________________

From report at bugs.python.org  Thu Oct 21 07:59:38 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 21 Oct 2021 11:59:38 +0000
Subject: [issue27816] sock.proto does not reflect actual protocol
In-Reply-To: <1471710119.38.0.449496094278.issue27816@psf.upfronthosting.co.za>
Message-ID: <1634817578.78.0.978071039445.issue27816@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

I can still reproduce the issue with Python 3.9 and newer.

>>> import socket
>>> socket.socket(socket.AF_INET, socket.SOCK_STREAM).proto
0

----------
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27816>
_______________________________________

From report at bugs.python.org  Thu Oct 21 08:02:17 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 21 Oct 2021 12:02:17 +0000
Subject: [issue19899] No test for thread.interrupt_main()
In-Reply-To: <1386256832.82.0.17906161504.issue19899@psf.upfronthosting.co.za>
Message-ID: <1634817737.4.0.211983829123.issue19899@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Tests have been added as part of GH-24755.

----------
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19899>
_______________________________________

From report at bugs.python.org  Thu Oct 21 08:04:09 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 21 Oct 2021 12:04:09 +0000
Subject: [issue29343] sock.close() raises OSError EBADF when socket's fd is
 closed
In-Reply-To: <1485087117.22.0.587639771074.issue29343@psf.upfronthosting.co.za>
Message-ID: <1634817849.57.0.581178482527.issue29343@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Yury, I don't remember how I found the issue.

It's still an issue in 3.9 and newer.

----------
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29343>
_______________________________________

From report at bugs.python.org  Thu Oct 21 08:05:20 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 21 Oct 2021 12:05:20 +0000
Subject: [issue28134] socket.socket(fileno=fd) does not work as documented
In-Reply-To: <1473794011.65.0.923929152137.issue28134@psf.upfronthosting.co.za>
Message-ID: <1634817920.77.0.0733008117438.issue28134@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Yes, the fix works well enough.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28134>
_______________________________________

From report at bugs.python.org  Thu Oct 21 08:14:35 2021
From: report at bugs.python.org (Alex Zaslavskis)
Date: Thu, 21 Oct 2021 12:14:35 +0000
Subject: [issue45382] platform() is not able to detect windows 11
In-Reply-To: <1633463037.19.0.965519087659.issue45382@roundup.psfhosted.org>
Message-ID: <1634818475.26.0.19536617629.issue45382@roundup.psfhosted.org>


Alex Zaslavskis <sahsariga111 at gmail.com> added the comment:

On my Win11 it returns me :

C:\Users\Win10Home>wmic os get Caption,Version /value


Caption=Microsoft Windows 11 Home Single Language
Version=10.0.22000

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________

From report at bugs.python.org  Thu Oct 21 08:24:55 2021
From: report at bugs.python.org (NATANAEL PEIXOTO QUINTINO)
Date: Thu, 21 Oct 2021 12:24:55 +0000
Subject: [issue45553] The modules Scipy and Pandas don't install in Win11-64
Message-ID: <1634819095.45.0.569403158755.issue45553@roundup.psfhosted.org>


New submission from NATANAEL PEIXOTO QUINTINO <natanael.quintino at ppgi.ufrj.br>:

Hi, I would like to report that the scipy and pandas modules are not installing via pip module commands on Windows 11 64-bit. Thanks

----------
components: Extension Modules, Installation, Windows
messages: 404592
nosy: natanael.quintino, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: The modules Scipy and Pandas don't install in Win11-64
type: compile error
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45553>
_______________________________________

From report at bugs.python.org  Thu Oct 21 08:41:49 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Thu, 21 Oct 2021 12:41:49 +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: <1634820109.98.0.982887796927.issue34451@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:


New changeset 00ddc1fbd7296ffe066077194a895b175cca26de by Miss Islington (bot) in branch '3.10':
bpo-34451: Document prompt and output toggle feature in html tutorial (GH-27105) (GH-29119)
https://github.com/python/cpython/commit/00ddc1fbd7296ffe066077194a895b175cca26de


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34451>
_______________________________________

From report at bugs.python.org  Thu Oct 21 08:42:14 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Thu, 21 Oct 2021 12:42:14 +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: <1634820134.35.0.589043646619.issue34451@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:


New changeset bfa4237ecfa605ff94e86fa7141f4a8b1f7cc44a by Miss Islington (bot) in branch '3.9':
bpo-34451: Document prompt and output toggle feature in html tutorial (GH-27105) (GH-29120)
https://github.com/python/cpython/commit/bfa4237ecfa605ff94e86fa7141f4a8b1f7cc44a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34451>
_______________________________________

From report at bugs.python.org  Thu Oct 21 08:44:23 2021
From: report at bugs.python.org (Paul Moore)
Date: Thu, 21 Oct 2021 12:44:23 +0000
Subject: [issue45553] The modules Scipy and Pandas don't install in Win11-64
In-Reply-To: <1634819095.45.0.569403158755.issue45553@roundup.psfhosted.org>
Message-ID: <1634820263.56.0.804884432656.issue45553@roundup.psfhosted.org>


Paul Moore <p.f.moore at gmail.com> added the comment:

That's probably because you're using Python 3.10 (assuming the "version" tag you added is correct) and those libraries haven't released Windows binaries for Python 3.10 yet.

You should wait for binaries to be released, and check with the projects themselves if you need an indication of timescales. It's not unusual for projects to take a few weeks to get binaries built after a new Python release.

If this isn't the issue, please provide more details of what is wrong.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45553>
_______________________________________

From report at bugs.python.org  Thu Oct 21 09:04:00 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Thu, 21 Oct 2021 13:04:00 +0000
Subject: [issue44133] "Py_FrozenMain" symbol is not exported
In-Reply-To: <1621011524.07.0.0957325647121.issue44133@roundup.psfhosted.org>
Message-ID: <1634821440.97.0.0639955777311.issue44133@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

> I'm not sure why, but "Py_FrozenMain" is the *only* impacted symbol of the whole C API.

Apparently, on some platforms `PyModule_Create2` and `PyModule_FromDefAndSpec2` don't appear either.

Should I rename the issue to cover these as well?

----------
nosy: +petr.viktorin

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44133>
_______________________________________

From report at bugs.python.org  Thu Oct 21 09:05:12 2021
From: report at bugs.python.org (John Marshall)
Date: Thu, 21 Oct 2021 13:05:12 +0000
Subject: [issue45554] multiprocessing exitcode is insufficiently documented
Message-ID: <1634821512.68.0.19757436473.issue45554@roundup.psfhosted.org>


New submission from John Marshall <jmarshall at hey.com>:

<https://docs.python.org/3.11/library/multiprocessing.html#multiprocessing.Process.exitcode> describes exitcode as

"The child?s exit code. This will be None if the process has not yet terminated. A negative value -N indicates that the child was terminated by signal N."

and similarly in earlier documentation versions.

This does not describe what the exit code will be under normal circumstances, or if the child abends by raising a Python exception.

By examination of BaseProcess._bootstrap() it can be determined that the current behaviour appears to be:

* even if your subclass overrides the run() method, whatever this method returns is ignored (and in particular the return value has no effect on the child's exit code);

* if the run() method returns normally, the child's exit code will be 0;

* if the run() method raises SystemExit (or, I guess, calls sys.exit()) with an integer exit status, that exit status will be propagated to the child's exit code;

* if the run() method raises any other exception, the exception traceback will be printed to stderr and the child's exit code will be 1.


However I did not see a way to figure these details out from the documentation, and it is unclear whether all these details are supported behaviours.

----------
assignee: docs at python
components: Documentation
messages: 404597
nosy: docs at python, jmarshall
priority: normal
severity: normal
status: open
title: multiprocessing exitcode is insufficiently documented
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45554>
_______________________________________

From report at bugs.python.org  Thu Oct 21 09:06:37 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 21 Oct 2021 13:06:37 +0000
Subject: [issue17924] Deprecate stat.S_IF* integer constants
In-Reply-To: <1367928320.73.0.37418131168.issue17924@psf.upfronthosting.co.za>
Message-ID: <1634821597.93.0.900339334231.issue17924@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
versions: +Python 3.11 -Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17924>
_______________________________________

From report at bugs.python.org  Thu Oct 21 09:11:03 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 21 Oct 2021 13:11:03 +0000
Subject: [issue26834] Add truncated SHA512/224 and SHA512/256
In-Reply-To: <1461439661.19.0.970129415182.issue26834@psf.upfronthosting.co.za>
Message-ID: <1634821863.83.0.943939950082.issue26834@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

OpenSSL 1.1.1 comes with sha512_256 and sha512_224. I propose that we use the OpenSSL implementation and don't add the variants to our _sha512 module.

>>> hashlib.new("sha512_256").hexdigest()
'c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a'
>>> hashlib.new("sha512_224").hexdigest()
'6ed0dd02806fa89e25de060c19d3ac86cabb87d6a0ddd05c333b84f4'

----------
assignee:  -> docs at python
components: +Documentation
nosy: +docs at python
versions: +Python 3.11 -Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26834>
_______________________________________

From report at bugs.python.org  Thu Oct 21 09:12:29 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 21 Oct 2021 13:12:29 +0000
Subject: [issue45522] Allow to build Python without freelists
In-Reply-To: <1634641564.68.0.977403045358.issue45522@roundup.psfhosted.org>
Message-ID: <1634821949.49.0.32631965755.issue45522@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 9942f42a93ccda047fd3558c47b822e99afe10c0 by Christian Heimes in branch 'main':
bpo-45522: Allow to disable freelists on build time (GH-29056)
https://github.com/python/cpython/commit/9942f42a93ccda047fd3558c47b822e99afe10c0


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45522>
_______________________________________

From report at bugs.python.org  Thu Oct 21 09:12:53 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 21 Oct 2021 13:12:53 +0000
Subject: [issue45522] Allow to build Python without freelists
In-Reply-To: <1634641564.68.0.977403045358.issue45522@roundup.psfhosted.org>
Message-ID: <1634821973.73.0.739523302764.issue45522@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45522>
_______________________________________

From report at bugs.python.org  Thu Oct 21 09:20:03 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 21 Oct 2021 13:20:03 +0000
Subject: [issue39947] [C API] Make the PyThreadState structure opaque (move it
 to the internal C API)
In-Reply-To: <1584035214.47.0.672795796186.issue39947@roundup.psfhosted.org>
Message-ID: <1634822403.94.0.612586823062.issue39947@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
pull_requests: +27399
pull_request: https://github.com/python/cpython/pull/29121

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39947>
_______________________________________

From report at bugs.python.org  Thu Oct 21 09:23:06 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 21 Oct 2021 13:23:06 +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: <1634822586.18.0.566082028686.issue43760@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I created https://github.com/python/cpython/pull/29121 to add PyThreadState_SetProfile() and PyThreadState_SetTrace() functions.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43760>
_______________________________________

From report at bugs.python.org  Thu Oct 21 09:30:09 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Thu, 21 Oct 2021 13:30:09 +0000
Subject: [issue44609] Buffer support in the stable ABI
In-Reply-To: <1626102302.84.0.543468149442.issue44609@roundup.psfhosted.org>
Message-ID: <1634823009.07.0.534871885715.issue44609@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

That removal was reverted. Thanks for the report!

They are still deprecated, which means they may be removed from future API (and only remain in the stable ABI).
But I hope that's only considered when the new buffer protocol is available in the stable ABI.

----------
nosy: +petr.viktorin
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44609>
_______________________________________

From report at bugs.python.org  Thu Oct 21 09:38:40 2021
From: report at bugs.python.org (Neil Schemenauer)
Date: Thu, 21 Oct 2021 13:38:40 +0000
Subject: [issue45521] obmalloc radix tree typo in code
In-Reply-To: <1634621878.99.0.975140050244.issue45521@roundup.psfhosted.org>
Message-ID: <1634823520.95.0.372885860772.issue45521@roundup.psfhosted.org>


Neil Schemenauer <nas-python at arctrix.com> added the comment:


New changeset 311910b31a4bd94dc79298388b7cb65ca5546438 by Neil Schemenauer in branch 'main':
bpo-45521: Fix a bug in the obmalloc radix tree code. (GH-29051)
https://github.com/python/cpython/commit/311910b31a4bd94dc79298388b7cb65ca5546438


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45521>
_______________________________________

From report at bugs.python.org  Thu Oct 21 10:04:34 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Thu, 21 Oct 2021 14:04: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: <1634825074.83.0.0361817914101.issue43656@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Martin: I was also thinking of adding a parameter to `extract()`. The issue I see is that it's still confusing and complicated for new students to understand the issue and find the parameter and understand why it's needed.

Joe: one important thing to note is that if an exception is caught and handled, it doesn't at all mean that unrelated exceptions from __repr__ can be silenced. Can we determine if they came from an initialized object or from object in the middle of initialization?

By the way, can you post a complete traceback that your students were getting? I would like to see how hard it is to tell from the traceback that a particular classes' __repr__ is at fault. If it's a long traceback please attach as a file..

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Thu Oct 21 10:11:29 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 21 Oct 2021 14:11:29 +0000
Subject: [issue45521] obmalloc radix tree typo in code
In-Reply-To: <1634621878.99.0.975140050244.issue45521@roundup.psfhosted.org>
Message-ID: <1634825489.82.0.689347556915.issue45521@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +27400
pull_request: https://github.com/python/cpython/pull/29122

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45521>
_______________________________________

From report at bugs.python.org  Thu Oct 21 10:22:46 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 14:22:46 +0000
Subject: [issue31000] Test failure in resource module on ZFS
In-Reply-To: <1500851878.05.0.462798019219.issue31000@psf.upfronthosting.co.za>
Message-ID: <1634826166.73.0.0541548222514.issue31000@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Can we/should we do anything about this or shall we close?

----------
nosy: +iritkatriel
resolution:  -> third party
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31000>
_______________________________________

From report at bugs.python.org  Thu Oct 21 10:38:55 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 21 Oct 2021 14:38:55 +0000
Subject: [issue44019] operator.call/operator.__call__
In-Reply-To: <1620051840.28.0.198895693226.issue44019@roundup.psfhosted.org>
Message-ID: <1634827135.68.0.862519188543.issue44019@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
pull_requests: +27401
pull_request: https://github.com/python/cpython/pull/29124

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44019>
_______________________________________

From report at bugs.python.org  Thu Oct 21 10:39:47 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 21 Oct 2021 14:39:47 +0000
Subject: [issue44019] operator.call/operator.__call__
In-Reply-To: <1620051840.28.0.198895693226.issue44019@roundup.psfhosted.org>
Message-ID: <1634827187.49.0.979285153716.issue44019@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

> test___all__ was not supposed to fail with the missing "call" in operator.__all__?

AFAIK, it doesn't check.

I add the test for the operator module.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44019>
_______________________________________

From report at bugs.python.org  Thu Oct 21 10:47:36 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Thu, 21 Oct 2021 14:47:36 +0000
Subject: [issue45459] Limited API support for Py_buffer
In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org>
Message-ID: <1634827656.0.0.622837317933.issue45459@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
nosy: +erlendaasland

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________

From report at bugs.python.org  Thu Oct 21 10:52:53 2021
From: report at bugs.python.org (Ivan Konovalov)
Date: Thu, 21 Oct 2021 14:52:53 +0000
Subject: [issue33838] Very slow upload with http.client on Windows when
 setting timeout
In-Reply-To: <1528739398.2.0.592728768989.issue33838@psf.upfronthosting.co.za>
Message-ID: <1634827973.08.0.365391606494.issue33838@roundup.psfhosted.org>


Change by Ivan Konovalov <ivknv0 at gmail.com>:


----------
versions: +Python 3.10, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33838>
_______________________________________

From report at bugs.python.org  Thu Oct 21 10:54:42 2021
From: report at bugs.python.org (Matias G)
Date: Thu, 21 Oct 2021 14:54:42 +0000
Subject: [issue45555] Object stays alive for weak reference if an exception
 happens in constructor
Message-ID: <1634828082.31.0.276861942935.issue45555@roundup.psfhosted.org>


New submission from Matias G <guijarro at esrf.fr>:

Hi Python developers,

I stumbled on a weird behavior, which might be a bug actually.

I am surprised by the output of the following piece of code:

```
import weakref

refs = []

class A:
    def __init__(self):
        refs.append(weakref.ref(self))
        #raise RuntimeError() <<< enable this line of code and be surprised!

try:
    A()
finally:
    print(refs[0]())
```

The code prints None ; but, if the RuntimeError exception is raised
in the constructor, we find the object in the final print. It is not
dereferenced properly, as it seems:

```
<__main__.A object at 0x7f4b6cf23ed0>
Traceback (most recent call last):
  File "/tmp/test.py", line 11, in <module>
    A()
  File "/tmp/test.py", line 8, in __init__
    raise RuntimeError()
RuntimeError
```

I tried adding `gc.collect()` with no luck.

Am I doing something wrong ?

Thanks in advance

----------
components: Interpreter Core
messages: 404606
nosy: guijarro
priority: normal
severity: normal
status: open
title: Object stays alive for weak reference if an exception happens in constructor
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45555>
_______________________________________

From report at bugs.python.org  Thu Oct 21 11:03:58 2021
From: report at bugs.python.org (Mosquito)
Date: Thu, 21 Oct 2021 15:03:58 +0000
Subject: [issue45556] uuid.uuid4() fast optimization
Message-ID: <1634828638.25.0.268468778181.issue45556@roundup.psfhosted.org>


New submission from Mosquito <me at mosquito.su>:

I does a small experiment, and found out that if you generate UUID4 with int instead of sequence of bytes, then the generation of UUID4 occurs up to three times faster.

.. code-block: python

    import random
    import uuid

    print("uuid.uuid4()")
    %timeit uuid.uuid4()
    # 5.49 ?s ? 120 ns per loop (mean ? std. dev. of 7 runs, 100000 loops each)

    print("uuid.UUID(int=random.getrandbits(128), version=4)")
    %timeit uuid.UUID(int=random.getrandbits(128), version=4)
    # 2.58 ?s ? 94.5 ns per loop (mean ? std. dev. of 7 runs, 100000 loops each)


I have already made fixes to my fork on GH, tell me, will it be useful to someone else besides me?

----------
components: Library (Lib)
files: 0001-Generating-uuid.uuid4-up-to-three-times-faster.patch
keywords: patch
messages: 404607
nosy: mosquito
priority: normal
severity: normal
status: open
title: uuid.uuid4() fast optimization
type: performance
versions: Python 3.10
Added file: https://bugs.python.org/file50381/0001-Generating-uuid.uuid4-up-to-three-times-faster.patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45556>
_______________________________________

From report at bugs.python.org  Thu Oct 21 11:05:06 2021
From: report at bugs.python.org (Mosquito)
Date: Thu, 21 Oct 2021 15:05:06 +0000
Subject: [issue45556] uuid.uuid4() fast optimization
In-Reply-To: <1634828638.25.0.268468778181.issue45556@roundup.psfhosted.org>
Message-ID: <1634828706.86.0.874852330199.issue45556@roundup.psfhosted.org>


Change by Mosquito <me at mosquito.su>:


----------
pull_requests: +27402
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29125

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45556>
_______________________________________

From report at bugs.python.org  Thu Oct 21 11:05:29 2021
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 21 Oct 2021 15:05:29 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1634828729.17.0.210661207028.issue45548@roundup.psfhosted.org>


Change by Zachary Ware <zachary.ware at gmail.com>:


----------
stage: patch review -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Thu Oct 21 11:05:19 2021
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 21 Oct 2021 15:05:19 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1634828719.68.0.928483514511.issue45548@roundup.psfhosted.org>


Change by Zachary Ware <zachary.ware at gmail.com>:


----------
nosy: +zach.ware
stage:  -> patch review

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Thu Oct 21 11:18:04 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 15:18:04 +0000
Subject: [issue41062] Advanced Debugger Support C-API is useless without
 HEAD_LOCK()/HEAD_UNLOCK()
In-Reply-To: <1592729628.06.0.446212297946.issue41062@roundup.psfhosted.org>
Message-ID: <1634829484.7.0.0410682054507.issue41062@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
nosy: +vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41062>
_______________________________________

From report at bugs.python.org  Thu Oct 21 11:20:26 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 15:20:26 +0000
Subject: [issue10566] gdb debugging support additions (Tools/gdb/libpython.py)
In-Reply-To: <1290962543.45.0.132664091788.issue10566@psf.upfronthosting.co.za>
Message-ID: <1634829626.46.0.406147249884.issue10566@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
nosy: +vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue10566>
_______________________________________

From report at bugs.python.org  Thu Oct 21 11:21:42 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 15:21:42 +0000
Subject: [issue26539] frozen executables should have an empty path
In-Reply-To: <1457701421.75.0.0409884963304.issue26539@psf.upfronthosting.co.za>
Message-ID: <1634829702.46.0.992748945382.issue26539@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26539>
_______________________________________

From report at bugs.python.org  Thu Oct 21 11:30:13 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 15:30:13 +0000
Subject: [issue24766] Subclass of property doesn't preserve instance __doc__
 when using doc= argument
In-Reply-To: <1438362123.61.0.0930515598899.issue24766@psf.upfronthosting.co.za>
Message-ID: <1634830213.99.0.0108212051891.issue24766@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11.

----------
nosy: +iritkatriel
versions: +Python 3.11 -Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24766>
_______________________________________

From report at bugs.python.org  Thu Oct 21 11:40:28 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Thu, 21 Oct 2021 15:40:28 +0000
Subject: [issue45552] Close asyncore/asynchat/smtpd issues and list them here
In-Reply-To: <1634815179.56.0.671714542902.issue45552@roundup.psfhosted.org>
Message-ID: <1634830828.52.0.849469553925.issue45552@roundup.psfhosted.org>


Change by Barry A. Warsaw <barry at python.org>:


----------
nosy: +barry

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45552>
_______________________________________

From report at bugs.python.org  Thu Oct 21 11:40:42 2021
From: report at bugs.python.org (Finite State Machine)
Date: Thu, 21 Oct 2021 15:40:42 +0000
Subject: [issue43532] Add keyword-only fields to dataclasses
In-Reply-To: <1616002761.92.0.652624260802.issue43532@roundup.psfhosted.org>
Message-ID: <1634830842.33.0.0567678552818.issue43532@roundup.psfhosted.org>


Finite State Machine <python at state-machine.ca> added the comment:

I doubt it's worth opening a separate issue for this, so I'll mention it here:

In the documentation (https://docs.python.org/3.10/library/dataclasses.html#dataclasses.KW_ONLY) nothing documents KW_ONLY as being new in Python 3.10.

----------
nosy: +finite-state-machine

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43532>
_______________________________________

From report at bugs.python.org  Thu Oct 21 11:40:44 2021
From: report at bugs.python.org (Neil Schemenauer)
Date: Thu, 21 Oct 2021 15:40:44 +0000
Subject: [issue45521] obmalloc radix tree typo in code
In-Reply-To: <1634621878.99.0.975140050244.issue45521@roundup.psfhosted.org>
Message-ID: <1634830844.18.0.153254787657.issue45521@roundup.psfhosted.org>


Neil Schemenauer <nas-python at arctrix.com> added the comment:


New changeset 1cdac61065e72db60d26e03ef9286d2743d7000e by Miss Islington (bot) in branch '3.10':
bpo-45521: Fix a bug in the obmalloc radix tree code. (GH-29051) (GH-29122)
https://github.com/python/cpython/commit/1cdac61065e72db60d26e03ef9286d2743d7000e


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45521>
_______________________________________

From report at bugs.python.org  Thu Oct 21 11:41:32 2021
From: report at bugs.python.org (Neil Schemenauer)
Date: Thu, 21 Oct 2021 15:41:32 +0000
Subject: [issue45521] obmalloc radix tree typo in code
In-Reply-To: <1634621878.99.0.975140050244.issue45521@roundup.psfhosted.org>
Message-ID: <1634830892.7.0.200303753376.issue45521@roundup.psfhosted.org>


Change by Neil Schemenauer <nas-python at arctrix.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45521>
_______________________________________

From report at bugs.python.org  Thu Oct 21 11:41:41 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Thu, 21 Oct 2021 15:41:41 +0000
Subject: [issue45552] Close asyncore/asynchat/smtpd issues and list them here
In-Reply-To: <1634815179.56.0.671714542902.issue45552@roundup.psfhosted.org>
Message-ID: <1634830901.74.0.399579819311.issue45552@roundup.psfhosted.org>


Barry A. Warsaw <barry at python.org> added the comment:

Thank you for doing this work Irit!  Just to point out that anybody who wants a modern replacement for smtpd should look at aiosmtpd: https://aiosmtpd.readthedocs.io/en/latest/

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45552>
_______________________________________

From report at bugs.python.org  Thu Oct 21 11:44:43 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 21 Oct 2021 15:44:43 +0000
Subject: [issue45556] uuid.uuid4() fast optimization
In-Reply-To: <1634828638.25.0.268468778181.issue45556@roundup.psfhosted.org>
Message-ID: <1634831083.53.0.928155974897.issue45556@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

random.getrandbits() is cryptographically weaker than os.urandom().

----------
nosy: +rhettinger, serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45556>
_______________________________________

From report at bugs.python.org  Thu Oct 21 11:58:55 2021
From: report at bugs.python.org (Jeremy)
Date: Thu, 21 Oct 2021 15:58:55 +0000
Subject: [issue45545] chdir __exit__ is not safe
In-Reply-To: <1634770485.18.0.358610816486.issue45545@roundup.psfhosted.org>
Message-ID: <1634831935.41.0.667984450196.issue45545@roundup.psfhosted.org>


Jeremy <ucodery at gmail.com> added the comment:

>If os.chdir is in os.supports_fd, the context manager can use dirfd = os.open(os.getcwd(), os.O_RDONLY). Using an fd should also work around the deleted directory case, though POSIX doesn't specify whether fchdir() succeeds in this case. It does in Linux, and the resulting state is the same as deleting the current working directory.

Yes, I was considering an open fd to guarantee to return to the old pwd as long as it existed. I said as much on the mailing list, but was uncertain if it was possible do deadlock holding on to arbitrary directory handles. If it's possible at all to deadlock, and I think it is, I don't think we can use this; not in a stdlib implementation. The reason for the deadlock is too hidden from the user and debugging it would be difficult. It would be fine for a user implementation where they understood the implications and made other guarantees about their traversals, but we can't be sure everyone using this implementation would read an understand this limitation.

I hadn't considered systems that don't support fd vops. I also hadn't considered crossing mount points and if that could cause any additional error cases. I don't think it can, not that we could correct in user-space and with just using os.chdir().

>In Windows, SetCurrentDirectoryW() resolves the full path. So the result from os.getcwd() should always work with os.chdir(). The context manager could prevent the original directory from getting deleted by opening it without delete sharing (e.g. via _winapi.CreateFile). Though it may be more reasonable to just let it fail to restore the original working directory.

Thanks, I am much less familiar with these APIs. So I believe you are saying the implementation as is will work in all reasonable cases for Windows.
I think attempting to move back to a directory that has been removed should be an error. Especially if we give the same behavior on Linux. Producing a FileNotFoundError gives the user the power to decide if they do in fact want to handle that differently.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Thu Oct 21 11:59:04 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 15:59:04 +0000
Subject: [issue18618] Need an atexit.register equivalent that also works in
 subinterps
In-Reply-To: <1375379263.55.0.273685957163.issue18618@psf.upfronthosting.co.za>
Message-ID: <1634831944.94.0.231385314998.issue18618@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> atexit callbacks should be run at subinterpreter shutdown

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18618>
_______________________________________

From report at bugs.python.org  Thu Oct 21 12:02:46 2021
From: report at bugs.python.org (Ned Deily)
Date: Thu, 21 Oct 2021 16:02:46 +0000
Subject: [issue42514] Relocatable framework for macOS
In-Reply-To: <1606760917.9.0.450918621788.issue42514@roundup.psfhosted.org>
Message-ID: <1634832166.04.0.775319271688.issue42514@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
versions: +Python 3.11 -Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42514>
_______________________________________

From report at bugs.python.org  Thu Oct 21 12:13:29 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Thu, 21 Oct 2021 16:13:29 +0000
Subject: [issue45549] Seek in file object didn't treat all paths of exceptions
In-Reply-To: <1634806787.57.0.83503988126.issue45549@roundup.psfhosted.org>
Message-ID: <1634832809.37.0.550981052481.issue45549@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

That's behavior we can't change without breaking code.

And it's documented as working this way, at least on Linux: https://linux.die.net/man/2/lseek

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45549>
_______________________________________

From report at bugs.python.org  Thu Oct 21 12:19:16 2021
From: report at bugs.python.org (Matthew Barnett)
Date: Thu, 21 Oct 2021 16:19:16 +0000
Subject: [issue45539] Negative lookaround assertions sometimes leak capture
 groups
In-Reply-To: <1634745178.86.0.213773355439.issue45539@roundup.psfhosted.org>
Message-ID: <1634833156.84.0.605864831312.issue45539@roundup.psfhosted.org>


Matthew Barnett <python at mrabarnett.plus.com> added the comment:

It's definitely a bug.

In order for the pattern to match, the negative lookaround must match, which means that its subexpression mustn't match, so none of the groups in that subexpression have captured.

----------
versions: +Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45539>
_______________________________________

From report at bugs.python.org  Thu Oct 21 12:43:11 2021
From: report at bugs.python.org (Ned Deily)
Date: Thu, 21 Oct 2021 16:43:11 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1634834591.22.0.239678324088.issue45548@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
nosy: +ned.deily

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Thu Oct 21 12:44:49 2021
From: report at bugs.python.org (Devin Prescott)
Date: Thu, 21 Oct 2021 16:44:49 +0000
Subject: [issue44319] setup openssl faild on linux (ubuntu 20.04)
In-Reply-To: <1622922030.41.0.294175639013.issue44319@roundup.psfhosted.org>
Message-ID: <1634834689.68.0.219055798445.issue44319@roundup.psfhosted.org>


Devin Prescott <devincprescott at gmail.com> added the comment:

I'm having the same issue trying to build python3.10 on CentOS 7.9

==================================================================
==================================================================
$ lsb_release -a
Distributor ID: CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:        7.9.2009
Codename:       Core

$ scl --list
devtoolset-8

$ gcc --version
gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ uname -r | cut -d"-" -f1
5.4.72
==================================================================
==================================================================

I've built and installed openssl 3.0.0 in the default location.

==================================================================
==================================================================

$ which openssl
/usr/bin/openssl

$ whereis openssl
openssl: /usr/bin/openssl /usr/lib64/openssl /usr/include/openssl /usr/share/man/man1/openssl.1ossl

==================================================================
==================================================================

Attempting the fix listed in https://bugs.python.org/issue45371 I still am met with the same issue:

$ ./configure --enable-optimizations --with-lto --with-system-ffi --with-computed-gotos --enable-loadable-sqlite-extensions --with-openssl=/usr/lib64/openssl --with-openssl-rpath=auto

$ make -j40

...

Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer

==================================================================
==================================================================

Should I be using a path other than /usr/lib64/openssl?

----------
nosy: +DevinCharles, alex, christian.heimes, dstufft, janssen
type:  -> compile error
versions: +Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44319>
_______________________________________

From report at bugs.python.org  Thu Oct 21 12:49:32 2021
From: report at bugs.python.org (Thomas)
Date: Thu, 21 Oct 2021 16:49:32 +0000
Subject: [issue39247] dataclass defaults and property don't work together
In-Reply-To: <1578418537.56.0.0565923550129.issue39247@roundup.psfhosted.org>
Message-ID: <1634834972.21.0.317685045819.issue39247@roundup.psfhosted.org>


Thomas <thomas.d.mckay at gmail.com> added the comment:

Hello everyone,

A quick look on SO and Google + this python issue + this blog post and its comments: https://florimond.dev/en/posts/2018/10/reconciling-dataclasses-and-properties-in-python/ show that this is still a problem where dataclass users keep hitting a wall.

The gist here seems to be that there's two ways to solve this:
- have descriptor be treated differently when found as default value in the __init__. I like this solution. The argument against is that users might want to have the descriptor object itself as an instance attribute and this solution would prevent them from doing it. I'd argue that, if the user intention was to have the descriptor object as a default value, the current dataclass implementation allows it in a weird way: as shown above, it actually sets and gets the descriptor using the descriptor as its own getter/setter (although it makes sense when one thinks of how dataclass are implemented, specifically "when" the dataclass modifies the class, it is nonetheless jarring at first glance).

- add an "alias/name/public_name/..." keyword to the field constructor so that we could write _bar: int = field(default=4, alias="bar"). The idea here keeps the usage of this alias to the __init__ method but I'd go further. The alias should be used everywhere we need to show the public API of the dataclass (repr, str, to_dict, ...). Basically, if a field has an alias, we only ever show / give access to the alias and essentially treat the original attribute name as a private name (i.e.: if the dataclass maintainer changes the attribute name, none of the user code should break).

I like both solutions for the given problem but I still have a preference for the first, as it covers more cases that are not shown by the example code: what if the descriptor doesn't delegate to a private field on the class? It is a bit less common, but one could want to have a field in the init that delegates to a resource that is not a field on the dataclass. The first solution allows that, the second doesn't.

So I'd like to propose a variation of the first solution that, hopefully, also solves the counter argument to that solution:

@dataclass
class FileObject:
    _uploaded_by: str = field(init=False)

    @property
    def uploaded_by(self):
        return self._uploaded_by

    @uploaded_by.setter
    def uploaded_by(self, uploaded_by):
        print('Setter Called with Value ', uploaded_by)
        self._uploaded_by = uploaded_by

    uploaded_by: str = field(default=None, descriptor=uploaded_by)


Basically, add an argument to the field constructor that allows developers to tell the dataclass constructor that this field requires special handling: in the __init__, it should use the default value as it would do for normal fields but at the class level, it should install the descriptor, instead of the default value.

What do you think ?

----------
nosy: +Thomas701

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39247>
_______________________________________

From report at bugs.python.org  Thu Oct 21 12:50:42 2021
From: report at bugs.python.org (Ethan Furman)
Date: Thu, 21 Oct 2021 16:50:42 +0000
Subject: [issue44174] Unclear meaning of _Private__names in enum docs.
In-Reply-To: <1621394869.98.0.78361930377.issue44174@roundup.psfhosted.org>
Message-ID: <1634835041.99.0.966354491815.issue44174@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:


New changeset 828722aca4ccba893f6b2e8c1d41fd74fd6e208d by Ethan Furman in branch '3.10':
[3.10] bpo-44174: [Enum] add reference to name mangling (GH-29117)
https://github.com/python/cpython/commit/828722aca4ccba893f6b2e8c1d41fd74fd6e208d


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44174>
_______________________________________

From report at bugs.python.org  Thu Oct 21 12:52:05 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 21 Oct 2021 16:52:05 +0000
Subject: [issue45540] module.__package__ and module.__spec__.parent have
 different semantics
In-Reply-To: <18C8915B-689A-49E5-BE0B-33C389540A87@python.org>
Message-ID: <CALFfu7BVwCsThozk-DK_+qSovP0BpAQMbBKdyZmAs6ZzvK9TAA@mail.gmail.com>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

On Wed, Oct 20, 2021 at 6:11 PM Barry A. Warsaw <report at bugs.python.org> wrote:
> I guess a question to answer then is whether we philosophically want the module attributes to be equivalent to the spec attributes.  And by equivalent, I mean enforced to be exactly so, and thus a proxy.  To me, the duplication is a wart that we should migrate away from so there?s only one place for these attributes, and that should be the spec.
>
> Here is the mapping we currently describe in the docs:
>
> mod.__name__ === __spec__.name
> mod.__package__ === __spec__.parent
> mod.__loader__ === __spec__.loader
> mod.__file__ === __spec__.origin
> mod.__path__ === __spec__.submodule_search_locations
> mod.__cached__ === __spec__.cached
>
> But right now, they don?t have to stay in sync, and I don?t think it?s reasonable to put the onus on the user to keep them in sync, because it?s unclear what code uses which attribute.  Okay, so you can just set them both to be safe, but then you can?t do that with __spec__.parent/__package__

Currently any of the module attrs can be different than the spec.  In
two cases they can legitimately be different: __name__ (with __main__)
and __file__ (with frozen stdlib modules).  For the rest, they should
be in sync.

Treating the spec as the single source of truth makes sense.  My only
concern has been that you can no longer determine how a module was
originally imported once the spec is changed.  However, I just
realized that you can always run importlib.util.find_spec() to
reproduce that info (with some minor caveats).  So now I'm less
concerned about that. :)

Notably, users have forever(?) been able to modify all of the module
attrs, with impact on the import system: __package__ and __path__
affecting later imports, and the rest affecting reload.

FWIW, an "advantage" of the module attrs is that they can be set in
the module code.  The same is true for the corresponding spec attrs
but with just enough indirection to require more intent.

Regardless, the idea of post-import modifications to modules/specs has
always made me uncomfortable.  As a user I'd expect an alternative
that feels less like a (non-obvious) low-level hack.

====

To me here are the important questions:

1. when does code ever modify the module attrs (or spec) and why?
2. should we distinguish the roles of the module attrs and spec
(how-module-was-loaded vs. how-module-will-reload vs.
how-module-impacts-other-imports)?
3. would it make sense to store spec modifications separately from the
spec (e.g. on the module)?
4. which attrs should be deprecated?
5. should any module attrs (the ones that don't get eventually
removed) be read-only?  What about spec attrs?
6. would it be better to provide importlib.util.* helpers to address
those needs, instead of having folks modify the module/spec directly?

My take:

1. that would be nice to know :)
2. that depends on what matters in practice.  My gut says the
distinctions aren't important enough to do anything about it, except
where there are legitimate differences between the module and spec.

Currently the module attrs cover all three roles.  The spec only
covers how-module-was-loaded (but is used as a fallback for the other
two roles in *most* cases).

Those two special cases, with __name__ and __file__ being out of sync,
are meaningful only for introspection, rather than affecting the
import machinery.  (In the case of frozen modules that have __file__
set, note that spec.has_location is False.)  I'm not sure how these
fit in with the different roles.

Advantages to keeping the spec exclusively how-module-was-imported:

* it's what I'd expect; having to call importlib.util.find_spec()
isn't the obvious thing
* the loader can modify the spec, so importlib.util.find_spec() won't
necessarily match

None of those appear important enough to warrant keeping the status
quo.  The disadvantages seem heavier (maintenance costs and user
confusion with (unnecessarily) having multiple sources of truth).

3. probably not, though it depends on (2)

However, if all those module attrs become read-only then we would need
to figure out where to store __name__ and __file__ in those special
cases.

4. everything except __name__ and __file__ (and probably __path__)
5. for modules, yes; for the spec, only if we stick with the one role

On modules I'd expect all of them to become properties regardless,
with most of them becoming read-only eventually:

getter:
* proxy the corresponding spec attr
* a deprecation warning if it isn't an attr that needs to stay

setter:
* proxy the corresponding spec attr
* a deprecation warning for now on all attrs
* a deprecation error later on all attrs
* an AttributeError even later (do not make it a data-only descriptor)

A bonus advantage of properties is that they would reduce clutter on
the module __dict__.

What about __path__?  We'll probably keep it as a traditional
indicator that the module is a package.  However, do we make it a
read-only proxy of spec.module_search_locations?  (We already use a
__path__ proxy for namespace packages.)

6. it probably isn't worth it.

Due to the extra indirection, modifying the spec seems like a more
deliberate (non-accidental or confused) action than changing the
module attrs.  That's probably enough "help".  However, in cases where
multiple attrs together have specific meaning, such helpers might be
helpful for users.

====

Regarding __file__ being different from spec.origin, it might be worth
revisiting the question of "origin" vs. "location" on the spec. Note
that, in the case of frozen stdlib modules, spec.has_location is False
even though __file__ is set.  That smells fishy to me.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45540>
_______________________________________

From report at bugs.python.org  Thu Oct 21 12:52:50 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 21 Oct 2021 16:52:50 +0000
Subject: [issue45540] module.__package__ and module.__spec__.parent have
 different semantics
In-Reply-To: <18C8915B-689A-49E5-BE0B-33C389540A87@python.org>
Message-ID: <CALFfu7DV1GdGDSWY19TSiSVX5UsYFGQEs0VhxSOwVH0JG0KEHw@mail.gmail.com>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

On Wed, Oct 20, 2021 at 6:11 PM Barry A. Warsaw <report at bugs.python.org> wrote:
> This is what leads me to think that having a proxy to keep them in sync and relaxing the read-only restriction is the path forward, even if writing __package__ doesn?t make sense.  It also seems like the easier way to keep backward compatibility, rather than enforcing read-only on __package__ to match __spec__.parent.
>
> So the question is less about whether this is useful than whether it will break things if they write to it.

I don't see any significant problem with making spec.parent writable.
It's read-only now only because it is computed from spec.name and any
other value doesn't make sense (which read-only communicates).  My
preference would be to make __package__ read-only instead. :)
However, I doubt it will make a difference in practice either way, so
I'm fine either way.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45540>
_______________________________________

From report at bugs.python.org  Thu Oct 21 12:53:10 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Thu, 21 Oct 2021 16:53:10 +0000
Subject: [issue22789] Compress the marshalled data in PYC files
In-Reply-To: <1415077245.4.0.700609350165.issue22789@psf.upfronthosting.co.za>
Message-ID: <1634835190.16.0.529847611921.issue22789@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

The space savings are nice, but I doubt that it will matter for startup time -- startup is most relevant in situations where it's *hot* (e.g. a shell script that repeatedly calls out to utilities written in Python).

----------
nosy: +gvanrossum

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22789>
_______________________________________

From report at bugs.python.org  Thu Oct 21 12:53:10 2021
From: report at bugs.python.org (Alex Waygood)
Date: Thu, 21 Oct 2021 16:53:10 +0000
Subject: [issue45535] Enum's dir() does not contain inherited members
In-Reply-To: <1634726106.14.0.525814954361.issue45535@roundup.psfhosted.org>
Message-ID: <1634835190.02.0.26490275612.issue45535@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

I had a go at writing a patch for `__dir__` that would include any methods an enum class had acquired through `int`/`str`/etc. mixins, while continuing to ignore enum dunders and sunders (as is currently the case). My patch also allows user-defined methods defined in enum subclasses to show up in the `help()` output, whereas they currently do not, since `help(enum_member)` looks up `dir(enum_class)` rather than `dir(enum_member)`.

The patch is a fair way more complex than the the existing code, however.

----------
nosy: +AlexWaygood
Added file: https://bugs.python.org/file50382/Enum_dir_patch.txt

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45535>
_______________________________________

From report at bugs.python.org  Thu Oct 21 12:54:24 2021
From: report at bugs.python.org (Alex Waygood)
Date: Thu, 21 Oct 2021 16:54:24 +0000
Subject: [issue45535] Enum's dir() does not contain inherited members
In-Reply-To: <1634726106.14.0.525814954361.issue45535@roundup.psfhosted.org>
Message-ID: <1634835264.73.0.171412461277.issue45535@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


Added file: https://bugs.python.org/file50383/enum_dir_output_with_patch.txt

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45535>
_______________________________________

From report at bugs.python.org  Thu Oct 21 12:58:47 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 21 Oct 2021 16:58:47 +0000
Subject: [issue33277] Deprecate __loader__, __package__,
 and __cached__ on modules
In-Reply-To: <1523656102.14.0.682650639539.issue33277@psf.upfronthosting.co.za>
Message-ID: <1634835527.62.0.0859756442264.issue33277@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

I ended up writing up more thoughts on this in the issue about __package__: https://bugs.python.org/issue45540#msg404619.

Users can call importlib.util.find_spec(), which is probably good enough to figure out how a module was originally imported.  So I don't have any serious objections to making the spec the writable single-source-of-truth.

FWIW, I'd rather there were high-level helpers available as an alternative to the low-level practice of modifying module attrs.  However, in this case it probably isn't frequent enough to make it worth it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33277>
_______________________________________

From report at bugs.python.org  Thu Oct 21 13:09:20 2021
From: report at bugs.python.org (Thomas)
Date: Thu, 21 Oct 2021 17:09:20 +0000
Subject: [issue39247] dataclass defaults and property don't work together
In-Reply-To: <1578418537.56.0.0565923550129.issue39247@roundup.psfhosted.org>
Message-ID: <1634836160.54.0.88874472772.issue39247@roundup.psfhosted.org>


Thomas <thomas.d.mckay at gmail.com> added the comment:

Thinking a little more about this, maybe a different solution would be to have default values be installed at the class level by default without being overwritten in the init, as is the case today. default_factory should keep being set in the init as is the case today.

With this approach:

@dataclass
class Foo:
    bar = field(default=4)
    # assigns 4 to Foo.bar but not to foo.bar (bonus: __init__ will be faster)

    bar = field(default=some_descriptor)
    # assigns some_descriptor to Foo.bar, so Foo().bar does a __get__ on the descriptor

    bar = field(default_factory=SomeDescriptor)
    # assigns a new SomeDescriptor instance to every instance of Foo

    bar = field(default_factory=lambda: some_descriptor)
    # assigns the same descriptor object to every instance of Foo

I don't think this change would break a lot of existing code as the attribute overwrite that happens at the instance level in the __init__ is essentially an implementation detail. It also seems this would solve the current problem and allow for a cleaner way to assign a descriptor object as a default value. Am I not seeing some obvious problem here ?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39247>
_______________________________________

From report at bugs.python.org  Thu Oct 21 13:27:36 2021
From: report at bugs.python.org (Thomas)
Date: Thu, 21 Oct 2021 17:27:36 +0000
Subject: [issue39247] dataclass defaults and property don't work together
In-Reply-To: <1578418537.56.0.0565923550129.issue39247@roundup.psfhosted.org>
Message-ID: <1634837256.91.0.879075483348.issue39247@roundup.psfhosted.org>


Thomas <thomas.d.mckay at gmail.com> added the comment:

Scratch that last one, it leads to problem when mixing descriptors with actual default values:

@dataclass
class Foo:
    bar = field(default=some_descriptor)
    # technically this is a descriptor field without a default value or at the very least, the dataclass constructor can't know because it doesn't know what field, if any, this delegates to. This means this will show up as optional in the __init__ signature but it might not be.

    bar = field(default=some_descriptor, default_factory=lambda:4)
    # this could be a solve for the above problem. The dc constructor would install the constructor at the class level and assign 4 to the instance attribute in the __init__. Still doesn't tell the dc constructor if a field is optional or not when it's default value is a descriptor and no default_factory is passed. And it feels a lot more like hack than anything else.


So ignore my previous message. I'm still 100% behind the "descriptor" arg in the field constructor, though :)

PS: Sorry for the noise, I just stumbled onto this problem for the nth-times and I can't get my brain to shut off.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39247>
_______________________________________

From report at bugs.python.org  Thu Oct 21 13:30:00 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 21 Oct 2021 17:30:00 +0000
Subject: [issue44319] setup openssl faild on linux (ubuntu 20.04)
In-Reply-To: <1622922030.41.0.294175639013.issue44319@roundup.psfhosted.org>
Message-ID: <1634837400.69.0.94697182392.issue44319@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

I need more information to assist you. Could you please provide:

- the steps how you compiled and install your custom OpenSSL installation
- the output of "ls /usr/lib64/openssl"
- your config.log file (please upload)
- the output of "make -j1" for the steps "building '_ssl' extension" and "building '_hashlib' extension"

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44319>
_______________________________________

From report at bugs.python.org  Thu Oct 21 13:44:09 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 21 Oct 2021 17:44:09 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1634838249.02.0.376369602346.issue45548@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

I started https://github.com/python/cpython/compare/main...tiran:configure_pkgconfig?expand=1 to integrate pkg-config with configure. The patchset also contains examples how to pass flags from configure into Makefile and Modules/Setup.

----------
nosy: +christian.heimes

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Thu Oct 21 13:54:25 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Thu, 21 Oct 2021 17:54:25 +0000
Subject: [issue45540] module.__package__ and module.__spec__.parent have
 different semantics
In-Reply-To: <1634749883.54.0.793446044283.issue45540@roundup.psfhosted.org>
Message-ID: <1634838865.77.0.978460885254.issue45540@roundup.psfhosted.org>


Barry A. Warsaw <barry at python.org> added the comment:

Thanks for your comprehensive comments Eric!  While I digest them, my TL;DR is that we probably need a PEP to describe everything from the current situation, to the the desired end state and migration path.  I'm willing to put that together with you and Brett as co-authors if you're amenable.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45540>
_______________________________________

From report at bugs.python.org  Thu Oct 21 13:59:20 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Thu, 21 Oct 2021 17:59:20 +0000
Subject: [issue42961] Use-after-free (of a heap type) during finalization
In-Reply-To: <1611004560.18.0.844080226766.issue42961@roundup.psfhosted.org>
Message-ID: <1634839160.83.0.751017111036.issue42961@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

as far as I can see, this had the same root cause as bpo-44184, and was fixed in GH-26274.


FWIW, the reproducers are missing a `Py_DECREF(type)` after `PyDict_SetItemString`/`PyObject_SetAttrString`; those don't steal the reference. That sent me on an unproductive refcounting chase :)

----------
nosy: +petr.viktorin
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42961>
_______________________________________

From report at bugs.python.org  Thu Oct 21 14:09:22 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 21 Oct 2021 18:09:22 +0000
Subject: [issue42961] Use-after-free (of a heap type) during finalization
In-Reply-To: <1611004560.18.0.844080226766.issue42961@roundup.psfhosted.org>
Message-ID: <1634839762.12.0.884728357831.issue42961@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
nosy: +vstinner
nosy_count: 3.0 -> 4.0
pull_requests: +27403
pull_request: https://github.com/python/cpython/pull/26274

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42961>
_______________________________________

From report at bugs.python.org  Thu Oct 21 14:25:26 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 21 Oct 2021 18:25:26 +0000
Subject: [issue45540] module.__package__ and module.__spec__.parent have
 different semantics
In-Reply-To: <1634838865.77.0.978460885254.issue45540@roundup.psfhosted.org>
Message-ID: <CALFfu7DutKfq+bBdfWf+PP33bJiz9pU2Eh3h+fj7p5rDFRsrMA@mail.gmail.com>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

On Thu, Oct 21, 2021 at 11:54 AM Barry A. Warsaw <report at bugs.python.org> wrote:
> Thanks for your comprehensive comments Eric!  While I digest them, my TL;DR is that we probably need a PEP to describe everything from the current situation, to the the desired end state and migration path.  I'm willing to put that together with you and Brett as co-authors if you're amenable.

+1

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45540>
_______________________________________

From report at bugs.python.org  Thu Oct 21 14:29:24 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 21 Oct 2021 18:29:24 +0000
Subject: [issue45556] uuid.uuid4() fast optimization
In-Reply-To: <1634828638.25.0.268468778181.issue45556@roundup.psfhosted.org>
Message-ID: <1634840964.88.0.522272597141.issue45556@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

We use os.urandom() because it is backed by a cryptographicly secure random number generator. The random module uses a non-secure RNG. While RFC 4122 does not mandate a CSRPNG, application often rely on unpredictable UUIDs. Correctness and security is more important here than performance.

If you need a faster uuid4 implementation, then you can role your own with a couple of lines of code:

import random
from uuid import UUID

def uuid4_fast():
    return UUID(int=random.getrandbits(128), version=4)

----------
nosy: +christian.heimes
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45556>
_______________________________________

From report at bugs.python.org  Thu Oct 21 14:29:38 2021
From: report at bugs.python.org (Ethan Furman)
Date: Thu, 21 Oct 2021 18:29:38 +0000
Subject: [issue44174] Unclear meaning of _Private__names in enum docs.
In-Reply-To: <1621394869.98.0.78361930377.issue44174@roundup.psfhosted.org>
Message-ID: <1634840978.99.0.53694435149.issue44174@roundup.psfhosted.org>


Change by Ethan Furman <ethan at stoneleaf.us>:


----------
pull_requests: +27404
pull_request: https://github.com/python/cpython/pull/29128

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44174>
_______________________________________

From report at bugs.python.org  Thu Oct 21 14:32:21 2021
From: report at bugs.python.org (Eric Cousineau)
Date: Thu, 21 Oct 2021 18:32: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: <1634841141.1.0.422900220835.issue45546@roundup.psfhosted.org>


Eric Cousineau <eric.cousineau at tri.global> added the comment:

> I get an error with 3.8.10, but not on the main branch (3.11) [...]

Confirmed, using 3.11.0a1 (using Docker). Seems like at least the pickling is fixed?

> I'm confused -- your initial report talks about pickling fields, but your tests are pickling the entire class... what am I missing?

Sorry about that; the original file, `enum_test.py`, was just trying to pickle an enum field, i.e. `DoesNotWork.a`. However, because it uses the type `DoesNotWork.NestedValue2`, `pickle` tries to unpackage that type, but cannot access it via name because `DoesNotWork.NestedValue2` is wrapped as an enum *field*, rather than just a normal field.

I've uploaded a new file, `enum_nested_type_test.py`, that perhaps shows the root cause - the `Enum` interprets the nested class as an enum field (wrapping it as an enum value), rather than as "just" a nested class. In contrast, it did not seem to wrap the function.

Does that make sense / help at all?

----------
Added file: https://bugs.python.org/file50384/enum_nested_type_test.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45546>
_______________________________________

From report at bugs.python.org  Thu Oct 21 14:32:32 2021
From: report at bugs.python.org (Ethan Furman)
Date: Thu, 21 Oct 2021 18:32:32 +0000
Subject: [issue44174] Unclear meaning of _Private__names in enum docs.
In-Reply-To: <1621394869.98.0.78361930377.issue44174@roundup.psfhosted.org>
Message-ID: <1634841152.43.0.48985047281.issue44174@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:


New changeset e628700dbf2c3376502cbb5a9bff2d58d1102e16 by Ethan Furman in branch '3.9':
[3.9] bpo-44174: [Enum] add name-mangling reference (GH-29128)
https://github.com/python/cpython/commit/e628700dbf2c3376502cbb5a9bff2d58d1102e16


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44174>
_______________________________________

From report at bugs.python.org  Thu Oct 21 14:33:16 2021
From: report at bugs.python.org (Ethan Furman)
Date: Thu, 21 Oct 2021 18:33:16 +0000
Subject: [issue44174] Unclear meaning of _Private__names in enum docs.
In-Reply-To: <1621394869.98.0.78361930377.issue44174@roundup.psfhosted.org>
Message-ID: <1634841196.94.0.679714236444.issue44174@roundup.psfhosted.org>


Change by Ethan Furman <ethan at stoneleaf.us>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44174>
_______________________________________

From report at bugs.python.org  Thu Oct 21 15:02:36 2021
From: report at bugs.python.org (Ethan Furman)
Date: Thu, 21 Oct 2021 19:02:36 +0000
Subject: [issue45535] Enum's dir() does not contain inherited members
In-Reply-To: <1634726106.14.0.525814954361.issue45535@roundup.psfhosted.org>
Message-ID: <1634842956.4.0.219774235595.issue45535@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:

Looks interesting, thank you for the patch.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45535>
_______________________________________

From report at bugs.python.org  Thu Oct 21 15:03:18 2021
From: report at bugs.python.org (Ethan Furman)
Date: Thu, 21 Oct 2021 19:03:18 +0000
Subject: [issue45535] Enum's dir() does not contain inherited members
In-Reply-To: <1634726106.14.0.525814954361.issue45535@roundup.psfhosted.org>
Message-ID: <1634842998.58.0.386616392179.issue45535@roundup.psfhosted.org>


Change by Ethan Furman <ethan at stoneleaf.us>:


----------
assignee:  -> ethan.furman
versions:  -Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45535>
_______________________________________

From report at bugs.python.org  Thu Oct 21 15:17:27 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 19:17:27 +0000
Subject: [issue24069] Option to delete obsolete bytecode files
In-Reply-To: <1430239459.0.0.172566043873.issue24069@psf.upfronthosting.co.za>
Message-ID: <1634843847.56.0.205787760535.issue24069@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24069>
_______________________________________

From report at bugs.python.org  Thu Oct 21 15:20:23 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 19:20:23 +0000
Subject: [issue22268] add dedicated functions mrohasattr and mrogetattr
In-Reply-To: <1408918667.95.0.696624554898.issue22268@psf.upfronthosting.co.za>
Message-ID: <1634844023.75.0.672626808392.issue22268@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22268>
_______________________________________

From report at bugs.python.org  Thu Oct 21 15:33:42 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 21 Oct 2021 19:33:42 +0000
Subject: [issue45535] Enum's dir() does not contain inherited members
In-Reply-To: <1634726106.14.0.525814954361.issue45535@roundup.psfhosted.org>
Message-ID: <1634844822.97.0.0135389474314.issue45535@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

There may be a simple error (superfluous .__class__), but I am not sure.

BTW, why use mro() instead of __mro__? Most code use __mro__.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45535>
_______________________________________

From report at bugs.python.org  Thu Oct 21 15:48:33 2021
From: report at bugs.python.org (Jean-Philippe VINCENT)
Date: Thu, 21 Oct 2021 19:48:33 +0000
Subject: [issue45557] Issue 42914
In-Reply-To: <PA4PR10MB460504F41A228E63B286D427CDBF9@PA4PR10MB4605.EURPRD10.PROD.OUTLOOK.COM>
Message-ID: <PA4PR10MB4605A0C7BA64ECBA8555E00BCDBF9@PA4PR10MB4605.EURPRD10.PROD.OUTLOOK.COM>


New submission from Jean-Philippe VINCENT <jpvincent at hotmail.fr>:

Hello,

I just tried the new attribute underscore_numbers with pprint, it doesn't work for me. I'm working on Windows.

[cid:8779885d-01bf-4162-9427-a44de152f7ac]

Best regards,

Jean-Philippe

----------
files: image.png
messages: 404636
nosy: jpvincent
priority: normal
severity: normal
status: open
title: Issue 42914
Added file: https://bugs.python.org/file50385/image.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45557>
_______________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 14926 bytes
Desc: not available
URL: <https://mail.python.org/pipermail/python-bugs-list/attachments/20211021/8aaa9a24/attachment-0001.png>

From report at bugs.python.org  Thu Oct 21 15:52:27 2021
From: report at bugs.python.org (Jean-Philippe VINCENT)
Date: Thu, 21 Oct 2021 19:52:27 +0000
Subject: [issue45557] pprint -> underscore_numbers argument not working
In-Reply-To: <PA4PR10MB4605A0C7BA64ECBA8555E00BCDBF9@PA4PR10MB4605.EURPRD10.PROD.OUTLOOK.COM>
Message-ID: <1634845947.74.0.681727845282.issue45557@roundup.psfhosted.org>


Change by Jean-Philippe VINCENT <jpvincent at hotmail.fr>:


----------
title: Issue 42914 -> pprint -> underscore_numbers argument not working

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45557>
_______________________________________

From report at bugs.python.org  Thu Oct 21 15:54:31 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 21 Oct 2021 19:54:31 +0000
Subject: [issue18056] Document importlib._bootstrap.NamespaceLoader
In-Reply-To: <1369496751.81.0.344197180241.issue18056@psf.upfronthosting.co.za>
Message-ID: <1634846071.49.0.853980983825.issue18056@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Close this?  As near as I can tell, there is currectly no doc for importlib._bootstrap ('_bootstrap' neither in Index nor importlib doc).  Also, it does not currently contain NamespaceLoader (not in dir(importlib._bootstrap).

----------
nosy: +terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18056>
_______________________________________

From report at bugs.python.org  Thu Oct 21 15:59:45 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 21 Oct 2021 19:59:45 +0000
Subject: [issue18331] Doc that runpy.run_path and run_module copy module
 globals
In-Reply-To: <1372602782.77.0.618152195123.issue18331@psf.upfronthosting.co.za>
Message-ID: <1634846385.7.0.0889427638538.issue18331@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Nick, is this issue still needed?

----------
nosy: +terry.reedy
title: Document that runpy.run_path and run_module copy the module globals -> Doc that runpy.run_path and run_module copy module globals
versions: +Python 3.11 -Python 2.7, Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18331>
_______________________________________

From report at bugs.python.org  Thu Oct 21 15:59:58 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 21 Oct 2021 19:59:58 +0000
Subject: [issue18056] Document importlib._bootstrap.NamespaceLoader
In-Reply-To: <1369496751.81.0.344197180241.issue18056@psf.upfronthosting.co.za>
Message-ID: <1634846398.43.0.310770986204.issue18056@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

See bpo-35673.  Also, it is actually in importlib._bootstrap_external.

----------
nosy: +eric.snow

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18056>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:05:28 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 21 Oct 2021 20:05:28 +0000
Subject: [issue5120] Change _tkinter initialization for new versions of Aqua
 Tk on OS X
In-Reply-To: <1233437150.39.0.445953575427.issue5120@psf.upfronthosting.co.za>
Message-ID: <1634846728.4.0.84501614267.issue5120@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Can we close this?  I expect that if crashes were still happening from this cause, there would be a newer issue.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue5120>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:05:25 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Thu, 21 Oct 2021 20:05:25 +0000
Subject: [issue45557] pprint -> underscore_numbers argument not working
In-Reply-To: <PA4PR10MB4605A0C7BA64ECBA8555E00BCDBF9@PA4PR10MB4605.EURPRD10.PROD.OUTLOOK.COM>
Message-ID: <1634846725.28.0.265402498395.issue45557@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

Please do not post screen shots. They don't work for people with vision impairments, and we can't copy and past from them, so it makes it harder for us to help you.

It looks like it works with pformat, and not pprint:

>>> pprint.pformat(10000, underscore_numbers=True)
'10_000'
>>> pprint.pprint(10000, underscore_numbers=True)
10000

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45557>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:06:00 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 21 Oct 2021 20:06:00 +0000
Subject: [issue5120] Change _tkinter initialization for new versions of Aqua
 Tk on OS X
In-Reply-To: <1233437150.39.0.445953575427.issue5120@psf.upfronthosting.co.za>
Message-ID: <1634846760.54.0.417967580313.issue5120@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Or should this be marked for 3.11?

----------
versions:  -Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue5120>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:09:08 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Thu, 21 Oct 2021 20:09:08 +0000
Subject: [issue45557] pprint -> underscore_numbers argument not working
In-Reply-To: <PA4PR10MB4605A0C7BA64ECBA8555E00BCDBF9@PA4PR10MB4605.EURPRD10.PROD.OUTLOOK.COM>
Message-ID: <1634846948.37.0.776681185159.issue45557@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

It's a bug in pprint.py. PR to follow shortly.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45557>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:13:50 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 21 Oct 2021 20:13:50 +0000
Subject: [issue18056] Document importlib._bootstrap.NamespaceLoader
In-Reply-To: <1369496751.81.0.344197180241.issue18056@psf.upfronthosting.co.za>
Message-ID: <1634847230.37.0.728608009454.issue18056@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

_bootstrap_external also appears to be undocumented.  It does has _NamespaceLoader among its 77 entries.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18056>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:15:14 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Thu, 21 Oct 2021 20:15:14 +0000
Subject: [issue45557] pprint -> underscore_numbers argument not working
In-Reply-To: <PA4PR10MB4605A0C7BA64ECBA8555E00BCDBF9@PA4PR10MB4605.EURPRD10.PROD.OUTLOOK.COM>
Message-ID: <1634847314.93.0.863962534843.issue45557@roundup.psfhosted.org>


Change by Eric V. Smith <eric at trueblade.com>:


----------
keywords: +patch
pull_requests: +27405
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29129

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45557>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:18:42 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 20:18:42 +0000
Subject: [issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11
In-Reply-To: <1633984027.59.0.32532195896.issue45436@roundup.psfhosted.org>
Message-ID: <1634847522.89.0.254420907464.issue45436@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks for the investigation, E. Paine. So I'm keeping this open then.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:20:18 2021
From: report at bugs.python.org (Doron Behar)
Date: Thu, 21 Oct 2021 20:20:18 +0000
Subject: [issue45558] shutil.copytree: Give the option to disable copystat
Message-ID: <1634847618.09.0.382160637693.issue45558@roundup.psfhosted.org>


Change by Doron Behar <doron.behar at gmail.com>:


----------
components: Library (Lib)
nosy: doronbehar
priority: normal
severity: normal
status: open
title: shutil.copytree: Give the option to disable copystat
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45558>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:21:43 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 21 Oct 2021 20:21:43 +0000
Subject: [issue15996] pow() for complex numbers is rough around the edges
In-Reply-To: <1348178428.15.0.517718755216.issue15996@psf.upfronthosting.co.za>
Message-ID: <1634847703.81.0.567220854129.issue15996@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

In Windows, I now get the Mark's macOS result instead of the Z.D.Error.

>>> (1.0+0j)**(float('inf') + 0j)
(nan+nanj)

Has there been a revision of complex ** on another issue such that this one is obsolete?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15996>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:23:05 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Thu, 21 Oct 2021 20:23:05 +0000
Subject: [issue45559] pprint module does not test pprint.pprint()
Message-ID: <1634847784.94.0.10912220069.issue45559@roundup.psfhosted.org>


New submission from Eric V. Smith <eric at trueblade.com>:

For example, see issue 45557, where pprint.pformat(underscore_numbers=True) worked, but pprint.pprint(underscore_numbers=True) did not.

Testing of pprint.pprint() should be added.

----------
components: Library (Lib)
messages: 404647
nosy: eric.smith
priority: normal
severity: normal
status: open
title: pprint module does not test pprint.pprint()
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45559>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:24:10 2021
From: report at bugs.python.org (Doron Behar)
Date: Thu, 21 Oct 2021 20:24:10 +0000
Subject: [issue45558] shutil.copytree: Give the option to disable copystat
Message-ID: <1634847850.07.0.910000466406.issue45558@roundup.psfhosted.org>


Change by Doron Behar <doron.behar at gmail.com>:


----------
keywords: +patch
pull_requests: +27406
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29130

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45558>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:25:23 2021
From: report at bugs.python.org (Michael Robellard)
Date: Thu, 21 Oct 2021 20:25:23 +0000
Subject: [issue39247] dataclass defaults and property don't work together
In-Reply-To: <1578418537.56.0.0565923550129.issue39247@roundup.psfhosted.org>
Message-ID: <1634847923.45.0.959507563393.issue39247@roundup.psfhosted.org>


Michael Robellard <mike at robellard.com> added the comment:

I can confirm that Juan Arrivillaga (juanpa.arrivillaga) workaround does work. 

Given that it works, then wouldn't it be relatively trivial to do what Thomas701 suggests and add a descriptor parameter to fields. Then apply the descriptor after all the other work is done so that it doesn't get clobbered, which is basically reproducing the workaround.

import dataclasses
@dataclasses.dataclass
class FileObject:
    _uploaded_by: str = dataclasses.field(default=None, init=False)

    def _uploaded_by_getter(self):
        return self._uploaded_by

    def _uploaded_by_setter(self, uploaded_by):
        print('Setter Called with Value ', uploaded_by)
        self._uploaded_by = uploaded_by

    uploaded_by: str = field(default=None, descriptor=property(
        FileObject._uploaded_by_getter, 
        FileObject._uploaded_by_setter))

p = FileObject()
print(p)
print(p.uploaded_by)

This would allow any descriptor to be applied to a dataclass field. If we allow descriptor to accept an iterable as well you could have multiple descriptors just like normal.

----------
versions: +Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39247>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:26:01 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 20:26:01 +0000
Subject: [issue45160] ttk.OptionMenu radiobuttons change variable value twice
In-Reply-To: <1631257980.33.0.506661911605.issue45160@roundup.psfhosted.org>
Message-ID: <1634847961.39.0.872471569963.issue45160@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset add46f84769a7e6fafa50954f79b7c248231fa4e by E-Paine in branch 'main':
bpo-45160: Ttk optionmenu only set variable once (GH-28291)
https://github.com/python/cpython/commit/add46f84769a7e6fafa50954f79b7c248231fa4e


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45160>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:26:27 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 21 Oct 2021 20:26:27 +0000
Subject: [issue45160] ttk.OptionMenu radiobuttons change variable value twice
In-Reply-To: <1631257980.33.0.506661911605.issue45160@roundup.psfhosted.org>
Message-ID: <1634847987.52.0.0450937247465.issue45160@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +27407
pull_request: https://github.com/python/cpython/pull/29131

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45160>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:26:37 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 21 Oct 2021 20:26:37 +0000
Subject: [issue45160] ttk.OptionMenu radiobuttons change variable value twice
In-Reply-To: <1631257980.33.0.506661911605.issue45160@roundup.psfhosted.org>
Message-ID: <1634847997.43.0.809518381927.issue45160@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27408
pull_request: https://github.com/python/cpython/pull/29132

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45160>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:42:28 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Thu, 21 Oct 2021 20:42:28 +0000
Subject: [issue31000] Test failure in resource module on ZFS
In-Reply-To: <1500851878.05.0.462798019219.issue31000@psf.upfronthosting.co.za>
Message-ID: <1634848948.76.0.285546359189.issue31000@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

this is probably somewhat of an edge case.  filesystems are presumably free to have their own concepts of granularity on size limit enforcement.

zfs may become more popular in future ubuntu versions as they're offering it as a supported primary whole system filesystem.  but zfs is also highly configurable so it likely isn't accurate to just say "zfs" caused this.

that test appears to be setting RLIMIT_FSIZE to 1024 and creating a 1024 byte file.  this could be an edge case, either in our understanding (the limit can never be reached or the limit can be exactly reached?) or in the filesystem's interpretation of that.  my understanding is that it is supposed to be inclusive.  RLIMIT_FSIZE 1024 should allow 1024 byte files.

but for such small unrealistic real world values i can easily imagine filesystems being creative...  people tend not to expect these limits to be so strict.

that test could use refactoring to rely less on strict limits.  that isn't what it was aiming to test.

----------
nosy: +gregory.p.smith
status: pending -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31000>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:43:04 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 21 Oct 2021 20:43:04 +0000
Subject: [issue45557] pprint -> underscore_numbers argument not working
In-Reply-To: <PA4PR10MB4605A0C7BA64ECBA8555E00BCDBF9@PA4PR10MB4605.EURPRD10.PROD.OUTLOOK.COM>
Message-ID: <1634848984.82.0.432374157888.issue45557@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +27409
pull_request: https://github.com/python/cpython/pull/29133

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45557>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:43:04 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Thu, 21 Oct 2021 20:43:04 +0000
Subject: [issue45557] pprint -> underscore_numbers argument not working
In-Reply-To: <PA4PR10MB4605A0C7BA64ECBA8555E00BCDBF9@PA4PR10MB4605.EURPRD10.PROD.OUTLOOK.COM>
Message-ID: <1634848984.48.0.983624025623.issue45557@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:


New changeset 087f089e5e04d5b132ffbff0576667d591f13219 by Eric V. Smith in branch 'main':
bpo-45557: Fix underscore_numbers in pprint.pprint(). (GH-29129)
https://github.com/python/cpython/commit/087f089e5e04d5b132ffbff0576667d591f13219


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45557>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:44:45 2021
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 21 Oct 2021 20:44:45 +0000
Subject: [issue43139] test_ttk test_compound,
 test_tk test_type fail with Tk 8.6.11.1
In-Reply-To: <1612552092.14.0.798552929042.issue43139@roundup.psfhosted.org>
Message-ID: <1634849085.06.0.449423126862.issue43139@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:

Closing as a duplicate of bpo-45436; fixes to the tests were committed with that issue number.

----------
nosy: +zach.ware
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> test_tk.test_configure_type() fails with Tcl/Tk 8.6.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43139>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:45:30 2021
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 21 Oct 2021 20:45:30 +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: <1634849130.39.0.0164599413579.issue45436@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:

I'm not sure there's much utility to keeping this issue open: the test failures are fixed with a mild but not unprecedented weakening of the tests, and Tcl/Tk 8.6.11 is in the wild and will remain there, so our tests are likely to need to continue handling its behavior (buggy or not) in perpetuity.

By all means, please continue pursuing the change with Tcl/Tk :).  I'm just not sure what else there is for us to do here.

----------
stage: patch review -> commit review

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:45:50 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 21 Oct 2021 20:45:50 +0000
Subject: [issue44970] Re-examine complex pow special case handling
In-Reply-To: <1629552403.37.0.715300348368.issue44970@roundup.psfhosted.org>
Message-ID: <1634849150.43.0.601131656503.issue44970@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Is not it a duplicate of issue15996?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44970>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:57:58 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 20:57:58 +0000
Subject: [issue44344] Documentation for pow() should include the possibility
 of complex numbers as a return type
In-Reply-To: <1623125616.73.0.892905550694.issue44344@roundup.psfhosted.org>
Message-ID: <1634849878.16.0.0686374699836.issue44344@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 887a55705bb6c05a507c2886c9978a9e0cff0dd7 by Mark Dickinson in branch 'main':
bpo-44344: Document that pow can return a complex number for non-complex inputs. (GH-27853)
https://github.com/python/cpython/commit/887a55705bb6c05a507c2886c9978a9e0cff0dd7


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44344>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:58:39 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 21 Oct 2021 20:58:39 +0000
Subject: [issue44344] Documentation for pow() should include the possibility
 of complex numbers as a return type
In-Reply-To: <1623125616.73.0.892905550694.issue44344@roundup.psfhosted.org>
Message-ID: <1634849919.67.0.960539695781.issue44344@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27411
pull_request: https://github.com/python/cpython/pull/29135

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44344>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:58:36 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 21 Oct 2021 20:58:36 +0000
Subject: [issue44344] Documentation for pow() should include the possibility
 of complex numbers as a return type
In-Reply-To: <1623125616.73.0.892905550694.issue44344@roundup.psfhosted.org>
Message-ID: <1634849916.28.0.612430218269.issue44344@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +27410
pull_request: https://github.com/python/cpython/pull/29134

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44344>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:58:26 2021
From: report at bugs.python.org (Larry Hastings)
Date: Thu, 21 Oct 2021 20:58:26 +0000
Subject: [issue31000] Test failure in resource module on ZFS
In-Reply-To: <1500851878.05.0.462798019219.issue31000@psf.upfronthosting.co.za>
Message-ID: <1634849906.23.0.68286754944.issue31000@roundup.psfhosted.org>


Larry Hastings <larry at hastings.org> added the comment:

FWIW the test still fails in exactly the same way.  This was building with main, on Pop!_OS 21.04 64-bit.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31000>
_______________________________________

From report at bugs.python.org  Thu Oct 21 16:59:26 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 20:59:26 +0000
Subject: [issue45160] ttk.OptionMenu radiobuttons change variable value twice
In-Reply-To: <1631257980.33.0.506661911605.issue45160@roundup.psfhosted.org>
Message-ID: <1634849966.42.0.49099003941.issue45160@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 04485ac9886cd807aae854fb905a88c791cfdde6 by Miss Islington (bot) in branch '3.9':
bpo-45160: Ttk optionmenu only set variable once (GH-28291) (GH-29132)
https://github.com/python/cpython/commit/04485ac9886cd807aae854fb905a88c791cfdde6


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45160>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:01:52 2021
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 21 Oct 2021 21:01:52 +0000
Subject: [issue40906] Unable to import module due to python unable to resolve
 dependecies
In-Reply-To: <1591595444.88.0.936758108882.issue40906@roundup.psfhosted.org>
Message-ID: <1634850112.35.0.643336092745.issue40906@roundup.psfhosted.org>


Change by Zachary Ware <zachary.ware at gmail.com>:


----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40906>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:02:28 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 21:02:28 +0000
Subject: [issue45160] ttk.OptionMenu radiobuttons change variable value twice
In-Reply-To: <1631257980.33.0.506661911605.issue45160@roundup.psfhosted.org>
Message-ID: <1634850148.02.0.460118969789.issue45160@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 98f157de1260801fd26c72eb6bfae0d9295e5ab3 by Miss Islington (bot) in branch '3.10':
bpo-45160: Ttk optionmenu only set variable once (GH-28291) (GH-29131)
https://github.com/python/cpython/commit/98f157de1260801fd26c72eb6bfae0d9295e5ab3


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45160>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:03:34 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 21:03:34 +0000
Subject: [issue45160] ttk.OptionMenu radiobuttons change variable value twice
In-Reply-To: <1631257980.33.0.506661911605.issue45160@roundup.psfhosted.org>
Message-ID: <1634850214.07.0.341626260131.issue45160@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks for the fix, E. Paine, and fhdrsdg for the fix! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45160>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:03:50 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 21:03:50 +0000
Subject: [issue45160] ttk.OptionMenu radiobuttons change variable value twice
In-Reply-To: <1631257980.33.0.506661911605.issue45160@roundup.psfhosted.org>
Message-ID: <1634850230.71.0.868578199477.issue45160@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
Removed message: https://bugs.python.org/msg404659

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45160>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:03:59 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 21:03:59 +0000
Subject: [issue45160] ttk.OptionMenu radiobuttons change variable value twice
In-Reply-To: <1631257980.33.0.506661911605.issue45160@roundup.psfhosted.org>
Message-ID: <1634850239.01.0.718154358813.issue45160@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks for the fix, E. Paine, and fhdrsdg for the report! ? ? ?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45160>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:04:08 2021
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 21 Oct 2021 21:04:08 +0000
Subject: [issue23120] installation order of 32bit and 64bit python seems to
 matter
In-Reply-To: <1419687510.82.0.457945734006.issue23120@psf.upfronthosting.co.za>
Message-ID: <1634850248.62.0.383810994411.issue23120@roundup.psfhosted.org>


Change by Zachary Ware <zachary.ware at gmail.com>:


----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23120>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:05:55 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 21:05:55 +0000
Subject: [issue45526] Set ADDRESS_BITS to 64 for obmalloc radix tree
In-Reply-To: <1634662124.91.0.148058700143.issue45526@roundup.psfhosted.org>
Message-ID: <1634850355.07.0.475380852127.issue45526@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 0224b7180b280794b9fba62057b278ffb536c86f by Neil Schemenauer in branch 'main':
bpo-45526: obmalloc radix use 64 addr bits (GH-29062)
https://github.com/python/cpython/commit/0224b7180b280794b9fba62057b278ffb536c86f


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45526>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:06:33 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 21:06:33 +0000
Subject: [issue45526] Set ADDRESS_BITS to 64 for obmalloc radix tree
In-Reply-To: <1634662124.91.0.148058700143.issue45526@roundup.psfhosted.org>
Message-ID: <1634850393.77.0.472305296918.issue45526@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Neil! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45526>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:13:45 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 21:13:45 +0000
Subject: [issue41983] Missing Documentation AF_PACKET
In-Reply-To: <1602255549.69.0.358914707678.issue41983@roundup.psfhosted.org>
Message-ID: <1634850825.59.0.603836673755.issue41983@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 51375388bee7287be2d942906b48c8cf3f691e8b by andrei kulakov in branch 'main':
bpo-41983: add availability info to socket docs (GH-27519)
https://github.com/python/cpython/commit/51375388bee7287be2d942906b48c8cf3f691e8b


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41983>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:13:56 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 21 Oct 2021 21:13:56 +0000
Subject: [issue41983] Missing Documentation AF_PACKET
In-Reply-To: <1602255549.69.0.358914707678.issue41983@roundup.psfhosted.org>
Message-ID: <1634850836.03.0.973556582586.issue41983@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +27412
pull_request: https://github.com/python/cpython/pull/29136

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41983>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:13:59 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 21 Oct 2021 21:13:59 +0000
Subject: [issue41983] Missing Documentation AF_PACKET
In-Reply-To: <1602255549.69.0.358914707678.issue41983@roundup.psfhosted.org>
Message-ID: <1634850839.03.0.505163021966.issue41983@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27413
pull_request: https://github.com/python/cpython/pull/29137

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41983>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:17:06 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 21 Oct 2021 21:17:06 +0000
Subject: [issue45557] pprint -> underscore_numbers argument not working
In-Reply-To: <PA4PR10MB4605A0C7BA64ECBA8555E00BCDBF9@PA4PR10MB4605.EURPRD10.PROD.OUTLOOK.COM>
Message-ID: <1634851026.53.0.0346050247957.issue45557@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 6b75ad5fd47e5b34a04197927f748d0391898de7 by Miss Islington (bot) in branch '3.10':
bpo-45557: Fix underscore_numbers in pprint.pprint(). (GH-29129)
https://github.com/python/cpython/commit/6b75ad5fd47e5b34a04197927f748d0391898de7


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45557>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:20:01 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Thu, 21 Oct 2021 21:20:01 +0000
Subject: [issue43592] test_importlib:
 test_multiprocessing_pool_circular_import() fails with "Too many open files"
 error on os.pipe()
In-Reply-To: <1616409182.92.0.0882668450853.issue43592@roundup.psfhosted.org>
Message-ID: <1634851201.2.0.911191201474.issue43592@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

macOS often has an unreasonably low default max number of file descriptors.  This is easy to raise from user code, it's a soft limit.

https://github.com/python/cpython/pull/29127

is out to try that from regrtest itself.

----------
assignee:  -> gregory.p.smith
components: +macOS
nosy: +gregory.p.smith, ronaldoussoren
stage:  -> patch review
type:  -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43592>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:20:23 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Thu, 21 Oct 2021 21:20:23 +0000
Subject: [issue43592] test_importlib:
 test_multiprocessing_pool_circular_import() fails with "Too many open files"
 error on os.pipe()
In-Reply-To: <1616409182.92.0.0882668450853.issue43592@roundup.psfhosted.org>
Message-ID: <1634851223.04.0.541747292348.issue43592@roundup.psfhosted.org>


Change by Gregory P. Smith <greg at krypto.org>:


----------
keywords: +patch
pull_requests: +27414
pull_request: https://github.com/python/cpython/pull/29127

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43592>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:24:38 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 21:24:38 +0000
Subject: [issue19336] No API to get events from epoll without allocating a list
In-Reply-To: <1382373266.71.0.522503434319.issue19336@psf.upfronthosting.co.za>
Message-ID: <1634851478.42.0.597892810333.issue19336@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19336>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:24:44 2021
From: report at bugs.python.org (Brett Cannon)
Date: Thu, 21 Oct 2021 21:24:44 +0000
Subject: [issue45547] Modernize the importlib loaders
In-Reply-To: <1634771710.27.0.594592936094.issue45547@roundup.psfhosted.org>
Message-ID: <1634851484.37.0.842503487139.issue45547@roundup.psfhosted.org>


Brett Cannon <brett at python.org> added the comment:

It's an interesting question. Probably should add the new APIs. As for dropping the old ones, we would have to check if we have been raising deprecation warnings as appropriate or if it's just a documentation thing.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45547>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:28:37 2021
From: report at bugs.python.org (Brett Cannon)
Date: Thu, 21 Oct 2021 21:28:37 +0000
Subject: [issue45540] module.__package__ and module.__spec__.parent have
 different semantics
In-Reply-To: <1634749883.54.0.793446044283.issue45540@roundup.psfhosted.org>
Message-ID: <1634851717.98.0.265375377885.issue45540@roundup.psfhosted.org>


Brett Cannon <brett at python.org> added the comment:

Sure, if you want to go full PEP on this I'm happy to be a co-author if the end goal is to ditch the (now) extraneous attributes.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45540>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:30:41 2021
From: report at bugs.python.org (Brett Cannon)
Date: Thu, 21 Oct 2021 21:30:41 +0000
Subject: [issue18056] Document importlib._bootstrap.NamespaceLoader
In-Reply-To: <1369496751.81.0.344197180241.issue18056@psf.upfronthosting.co.za>
Message-ID: <1634851841.3.0.693207365888.issue18056@roundup.psfhosted.org>


Brett Cannon <brett at python.org> added the comment:

This was taken care of by https://github.com/python/cpython/pull/29049/.

----------
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18056>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:31:52 2021
From: report at bugs.python.org (Andre Roberge)
Date: Thu, 21 Oct 2021 21:31:52 +0000
Subject: [issue45560] sys.last_* not set for SyntaxErrors with IDLE
Message-ID: <1634851912.62.0.543698979656.issue45560@roundup.psfhosted.org>


New submission from Andre Roberge <andre.roberge at gmail.com>:

As stated in the documentation, sys.last_type, sys.last_value and sys.last_traceback ... are set when an exception is not handled and the interpreter prints an error message and a stack traceback.

This is true whether the exception is a SyntaxError or some runtime error when a standard Python interpreter is used.

However, when the IDLE shell is used and a SyntaxError occurs, these are not set.  If it is not possible to change this behaviour in IDLE, perhaps the documentation of the sys module should be amended to include this information.

----------
assignee: terry.reedy
components: IDLE
messages: 404669
nosy: aroberge, terry.reedy
priority: normal
severity: normal
status: open
title: sys.last_* not set for SyntaxErrors with IDLE
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45560>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:34:30 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 21:34:30 +0000
Subject: [issue28375] cgi.py spam in Apache server logs
In-Reply-To: <1475755223.43.0.818852294498.issue28375@psf.upfronthosting.co.za>
Message-ID: <1634852070.36.0.251682499408.issue28375@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

There's been quite a few changes in finalization (thanks to Victor) since 3.5/3.6. 

Are you seeing this problem on 3.9+? 

Can you provide instructions how to reproduce it?

----------
nosy: +iritkatriel, vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28375>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:38:00 2021
From: report at bugs.python.org (Neil Schemenauer)
Date: Thu, 21 Oct 2021 21:38:00 +0000
Subject: [issue45561] Run smelly.py and multissltests.py from $(srcdir)
Message-ID: <1634852280.03.0.00103137600776.issue45561@roundup.psfhosted.org>


New submission from Neil Schemenauer <nas-python at arctrix.com>:

Some makefile rules don't work if you build in a separate folder.

----------
messages: 404671
nosy: nascheme
priority: normal
severity: normal
stage: patch review
status: open
title: Run smelly.py and multissltests.py from $(srcdir)
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45561>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:40:54 2021
From: report at bugs.python.org (Neil Schemenauer)
Date: Thu, 21 Oct 2021 21:40:54 +0000
Subject: [issue45561] Run smelly.py and multissltests.py from $(srcdir)
In-Reply-To: <1634852280.03.0.00103137600776.issue45561@roundup.psfhosted.org>
Message-ID: <1634852454.13.0.0474498231234.issue45561@roundup.psfhosted.org>


Change by Neil Schemenauer <nas-python at arctrix.com>:


----------
keywords: +patch
pull_requests: +27415
pull_request: https://github.com/python/cpython/pull/29138

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45561>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:42:42 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 21:42:42 +0000
Subject: [issue12675] tokenize module happily tokenizes code with syntax errors
In-Reply-To: <1312203519.76.0.918580877349.issue12675@psf.upfronthosting.co.za>
Message-ID: <1634852562.95.0.372066036856.issue12675@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11.

----------
nosy: +iritkatriel
versions: +Python 3.11 -Python 2.7, Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue12675>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:54:15 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 21 Oct 2021 21:54:15 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
Message-ID: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>


New submission from Marc-Andre Lemburg <mal at egenix.com>:

python3.9 -d:

Python 3.9.7 (default, Oct 21 2021, 20:51:19)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Loaded pyinteractive.py.

>>>

python3.10 -d:

Python 3.10.0 (default, Oct 21 2021, 23:13:32) [GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
line[1] = "\"\"\" pyinteractive.py\n"  tok->done = 10
line[2] = "\n"  tok->done = 10
line[3] = "    This file is executed on interactive startup by Python\n"  tok->done = 10
...

(not that in both cases a PYTHONINTERACTIVE script is loaded)

Is that intended ?

----------
messages: 404673
nosy: lemburg
priority: normal
severity: normal
status: open
title: python -d creates lots of tokenizer messages
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:54:47 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Thu, 21 Oct 2021 21:54:47 +0000
Subject: [issue45557] pprint -> underscore_numbers argument not working
In-Reply-To: <PA4PR10MB4605A0C7BA64ECBA8555E00BCDBF9@PA4PR10MB4605.EURPRD10.PROD.OUTLOOK.COM>
Message-ID: <1634853287.47.0.622803892278.issue45557@roundup.psfhosted.org>


Change by Eric V. Smith <eric at trueblade.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45557>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:55:20 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Thu, 21 Oct 2021 21:55:20 +0000
Subject: [issue45559] pprint tests do not test pprint.pprint()
In-Reply-To: <1634847784.94.0.10912220069.issue45559@roundup.psfhosted.org>
Message-ID: <1634853320.66.0.341638089928.issue45559@roundup.psfhosted.org>


Change by Eric V. Smith <eric at trueblade.com>:


----------
title: pprint module does not test pprint.pprint() -> pprint tests do not test pprint.pprint()

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45559>
_______________________________________

From report at bugs.python.org  Thu Oct 21 17:59:38 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 21:59:38 +0000
Subject: [issue16621] sched module enhancement request
In-Reply-To: <1354736219.44.0.000463218427314.issue16621@psf.upfronthosting.co.za>
Message-ID: <1634853578.09.0.0782846437176.issue16621@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> sched.scheduler.run() blocks scheduler

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue16621>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:02:12 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 21 Oct 2021 22:02:12 +0000
Subject: [issue45563] inspect.getframeinfo() doesn't handle frames without
 lineno
Message-ID: <1634853732.41.0.89193081236.issue45563@roundup.psfhosted.org>


New submission from Marc-Andre Lemburg <mal at egenix.com>:

In Python 3.10, it seems that top-level frames generated by running exec() have their f_lineno attribute set to None.

inspect.getframeinfo() tries to build context lines and fails on this line in such a case:

        start = lineno - 1 - context//2

because lineno is None.

It's not clear whether this is a bug in inspect or the way such frames get their f_lineno attribute initialized.

The same code works just fine in Python 3.9.

----------
messages: 404674
nosy: lemburg
priority: normal
severity: normal
status: open
title: inspect.getframeinfo() doesn't handle frames without lineno
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45563>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:04:00 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 21 Oct 2021 22:04:00 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1634853840.98.0.327451230299.issue45562@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

What's even worse is that those debug lines get written to stdout, not stderr.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:04:23 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 21 Oct 2021 22:04:23 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1634853863.41.0.856794770456.issue45562@roundup.psfhosted.org>


Change by Marc-Andre Lemburg <mal at egenix.com>:


----------
components: +Parser
nosy: +lys.nikolaou, pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:05:08 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 21 Oct 2021 22:05:08 +0000
Subject: [issue45563] inspect.getframeinfo() doesn't handle frames without
 lineno
In-Reply-To: <1634853732.41.0.89193081236.issue45563@roundup.psfhosted.org>
Message-ID: <1634853908.0.0.609768607399.issue45563@roundup.psfhosted.org>


Change by Marc-Andre Lemburg <mal at egenix.com>:


----------
components: +Interpreter Core, Library (Lib), Parser
nosy: +lys.nikolaou, pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45563>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:05:30 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 22:05:30 +0000
Subject: [issue17181] SSLContext.set_servername_callback should be able to
 set	argument
In-Reply-To: <1360577259.03.0.413727229481.issue17181@psf.upfronthosting.co.za>
Message-ID: <1634853930.19.0.133355954278.issue17181@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
nosy: +christian.heimes

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17181>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:07:42 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 22:07:42 +0000
Subject: [issue41983] Missing Documentation AF_PACKET
In-Reply-To: <1602255549.69.0.358914707678.issue41983@roundup.psfhosted.org>
Message-ID: <1634854062.56.0.657176477964.issue41983@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset b26eae54e98f44eebc1599ca458228dae0568ffa by Miss Islington (bot) in branch '3.9':
bpo-41983: add availability info to socket docs (GH-27519) (GH-29137)
https://github.com/python/cpython/commit/b26eae54e98f44eebc1599ca458228dae0568ffa


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41983>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:07:15 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 22:07:15 +0000
Subject: [issue41983] Missing Documentation AF_PACKET
In-Reply-To: <1602255549.69.0.358914707678.issue41983@roundup.psfhosted.org>
Message-ID: <1634854035.79.0.507635489496.issue41983@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 8fd7e8965d0ff9f76401b86aec2166cc59a40637 by Miss Islington (bot) in branch '3.10':
bpo-41983: add availability info to socket docs (GH-27519) (GH-29136)
https://github.com/python/cpython/commit/8fd7e8965d0ff9f76401b86aec2166cc59a40637


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41983>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:08:05 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 22:08:05 +0000
Subject: [issue41983] Missing Documentation AF_PACKET
In-Reply-To: <1602255549.69.0.358914707678.issue41983@roundup.psfhosted.org>
Message-ID: <1634854085.26.0.885841334572.issue41983@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Andrei! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41983>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:08:25 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 22:08:25 +0000
Subject: [issue44344] Documentation for pow() should include the possibility
 of complex numbers as a return type
In-Reply-To: <1623125616.73.0.892905550694.issue44344@roundup.psfhosted.org>
Message-ID: <1634854105.27.0.996226118185.issue44344@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 9b3cda56870d087cf50f605e91f3d26964868640 by Miss Islington (bot) in branch '3.10':
bpo-44344: Document that pow can return a complex number for non-complex inputs. (GH-27853) (GH-29135)
https://github.com/python/cpython/commit/9b3cda56870d087cf50f605e91f3d26964868640


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44344>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:08:39 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 22:08:39 +0000
Subject: [issue44344] Documentation for pow() should include the possibility
 of complex numbers as a return type
In-Reply-To: <1623125616.73.0.892905550694.issue44344@roundup.psfhosted.org>
Message-ID: <1634854119.8.0.879382815149.issue44344@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset c53428fe8980aab6eda3e573bafed657e6798e6e by Miss Islington (bot) in branch '3.9':
bpo-44344: Document that pow can return a complex number for non-complex inputs. (GH-27853) (GH-29134)
https://github.com/python/cpython/commit/c53428fe8980aab6eda3e573bafed657e6798e6e


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44344>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:09:20 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 22:09:20 +0000
Subject: [issue44344] Documentation for pow() should include the possibility
 of complex numbers as a return type
In-Reply-To: <1623125616.73.0.892905550694.issue44344@roundup.psfhosted.org>
Message-ID: <1634854160.53.0.353184587594.issue44344@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Mark! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44344>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:09:51 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 22:09:51 +0000
Subject: [issue44547] fraction.Fraction does not implement __int__.
In-Reply-To: <1625169148.48.0.541804995208.issue44547@roundup.psfhosted.org>
Message-ID: <1634854191.38.0.220370987041.issue44547@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset d1b24775b462f4f28aa4929fd031899170793388 by Mark Dickinson in branch 'main':
bpo-44547: Make Fractions objects instances of typing.SupportsInt (GH-27851)
https://github.com/python/cpython/commit/d1b24775b462f4f28aa4929fd031899170793388


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44547>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:10:31 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 21 Oct 2021 22:10:31 +0000
Subject: [issue44547] fraction.Fraction does not implement __int__.
In-Reply-To: <1625169148.48.0.541804995208.issue44547@roundup.psfhosted.org>
Message-ID: <1634854231.69.0.807473038322.issue44547@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks for the patch, Mark! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44547>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:12:24 2021
From: report at bugs.python.org (Thomas)
Date: Thu, 21 Oct 2021 22:12:24 +0000
Subject: [issue39247] dataclass defaults and property don't work together
In-Reply-To: <1578418537.56.0.0565923550129.issue39247@roundup.psfhosted.org>
Message-ID: <1634854344.36.0.582975596464.issue39247@roundup.psfhosted.org>


Thomas <thomas.d.mckay at gmail.com> added the comment:

Agreed on everything but that last part, which I'm not sure I understand:
> If we allow descriptor to accept an iterable as well you could have multiple descriptors just like normal.
Could you give an example of what you mean with a regular class?

I've had a bit more time to think about this and I think one possible solution would be to mix the idea of a "descriptor" argument to the field constructor and the idea of not applying regular defaults at __init__ time.


Basically, at dataclass construction time (when the @dataclass decorator inspects and enhances the class), apply regular defaults at the class level unless the field has a descriptor argument, then apply that instead at the class level. At __init__ time, apply default_factories only unless the field has a descriptor argument, then do apply the regular default value.

If the implementation changed in these two ways, we'd have code like this work exactly as expected:

from dataclasses import dataclass, field


@dataclass
class Foo:
    _bar: int = field(init=False)
    
    @property
    def bar(self):
        return self._bar

    @bar.setter
    def bar(self, value):
        self._bar = value
    
    # field is required,
    # uses descriptor bar for get/set
    bar: int = field(descriptor=bar)

    # field is optional,
    # default of 5 is set at __init__ time
    # using the descriptor bar for get/set,
    bar: int = field(descriptor=bar, default=5)

    # field is optional,
    # default value is the descriptor instance,
    # it is set using regular attribute setter
    bar: int = field(default=bar)

Not only does this allow for descriptor to be used with dataclasses, it also fixes the use case of trying to have a descriptor instance as a default value because the descriptor wouldn't be used to get/set itself.

Although I should say, at this point, I'm clearly seeing this with blinders on to solve this particular problem... It's probable this solution breaks something somewhere that I'm not seeing. Fresh eyes appreciated :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39247>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:18:26 2021
From: report at bugs.python.org (Michael Robellard)
Date: Thu, 21 Oct 2021 22:18:26 +0000
Subject: [issue39247] dataclass defaults and property don't work together
In-Reply-To: <1578418537.56.0.0565923550129.issue39247@roundup.psfhosted.org>
Message-ID: <1634854706.89.0.600558457651.issue39247@roundup.psfhosted.org>


Michael Robellard <mike at robellard.com> added the comment:

An example of multiple descriptors would be to have:

@cached_property
@property
def expensive_calc(self):
    #Do something expensive

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39247>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:19:30 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Thu, 21 Oct 2021 22:19:30 +0000
Subject: [issue45563] inspect.getframeinfo() doesn't handle frames without
 lineno
In-Reply-To: <1634853732.41.0.89193081236.issue45563@roundup.psfhosted.org>
Message-ID: <1634854770.03.0.82215505537.issue45563@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
nosy: +Mark.Shannon

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45563>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:19:43 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Thu, 21 Oct 2021 22:19:43 +0000
Subject: [issue45563] inspect.getframeinfo() doesn't handle frames without
 lineno
In-Reply-To: <1634853732.41.0.89193081236.issue45563@roundup.psfhosted.org>
Message-ID: <1634854783.69.0.381094375106.issue45563@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
components:  -Parser

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45563>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:19:52 2021
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 21 Oct 2021 22:19:52 +0000
Subject: [issue29370] "./configure --enable-optimizations && make install"
 does not install files in ${BINDIR} and ${LIBDIR}
In-Reply-To: <1485349281.44.0.908942370293.issue29370@psf.upfronthosting.co.za>
Message-ID: <1634854792.04.0.386430688634.issue29370@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:

I can't reproduce this one with current main, so I'm closing as out of date.  If someone can still reproduce with a current version, please reopen or leave a message with details.

----------
nosy: +zach.ware
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29370>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:21:02 2021
From: report at bugs.python.org (Alexander Patrakov)
Date: Thu, 21 Oct 2021 22:21:02 +0000
Subject: [issue45564] shutil.rmtree and os.walk are implemented using
 recursion, fail on deep hierarchies
Message-ID: <1634854862.16.0.108410950384.issue45564@roundup.psfhosted.org>


New submission from Alexander Patrakov <patrakov at gmail.com>:

It is possible to create deep directory hierarchies that cannot be removed via shutil.rmtree or walked via os.walk, because these functions exceed the interpreter recursion limit. This may have security implications for web services (e.g. various webdisks) that have to clean up user-created mess or walk through it.

[aep at aep-haswell ~]$ mkdir /tmp/badstuff
[aep at aep-haswell ~]$ cd /tmp/badstuff
[aep at aep-haswell badstuff]$ for x in `seq 2048` ; do mkdir $x ; cd $x ; done
[aep at aep-haswell 103]$ cd
[aep at aep-haswell ~]$ python
Python 3.9.7 (default, Oct 10 2021, 15:13:22) 
[GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import shutil
>>> shutil.rmtree('/tmp/badstuff')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.9/shutil.py", line 726, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/lib/python3.9/shutil.py", line 663, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/usr/lib/python3.9/shutil.py", line 663, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/usr/lib/python3.9/shutil.py", line 663, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  [Previous line repeated 992 more times]
  File "/usr/lib/python3.9/shutil.py", line 642, in _rmtree_safe_fd
    fullname = os.path.join(path, entry.name)
  File "/usr/lib/python3.9/posixpath.py", line 77, in join
    sep = _get_sep(a)
  File "/usr/lib/python3.9/posixpath.py", line 42, in _get_sep
    if isinstance(path, bytes):
RecursionError: maximum recursion depth exceeded while calling a Python object
>>> import os
>>> list(os.walk('/tmp/badstuff'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.9/os.py", line 418, in _walk
    yield from _walk(new_path, topdown, onerror, followlinks)
  File "/usr/lib/python3.9/os.py", line 418, in _walk
    yield from _walk(new_path, topdown, onerror, followlinks)
  File "/usr/lib/python3.9/os.py", line 418, in _walk
    yield from _walk(new_path, topdown, onerror, followlinks)
  [Previous line repeated 993 more times]
  File "/usr/lib/python3.9/os.py", line 412, in _walk
    new_path = join(top, dirname)
  File "/usr/lib/python3.9/posixpath.py", line 77, in join
    sep = _get_sep(a)
  File "/usr/lib/python3.9/posixpath.py", line 42, in _get_sep
    if isinstance(path, bytes):
RecursionError: maximum recursion depth exceeded while calling a Python object
>>>

----------
components: Library (Lib)
messages: 404687
nosy: Alexander.Patrakov
priority: normal
severity: normal
status: open
title: shutil.rmtree and os.walk are implemented using recursion, fail on deep hierarchies
type: crash
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45564>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:22:29 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 21 Oct 2021 22:22:29 +0000
Subject: [issue17181] SSLContext.set_servername_callback should be able to
 set	argument
In-Reply-To: <1360577259.03.0.413727229481.issue17181@psf.upfronthosting.co.za>
Message-ID: <1634854949.57.0.817589606815.issue17181@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

As Antoine said, you can use a partial function, closure, or an instance method as a callable.

Besides nobody else has requested an additional argument in the past eight years. I see this as a strong indication that an argument is not required.

----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17181>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:23:30 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Thu, 21 Oct 2021 22:23:30 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1634855010.32.0.015982645394.issue45562@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Yeah, those are expected in 3.10, but this should not appear in release versions (only on debug ones).

Python -d is normally used to debug the parser:

-d     : turn on parser debugging output (for experts only, only works on
         debug builds); also PYTHONDEBUG=x

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:24:55 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 21 Oct 2021 22:24:55 +0000
Subject: [issue20952] OpenSSL and RDRAND
In-Reply-To: <1395009823.06.0.12513934029.issue20952@psf.upfronthosting.co.za>
Message-ID: <1634855095.18.0.762820233806.issue20952@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Thankfully RDRAND is no longer a concern for us. All OpenSSL versions in official Python.org installers and supported by recent Python versions have a strong and fork-safe RNG.

----------
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20952>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:26:23 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Thu, 21 Oct 2021 22:26:23 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1634855183.06.0.216776990684.issue45562@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
keywords: +patch
pull_requests: +27416
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29140

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:26:59 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 21 Oct 2021 22:26:59 +0000
Subject: [issue18276] posixpath.c:_fd_converter() should use
 PyObject_AsFileDescriptor()
In-Reply-To: <1371813162.19.0.902104537883.issue18276@psf.upfronthosting.co.za>
Message-ID: <1634855219.43.0.249936644943.issue18276@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

I like calling .fileno() explicitly. It seems like it's not really needed to call it implicitly, since this issue doesn't get much activity. I suggest to reject it.

----------
status: pending -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18276>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:27:49 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 21 Oct 2021 22:27:49 +0000
Subject: [issue18276] posixpath.c:_fd_converter() should use
 PyObject_AsFileDescriptor()
In-Reply-To: <1371813162.19.0.902104537883.issue18276@psf.upfronthosting.co.za>
Message-ID: <1634855269.85.0.995860100948.issue18276@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Fine with me! Thanks for your feedback.

----------
resolution:  -> rejected
stage: needs patch -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18276>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:28:14 2021
From: report at bugs.python.org (STINNER Victor)
Date: Thu, 21 Oct 2021 22:28:14 +0000
Subject: [issue5120] Change _tkinter initialization for new versions of Aqua
 Tk on OS X
In-Reply-To: <1233437150.39.0.445953575427.issue5120@psf.upfronthosting.co.za>
Message-ID: <1634855294.81.0.969170002757.issue5120@roundup.psfhosted.org>


Change by STINNER Victor <vstinner at python.org>:


----------
nosy:  -vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue5120>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:30:10 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 21 Oct 2021 22:30:10 +0000
Subject: [issue42413] Replace custom exceptions for timeouts with TimeoutError
In-Reply-To: <1605813042.63.0.217434537297.issue42413@roundup.psfhosted.org>
Message-ID: <1634855410.05.0.238593634207.issue42413@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Andrew, could you please rebase your PR and get it submitted?

----------
assignee: christian.heimes -> asvetlov
versions: +Python 3.11 -Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42413>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:31:27 2021
From: report at bugs.python.org (Thomas)
Date: Thu, 21 Oct 2021 22:31:27 +0000
Subject: [issue39247] dataclass defaults and property don't work together
In-Reply-To: <1578418537.56.0.0565923550129.issue39247@roundup.psfhosted.org>
Message-ID: <1634855487.09.0.955655015098.issue39247@roundup.psfhosted.org>


Thomas <thomas.d.mckay at gmail.com> added the comment:

Just to rephrase, because the explanation in my last message can be ambiguous:

At dataclass construction time (when the @dataclass decorator inspects and enhances the class):

for field in fields:
    if descriptor := getattr(field, 'descriptor'):
        setattr(cls, field.name, descriptor)
    elif default := getattr(field, 'default'):
        setattr(cls, field.name, default)


Then at __init__ time:

for field in fields:
    if (
        (descriptor := getattr(field, 'descriptor'))
        and (default := getattr(field, 'default'))
    ):
        setattr(self, field.name, default)
    elif default_factory := getattr(field, 'default_factory'):
        setattr(self, field.name, default_factory())

Now, this is just pseudo-code to illustrate the point, I know the dataclass implementation generates the __init__ on the fly by building its code as a string then exec'ing it. This logic would have to be applied to that generative code.

I keep thinking I'm not seeing some obvious problem here, so if something jumps out let me know.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39247>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:31:56 2021
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 21 Oct 2021 22:31:56 +0000
Subject: [issue42358] Python 3.9.0 unable to detect
 ax_cv_c_float_words_bigendian value on bigendian system
In-Reply-To: <1605384101.77.0.568061256015.issue42358@roundup.psfhosted.org>
Message-ID: <1634855516.22.0.525992340698.issue42358@roundup.psfhosted.org>


Change by Zachary Ware <zachary.ware at gmail.com>:


----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed
title: Python 3.9.0 unable to detect ax_cv_c_float_words_bigendian value on nigendan system -> Python 3.9.0 unable to detect ax_cv_c_float_words_bigendian value on bigendian system

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42358>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:34:50 2021
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 21 Oct 2021 22:34:50 +0000
Subject: [issue42074] setup error on windows
In-Reply-To: <1603057749.44.0.277772505127.issue42074@roundup.psfhosted.org>
Message-ID: <1634855690.52.0.312645479372.issue42074@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:

Closing due to lack of response.

----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42074>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:37:21 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Thu, 21 Oct 2021 22:37:21 +0000
Subject: [issue31000] Test failure in resource module on some ZFS systems
In-Reply-To: <1500851878.05.0.462798019219.issue31000@psf.upfronthosting.co.za>
Message-ID: <1634855841.44.0.829035678007.issue31000@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

It doesn't happen on the zfs ubuntu 20.04 machine i've got.  Figuring out an appropriate workaround when refactoring the test for this is best done by someone with a system it fails on.  It'd be guesswork otherwise.

----------
title: Test failure in resource module on ZFS -> Test failure in resource module on some ZFS systems
versions: +Python 3.11 -Python 3.4, Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31000>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:41:55 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 21 Oct 2021 22:41:55 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <1b8c02e2-987c-66e1-9bce-a637a557b8b3@egenix.com>
Message-ID: <8a1961dd-d6e3-d871-6e48-3f925d524653@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

I have an initial version of PyRun for Python 3.10 running as well.
This created a few more headaches in order to make it work with
setuptools and some glitches which appear to be bugs in 3.10
(https://bugs.python.org/issue45563 and https://bugs.python.org/issue45562).
Nothing major, though.

I'll have to check my version of the freeze tool against the one
in Python 3.9 and 3.10 to see whether there's anything in the
core versions which could cause the tool not to work.

BTW: (My) freeze.py uses this startup code as main():

int
main(int argc, char **argv)
{
        extern int Py_FrozenMain(int, char **);

        /* Disabled, since we want to default to non-optimized mode: */
        /* Py_OptimizeFlag++; */
        Py_NoSiteFlag++;        /* Don't import site.py */

        PyImport_FrozenModules = _PyImport_FrozenModules;
        return Py_FrozenMain(argc, argv);
}

I still have to dig through the changes you have made, but this
suggests that it replaces PyImport_FrozenModules completely
with its own version, so the default freeze that you are
implementing gets overridden.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:41:34 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 22:41:34 +0000
Subject: [issue31382] CGI upload error when file ~< 10kb
In-Reply-To: <1504787509.49.0.0241547941572.issue31382@psf.upfronthosting.co.za>
Message-ID: <1634856094.13.0.220748640773.issue31382@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

There isn't enough information here to understand what your issue is. If you are still having this problem on a current python version (3.9+), please create a new issue and provide instructions how to reproduce it and information about the environment in which you are seeing it.

----------
nosy: +iritkatriel
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31382>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:48:37 2021
From: report at bugs.python.org (Zachary Ware)
Date: Thu, 21 Oct 2021 22:48:37 +0000
Subject: [issue29844] Windows Python installers not installing DLL to
 System32/SysWOW64
In-Reply-To: <1489831433.22.0.028475249754.issue29844@psf.upfronthosting.co.za>
Message-ID: <1634856517.61.0.486604564519.issue29844@roundup.psfhosted.org>


Change by Zachary Ware <zachary.ware at gmail.com>:


----------
keywords: +patch
pull_requests: +27417
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29141

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29844>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:48:32 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 21 Oct 2021 22:48:32 +0000
Subject: [issue1353344] python.desktop
Message-ID: <1634856512.24.0.386658504784.issue1353344@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
stage: patch review -> needs patch
versions: +Python 3.11 -Python 2.7, Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue1353344>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:50:26 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 22:50:26 +0000
Subject: [issue41104] IMAPlib debug errors
In-Reply-To: <1593006264.44.0.612791321942.issue41104@roundup.psfhosted.org>
Message-ID: <1634856626.72.0.103349743881.issue41104@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

This function was rewritten in PR15206 and this line is no longer there.

----------
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41104>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:51:04 2021
From: report at bugs.python.org (Thomas)
Date: Thu, 21 Oct 2021 22:51:04 +0000
Subject: [issue39247] dataclass defaults and property don't work together
In-Reply-To: <1578418537.56.0.0565923550129.issue39247@roundup.psfhosted.org>
Message-ID: <1634856664.31.0.473706299735.issue39247@roundup.psfhosted.org>


Thomas <thomas.d.mckay at gmail.com> added the comment:

> An example of multiple descriptors would be to have:
> @cached_property
> @property
> def expensive_calc(self):
>     #Do something expensive

That's decorator chaining. The example you gave is not working code (try to return something from expensive_calc and print(obj.expensive_calc()), you'll get a TypeError). Correct me if I'm wrong, but I don't think you can chain descriptors the way you want unless the descriptors themselves have knowledge that they're acting on descriptors. E.g., given:

class Foo:
    @descriptorA
    @descriptorB
    def bar(self):
        return 5

You would need descriptorA to be implemented such that its __get__ method return .__get__() of whatever it was wrapping (in this case descriptorB).

Either way, at the class level (I mean the Foo class, the one we'd like to make a dataclass), all of this doesn't matter because it only sees the outer descriptor (descriptorA). Assuming the proposed solution is accepted, you would be able to do this:

@dataclass
class Foo:
    @descriptorA
    @descriptorB
    def bar(self):
        return some_value
    
    @bar.setter
    def bar(self, value):
        ...  # store value
    
    bar: int = field(descriptor=bar)

and, assuming descriptorA is compatible with descriptorB on both .__get__ and .__set__, as stated above, it would work the way you intend it to.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39247>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:52:05 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 22:52:05 +0000
Subject: [issue41592] Make _SubParsersAction public
In-Reply-To: <1597864894.48.0.159581898725.issue41592@roundup.psfhosted.org>
Message-ID: <1634856725.51.0.929463235866.issue41592@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
nosy: +kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41592>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:53:54 2021
From: report at bugs.python.org (Michael Wayne Goodman)
Date: Thu, 21 Oct 2021 22:53:54 +0000
Subject: [issue45528] mmap: constants not listed in the documentation
In-Reply-To: <1634671970.69.0.866952550683.issue45528@roundup.psfhosted.org>
Message-ID: <1634856834.17.0.487129969562.issue45528@roundup.psfhosted.org>


Michael Wayne Goodman <goodman.m.w at gmail.com> added the comment:

Also, the first sentences of third paragraph have some problems:

> For both the Unix and Windows versions of the constructor,
> access may be specified as an optional keyword
> parameter. access accepts one of four values: ACCESS_READ,
> ACCESS_WRITE, or ACCESS_COPY to specify read-only,
> write-through or copy-on-write memory respectively, or
> ACCESS_DEFAULT to defer to prot. access can be used on both
> Unix and Windows. If access is not specified, Windows mmap
> returns a write-through mapping.

1. It redundantly says that *access* may be used for Unix and Windows.
2. It says ACCESS_DEFAULT defers to *prot* but doesn't say this is only for Unix nor that *prot* is a parameter.
3. It doesn't say what happens on Unix if *access* is not specified except implicitly by the earlier statement about ACCESS_DEFAULT.

Proposed change:

    For both the Unix and Windows versions of the constructor,
    *access* may be specified as an optional keyword parameter.
    *access* accepts one of the four :ref:`ACCESS_* constants
    <access-constants>`: :const:`ACCESS_READ`,
    :const:`ACCESS_WRITE`, or :const:`ACCESS_COPY` to specify
    read-only, write-through or copy-on-write memory
    respectively, or :const:`ACCESS_DEFAULT` (the default value
    if *access* is not specified) to return a write-through
    mapping on Windows or defer to the value of the *prot*
    parameter on Unix.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45528>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:58:08 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 21 Oct 2021 22:58:08 +0000
Subject: [issue44019] operator.call/operator.__call__
In-Reply-To: <1620051840.28.0.198895693226.issue44019@roundup.psfhosted.org>
Message-ID: <1634857088.09.0.0930613686444.issue44019@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset 37fad7d3b7154c44b9902a2ab0db8641f1a0284b by Dong-hee Na in branch 'main':
bpo-44019: Add test_all_exported_names for operator module (GH-29124)
https://github.com/python/cpython/commit/37fad7d3b7154c44b9902a2ab0db8641f1a0284b


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44019>
_______________________________________

From report at bugs.python.org  Thu Oct 21 18:58:23 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 21 Oct 2021 22:58:23 +0000
Subject: [issue44019] operator.call/operator.__call__
In-Reply-To: <1620051840.28.0.198895693226.issue44019@roundup.psfhosted.org>
Message-ID: <1634857103.49.0.475420269022.issue44019@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
pull_requests: +27418
pull_request: https://github.com/python/cpython/pull/29142

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44019>
_______________________________________

From report at bugs.python.org  Thu Oct 21 19:01:34 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 23:01:34 +0000
Subject: [issue28375] cgi.py spam in Apache server logs
In-Reply-To: <1475755223.43.0.818852294498.issue28375@psf.upfronthosting.co.za>
Message-ID: <1634857294.31.0.220413886732.issue28375@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28375>
_______________________________________

From report at bugs.python.org  Thu Oct 21 19:11:14 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 23:11:14 +0000
Subject: [issue41050] class multiprocessing.Value calls set_start_method
In-Reply-To: <1592654455.47.0.317268475244.issue41050@roundup.psfhosted.org>
Message-ID: <1634857874.36.0.757645852384.issue41050@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11.

----------
nosy: +iritkatriel
versions: +Python 3.11 -Python 3.5, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41050>
_______________________________________

From report at bugs.python.org  Thu Oct 21 19:15:09 2021
From: report at bugs.python.org (Brett Cannon)
Date: Thu, 21 Oct 2021 23:15:09 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1634858109.97.0.105126433129.issue45548@roundup.psfhosted.org>


Change by Brett Cannon <brett at python.org>:


----------
pull_requests: +27419
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29143

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Thu Oct 21 19:19:13 2021
From: report at bugs.python.org (Stefan Pochmann)
Date: Thu, 21 Oct 2021 23:19:13 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634858353.34.0.906310344241.issue45530@roundup.psfhosted.org>


Stefan Pochmann <stefan.pochmann at gmail.com> added the comment:

I see you mentioned that PyObject_RichCompareBool(..., Py_EQ) might be faster for example because it checks identity. Why not do an identity check before the ms->tuple_elem_compare calls? Too expensive and rarely successful?
 
> Extending the idea to positions beyond the first is dubious on those grounds: if the first tuple positions in fact often match, then the optimization has already backfired. Time to admit defeat then, not double down on failed arrogance ;-)
 
I don't see that. First and second positions are quite different.

For example I sorted a million tuples where both first and second element are randomly chosen from a population of 10,000. So their amounts of duplication were the same. But these are the statistics from sorting:
- First position:   18,603,981 equality comparisons, 29.87% equal
- Second position:   5,556,203 equality comparisons,  0.09% equal
Many first positions matched, almost no second positions matched.

One more idea: What do you think of sorting lists of tuples (or tuple keys) in two stages?
1) Sort the list only by first position (comparing with only one tuple_elem_compare).
2) Identify equal-first-position-runs (with tuple_elem_compare) and sort each run independently (comparing only positions 1+).
Some experiments I did with this looked good, not sure if too off-topic to post here...

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Thu Oct 21 19:19:38 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 21 Oct 2021 23:19:38 +0000
Subject: [issue43706] enumerate() instantiation time reducing by using PEP 590
 vectorcall
In-Reply-To: <1617384973.81.0.220949587115.issue43706@roundup.psfhosted.org>
Message-ID: <1634858378.64.0.255678782996.issue43706@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

See my last benchmark

https://github.com/python/cpython/pull/25154#issuecomment-949061515

Same result in both Linux VM and Macbook pro.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43706>
_______________________________________

From report at bugs.python.org  Thu Oct 21 19:19:55 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 21 Oct 2021 23:19:55 +0000
Subject: [issue43706] enumerate() instantiation time reducing by using PEP 590
 vectorcall
In-Reply-To: <1617384973.81.0.220949587115.issue43706@roundup.psfhosted.org>
Message-ID: <1634858395.58.0.0351636361893.issue43706@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
nosy: +kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43706>
_______________________________________

From report at bugs.python.org  Thu Oct 21 19:20:51 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 21 Oct 2021 23:20:51 +0000
Subject: [issue43706] enumerate() instantiation time reducing by using PEP 590
 vectorcall
In-Reply-To: <1617384973.81.0.220949587115.issue43706@roundup.psfhosted.org>
Message-ID: <1634858451.2.0.811951485106.issue43706@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset 83f202a802b0810e2f0900c6d298fd104390f2ba by Dong-hee Na in branch 'main':
bpo-43706: Use PEP 590 vectorcall to speed up enumerate() (GH-25154)
https://github.com/python/cpython/commit/83f202a802b0810e2f0900c6d298fd104390f2ba


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43706>
_______________________________________

From report at bugs.python.org  Thu Oct 21 19:23:14 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 21 Oct 2021 23:23:14 +0000
Subject: [issue43706] enumerate() instantiation time reducing by using PEP 590
 vectorcall
In-Reply-To: <1617384973.81.0.220949587115.issue43706@roundup.psfhosted.org>
Message-ID: <1634858594.28.0.868426553834.issue43706@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

Thanks Victor!

----------
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43706>
_______________________________________

From report at bugs.python.org  Thu Oct 21 19:26:19 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 23:26:19 +0000
Subject: [issue21358] Augmented assignment doc: clarify 'only evaluated once'
In-Reply-To: <1398544739.49.0.840910165962.issue21358@psf.upfronthosting.co.za>
Message-ID: <1634858779.15.0.625675162265.issue21358@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21358>
_______________________________________

From report at bugs.python.org  Thu Oct 21 19:28:29 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 23:28:29 +0000
Subject: [issue26597] Document how to cite Python
In-Reply-To: <1458521072.31.0.998709728719.issue26597@psf.upfronthosting.co.za>
Message-ID: <1634858909.74.0.715704879248.issue26597@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
versions: +Python 3.11 -Python 2.7, Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26597>
_______________________________________

From report at bugs.python.org  Thu Oct 21 19:29:20 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Thu, 21 Oct 2021 23:29:20 +0000
Subject: [issue43706] enumerate() instantiation time reducing by using PEP 590
 vectorcall
In-Reply-To: <1617384973.81.0.220949587115.issue43706@roundup.psfhosted.org>
Message-ID: <1634858960.16.0.486566865206.issue43706@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
versions: +Python 3.11 -Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43706>
_______________________________________

From report at bugs.python.org  Thu Oct 21 19:38:06 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 23:38:06 +0000
Subject: [issue21249] removing pythonXY.zip from sys.path results in
 additional test failures
In-Reply-To: <1397600181.83.0.758754205227.issue21249@psf.upfronthosting.co.za>
Message-ID: <1634859486.29.0.48986066341.issue21249@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

This seems abandoned. Shall we close?

----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21249>
_______________________________________

From report at bugs.python.org  Thu Oct 21 19:51:52 2021
From: report at bugs.python.org (Irit Katriel)
Date: Thu, 21 Oct 2021 23:51:52 +0000
Subject: [issue27544] Document the ABCs for instance/subclass checks of dict
 view types
In-Reply-To: <1468805116.02.0.14575319212.issue27544@psf.upfronthosting.co.za>
Message-ID: <1634860312.8.0.287856674505.issue27544@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
versions: +Python 3.11 -Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27544>
_______________________________________

From report at bugs.python.org  Thu Oct 21 20:02:19 2021
From: report at bugs.python.org (Zachary Ware)
Date: Fri, 22 Oct 2021 00:02:19 +0000
Subject: [issue29844] Windows Python installers not installing DLL to
 System32/SysWOW64
In-Reply-To: <1489831433.22.0.028475249754.issue29844@psf.upfronthosting.co.za>
Message-ID: <1634860939.49.0.347567975278.issue29844@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:


New changeset 098a33f6a60ca2df88e03024ac9d8da507cfa5c8 by Zachary Ware in branch 'main':
bpo-29844: Remove obsolete paragraph from Tools/msi/README.txt (GH-29141)
https://github.com/python/cpython/commit/098a33f6a60ca2df88e03024ac9d8da507cfa5c8


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29844>
_______________________________________

From report at bugs.python.org  Thu Oct 21 20:07:33 2021
From: report at bugs.python.org (Brett Cannon)
Date: Fri, 22 Oct 2021 00:07:33 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1634861253.8.0.912171087975.issue45548@roundup.psfhosted.org>


Brett Cannon <brett at python.org> added the comment:


New changeset 01cf4fb9c1aa567484c2ffb1b11f9b3fe9949b05 by Brett Cannon in branch 'main':
bpo-45548: Make `Modules/Setup` easier to read (GH-29143)
https://github.com/python/cpython/commit/01cf4fb9c1aa567484c2ffb1b11f9b3fe9949b05


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Thu Oct 21 20:17:38 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 22 Oct 2021 00:17:38 +0000
Subject: [issue45560] sys.last_* not set for SyntaxErrors with IDLE
In-Reply-To: <1634851912.62.0.543698979656.issue45560@roundup.psfhosted.org>
Message-ID: <1634861858.48.0.276172895498.issue45560@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

This is most likely an oversight.  It affects both normal and -n mode.  The three sys attributes can be written.  Given the error instance e caught in the IDLE process, we need to execute, *in the user namespace*,
  sys.last_type, sys.last_value, sys.traceback = type(e), e, None

The syntax error handle should call run_source (or maybe run_code).  I will make a PR if it seem to work.

----------
stage:  -> test needed
type:  -> behavior
versions:  -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45560>
_______________________________________

From report at bugs.python.org  Thu Oct 21 20:40:58 2021
From: report at bugs.python.org (Andre Roberge)
Date: Fri, 22 Oct 2021 00:40:58 +0000
Subject: [issue45560] sys.last_* not set for SyntaxErrors with IDLE
In-Reply-To: <1634851912.62.0.543698979656.issue45560@roundup.psfhosted.org>
Message-ID: <1634863258.46.0.302987827275.issue45560@roundup.psfhosted.org>


Andre Roberge <andre.roberge at gmail.com> added the comment:

If this can be implemented, then I believe that https://bugs.python.org/issue43476 could be closed as well.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45560>
_______________________________________

From report at bugs.python.org  Thu Oct 21 21:16:03 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 22 Oct 2021 01:16:03 +0000
Subject: [issue45560] sys.last_* not set for SyntaxErrors with IDLE
In-Reply-To: <1634851912.62.0.543698979656.issue45560@roundup.psfhosted.org>
Message-ID: <1634865363.71.0.773902608657.issue45560@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

The method to run just code in userspace, without involving the debugger or history list, is runcommand.  It needs a code string.  The hard part is the code needed to recreate the exception instance in the user space.  It will be different for SyntaxError versus the other error possible when compiling.  The SE details tuple has a mix of strs and ints.  I believe I know in principle how to do it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45560>
_______________________________________

From report at bugs.python.org  Thu Oct 21 21:22:34 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Fri, 22 Oct 2021 01:22:34 +0000
Subject: [issue43592] test_importlib:
 test_multiprocessing_pool_circular_import() fails with "Too many open files"
 error on os.pipe()
In-Reply-To: <1616409182.92.0.0882668450853.issue43592@roundup.psfhosted.org>
Message-ID: <1634865754.57.0.140527768686.issue43592@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:


New changeset 843b890334ca30cf6af27dffe29cecd06b49f7d9 by Gregory P. Smith in branch 'main':
bpo-43592: Raise RLIMIT_NOFILE in test.libregrtest (GH-29127)
https://github.com/python/cpython/commit/843b890334ca30cf6af27dffe29cecd06b49f7d9


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43592>
_______________________________________

From report at bugs.python.org  Thu Oct 21 21:22:38 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 01:22:38 +0000
Subject: [issue43592] test_importlib:
 test_multiprocessing_pool_circular_import() fails with "Too many open files"
 error on os.pipe()
In-Reply-To: <1616409182.92.0.0882668450853.issue43592@roundup.psfhosted.org>
Message-ID: <1634865758.89.0.811330444684.issue43592@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27421
pull_request: https://github.com/python/cpython/pull/29145

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43592>
_______________________________________

From report at bugs.python.org  Thu Oct 21 21:22:34 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 01:22:34 +0000
Subject: [issue43592] test_importlib:
 test_multiprocessing_pool_circular_import() fails with "Too many open files"
 error on os.pipe()
In-Reply-To: <1616409182.92.0.0882668450853.issue43592@roundup.psfhosted.org>
Message-ID: <1634865754.72.0.477586733209.issue43592@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
message_count: 10.0 -> 11.0
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +27420
pull_request: https://github.com/python/cpython/pull/29144

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43592>
_______________________________________

From report at bugs.python.org  Thu Oct 21 21:24:11 2021
From: report at bugs.python.org (Tim Peters)
Date: Fri, 22 Oct 2021 01:24:11 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634865851.58.0.742587001536.issue45530@roundup.psfhosted.org>


Tim Peters <tim at python.org> added the comment:

> I see you mentioned that PyObject_RichCompareBool(..., Py_EQ) might be
> faster for example because it checks identity.

For example, in tupsort.py replace

    xs = [random() for _ in range(length)]

with

    xs = ['z' * 100 for _ in range(length)]

Then sorting that directly is _slower_ than wrapping each string in a 1-tuple first. That's so today, and also so in the latest version of the PR (but not in the original PR code).

> Why not do an identity check before the ms->tuple_elem_compare calls? Too
> expensive and rarely successful?

It's a cheap test, but, ya, "rarely successful" outside of special cases. PyObject_RichCompareBool() already does that special-casing now, and the PR now adjusts to use PyObject_RichCompareBool(Py_EQ) instead when the pair of ms->tuple_elem_compare calls isn't paying off. It's enough that one part of the chain rarely pays off, but gets nearly all the potential benefit when it does pay off. Duplicating the special-casing would double the overhead with scant additional payoff when it pays.

> I sorted a million tuples where both first and second element
> are randomly chosen from a population of 10,000.

So you expect about 100 repetitions of each value in each tuple position.

> So their amounts of duplication were the same. But these are the
> statistics from sorting:
> - First position:   18,603,981 equality comparisons, 29.87% equal
> - Second position:   5,556,203 equality comparisons,  0.09% equal

Well, for any given fixed value in the first tuple position, you expect about 100 tuples total to have that value in the first position, and the second position in those contains a random sample (with repetition) of 100 elements out of 10,000. It's not surprising the 2nd positions are rarely equal _given_ that the universe has been reduced to the 100 tuples with the same first element.

In any case, I don't see the point to this exercise ;-)

BTW, don't overlook that tuple_elem_compare can _only_ be used on the very first elements of the tuples. The pre-scan developed no idea whatsoever of the types of tuple elements other than the first.


> One more idea: What do you think of sorting lists of tuples
> (or tuple keys) in two stages?

Primarily that I'm not looking for a term project here - I'm looking to get an easy win from simple changes to one function.

What's there in the PR now is designed to play well with how sorting works. When there are many duplicates, a merge will find about 7 comparison attempts in a row where the first elements are equal, and the code adjusts to use PyObject_RichCompareBool(Py_EQ) for at least all but the first compare. Galloping mode will continue with that for a brief time at the start, but probably soon hit a chain of cases all of which can be resolved solely with tuple_elem_compare calls, and the code adjusts to that too, never using PyObject_RichCompareBool(Py_EQ) again after the first time it sees that return "no, not equal".

OTOH, when there are no duplicates, PyObject_RichCompareBool(Py_EQ) isn't helpful, and in fact will never be called.

> 1) Sort the list only by first position (comparing with only one
>    tuple_elem_compare).

Not sure what that means, exactly. (the "with only one tuple_elem_compare" part; I know what it means to sort by the first position)

> 2) Identify equal-first-position-runs (with tuple_elem_compare) and
> sort each run independently (comparing only positions 1+).

What are you aiming at? There was no motivation given here.

> Some experiments I did with this looked good, not sure if too
> off-topic to post here...

Will, this issue report is about unsafe_tuple_compare(), so, ya, if the changes you envision aren't limited to that, I'd say you want to open a different issue report and a different PR :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Thu Oct 21 21:32:00 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 22 Oct 2021 01:32:00 +0000
Subject: [issue45560] sys.last_* not set for SyntaxErrors with IDLE
In-Reply-To: <1634851912.62.0.543698979656.issue45560@roundup.psfhosted.org>
Message-ID: <1634866320.22.0.83060997529.issue45560@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

#43476 is clearly an enhancement request.  It proposes to stash info in the GUI process in a way that lets it be into from the other process by non-standard means.

This is closer to a bugfix request in that successive lines have a different response in REPL and Shell.  Having sys attributes different in the two environments is not a bug in itself: for instance, sys.stdxxx *must* be different in the two environments because the standard streams *are* different.  Having sys.last_type, for instance, being either None or wrong (the last non-syntax error) instead of SyntaxError is something different.  I fix here will be harder, but I like it better.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45560>
_______________________________________

From report at bugs.python.org  Thu Oct 21 21:59:19 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Fri, 22 Oct 2021 01:59:19 +0000
Subject: [issue43706] enumerate() instantiation time reducing by using PEP 590
 vectorcall
In-Reply-To: <1617384973.81.0.220949587115.issue43706@roundup.psfhosted.org>
Message-ID: <1634867959.69.0.279650419258.issue43706@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

@vstinner

I noticed that the msg390083 was based on a non-optimized build.
https://github.com/python/cpython/pull/25154#issuecomment-949061515 ran with the same build option condition.

Here is the PGO + LTO based benchmark.
Still fast.

+-----------------+----------+----------------------+
| Benchmark       | base_opt | vectorcall_opt       |
+=================+==========+======================+
| bench enumerate | 384 ns   | 277 ns: 1.39x faster |
+-----------------+----------+----------------------+

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43706>
_______________________________________

From report at bugs.python.org  Thu Oct 21 22:35:17 2021
From: report at bugs.python.org (Eryk Sun)
Date: Fri, 22 Oct 2021 02:35:17 +0000
Subject: [issue45545] chdir __exit__ is not safe
In-Reply-To: <1634770485.18.0.358610816486.issue45545@roundup.psfhosted.org>
Message-ID: <1634870117.24.0.689432023171.issue45545@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

Sorry, I seem to have missed your post last month when I scanned over the thread on python-ideas [1]. 

In POSIX, it could try to handle ENAMETOOLONG by walking the path forward with a relative chdir(). This could try to consume as many components as possible in each pass according to os.pathconf(cwd, os.pathconf_names['PC_PATH_MAX']), starting with cwd='/' and subsequently cwd=".". However, the return value is unreliable if the relative path traverses a mount point into a more restrictive filesystem [2]. It's probably good enough to just walk forward one component at a time.

---
[1] https://mail.python.org/archives/list/python-ideas at python.org/thread/C525UVPP3ALGTXDNFL2GFDV23KCHP3RL
[2] https://pubs.opengroup.org/onlinepubs/9699919799/functions/pathconf.html

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Fri Oct 22 00:47:18 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 04:47:18 +0000
Subject: [issue43592] test_importlib:
 test_multiprocessing_pool_circular_import() fails with "Too many open files"
 error on os.pipe()
In-Reply-To: <1616409182.92.0.0882668450853.issue43592@roundup.psfhosted.org>
Message-ID: <1634878038.76.0.313195154308.issue43592@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 8f6aa48cb2dc827a2cb76e35e91bf02d099875c5 by Miss Islington (bot) in branch '3.10':
bpo-43592: Raise RLIMIT_NOFILE in test.libregrtest (GH-29127)
https://github.com/python/cpython/commit/8f6aa48cb2dc827a2cb76e35e91bf02d099875c5


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43592>
_______________________________________

From report at bugs.python.org  Fri Oct 22 00:49:25 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Fri, 22 Oct 2021 04:49:25 +0000
Subject: [issue43592] test_importlib:
 test_multiprocessing_pool_circular_import() fails with "Too many open files"
 error on os.pipe()
In-Reply-To: <1616409182.92.0.0882668450853.issue43592@roundup.psfhosted.org>
Message-ID: <1634878165.65.0.264871910121.issue43592@roundup.psfhosted.org>


Change by Gregory P. Smith <greg at krypto.org>:


----------
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43592>
_______________________________________

From report at bugs.python.org  Fri Oct 22 00:48:47 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 04:48:47 +0000
Subject: [issue43592] test_importlib:
 test_multiprocessing_pool_circular_import() fails with "Too many open files"
 error on os.pipe()
In-Reply-To: <1616409182.92.0.0882668450853.issue43592@roundup.psfhosted.org>
Message-ID: <1634878127.97.0.639366508004.issue43592@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 216c040bb1fdf73e78d67ab82a43563d7593f874 by Miss Islington (bot) in branch '3.9':
bpo-43592: Raise RLIMIT_NOFILE in test.libregrtest (GH-29127)
https://github.com/python/cpython/commit/216c040bb1fdf73e78d67ab82a43563d7593f874


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43592>
_______________________________________

From report at bugs.python.org  Fri Oct 22 03:15:31 2021
From: report at bugs.python.org (Ken Jin)
Date: Fri, 22 Oct 2021 07:15:31 +0000
Subject: [issue45565] More LOAD_ATTR specializations
Message-ID: <1634886931.96.0.742375847346.issue45565@roundup.psfhosted.org>


Change by Ken Jin <kenjin4096 at gmail.com>:


----------
components: Interpreter Core
nosy: Mark.Shannon, kj
priority: normal
severity: normal
status: open
title: More LOAD_ATTR specializations
type: performance
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45565>
_______________________________________

From report at bugs.python.org  Fri Oct 22 03:16:45 2021
From: report at bugs.python.org (Ken Jin)
Date: Fri, 22 Oct 2021 07:16:45 +0000
Subject: [issue45565] More LOAD_ATTR specializations
Message-ID: <1634887005.74.0.981386792866.issue45565@roundup.psfhosted.org>


Change by Ken Jin <kenjin4096 at gmail.com>:


----------
keywords: +patch
pull_requests: +27422
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29146

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45565>
_______________________________________

From report at bugs.python.org  Fri Oct 22 03:36:33 2021
From: report at bugs.python.org (Alex Waygood)
Date: Fri, 22 Oct 2021 07:36:33 +0000
Subject: [issue45535] Enum's dir() does not contain inherited members
In-Reply-To: <1634726106.14.0.525814954361.issue45535@roundup.psfhosted.org>
Message-ID: <1634888193.65.0.127897047457.issue45535@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

Would there be interest in me submitting a PR along these lines?

----

> why use mro() instead of __mro__?

Er, no reason, really. To be honest, I've never really understood why Python has both.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45535>
_______________________________________

From report at bugs.python.org  Fri Oct 22 03:54:45 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 07:54:45 +0000
Subject: [issue45528] mmap: constants not listed in the documentation
In-Reply-To: <1634671970.69.0.866952550683.issue45528@roundup.psfhosted.org>
Message-ID: <1634889285.51.0.088214886884.issue45528@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
type:  -> enhancement
versions:  -Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45528>
_______________________________________

From report at bugs.python.org  Fri Oct 22 04:08:50 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 22 Oct 2021 08:08:50 +0000
Subject: [issue45520] Frozen dataclass deep copy doesn't work with __slots__
In-Reply-To: <1634599102.35.0.694436062352.issue45520@roundup.psfhosted.org>
Message-ID: <1634890130.2.0.249301573919.issue45520@roundup.psfhosted.org>


Change by Nikita Sobolev <mail at sobolevn.me>:


----------
keywords: +patch
nosy: +sobolevn
nosy_count: 3.0 -> 4.0
pull_requests: +27423
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29147

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45520>
_______________________________________

From report at bugs.python.org  Fri Oct 22 04:12:16 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 08:12:16 +0000
Subject: [issue44133] "Py_FrozenMain" symbol is not exported
In-Reply-To: <1621011524.07.0.0957325647121.issue44133@roundup.psfhosted.org>
Message-ID: <1634890336.09.0.147947931077.issue44133@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +27425
pull_request: https://github.com/python/cpython/pull/29148

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44133>
_______________________________________

From report at bugs.python.org  Fri Oct 22 04:12:11 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Fri, 22 Oct 2021 08:12:11 +0000
Subject: [issue44133] "Py_FrozenMain" symbol is not exported
In-Reply-To: <1621011524.07.0.0957325647121.issue44133@roundup.psfhosted.org>
Message-ID: <1634890331.42.0.160624792733.issue44133@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:


New changeset 276468dddb46c54980c782c09cdb53bd90755752 by Petr Viktorin in branch 'main':
bpo-43795: Add a test for Stable ABI symbol availability using ctypes (GH-26354)
https://github.com/python/cpython/commit/276468dddb46c54980c782c09cdb53bd90755752


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44133>
_______________________________________

From report at bugs.python.org  Fri Oct 22 04:12:11 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Fri, 22 Oct 2021 08:12:11 +0000
Subject: [issue43795] Implement PEP 652 -- Maintaining the Stable ABI
In-Reply-To: <1617983030.95.0.501839301811.issue43795@roundup.psfhosted.org>
Message-ID: <1634890331.31.0.0767433841901.issue43795@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:


New changeset 276468dddb46c54980c782c09cdb53bd90755752 by Petr Viktorin in branch 'main':
bpo-43795: Add a test for Stable ABI symbol availability using ctypes (GH-26354)
https://github.com/python/cpython/commit/276468dddb46c54980c782c09cdb53bd90755752


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43795>
_______________________________________

From report at bugs.python.org  Fri Oct 22 04:12:15 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 08:12:15 +0000
Subject: [issue43795] Implement PEP 652 -- Maintaining the Stable ABI
In-Reply-To: <1617983030.95.0.501839301811.issue43795@roundup.psfhosted.org>
Message-ID: <1634890335.97.0.755025712482.issue43795@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27424
pull_request: https://github.com/python/cpython/pull/29148

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43795>
_______________________________________

From report at bugs.python.org  Fri Oct 22 04:16:35 2021
From: report at bugs.python.org (Ken Jin)
Date: Fri, 22 Oct 2021 08:16:35 +0000
Subject: [issue41592] Make _SubParsersAction public
In-Reply-To: <1597864894.48.0.159581898725.issue41592@roundup.psfhosted.org>
Message-ID: <1634890595.13.0.966501518258.issue41592@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

Turning a class public or not requires a lot more discussion by the argparse maintainers (I'm definitely not one of them). Have you considered this workaround for PyCharm?

from argparse import (
    _SubParsersAction,  # noqa
    ArgumentParser,
)

----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41592>
_______________________________________

From report at bugs.python.org  Fri Oct 22 04:23:03 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 22 Oct 2021 08:23:03 +0000
Subject: [issue45125] Improve tests and docs of how `pickle` works with
 `SharedMemory` obejcts
In-Reply-To: <1631009872.94.0.369430162871.issue45125@roundup.psfhosted.org>
Message-ID: <1634890983.95.0.685015183319.issue45125@roundup.psfhosted.org>


Nikita Sobolev <mail at sobolevn.me> added the comment:

Thanks everyone. It is now fixed

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45125>
_______________________________________

From report at bugs.python.org  Fri Oct 22 04:23:37 2021
From: report at bugs.python.org (Mark Dickinson)
Date: Fri, 22 Oct 2021 08:23:37 +0000
Subject: [issue44970] Re-examine complex pow special case handling
In-Reply-To: <1629552403.37.0.715300348368.issue44970@roundup.psfhosted.org>
Message-ID: <1634891017.53.0.171797677086.issue44970@roundup.psfhosted.org>


Mark Dickinson <dickinsm at gmail.com> added the comment:

> Is not it a duplicate of issue15996?

Yes, I think it's close enough. Thanks.

----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> pow() for complex numbers is rough around the edges

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44970>
_______________________________________

From report at bugs.python.org  Fri Oct 22 04:24:05 2021
From: report at bugs.python.org (Mark Dickinson)
Date: Fri, 22 Oct 2021 08:24:05 +0000
Subject: [issue15996] pow() for complex numbers is rough around the edges
In-Reply-To: <1348178428.15.0.517718755216.issue15996@psf.upfronthosting.co.za>
Message-ID: <1634891045.17.0.742015653597.issue15996@roundup.psfhosted.org>


Mark Dickinson <dickinsm at gmail.com> added the comment:

See also discussion in #44970, which is closed as a duplicate of this issue.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15996>
_______________________________________

From report at bugs.python.org  Fri Oct 22 04:39:07 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 22 Oct 2021 08:39:07 +0000
Subject: [issue45566] `test_frozen_pickle` does not use all possible `pickle`
 protocols
Message-ID: <1634891947.06.0.600142901544.issue45566@roundup.psfhosted.org>


New submission from Nikita Sobolev <mail at sobolevn.me>:

While working on https://github.com/python/cpython/pull/29147 I've noticed that `test_frozen_pickle` does not use all possible `pickle` protocols: https://github.com/python/cpython/blob/276468dddb46c54980c782c09cdb53bd90755752/Lib/test/test_dataclasses.py#L2862

I will add `for` and `self.subTest` for each unique `pickle` protocol.
After that it would be in sync with `3.9` branch.

----------
components: Tests
messages: 404728
nosy: sobolevn
priority: normal
severity: normal
status: open
title: `test_frozen_pickle` does not use all possible `pickle` protocols
type: behavior
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45566>
_______________________________________

From report at bugs.python.org  Fri Oct 22 04:50:46 2021
From: report at bugs.python.org (Sebastian Rittau)
Date: Fri, 22 Oct 2021 08:50:46 +0000
Subject: [issue28375] cgi.py spam in Apache server logs
In-Reply-To: <1475755223.43.0.818852294498.issue28375@psf.upfronthosting.co.za>
Message-ID: <1634892646.31.0.954782432649.issue28375@roundup.psfhosted.org>


Sebastian Rittau <srittau at rittau.biz> added the comment:

All my projects now use werkzeug instead of the cgi module, so I can't confirm whether this problem still exists. I'm fine with closing this as unreproducible if no one else can reproduce it.

----------
status: pending -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28375>
_______________________________________

From report at bugs.python.org  Fri Oct 22 04:52:51 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 08:52:51 +0000
Subject: [issue41086] Exception for uninstantiated interpolation (configparser)
In-Reply-To: <1592875721.54.0.0419083877118.issue41086@roundup.psfhosted.org>
Message-ID: <1634892771.07.0.687739822192.issue41086@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

This is not a bugfix so it should probably not be backported.

----------
nosy: +iritkatriel
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 <report at bugs.python.org>
<https://bugs.python.org/issue41086>
_______________________________________

From report at bugs.python.org  Fri Oct 22 04:52:32 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 08:52:32 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1634892752.33.0.24237703034.issue45562@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27426
pull_request: https://github.com/python/cpython/pull/29149

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Fri Oct 22 04:52:28 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 08:52:28 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1634892748.24.0.647229419822.issue45562@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 86dfb55d2e091cf633dbd7aabcd49d96fb1f9d81 by Pablo Galindo Salgado in branch 'main':
bpo-45562: Only show debug output from the parser in debug builds (GH-29140)
https://github.com/python/cpython/commit/86dfb55d2e091cf633dbd7aabcd49d96fb1f9d81


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Fri Oct 22 04:59:46 2021
From: report at bugs.python.org (Hans-Christoph Steiner)
Date: Fri, 22 Oct 2021 08:59:46 +0000
Subject: [issue45567] Support TLS Encrypted ClientHello (ECH)
Message-ID: <1634893186.6.0.527110144987.issue45567@roundup.psfhosted.org>


New submission from Hans-Christoph Steiner <hans at eds.org>:

The next version of the IETF-standardized TLS protocol is known as Encrypted ClientHello (ECH) [1] formerly known as Encrypted SNI (ESNI). This ticket collects information for ECH support, and tracks which APIs have to be added to Python in order to implement ECH in Python's ssl module.  ECH is built on top of TLSv1.3 and completes the unfinished work from the TLSv1.3 effort.  It is now in draft-13 and there are many implementations that are interoperating.  ECH is working for openssl[2], boringssl[3], nginx, Apache HTTPD, lighttpd, HAProxy, Conscrypt[4], curl, and more.  There is work underway in Firefox [5] and Chromium [6].  It has been sketched out for OkHTTP [7].  Early versions of the standard, known as ESNI, have been deployed in Firefox releases and some production web services.  ECH works in conjunction with the new DNS RR Types HTTPS and SVCB [8].  This means that DNS needs to be handled a bit differently.

As far as I understand it, the ssl module has to gain additional features:

1. HTTPS/SVCB DNS queries for setting up TLS connection with ECH.
2. A way to provide ECH Config Lists as bytes directly to ssl clients.
3. A callback that gets called whenever ECH negotiation fails and the server offers a "Retry Config".
4. A method to ensure encrypted DNS is used so all metadata is encrypted.

OpenSSL does not implement the necessary APIs yet. Stephen Farrell's development OpenSSL fork [9] implements ECH and has been used in Apache HTTPD, nginx, lighttpd, HAProxy, and curl implementations.

The TLS WG maintain a page with information about other implementations:
https://github.com/tlswg/draft-ietf-tls-esni/wiki/Implementations


[1] https://www.ietf.org/archive/id/draft-ietf-tls-esni-13.html
[2] https://github.com/openssl/openssl/issues/7482
[3] https://bugs.chromium.org/p/boringssl/issues/detail?id=275
[5] https://bugzilla.mozilla.org/show_bug.cgi?id=1725938
[6] https://bugs.chromium.org/p/chromium/issues/detail?id=1091403
[6] https://github.com/google/conscrypt/issues/730
[7] https://github.com/square/okhttp/issues/6539
[8] https://www.ietf.org/archive/id/draft-ietf-dnsop-svcb-https-07.html
[9] https://github.com/sftcd/openssl

----------
assignee: christian.heimes
components: SSL
messages: 404732
nosy: christian.heimes, eighthave
priority: normal
severity: normal
status: open
title: Support TLS Encrypted ClientHello (ECH)
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45567>
_______________________________________

From report at bugs.python.org  Fri Oct 22 05:03:48 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 09:03:48 +0000
Subject: [issue22886] TestProgram leaves defaultTestLoader.errors dirty
In-Reply-To: <1416184473.93.0.181686669268.issue22886@psf.upfronthosting.co.za>
Message-ID: <1634893428.28.0.668443703205.issue22886@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22886>
_______________________________________

From report at bugs.python.org  Fri Oct 22 05:06:45 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 22 Oct 2021 09:06:45 +0000
Subject: [issue45566] `test_frozen_pickle` does not use all possible `pickle`
 protocols
In-Reply-To: <1634891947.06.0.600142901544.issue45566@roundup.psfhosted.org>
Message-ID: <1634893605.55.0.671267697127.issue45566@roundup.psfhosted.org>


Change by Nikita Sobolev <mail at sobolevn.me>:


----------
keywords: +patch
pull_requests: +27427
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29150

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45566>
_______________________________________

From report at bugs.python.org  Fri Oct 22 05:17:33 2021
From: report at bugs.python.org (Mark Dickinson)
Date: Fri, 22 Oct 2021 09:17:33 +0000
Subject: [issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC
In-Reply-To: <1540110172.83.0.788709270274.issue35037@psf.upfronthosting.co.za>
Message-ID: <1634894253.64.0.617906214522.issue35037@roundup.psfhosted.org>


Mark Dickinson <dickinsm at gmail.com> added the comment:

This should probably be a separate issue, but I wonder whether the 15-bit digit option has value any more. Should we just drop that option and always use 30-bit digits? 

30-bit digits were introduced at a time when we couldn't rely on a 64-bit integer type always being available,  so we still needed to keep the 15-bit fallback option. But I think that's no longer the case.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35037>
_______________________________________

From report at bugs.python.org  Fri Oct 22 05:29:48 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 09:29:48 +0000
Subject: [issue6529] get{pw,gr}{nam,[ug]id}() calls are not re-entrant
In-Reply-To: <1248130486.1.0.677109329447.issue6529@psf.upfronthosting.co.za>
Message-ID: <1634894988.99.0.808599201792.issue6529@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.1, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue6529>
_______________________________________

From report at bugs.python.org  Fri Oct 22 05:30:07 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 09:30:07 +0000
Subject: [issue6529] get{pw,gr}{nam,[ug]id}() calls are not re-entrant
In-Reply-To: <1248130486.1.0.677109329447.issue6529@psf.upfronthosting.co.za>
Message-ID: <1634895007.18.0.805816200348.issue6529@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
stage: test needed -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue6529>
_______________________________________

From report at bugs.python.org  Fri Oct 22 05:30:19 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 09:30:19 +0000
Subject: [issue6529] get{pw,gr}{nam,[ug]id}() calls are not re-entrant
In-Reply-To: <1248130486.1.0.677109329447.issue6529@psf.upfronthosting.co.za>
Message-ID: <1634895019.03.0.538642523533.issue6529@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

The problem was fixed a couple of years ago. Python uses the reentrant functions since commit 23e65b25557f957af840cf8fe68e80659ce28629 / GH-7081.

----------
nosy: +christian.heimes
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
superseder:  -> Release GIL for grp.getgr{nam,gid} and pwd.getpw{nam,uid}
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue6529>
_______________________________________

From report at bugs.python.org  Fri Oct 22 05:33:40 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 09:33:40 +0000
Subject: [issue6529] get{pw,gr}{nam,[ug]id}() calls are not re-entrant
In-Reply-To: <1248130486.1.0.677109329447.issue6529@psf.upfronthosting.co.za>
Message-ID: <1634895220.53.0.597391850733.issue6529@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
versions: +Python 3.7 -Python 2.7, Python 3.1, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue6529>
_______________________________________

From report at bugs.python.org  Fri Oct 22 05:38:46 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 09:38:46 +0000
Subject: [issue24055] unittest package-level set up & tear down module
In-Reply-To: <1429907156.24.0.517799178005.issue24055@psf.upfronthosting.co.za>
Message-ID: <1634895526.11.0.352031300965.issue24055@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

This was added under issue30108.

----------
nosy: +iritkatriel
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed
superseder:  -> test_site modifies sys.path

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24055>
_______________________________________

From report at bugs.python.org  Fri Oct 22 05:40:48 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 09:40:48 +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: <1634895648.61.0.552641989215.issue43656@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

See also 23597.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Fri Oct 22 05:41:33 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 09:41:33 +0000
Subject: [issue23597] Allow easy display of local variables in log messages?
In-Reply-To: <1425607966.26.0.932937253201.issue23597@psf.upfronthosting.co.za>
Message-ID: <1634895693.15.0.569588447101.issue23597@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
type:  -> enhancement
versions: +Python 3.11 -Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23597>
_______________________________________

From report at bugs.python.org  Fri Oct 22 05:42:19 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 09:42:19 +0000
Subject: [issue23597] Allow easy display of local variables in log messages?
In-Reply-To: <1425607966.26.0.932937253201.issue23597@psf.upfronthosting.co.za>
Message-ID: <1634895739.39.0.714692136922.issue23597@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

See also 43656.

----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23597>
_______________________________________

From report at bugs.python.org  Fri Oct 22 05:45:26 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Fri, 22 Oct 2021 09:45:26 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1634895926.08.0.135007497268.issue45562@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

Yes, I know that (at the moment) it's only documented to work in the parser, but since Py_DebugFlag is a general purpose flag, this use could easily be extended to other parts of the interpreter as well, e.g. for parsing the command line or instrumenting the interpreter to collect debug stats.

In any case, thanks for the quick fix, Pablo.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Fri Oct 22 05:51:42 2021
From: report at bugs.python.org (Zbigniew Siciarz)
Date: Fri, 22 Oct 2021 09:51:42 +0000
Subject: [issue45568] @asynccontextmanager is missing in decorator usage
 example
Message-ID: <1634896302.66.0.162029203149.issue45568@roundup.psfhosted.org>


New submission from Zbigniew Siciarz <zbigniew at siciarz.net>:

The docs of contextlib.asynccontextmanager provide an example how to use it as a decorator (https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager). However, the example snippet of code doesn't decorate the timeit() function with @asynccontextmanager, leading to reader confusion.

----------
assignee: docs at python
components: Documentation
messages: 404739
nosy: docs at python, zsiciarz
priority: normal
severity: normal
status: open
title: @asynccontextmanager is missing in decorator usage example
type: enhancement
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45568>
_______________________________________

From report at bugs.python.org  Fri Oct 22 05:56:00 2021
From: report at bugs.python.org (Zbigniew Siciarz)
Date: Fri, 22 Oct 2021 09:56:00 +0000
Subject: [issue45568] @asynccontextmanager is missing in decorator usage
 example
In-Reply-To: <1634896302.66.0.162029203149.issue45568@roundup.psfhosted.org>
Message-ID: <1634896560.64.0.874812767193.issue45568@roundup.psfhosted.org>


Change by Zbigniew Siciarz <zbigniew at siciarz.net>:


----------
keywords: +patch
pull_requests: +27428
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29151

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45568>
_______________________________________

From report at bugs.python.org  Fri Oct 22 06:01:36 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 22 Oct 2021 10:01:36 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
In-Reply-To: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org>
Message-ID: <1634896896.15.0.0640112591714.issue45524@roundup.psfhosted.org>


Nikita Sobolev <mail at sobolevn.me> added the comment:

I had some time to debug this. It happens because we treat classes and functions differently.

The difference between `get_type_hints(B)` and `get_type_hints(B.__init__)` is that we use different `global` contexts there:
- For `B` we use `__mro__` entries and extract `globals` and `locals` from there: https://github.com/python/cpython/blob/86dfb55d2e091cf633dbd7aabcd49d96fb1f9d81/Lib/typing.py#L1792-L1796
- For `B.__init__` we use simplier logic https://github.com/python/cpython/blob/86dfb55d2e091cf633dbd7aabcd49d96fb1f9d81/Lib/typing.py#L1822-L1828 It does not know anything about `__mro__` and super contexts

Funny thing, this problem goes away if we remove `@dataclass` decorator and convert our examples into regular classes:

```
# a.py
from __future__ import annotations

import collections


class A:
  x: collections.OrderedDict
  def __init__(self, x: collections.OrderedDict) -> None:
      ...
```

and

```
# b.py
from __future__ import annotations

import a
import typing

class B(a.A):
  pass

print(typing.get_type_hints(B))  
# {'x': <class 'collections.OrderedDict'>}
print(typing.get_type_hints(B.__init__))
# {'x': <class 'collections.OrderedDict'>, 'return': <class 'NoneType'>}
```

I am going to try to solve this with something really simple (if no one else is working on it).

----------
nosy: +sobolevn

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Fri Oct 22 06:01:01 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 10:01:01 +0000
Subject: [issue29374] Doc: signal.sig(timed)wait do not work outside the main
 thread
In-Reply-To: <1485365131.36.0.15146613889.issue29374@psf.upfronthosting.co.za>
Message-ID: <1634896861.56.0.8872258641.issue29374@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
type: behavior -> enhancement
versions: +Python 3.11 -Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29374>
_______________________________________

From report at bugs.python.org  Fri Oct 22 06:04:09 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 10:04:09 +0000
Subject: [issue7438] Allow to use a part of subprocess module during building
 Python
In-Reply-To: <1259987684.71.0.162752431193.issue7438@psf.upfronthosting.co.za>
Message-ID: <1634897049.82.0.418915807904.issue7438@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Closed after 12 years of inactivity. The code has moved on quite a bit since then.

----------
nosy: +iritkatriel
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue7438>
_______________________________________

From report at bugs.python.org  Fri Oct 22 06:12:58 2021
From: report at bugs.python.org (=?utf-8?q?Florin_Sp=C4=83tar?=)
Date: Fri, 22 Oct 2021 10:12:58 +0000
Subject: [issue44959] EXT_SUFFIX is missing '.sl' on HP-UX
In-Reply-To: <1629452083.0.0.513630560234.issue44959@roundup.psfhosted.org>
Message-ID: <1634897578.36.0.486690297203.issue44959@roundup.psfhosted.org>


Florin Sp?tar <florin.spatar at gmail.com> added the comment:

Can this be merged to python 3.10 as well? Thanks

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44959>
_______________________________________

From report at bugs.python.org  Fri Oct 22 06:14:52 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Fri, 22 Oct 2021 10:14:52 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1634897692.45.0.768119488919.issue45562@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset ae78ffdc9399802621eabcd1668e44a91ec5f45e by Miss Islington (bot) in branch '3.10':
bpo-45562: Only show debug output from the parser in debug builds (GH-29140) (#29149)
https://github.com/python/cpython/commit/ae78ffdc9399802621eabcd1668e44a91ec5f45e


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Fri Oct 22 06:15:11 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Fri, 22 Oct 2021 10:15:11 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1634897711.51.0.628253920824.issue45562@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Thanks you for the catch!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Fri Oct 22 06:18:51 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Fri, 22 Oct 2021 10:18:51 +0000
Subject: [issue45563] inspect.getframeinfo() doesn't handle frames without
 lineno
In-Reply-To: <1634853732.41.0.89193081236.issue45563@roundup.psfhosted.org>
Message-ID: <1634897931.93.0.0134696839567.issue45563@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

To add some more context:

This came up while porting eGenix PyRun to Python 3.10. While installing setuptools 58.2.0 via "pyrun setup.py install", an exception was raised in getframeinfo().

PyRun uses exec() to run Python code:

    def pyrun_exec_code_file(filename, globals_dict, locals_dict=None):
        with open(filename, 'r', encoding='utf-8') as file:
            source = file.read()
        code = compile(source, filename, 'exec', optimize=pyrun_optimized)
        exec(code, globals_dict, locals_dict)

Using pdb, I then found that the top frame does not have f_lineno set in Python 3.10.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45563>
_______________________________________

From report at bugs.python.org  Fri Oct 22 06:30:32 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 10:30:32 +0000
Subject: [issue44959] EXT_SUFFIX is missing '.sl' on HP-UX
In-Reply-To: <1629452083.0.0.513630560234.issue44959@roundup.psfhosted.org>
Message-ID: <1634898632.05.0.991570682525.issue44959@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27430
pull_request: https://github.com/python/cpython/pull/29153

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44959>
_______________________________________

From report at bugs.python.org  Fri Oct 22 06:30:27 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 10:30:27 +0000
Subject: [issue44959] EXT_SUFFIX is missing '.sl' on HP-UX
In-Reply-To: <1629452083.0.0.513630560234.issue44959@roundup.psfhosted.org>
Message-ID: <1634898627.8.0.0733405146732.issue44959@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27429
pull_request: https://github.com/python/cpython/pull/29152

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44959>
_______________________________________

From report at bugs.python.org  Fri Oct 22 06:31:32 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 22 Oct 2021 10:31:32 +0000
Subject: [issue44959] EXT_SUFFIX is missing '.sl' on HP-UX
In-Reply-To: <1629452083.0.0.513630560234.issue44959@roundup.psfhosted.org>
Message-ID: <1634898692.8.0.0827740569704.issue44959@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

> Can this be merged to python 3.10 as well? Thanks

It's unclear to me if it's a new feature or a bugfix. But since the change is trivial, I'm fine with backporting it as a bugfix to 3.9 and 3.10 branches.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44959>
_______________________________________

From report at bugs.python.org  Fri Oct 22 06:35:46 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Fri, 22 Oct 2021 10:35:46 +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: <1634898946.36.0.035654326704.issue44133@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

Repurposing this bug to track all symbols that don't appear in some configurations.

- `Py_FrozenMain` should be added to stable ABI when this is fixed. It was left out of the 3.10 stable ABI for only this reason. See discussion here: https://mail.python.org/archives/list/capi-sig at python.org/thread/5QLI3NUP3OSGLCCIBAQOTX4GEJQBWJ6F/

- `PyModule_Create2` and `PyModule_FromDefAndSpec2` are "temporarily" excluded from tests in `Tools/scripts/stable_abi.py`'s `gen_ctypes_test`, so that all the other symbols can get regression testing. When this issue is fixed, that special case should be removed.

----------
title: "Py_FrozenMain" symbol is not exported -> Some C-API symbols (e.g. Py_FrozenMain) are not always exported

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44133>
_______________________________________

From report at bugs.python.org  Fri Oct 22 06:41:35 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 10:41:35 +0000
Subject: [issue45567] Support TLS Encrypted ClientHello (ECH)
In-Reply-To: <1634893186.6.0.527110144987.issue45567@roundup.psfhosted.org>
Message-ID: <1634899295.73.0.909405791035.issue45567@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Thanks for filing this feature request!

The DNS lookup part is out of scope for the ssl module. I don't want to get into the DNS business. At $WORK I work on BIND, DNSSEC and DNS over TLS. Secure DNS (and DNS in general) is already complicated when you control the entire stack and only have to deal with one family of Linux distros. AFAIK there isn't even a platform-independent way to perform lookups with abitrary RRTYPEs. res_nquery() is only available on some platforms and doesn't work reliable with some libcs. I have had issues with EDNS0 on musl in the past. KRB5KDC SRV looks with large responses where unreliable. Let's offload the DNS part of consumers of the ssl module. They can use python-dns or c-ares.

The ECH part and callback look sensible, though. I'll include the APIs as soon as OpenSSL support them.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45567>
_______________________________________

From report at bugs.python.org  Fri Oct 22 06:21:47 2021
From: report at bugs.python.org (Mark Dickinson)
Date: Fri, 22 Oct 2021 10:21:47 +0000
Subject: [issue45569] Drop support for 15-bit PyLong digits?
Message-ID: <1634898107.47.0.88725686674.issue45569@roundup.psfhosted.org>


New submission from Mark Dickinson <dickinsm at gmail.com>:

Looking at issue #35037 (which is a compatibility issue having to do with PYLONG_BITS_IN_DIGIT), I'm wondering whether it would make sense to drop support for 15-bit PyLong digits altogether. This would simplify some of the code, eliminate a configuration option, and eliminate the scope for ABI mismatches like that occurring in #35037.

There were a couple of reasons that we kept support for 15-bit digits when 30-bit digits were introduced, back in #4258.

- At the time, we wanted to use `long long` for the `twodigits` type with 30-bit digits, and we couldn't guarantee that all platforms we cared about would have `long long` or another 64-bit integer type available.

- It wasn't clear whether there were systems where using 30-bit digits in place of 15-bit digits might cause a performance regression.

Now that we can safely rely on C99 support on all platforms we care about, the existence of a 64-bit integer type isn't an issue (and indeed, we already rely on the existence of such a type in dtoa.c and elsewhere in the codebase).

As to performance, I doubt that there are still platforms where using 15-bit digits gives a performance advantage, but I admit I haven't checked.

----------
messages: 404746
nosy: mark.dickinson
priority: normal
severity: normal
status: open
title: Drop support for 15-bit PyLong digits?

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45569>
_______________________________________

From report at bugs.python.org  Fri Oct 22 06:49:16 2021
From: report at bugs.python.org (Simon McVittie)
Date: Fri, 22 Oct 2021 10:49:16 +0000
Subject: [issue43137] webbrowser to support "gio open <URL>"
In-Reply-To: <1612527994.14.0.364284995735.issue43137@roundup.psfhosted.org>
Message-ID: <1634899756.59.0.159913732067.issue43137@roundup.psfhosted.org>


Change by Simon McVittie <simon.mcvittie at collabora.co.uk>:


----------
keywords: +patch
nosy: +smcv
nosy_count: 1.0 -> 2.0
pull_requests: +27431
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29154

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43137>
_______________________________________

From report at bugs.python.org  Fri Oct 22 07:07:53 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Fri, 22 Oct 2021 11:07:53 +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: <1634900873.78.0.442385464846.issue45113@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

> Can I do something for this pending PEP?

Ask Victor, he should know more. But as far as I know, no one started on it yet.


> I guess the outside user will use it MAYBE.

Py_TPFLAGS_DISALLOW_INSTANTIATION is not part of the limited API, so it would be nice to find another use case.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Fri Oct 22 07:08:54 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 11:08:54 +0000
Subject: [issue44959] EXT_SUFFIX is missing '.sl' on HP-UX
In-Reply-To: <1629452083.0.0.513630560234.issue44959@roundup.psfhosted.org>
Message-ID: <1634900934.08.0.382300167747.issue44959@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset aa8c3446c085175e65e736b0d2e32719c00004d2 by Miss Islington (bot) in branch '3.9':
bpo-44959: Add fallback to extension modules with '.sl' suffix on HP-UX (GH-27857)
https://github.com/python/cpython/commit/aa8c3446c085175e65e736b0d2e32719c00004d2


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44959>
_______________________________________

From report at bugs.python.org  Fri Oct 22 07:09:29 2021
From: report at bugs.python.org (Alex Waygood)
Date: Fri, 22 Oct 2021 11:09:29 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
In-Reply-To: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org>
Message-ID: <1634900969.36.0.366076968379.issue45524@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

@Nikita, I had a go at writing some more rigorous tests regarding this issue. I found the same thing you did -- the issue seems:

* Isolated to dataclasses specifically (doesn't occur with TypedDicts, standard classes or NamedTuples)
* Isolated to the __init__ method of dataclasses
* Only occurs when you *subclass* a dataclass defined in another module.

My tests are in these two files on my cpython fork:

* https://github.com/AlexWaygood/cpython/blob/forward-annotations-bpo-45524/Lib/test/test_future_annotations.py
* https://github.com/AlexWaygood/cpython/blob/forward-annotations-bpo-45524/Lib/test/_typing_imports_helper.py

(I'm not proposing adding two new files to the cpython test suite -- just put the tests in new files so that I could isolate the new tests from the rest of the test suite and understand the problem better.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Fri Oct 22 07:14:00 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Fri, 22 Oct 2021 11:14:00 +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: <1634901240.65.0.251010903581.issue45113@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

FYI, see bpo-43916 regarding the introduction and rationale of introducing Py_TPFLAGS_DISALLOW_INSTANTIATION.

Slightly related: bpo-43908

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Fri Oct 22 07:22:12 2021
From: report at bugs.python.org (Alex Waygood)
Date: Fri, 22 Oct 2021 11:22:12 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
In-Reply-To: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org>
Message-ID: <1634901732.74.0.245627847746.issue45524@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

If you try running my test script with the `from __future__ import annotations` line at the top commented out, however, the error is the same. (`from __future__ import annotations` is obviously still there in the module that's being imported by the test script.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Fri Oct 22 07:32:51 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 11:32:51 +0000
Subject: [issue43974] Define Py_BUILD_CORE_MODULE in extensions instead of
 setup.py and Modules/Setup
In-Reply-To: <1619686946.42.0.670507836309.issue43974@roundup.psfhosted.org>
Message-ID: <1634902371.37.0.473248794113.issue43974@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

The proposal is related to Brett's ticket bpo-45548. I no longer think that we should define Py_BUILD_CORE_MODULE unconditionally. Instead I propose to move the defines into each C module. This avoids duplication of macros in setup.py and Modules/Setup.

----------
components: +Extension Modules
nosy: +brett.cannon
title: setup.py should set Py_BUILD_CORE_MODULE as defined macro -> Define Py_BUILD_CORE_MODULE in extensions instead of setup.py and Modules/Setup
versions:  -Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43974>
_______________________________________

From report at bugs.python.org  Fri Oct 22 07:41:55 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Fri, 22 Oct 2021 11:41:55 +0000
Subject: [issue45545] chdir __exit__ is not safe
In-Reply-To: <1634770485.18.0.358610816486.issue45545@roundup.psfhosted.org>
Message-ID: <1634902915.41.0.538443484989.issue45545@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
nosy: +FFY00

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Fri Oct 22 07:44:58 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Fri, 22 Oct 2021 11:44:58 +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: <1634903098.59.0.16920693038.issue45113@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

>> Can I do something for this pending PEP?
>
> Ask Victor, he should know more. But as far as I know, no one started on it yet.

Quoting PEP 630 (active PEP):

  Whenever this PEP mentions extension modules, the advice also applies to
  built-in modules, such as the C parts of the standard library. The standard
  library is expected to switch to per-module state early.


Why is not PEP 630 enough? (I find these "political" discussions a bit hard to follow sometimes :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Fri Oct 22 08:07:11 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 12:07:11 +0000
Subject: [issue43974] Define Py_BUILD_CORE_MODULE in extensions instead of
 setup.py and Modules/Setup
In-Reply-To: <1619686946.42.0.670507836309.issue43974@roundup.psfhosted.org>
Message-ID: <1634904431.2.0.306063060905.issue43974@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
pull_requests: +27432
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29157

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43974>
_______________________________________

From report at bugs.python.org  Fri Oct 22 08:15:34 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 22 Oct 2021 12:15:34 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
In-Reply-To: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org>
Message-ID: <1634904934.13.0.450019555318.issue45524@roundup.psfhosted.org>


Change by Nikita Sobolev <mail at sobolevn.me>:


----------
keywords: +patch
pull_requests: +27433
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29158

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Fri Oct 22 08:18:16 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Fri, 22 Oct 2021 12:18:16 +0000
Subject: [issue43974] Define Py_BUILD_CORE_MODULE in extensions instead of
 setup.py and Modules/Setup
In-Reply-To: <1619686946.42.0.670507836309.issue43974@roundup.psfhosted.org>
Message-ID: <1634905096.28.0.588869960192.issue43974@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

> I no longer think that we should define Py_BUILD_CORE_MODULE
> unconditionally. Instead I propose to move the defines into each C module.

+1. Explicit is nice.

----------
nosy: +erlendaasland

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43974>
_______________________________________

From report at bugs.python.org  Fri Oct 22 08:23:42 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Fri, 22 Oct 2021 12:23:42 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1634905422.82.0.360819883974.issue45562@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

I had left a comment on Github about using stderr instead of stdout, to make the output more consistent (other parser error messages go to stderr).

Note sure whether that's something you still want to change before closing the issue.

----------
stage: patch review -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Fri Oct 22 08:28:22 2021
From: report at bugs.python.org (Ken Jin)
Date: Fri, 22 Oct 2021 12:28:22 +0000
Subject: [issue41592] Make _SubParsersAction public
In-Reply-To: <1597864894.48.0.159581898725.issue41592@roundup.psfhosted.org>
Message-ID: <1634905702.11.0.915012624954.issue41592@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

Closing this because this is a linter problem (inside PyCharm), not a Python problem. In the earlier message I provided a solution for PyCharm.

PS, mypy --strict doesn't complain when I import _SubParsersAction, meaning most type checkers likely won't complain either.

Thanks for your time!

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41592>
_______________________________________

From report at bugs.python.org  Fri Oct 22 08:37:40 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Fri, 22 Oct 2021 12:37:40 +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: <1634906260.53.0.338384858584.issue45555@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

I can reproduce the described scenario. I will nosy Pablo and Neil for another eye.

I suggest that if it's not a bug, then maybe the docs should be updated to explain this behavior.

The only part that talks about exceptions in the documentation for weakref.ref() reads as:

"""
Exceptions raised by the callback will be noted on the standard error output, but cannot be propagated; they are handled in exactly the same way as exceptions raised from an object?s __del__() method.
"""

----------
nosy: +nanjekyejoannah, nascheme, pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45555>
_______________________________________

From report at bugs.python.org  Fri Oct 22 08:40:23 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 12:40:23 +0000
Subject: [issue45570] Simplify setup macros for pyexpat and _elementtree
Message-ID: <1634906423.38.0.044839571581.issue45570@roundup.psfhosted.org>


New submission from Christian Heimes <lists at cheimes.de>:

setup.py and Modules/Setup define a couple of macros for pyexpat and _elementtree. The macros are no longer needed or should be moved to our expat_config.h copy.

* HAVE_EXPAT_CONFIG_H is not used by our code and not used by system-wide expat header files
* USE_PYEXPAT_CAPI is no longer used by our code
* XML_POOR_ENTROPY should be defined in expat_config.h

----------
assignee: christian.heimes
components: Build
messages: 404761
nosy: brett.cannon, christian.heimes, vstinner
priority: normal
severity: normal
status: open
title: Simplify setup macros for pyexpat and _elementtree
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45570>
_______________________________________

From report at bugs.python.org  Fri Oct 22 08:40:39 2021
From: report at bugs.python.org (Tim Golden)
Date: Fri, 22 Oct 2021 12:40:39 +0000
Subject: [issue34240] Convert test_mmap to use tempfile
In-Reply-To: <1532632974.46.0.56676864532.issue34240@psf.upfronthosting.co.za>
Message-ID: <1634906439.46.0.138905353166.issue34240@roundup.psfhosted.org>


Tim Golden <mail at timgolden.me.uk> added the comment:

Closing as no longer reproducible in the current codebase on my current laptop

----------
resolution:  -> not a bug
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34240>
_______________________________________

From report at bugs.python.org  Fri Oct 22 08:45:18 2021
From: report at bugs.python.org (Mark Shannon)
Date: Fri, 22 Oct 2021 12:45:18 +0000
Subject: [issue45563] inspect.getframeinfo() doesn't handle frames without
 lineno
In-Reply-To: <1634853732.41.0.89193081236.issue45563@roundup.psfhosted.org>
Message-ID: <1634906718.33.0.700905795693.issue45563@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:

What is `source`?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45563>
_______________________________________

From report at bugs.python.org  Fri Oct 22 08:49:16 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 12:49:16 +0000
Subject: [issue45570] Simplify setup macros for pyexpat and _elementtree
In-Reply-To: <1634906423.38.0.044839571581.issue45570@roundup.psfhosted.org>
Message-ID: <1634906956.06.0.970469539417.issue45570@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
keywords: +patch
pull_requests: +27434
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29159

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45570>
_______________________________________

From report at bugs.python.org  Fri Oct 22 08:51:13 2021
From: report at bugs.python.org (Mark Dickinson)
Date: Fri, 22 Oct 2021 12:51:13 +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: <1634907073.52.0.552255984143.issue45555@roundup.psfhosted.org>


Mark Dickinson <dickinsm at gmail.com> added the comment:

I don't think this is a bug: there's still a reference to the `A` instance in `sys.exc_info()` (specifically, in the exception traceback) in this case, so that instance is still alive.

If you add an `except: pass` clause to your `try / finally`, you should see that dereferencing the weakref gives `None` in the `finally` clause.

----------
nosy: +mark.dickinson

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45555>
_______________________________________

From report at bugs.python.org  Fri Oct 22 09:07:30 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Fri, 22 Oct 2021 13:07:30 +0000
Subject: [issue45126] [sqlite3] cleanup and harden Connection and Cursor
 __init__
In-Reply-To: <1631015162.08.0.638095834379.issue45126@roundup.psfhosted.org>
Message-ID: <1634908050.11.0.411664312204.issue45126@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
pull_requests: +27435
pull_request: https://github.com/python/cpython/pull/29160

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45126>
_______________________________________

From report at bugs.python.org  Fri Oct 22 09:18:59 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Fri, 22 Oct 2021 13:18:59 +0000
Subject: [issue45563] inspect.getframeinfo() doesn't handle frames without
 lineno
In-Reply-To: <1634853732.41.0.89193081236.issue45563@roundup.psfhosted.org>
Message-ID: <1634908739.19.0.14697016915.issue45563@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

In the case of setuptools, this would be the file setup.py, but I think the specific file is not relevant. I can try to come up with a shorter example.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45563>
_______________________________________

From report at bugs.python.org  Fri Oct 22 09:21:54 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 13:21:54 +0000
Subject: [issue45571] Modules/makesetup uses wrong CFLAGS for *shared*
Message-ID: <1634908914.03.0.439923093863.issue45571@roundup.psfhosted.org>


New submission from Christian Heimes <lists at cheimes.de>:

I think that makesetup uses the wrong CFLAGS variable for shared modules. The script uses PY_CFLAGS:

    no)     cc="$cc \$(CCSHARED) \$(PY_CFLAGS) \$(PY_CPPFLAGS)";;

while setup.py uses PY_CFLAGS_NODIST:

    set_compiler_flags('CFLAGS', 'PY_CFLAGS_NODIST')

The flags are similar but not equal. Amongst others PY_CFLAGS does not include Include/internal while PY_CFLAGS_NODIST has -I./Include/internal.

----------
components: Build
messages: 404766
nosy: brett.cannon, christian.heimes, twouters, vstinner
priority: normal
severity: normal
status: open
title: Modules/makesetup uses wrong CFLAGS for *shared*
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45571>
_______________________________________

From report at bugs.python.org  Fri Oct 22 09:30:12 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 13:30:12 +0000
Subject: [issue45571] Modules/makesetup uses wrong CFLAGS for *shared*
In-Reply-To: <1634908914.03.0.439923093863.issue45571@roundup.psfhosted.org>
Message-ID: <1634909412.79.0.113001249725.issue45571@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
keywords: +patch
pull_requests: +27436
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29161

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45571>
_______________________________________

From report at bugs.python.org  Fri Oct 22 09:35:34 2021
From: report at bugs.python.org (tongxiaoge)
Date: Fri, 22 Oct 2021 13:35:34 +0000
Subject: [issue45572] urllib.request:AttributeError: 'dict' object has no
 attribute 'get_all' in http_error_auth_reqed function
Message-ID: <1634909734.24.0.124969342817.issue45572@roundup.psfhosted.org>


New submission from tongxiaoge <shixuantong at huawei.com>:

The python version I currently use in my development environment is 3.7.4. Using the following script, the program has never output, and seems to have entered an infinite loop.

To reproduce the issue we can use the following code:

from urllib.request import AbstractBasicAuthHandler
auth_handler = AbstractBasicAuthHandler()
header = {'www-authenticate': 'Basic ' + ',' * 64 + ' ' + 'foo' + ' ' +'realm'}
auth_handler.http_error_auth_reqed('www-authenticate','unused','unused',header)




So I tried to upgrade it to version 3.7.12, and the program will directly report an error. The information is as follows:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/urllib/request.py", line 990, in http_error_auth_reqed
    headers = headers.get_all(authreq)
AttributeError: 'dict' object has no attribute 'get_all'

This problem also exists when I upgrade Python 3 to 3.11.0a1. In Python version 3.7.4, the cause of program hang on seems to be a security vulnerability. Refer to https://bugs.python.org/issue39503. The reason for CVE is not the wrong type of headers. However, after repairing CVE, it seems that the type of headers is limited? For the CVE patch, I tried to only fix the part of the regular expression, and the program can run. So, after repairing CVE-2020-8492, what type should the headers parameter be for http_error_auth_reqed  function? Based on the current code, how should I adapt and modify it to make it run normally?

----------
components: Library (Lib)
files: 3.7.4 hang on.png
messages: 404767
nosy: sxt1001
priority: normal
severity: normal
status: open
title: urllib.request:AttributeError: 'dict' object has no attribute 'get_all' in http_error_auth_reqed function
type: behavior
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file50386/3.7.4 hang on.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45572>
_______________________________________

From report at bugs.python.org  Fri Oct 22 09:36:37 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 13:36:37 +0000
Subject: [issue43974] Define Py_BUILD_CORE_MODULE in extensions instead of
 setup.py and Modules/Setup
In-Reply-To: <1619686946.42.0.670507836309.issue43974@roundup.psfhosted.org>
Message-ID: <1634909797.08.0.213479436153.issue43974@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:


New changeset 03e9f5dc751b8c441a85f428abc3f432ffe46345 by Christian Heimes in branch 'main':
bpo-43974: Move Py_BUILD_CORE_MODULE into module code (GH-29157)
https://github.com/python/cpython/commit/03e9f5dc751b8c441a85f428abc3f432ffe46345


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43974>
_______________________________________

From report at bugs.python.org  Fri Oct 22 09:37:02 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 13:37:02 +0000
Subject: [issue43974] Define Py_BUILD_CORE_MODULE in extensions instead of
 setup.py and Modules/Setup
In-Reply-To: <1619686946.42.0.670507836309.issue43974@roundup.psfhosted.org>
Message-ID: <1634909822.82.0.553338758536.issue43974@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43974>
_______________________________________

From report at bugs.python.org  Fri Oct 22 09:37:45 2021
From: report at bugs.python.org (tongxiaoge)
Date: Fri, 22 Oct 2021 13:37:45 +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: <1634909865.49.0.85810083552.issue45572@roundup.psfhosted.org>


Change by tongxiaoge <shixuantong at huawei.com>:


Added file: https://bugs.python.org/file50387/3.7.4 fix Regex   ok.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45572>
_______________________________________

From report at bugs.python.org  Fri Oct 22 09:39:41 2021
From: report at bugs.python.org (tongxiaoge)
Date: Fri, 22 Oct 2021 13:39:41 +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: <1634909981.32.0.70996017779.issue45572@roundup.psfhosted.org>


Change by tongxiaoge <shixuantong at huawei.com>:


Added file: https://bugs.python.org/file50388/3.7.12 fail.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45572>
_______________________________________

From report at bugs.python.org  Fri Oct 22 09:43:39 2021
From: report at bugs.python.org (tongxiaoge)
Date: Fri, 22 Oct 2021 13:43:39 +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: <1634910219.77.0.736409825243.issue45572@roundup.psfhosted.org>


Change by tongxiaoge <shixuantong at huawei.com>:


Added file: https://bugs.python.org/file50389/3.11.0a1 fail.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45572>
_______________________________________

From report at bugs.python.org  Fri Oct 22 09:51:55 2021
From: report at bugs.python.org (Eric Pederson)
Date: Fri, 22 Oct 2021 13:51:55 +0000
Subject: [issue41592] Make _SubParsersAction public
In-Reply-To: <1597864894.48.0.159581898725.issue41592@roundup.psfhosted.org>
Message-ID: <1634910715.89.0.245393872814.issue41592@roundup.psfhosted.org>


Eric Pederson <ericacm at gmail.com> added the comment:

Yes - that was the first thing I tried and why I logged the bug.  I will log a bug with Pycharm but it still seems like the long term solution is to make _SubParsersAction public since it is used like a public object.  I thought that logging the bug here would be the start of the discussion by the argparse maintainers.  Where can I get their attention?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41592>
_______________________________________

From report at bugs.python.org  Fri Oct 22 09:54:57 2021
From: report at bugs.python.org (tongxiaoge)
Date: Fri, 22 Oct 2021 13:54:57 +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: <1634910897.11.0.806201696576.issue45572@roundup.psfhosted.org>


Change by tongxiaoge <shixuantong at huawei.com>:


----------
nosy: +vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45572>
_______________________________________

From report at bugs.python.org  Fri Oct 22 09:58:56 2021
From: report at bugs.python.org (R. David Murray)
Date: Fri, 22 Oct 2021 13:58:56 +0000
Subject: [issue45551] EmailMessage utf-8 folding error
In-Reply-To: <1634815086.56.0.391780385462.issue45551@roundup.psfhosted.org>
Message-ID: <1634911136.18.0.0575149188645.issue45551@roundup.psfhosted.org>


R. David Murray <rdmurray at bitdance.com> added the comment:

I'm pretty sure this is a duplicate report and that we worked on a fix, but I don't know if it got committed because I can't find the issue...

(To be clear, the problem here is the lack of whitespace at the start of the folded part of the header.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45551>
_______________________________________

From report at bugs.python.org  Fri Oct 22 10:00:13 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 14:00:13 +0000
Subject: [issue32170] Contrary to documentation,
 ZipFile.extract does not extract timestamps or other metadata
In-Reply-To: <1511985115.6.0.213398074469.issue32170@psf.upfronthosting.co.za>
Message-ID: <1634911213.75.0.0619479227981.issue32170@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32170>
_______________________________________

From report at bugs.python.org  Fri Oct 22 10:12:06 2021
From: report at bugs.python.org (Matias G)
Date: Fri, 22 Oct 2021 14:12:06 +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: <1634911926.98.0.13053511277.issue45555@roundup.psfhosted.org>


Matias G <guijarro at esrf.fr> added the comment:

About the reference in exception: I thought that Python 3 didn't have
the need for `sys.exc_clear()` (which has been removed), specifically
for this kind of problem.

The code I use is in fact more complex than the small snippet I posted
here to reproduce the (presumed) bug ; what I see, is that the reference
is **never** removed. The weakref cannot die.

My program is a REPL, I want exceptions to bubble up to users, so
catching it before it reaches the user layer is not so great.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45555>
_______________________________________

From report at bugs.python.org  Fri Oct 22 10:15:02 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 22 Oct 2021 14:15:02 +0000
Subject: [issue45502] Fix test_shelve and make it discoverable
In-Reply-To: <1634465757.41.0.209752823951.issue45502@roundup.psfhosted.org>
Message-ID: <1634912102.13.0.948539833099.issue45502@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset b781cc3bfce7c052728b06aad9f1a467cced289d by Serhiy Storchaka in branch 'main':
bpo-45502: Fix test_shelve (GH-29003)
https://github.com/python/cpython/commit/b781cc3bfce7c052728b06aad9f1a467cced289d


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45502>
_______________________________________

From report at bugs.python.org  Fri Oct 22 10:31:26 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Fri, 22 Oct 2021 14:31:26 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1634913086.76.0.16668880431.issue45562@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Yeah, let me fix that in another PR

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Fri Oct 22 10:34:02 2021
From: report at bugs.python.org (Ken Jin)
Date: Fri, 22 Oct 2021 14:34:02 +0000
Subject: [issue41592] Make _SubParsersAction public
In-Reply-To: <1597864894.48.0.159581898725.issue41592@roundup.psfhosted.org>
Message-ID: <1634913242.35.0.640479703765.issue41592@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

>  Where can I get their attention?

I've nosied Raymond on this bug, he should be receiving our messages.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41592>
_______________________________________

From report at bugs.python.org  Fri Oct 22 10:36:14 2021
From: report at bugs.python.org (Richard van den Berg)
Date: Fri, 22 Oct 2021 14:36:14 +0000
Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely
 DNS-based setups
In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za>
Message-ID: <1634913374.73.0.114051830726.issue5004@roundup.psfhosted.org>


Richard van den Berg <richard.security.consultant at gmail.com> added the comment:

I just ran into this 12 year old issue. Can this be merged please?

----------
nosy: +richard.security.consultant

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue5004>
_______________________________________

From report at bugs.python.org  Fri Oct 22 10:39:29 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Fri, 22 Oct 2021 14:39:29 +0000
Subject: [issue44665] asyncio.create_task() documentation should mention user
 needs to keep reference to the task
In-Reply-To: <1626588086.28.0.802457585502.issue44665@roundup.psfhosted.org>
Message-ID: <1634913569.8.0.791700083253.issue44665@roundup.psfhosted.org>


Change by Joannah Nanjekye <nanjekyejoannah at gmail.com>:


----------
keywords: +patch
nosy: +nanjekyejoannah
nosy_count: 2.0 -> 3.0
pull_requests: +27437
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29163

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44665>
_______________________________________

From report at bugs.python.org  Fri Oct 22 10:40:58 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Fri, 22 Oct 2021 14:40:58 +0000
Subject: [issue44665] asyncio.create_task() documentation should mention user
 needs to keep reference to the task
In-Reply-To: <1626588086.28.0.802457585502.issue44665@roundup.psfhosted.org>
Message-ID: <1634913658.89.0.992549012616.issue44665@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

@bernat and ncoghlan, please see if the wording I have used in the linked PR helps to clarify this.

----------
stage: patch review -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44665>
_______________________________________

From report at bugs.python.org  Fri Oct 22 10:42:14 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Fri, 22 Oct 2021 14:42:14 +0000
Subject: [issue42538] AsyncIO strange behaviour
In-Reply-To: <1606911447.68.0.828780901691.issue42538@roundup.psfhosted.org>
Message-ID: <1634913734.44.0.676941163145.issue42538@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

I opened a documentation PR agreeing with @ncoghlan, that adds this behavior. See https://bugs.python.org/issue44665

----------
nosy: +nanjekyejoannah

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42538>
_______________________________________

From report at bugs.python.org  Fri Oct 22 10:42:50 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Fri, 22 Oct 2021 14:42:50 +0000
Subject: [issue42538] AsyncIO strange behaviour
In-Reply-To: <1606911447.68.0.828780901691.issue42538@roundup.psfhosted.org>
Message-ID: <1634913770.37.0.449709362914.issue42538@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

I meant, "that describes the behaviour"

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42538>
_______________________________________

From report at bugs.python.org  Fri Oct 22 10:46:38 2021
From: report at bugs.python.org (Alex Waygood)
Date: Fri, 22 Oct 2021 14:46:38 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
In-Reply-To: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org>
Message-ID: <1634913998.03.0.322190096546.issue45524@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
nosy: +gvanrossum, kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Fri Oct 22 10:52:17 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Fri, 22 Oct 2021 14:52:17 +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: <1634914337.11.0.542228961027.issue45555@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

I concur, this is not a bug. The contract of the weakref is that the callback will be triggered when the object is destroyed, but here the object is not destroyed because is owned by the frame in the traceback.

As Mark correctly mentions, the object should die when the try/except/finally ends.

I am not sure if it makes sense to document this because this does not really relate to weak reference, but why an object is alive. This is by far not the only weird way that can keep the object alive and maintain the behaviour so I don't know if it makes sense to document this because there are many many other confusing scenarios.

For now, I am marking this as "not a bug" but keeping it open in case we want to improve the docs.

----------
resolution:  -> not a bug

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45555>
_______________________________________

From report at bugs.python.org  Fri Oct 22 11:01:34 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 15:01:34 +0000
Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely
 DNS-based setups
In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za>
Message-ID: <1634914894.48.0.640061746578.issue5004@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Could you or somebody else please create a PR with patch and a test case?

----------
versions: +Python 3.11 -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue5004>
_______________________________________

From report at bugs.python.org  Fri Oct 22 11:22:43 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 15:22:43 +0000
Subject: [issue45573] Use pkg-config autoconf macros to detect flags for
 Modules/Setup
Message-ID: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org>


New submission from Christian Heimes <lists at cheimes.de>:

pkg-config [1] is a standard tool on Linux and other platforms to detect presence of dependencies as well as to figure out which compiler and linker flags they require. Development packages provide a .pc file, e.g. ncurses provides a ncursesw.pc file.

$ pkg-config --libs --cflags ncursesw
-D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -lncursesw -ltinfo

I propose to use a modified version of pkg-config's PKG_HAVE_DEFINE_WITH_MODULES macro in our configure script. On succss the modified macro defines:

* HAVE_FOO=1
* FOO_CFLAGS="some compile flags"
* FOO_LIBS="some library flags for linker"

On error, it sets nothing and does not cause configure to stop with an error.

The macro also allows users to override flags by setting FOO_CFLAGS and FOO_LIBS env vars. HAVE_FOO is added to pyconfig.h. The FOO_CFLAGS/LIBS are added to Makefile, from where it can be consumed by Modules/Setup.

Eventually Python could use the flags in setup.py, too. For now I would like to start with Modules/Setup. It is only used by some power users and has less risk of breaking the setup of beginners.

[1] https://www.freedesktop.org/wiki/Software/pkg-config/

----------
assignee: christian.heimes
components: Build
messages: 404781
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: Use pkg-config autoconf macros to detect flags for Modules/Setup
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45573>
_______________________________________

From report at bugs.python.org  Fri Oct 22 11:25:30 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 15:25:30 +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: <1634916330.15.0.619161173676.issue45573@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
keywords: +patch
pull_requests: +27438
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29164

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45573>
_______________________________________

From report at bugs.python.org  Fri Oct 22 11:27:20 2021
From: report at bugs.python.org (Chris Meyer)
Date: Fri, 22 Oct 2021 15:27:20 +0000
Subject: [issue44665] asyncio.create_task() documentation should mention user
 needs to keep reference to the task
In-Reply-To: <1626588086.28.0.802457585502.issue44665@roundup.psfhosted.org>
Message-ID: <1634916440.05.0.78428054426.issue44665@roundup.psfhosted.org>


Chris Meyer <cmeyer1969 at gmail.com> added the comment:

Is there a way to reproduce this issue? I run the following code in Python 3.9 and it works as expected (prints "xyz" twice).

import asyncio
import gc

async def xyz():
    print("xyz")

event_loop = asyncio.get_event_loop()

event_loop.create_task(xyz())

t = event_loop.create_task(xyz())
del t

gc.collect()

event_loop.stop()
event_loop.run_forever()

----------
nosy: +cmeyer

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44665>
_______________________________________

From report at bugs.python.org  Fri Oct 22 11:28:16 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 15:28:16 +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: <1634916496.84.0.0902321956782.issue45573@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

I added some whitespace to Modules/Setup. All lines starting with ``#([a-z_])`` compile cleanly on Fedora 34 with all dependencies available. dbm, tkinter, and sqlite are missing or untested.


$ sed -E -i 's/^#([a-z_])/\1/g' Modules/Setup
$ make
...
The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc               _asyncio           _bisect         
_blake2            _bz2               _codecs_cn      
_codecs_hk         _codecs_iso2022    _codecs_jp      
_codecs_kr         _codecs_tw         _contextvars    
_crypt             _csv               _curses         
_curses_panel      _datetime          _elementtree    
_hashlib           _heapq             _json           
_lsprof            _lzma              _md5            
_multibytecodec    _opcode            _pickle         
_posixsubprocess   _queue             _random         
_sha1              _sha256            _sha3           
_sha512            _socket            _ssl            
_statistics        _struct            _testbuffer     
_testimportmultiple   _testinternalcapi   _testmultiphase 
_typing            _xxsubinterpreters   _xxtestfuzz     
_zoneinfo          array              audioop         
binascii           cmath              fcntl           
grp                math               mmap            
nis                ossaudiodev        pwd             
pyexpat            readline           resource        
select             spwd               syslog          
termios            time               unicodedata     
xxlimited          xxlimited_35       zlib   

$  ./python -c "import sys; print(sys.builtin_module_names)"
('_abc', '_ast', '_asyncio', '_bisect', '_blake2', '_bz2', '_codecs', '_codecs_cn', '_codecs_hk', '_codecs_iso2022', '_codecs_jp', '_codecs_kr', '_codecs_tw', '_collections', '_contextvars', '_crypt', '_csv', '_curses', '_curses_panel', '_datetime', '_elementtree', '_functools', '_hashlib', '_heapq', '_imp', '_io', '_json', '_locale', '_lsprof', '_lzma', '_md5', '_multibytecodec', '_opcode', '_operator', '_pickle', '_posixsubprocess', '_queue', '_random', '_sha1', '_sha256', '_sha3', '_sha512', '_signal', '_socket', '_sre', '_ssl', '_stat', '_statistics', '_string', '_struct', '_symtable', '_testbuffer', '_testimportmultiple', '_testinternalcapi', '_testmultiphase', '_thread', '_tokenize', '_tracemalloc', '_typing', '_warnings', '_weakref', '_xxsubinterpreters', '_xxtestfuzz', '_zoneinfo', 'array', 'atexit', 'audioop', 'binascii', 'builtins', 'cmath', 'errno', 'faulthandler', 'fcntl', 'gc', 'grp', 'itertools', 'marshal', 'math', 'mmap', 'nis', 'ossaudiodev', 'posix', 'pwd', 'pyexpat', 'readline', 'resource', 'select', 'spwd', 'sys', 'syslog', 'termios', 'time', 'unicodedata', 'xx', 'xxlimited', 'xxlimited_35', 'xxsubtype', 'zlib')
$ ldd python
        linux-vdso.so.1 (0x00007fffa1f40000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6032fe2000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f6032fdb000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00007f6032fd6000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f6032e92000)
        libcrypt.so.2 => /lib64/libcrypt.so.2 (0x00007f6032e58000)
        libnsl.so.2 => /lib64/libnsl.so.2 (0x00007f6032e3c000)
        libtirpc.so.3 => /lib64/libtirpc.so.3 (0x00007f6032e0a000)
        libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f6032df7000)
        liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f6032dcb000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f6032db1000)
        libreadline.so.8 => /lib64/libreadline.so.8 (0x00007f6032d59000)
        libssl.so.1.1 => /lib64/libssl.so.1.1 (0x00007f6032cbc000)
        libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x00007f60329cc000)
        libncursesw.so.6 => /lib64/libncursesw.so.6 (0x00007f603298d000)
        libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007f603295e000)
        libpanel.so.6 => /lib64/libpanel.so.6 (0x00007f6032958000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f6032789000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f6033029000)
        libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f6032732000)
        libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f6032652000)
        libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f603263a000)
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f6032633000)
        libncurses.so.6 => /lib64/libncurses.so.6 (0x00007f6032606000)
        libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f60325f5000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f60325ec000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f60325d2000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f60325a6000)
        libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007f603250f000)

----------
nosy: +brett.cannon, twouters

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45573>
_______________________________________

From report at bugs.python.org  Fri Oct 22 11:30:03 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 15:30: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: <1634916602.99.0.798881787053.issue45573@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

$ find build/lib.linux-x86_64-3.11/ -name '*.so' | sort
build/lib.linux-x86_64-3.11/_ctypes.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_ctypes_test.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_dbm.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_decimal.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_gdbm.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_multiprocessing.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_posixshmem.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_sqlite3.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_testcapi.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_tkinter.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_uuid.cpython-311-x86_64-linux-gnu.so

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45573>
_______________________________________

From report at bugs.python.org  Fri Oct 22 11:40:25 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 15:40:25 +0000
Subject: [issue19460] Add test for MIMENonMultipart
In-Reply-To: <1383235171.21.0.576245026541.issue19460@psf.upfronthosting.co.za>
Message-ID: <1634917225.83.0.739915946611.issue19460@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

The patch needs to be converted to a GitHub PR.

----------
keywords: +easy -patch
nosy: +iritkatriel
versions: +Python 3.11 -Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19460>
_______________________________________

From report at bugs.python.org  Fri Oct 22 11:42:43 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 22 Oct 2021 15:42:43 +0000
Subject: =?utf-8?b?W2lzc3VlNDU1NzRdIFdhcm5pbmc6IOKAmHByaW50X2VzY2FwZeKAmSBkZWZp?=
 =?utf-8?q?ned_but_not_used?=
Message-ID: <1634917363.52.0.444019325273.issue45574@roundup.psfhosted.org>


New submission from Nikita Sobolev <mail at sobolevn.me>:

Recently, GitHub started to show a new warning:

> Check warning on line 999 in Parser/tokenizer.c
> GitHub Actions / Address sanitizer
> Parser/tokenizer.c#L999
> ?print_escape? defined but not used [-Wunused-function]

Link: https://github.com/python/cpython/pull/29158/files#file-parser-tokenizer-c-L999

I guess this happens because `print_escape` is only used when `Py_DEBUG` is set:

```
#if defined(Py_DEBUG)
        if (Py_DebugFlag) {
            printf("line[%d] = ", tok->lineno);
            print_escape(stdout, tok->cur, tok->inp - tok->cur);
            printf("  tok->done = %d\n", tok->done);
        }
#endif
```

Will this be a proper fix? Or do we need it for some other reason?

```
#if defined(Py_DEBUG)
static void
print_escape(FILE *f, const char *s, Py_ssize_t size)
// ...
# endif
```

If it's fine, I will send a PR :)

----------
messages: 404786
nosy: sobolevn
priority: normal
severity: normal
status: open
title: Warning: ?print_escape? defined but not used

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45574>
_______________________________________

From report at bugs.python.org  Fri Oct 22 11:50:32 2021
From: report at bugs.python.org (Ned Deily)
Date: Fri, 22 Oct 2021 15:50:32 +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: <1634917832.59.0.984313291684.issue45573@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
nosy: +ned.deily

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45573>
_______________________________________

From report at bugs.python.org  Fri Oct 22 12:15:50 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Fri, 22 Oct 2021 16:15:50 +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: <1634919350.36.0.0696127072038.issue45113@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

> Why is not PEP 630 enough?

My understanding is that this entire class of code changes has been put on hold pending Steering Council approval.  It represents a great deal of code churn and creation on new APIs.  Several of the patches had had negative performance impacts and AFAICT all of the patches have made the code more complicated and harder to maintain.  Several that I looked at had no tests at all, so there was no discernible or provabler user benefit.  Also the code being affected is typically some of our most stable code that hasn't had to be changed in over a decade.  IIRC one or more of the patches created new bugs, were destabilizing, or altered the APIs in subtle ways.

Please get explicit approval from the SC before continuing to sweep through the code base, creating heap types everywhere.  Given that some essential third party modules are not going down this path, it is unlikely that general users would ever see any benefit.

----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Fri Oct 22 12:20:28 2021
From: report at bugs.python.org (Mark Shannon)
Date: Fri, 22 Oct 2021 16:20:28 +0000
Subject: [issue45575] Use a more principled approach to freelists
Message-ID: <1634919628.65.0.571286636454.issue45575@roundup.psfhosted.org>


New submission from Mark Shannon <mark at hotpy.org>:

We have multiple freelists for performance, but they are adhoc and poorly integrated with the underlying allocator.

Improving this should give us a decent speedup.

----------
assignee: Mark.Shannon
components: Interpreter Core
messages: 404788
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Use a more principled approach to freelists
type: performance
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45575>
_______________________________________

From report at bugs.python.org  Fri Oct 22 12:21:16 2021
From: report at bugs.python.org (Mark Shannon)
Date: Fri, 22 Oct 2021 16:21:16 +0000
Subject: [issue45575] Use a more principled approach to freelists
In-Reply-To: <1634919628.65.0.571286636454.issue45575@roundup.psfhosted.org>
Message-ID: <1634919676.1.0.210436418047.issue45575@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
keywords: +patch
pull_requests: +27439
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29165

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45575>
_______________________________________

From report at bugs.python.org  Fri Oct 22 12:28:39 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 16:28:39 +0000
Subject: [issue45570] Simplify setup macros for pyexpat and _elementtree
In-Reply-To: <1634906423.38.0.044839571581.issue45570@roundup.psfhosted.org>
Message-ID: <1634920119.62.0.275282717656.issue45570@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45570>
_______________________________________

From report at bugs.python.org  Fri Oct 22 12:28:26 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 16:28:26 +0000
Subject: [issue45570] Simplify setup macros for pyexpat and _elementtree
In-Reply-To: <1634906423.38.0.044839571581.issue45570@roundup.psfhosted.org>
Message-ID: <1634920106.59.0.826385897047.issue45570@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset ec93721e0066c4cbe40085188a9bf0952aa935ef by Christian Heimes in branch 'main':
bpo-45570: Simplify setup macros for pyexpat (GH-29159)
https://github.com/python/cpython/commit/ec93721e0066c4cbe40085188a9bf0952aa935ef


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45570>
_______________________________________

From report at bugs.python.org  Fri Oct 22 12:31:34 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 16:31:34 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1634920294.08.0.16343618181.issue45548@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

I added several missing module definitions in https://github.com/python/cpython/pull/29164

math/cmath conflict when _math.c is included twice.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Fri Oct 22 12:33:10 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 16:33:10 +0000
Subject: [issue20937] test_socket: buffer overflow in sock_recvmsg_guts
In-Reply-To: <1394903226.57.0.732764988148.issue20937@psf.upfronthosting.co.za>
Message-ID: <1634920390.08.0.865882758212.issue20937@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20937>
_______________________________________

From report at bugs.python.org  Fri Oct 22 12:33:50 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 16:33:50 +0000
Subject: [issue20937] test_socket: buffer overflow in sock_recvmsg_guts
In-Reply-To: <1394903226.57.0.732764988148.issue20937@psf.upfronthosting.co.za>
Message-ID: <1634920430.45.0.672745198099.issue20937@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Please create a new issue if you're still seeing this on 3.9+.

----------
nosy: +iritkatriel

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20937>
_______________________________________

From report at bugs.python.org  Fri Oct 22 12:40:33 2021
From: report at bugs.python.org (Luis Franca)
Date: Fri, 22 Oct 2021 16:40:33 +0000
Subject: [issue45576] Cannot import modules from Zip64 files
Message-ID: <1634920833.59.0.789504609207.issue45576@roundup.psfhosted.org>


New submission from Luis Franca <lfamorim at gmail.com>:

I've tried to import a module from a fat jar file and got a ModuleNotFoundError: No module named ... error.

I checked that the jar file had more than 65k files and was created using Zip64. When I unzip the file, Python is capable of importing the modules.

I was able to reproduce the error on a simple project, such as:

simplePackage/
  __init__.py
  a/
    __init__.py
    moduleA.py

where

- I'm using Python 3.9.4
- __init__.py files are empty
- moduleA.py only has a printA() function

I ran the following tests:

1. When importing from the folder, it works

python
>>> import sys
>>> sys.path.append('C:\\Users\\...\\simplePackage')
>>> from a.moduleA import printA
>>> printA()
I'm module a

2. When zipping the folder, it works

python
>>> import sys
>>> sys.path.append('C:\\Users\\...\\simplePackage.zip')
>>> from a.moduleA import printA
>>> printA()
I'm module a

3. When forcing to zip with Zip64 it doesn't work

On linux: zip -fzr simple64Package.zip .

python
>>> import sys
>>> sys.path.append('C:\\Users\\...\\simple64Package.zip')
>>> from a.moduleA import printA
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'a'

Is this an expected behavior? Am I missing something?

Thanks!

----------
components: Library (Lib)
messages: 404792
nosy: lfamorim
priority: normal
severity: normal
status: open
title: Cannot import modules from Zip64 files
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45576>
_______________________________________

From report at bugs.python.org  Fri Oct 22 12:42:30 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 22 Oct 2021 16:42:30 +0000
Subject: [issue45577] Make `test_zoneinfo.py` to check all pickle protocols
Message-ID: <1634920950.64.0.966445570701.issue45577@roundup.psfhosted.org>


New submission from Nikita Sobolev <mail at sobolevn.me>:

Right now it only uses a default one.

Examples:
- `3.9`: https://github.com/python/cpython/blob/aa8c3446c085175e65e736b0d2e32719c00004d2/Lib/test/test_zoneinfo/test_zoneinfo.py#L1407
- `3.10`: https://github.com/python/cpython/blob/ae78ffdc9399802621eabcd1668e44a91ec5f45e/Lib/test/test_zoneinfo/test_zoneinfo.py#L1407
- `main`: https://github.com/python/cpython/blob/ec93721e0066c4cbe40085188a9bf0952aa935ef/Lib/test/test_zoneinfo/test_zoneinfo.py#L1405

PR is on its way!

----------
components: Tests
messages: 404793
nosy: sobolevn
priority: normal
severity: normal
status: open
title: Make `test_zoneinfo.py` to check all pickle protocols
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45577>
_______________________________________

From report at bugs.python.org  Fri Oct 22 12:45:19 2021
From: report at bugs.python.org (Tim Peters)
Date: Fri, 22 Oct 2021 16:45:19 +0000
Subject: [issue45569] Drop support for 15-bit PyLong digits?
In-Reply-To: <1634898107.47.0.88725686674.issue45569@roundup.psfhosted.org>
Message-ID: <1634921119.82.0.807110759959.issue45569@roundup.psfhosted.org>


Tim Peters <tim at python.org> added the comment:

+1 "in theory". But I too don't know whether any platforms would be adversely affected, or how to find out :-(

----------
nosy: +tim.peters

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45569>
_______________________________________

From report at bugs.python.org  Fri Oct 22 12:45:48 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 22 Oct 2021 16:45:48 +0000
Subject: [issue45577] Make `test_zoneinfo.py` to check all pickle protocols
In-Reply-To: <1634920950.64.0.966445570701.issue45577@roundup.psfhosted.org>
Message-ID: <1634921148.66.0.411743813229.issue45577@roundup.psfhosted.org>


Change by Nikita Sobolev <mail at sobolevn.me>:


----------
keywords: +patch
pull_requests: +27440
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29167

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45577>
_______________________________________

From report at bugs.python.org  Fri Oct 22 12:58:50 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Fri, 22 Oct 2021 16:58:50 +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: <1634921930.2.0.317489790551.issue45113@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

> My understanding is that this entire class of code changes has been put on hold pending Steering Council approval.

Can you please point me to the official SC statement regarding this? I cannot find it.

> It represents a great deal of code churn and creation on new APIs.

You cannot implement [the accepted] PEP 630 without a little bit of code churn ;) Luckily, (most of) the APIs needed are defined in PEP 573 (also accepted, now in final state).

> Several of the patches had had negative performance impacts [...]

Can you provide a list of the patches/bpo's with still unresolved performance impacts?

> [...] all of the patches have made the code more complicated and harder to maintain

I have not seen other complaints about this? Can you provide a link to a bpo or a Discourse topic? If you find the new APIs hard to use or understand, we can of course improve the documentation and the dev guide :)

> Several that I looked at had no tests at all [...]

Actually, we've added tests to heap types with Py_TPFLAGS_IMMUTABLE_TYPE and Py_TPFLAGS_DISALLOW_INSTANTIATION. Apart from that; if a type lives on the stack or on the heap should be transparent for the user, right? The existing test suite will help verify exactly that.

> [...] so there was no discernible or provabler user benefit.

The benefits are described in PEP 630 ;)

> IIRC one or more of the patches created new bugs, were destabilizing, or altered the APIs in subtle ways.

There has been cases with ref-leaks, but that happens from time to time in all types of PRs, not just heap type PRs. Those have all been caught and fixed, thanks to reviewers and ref-leak-bots.

I'm not sure what you mean with 'destabilizing'? Can you point to a specific example or issue?

Regarding APIs, there was a long discussion about immutability and disallowing instantiation during the 3.10 beta period. Those issues were fixed and unblocked.

> Please get explicit approval from the SC before continuing to sweep through the code base, creating heap types everywhere.

Strictly speaking, the fact that PEP 630 is accepted and active _is_ an explicit approval. It has not been withdrawn or rejected.

> Given that some essential third party modules are not going down this path [...]

Which ones? Can you provide a link?

> [...] it is unlikely that general users would ever see any benefit.

The benefits are explained in PEP 630. It is a well written PEP; I suggest you re-read it :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Fri Oct 22 13:12:49 2021
From: report at bugs.python.org (Richard van den Berg)
Date: Fri, 22 Oct 2021 17:12:49 +0000
Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely
 DNS-based setups
In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za>
Message-ID: <1634922769.68.0.636952436041.issue5004@roundup.psfhosted.org>


Richard van den Berg <richard.security.consultant at gmail.com> added the comment:

Here is the updated patch. Is python5004-test.c enough as a test case?

----------
Added file: https://bugs.python.org/file50390/python2.7-socket-getfqdn.patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue5004>
_______________________________________

From report at bugs.python.org  Fri Oct 22 13:14:44 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 17:14:44 +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: <1634922884.62.0.261090430227.issue22678@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Shall we conclude from 7 years of no activity that there isn't much interest in this exception?

----------
nosy: +iritkatriel
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22678>
_______________________________________

From report at bugs.python.org  Fri Oct 22 13:22:23 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Fri, 22 Oct 2021 17:22:23 +0000
Subject: [issue39838] Possible unnecessary redifinition of _POSIX_C_SOURCE
In-Reply-To: <1583259164.39.0.686980300564.issue39838@roundup.psfhosted.org>
Message-ID: <1634923343.37.0.323594718954.issue39838@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

Closing this, someone else can reopen if they see the same.

----------
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39838>
_______________________________________

From report at bugs.python.org  Fri Oct 22 13:24:17 2021
From: report at bugs.python.org (Richard)
Date: Fri, 22 Oct 2021 17:24:17 +0000
Subject: [issue45487] SSLEOFError regression with certain servers in Python
 3.10
In-Reply-To: <1634312468.77.0.966089091529.issue45487@roundup.psfhosted.org>
Message-ID: <1634923457.3.0.959517604035.issue45487@roundup.psfhosted.org>


Richard <nyuszika7h at gmail.com> added the comment:

Never mind, I found the root cause after some debugging. Adding AES256-GCM-SHA384 to the cipher string resolved the issue.

And now I see that the release notes say this:

> The ssl module now has more secure default settings. Ciphers without forward secrecy or SHA-1 MAC are disabled by default. Security level 2 prohibits weak RSA, DH, and ECC keys with less than 112 bits of security. SSLContext defaults to minimum protocol version TLS 1.2. Settings are based on Hynek Schlawack?s research. (Contributed by Christian Heimes in bpo-43998.)

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45487>
_______________________________________

From report at bugs.python.org  Fri Oct 22 13:26:36 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Fri, 22 Oct 2021 17:26:36 +0000
Subject: [issue45563] inspect.getframeinfo() doesn't handle frames without
 lineno
In-Reply-To: <1634853732.41.0.89193081236.issue45563@roundup.psfhosted.org>
Message-ID: <1634923596.05.0.377168490522.issue45563@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

Update: I've been trying hard to find a short version which triggers the issue, but so far it seems to only trigger when using exec() from a frozen Python module.

There don't appear to be many ways frame->f_lineno can end up being -1 (which then gets translated into None in Python). _PyCode_CheckLineNumber() is one source I found.

Any hints where to look for the cause of this weird effect ?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45563>
_______________________________________

From report at bugs.python.org  Fri Oct 22 13:29:16 2021
From: report at bugs.python.org (STINNER Victor)
Date: Fri, 22 Oct 2021 17:29:16 +0000
Subject: [issue24666] Buffered I/O does not take file position into account
 when reading blocks
In-Reply-To: <1437282046.06.0.196054163473.issue24666@psf.upfronthosting.co.za>
Message-ID: <1634923756.13.0.356948365531.issue24666@roundup.psfhosted.org>


STINNER Victor <vstinner at python.org> added the comment:

Hi, the io module doesn't use the block size of the filesystem. io.BufferedReader uses a default buffer size of 8 * 1024 bytes. I don't think that it's really important to respect the block size in Python. There are buffers at many levels. io.BufferedReader is a buffer in user space, but there is also a buffer in the kernel. I'm not sure how relevant is to use know that a "disk sector" is 4096 bytes, when most people use SSDs which use way larger SSD blocks (ex: 512 KB). It's hard to say what's real block size. The disk firmware can lie (pretend it's 4 KiB) or the kernel can lie. The disk firmware can emulate different "block sizes".

If you write a database, maybe you would like to start caring about that, but you may want to use direct I/O (O_DIRECT) flag for that.

In short, Python works as expect, it's efficient and you should not worry about that ;-)

----------
nosy: +vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24666>
_______________________________________

From report at bugs.python.org  Fri Oct 22 13:30:57 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 17:30:57 +0000
Subject: [issue24666] Buffered I/O does not take file position into account
 when reading blocks
In-Reply-To: <1437282046.06.0.196054163473.issue24666@psf.upfronthosting.co.za>
Message-ID: <1634923857.03.0.424345608402.issue24666@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24666>
_______________________________________

From report at bugs.python.org  Fri Oct 22 13:35:34 2021
From: report at bugs.python.org (Mark Shannon)
Date: Fri, 22 Oct 2021 17:35:34 +0000
Subject: [issue45563] inspect.getframeinfo() doesn't handle frames without
 lineno
In-Reply-To: <1634853732.41.0.89193081236.issue45563@roundup.psfhosted.org>
Message-ID: <1634924134.8.0.554258481152.issue45563@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:

If I knew where to look, I would be looking myself :)

Is the frozen module one built into CPython or one you have generated?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45563>
_______________________________________

From report at bugs.python.org  Fri Oct 22 13:41:02 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Fri, 22 Oct 2021 17:41:02 +0000
Subject: [issue24151] test_pydoc fails
In-Reply-To: <1431200812.83.0.50914922757.issue24151@psf.upfronthosting.co.za>
Message-ID: <1634924462.93.0.52624225532.issue24151@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

I wonder if this is worth keeping open, since it's old and no one has reproduced it. I propose closing or OP to share environment details.

----------
nosy: +nanjekyejoannah

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24151>
_______________________________________

From report at bugs.python.org  Fri Oct 22 14:03:12 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 18:03:12 +0000
Subject: [issue45571] Modules/makesetup uses wrong CFLAGS for *shared*
In-Reply-To: <1634908914.03.0.439923093863.issue45571@roundup.psfhosted.org>
Message-ID: <1634925792.02.0.529855065582.issue45571@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27442
pull_request: https://github.com/python/cpython/pull/29169

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45571>
_______________________________________

From report at bugs.python.org  Fri Oct 22 14:03:07 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 18:03:07 +0000
Subject: [issue45571] Modules/makesetup uses wrong CFLAGS for *shared*
In-Reply-To: <1634908914.03.0.439923093863.issue45571@roundup.psfhosted.org>
Message-ID: <1634925787.94.0.896223286234.issue45571@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:


New changeset f6e8b80d20159596cf641305bad3a833bedd2f4f by Christian Heimes in branch 'main':
bpo-45571: use PY_CFLAGS_NODIST for shared Modules/Setup (GH-29161)
https://github.com/python/cpython/commit/f6e8b80d20159596cf641305bad3a833bedd2f4f


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45571>
_______________________________________

From report at bugs.python.org  Fri Oct 22 14:03:06 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 18:03:06 +0000
Subject: [issue45571] Modules/makesetup uses wrong CFLAGS for *shared*
In-Reply-To: <1634908914.03.0.439923093863.issue45571@roundup.psfhosted.org>
Message-ID: <1634925786.58.0.437406668684.issue45571@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +27441
pull_request: https://github.com/python/cpython/pull/29168

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45571>
_______________________________________

From report at bugs.python.org  Fri Oct 22 14:10:02 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 18:10:02 +0000
Subject: [issue41222] POpen bufsize=0 ignored with universal_newlines=True
In-Reply-To: <1594065242.21.0.841046846995.issue41222@roundup.psfhosted.org>
Message-ID: <1634926202.07.0.988213937064.issue41222@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
nosy: +pitrou

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41222>
_______________________________________

From report at bugs.python.org  Fri Oct 22 14:15:58 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Fri, 22 Oct 2021 18:15:58 +0000
Subject: [issue45578] Missing tests for he dis module
Message-ID: <1634926558.7.0.911953252083.issue45578@roundup.psfhosted.org>


New submission from Joannah Nanjekye <nanjekyejoannah at gmail.com>:

I don't see any tests for the following:

dis.distb
dis.findlabels

They are documented, I wonder if it was intentional.

dis.findlabels is also not dicumented.

----------
components: Tests
messages: 404805
nosy: nanjekyejoannah
priority: normal
severity: normal
status: open
title: Missing tests for he dis module
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45578>
_______________________________________

From report at bugs.python.org  Fri Oct 22 14:16:15 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Fri, 22 Oct 2021 18:16:15 +0000
Subject: [issue45578] Missing tests for the dis module
In-Reply-To: <1634926558.7.0.911953252083.issue45578@roundup.psfhosted.org>
Message-ID: <1634926575.33.0.916435528676.issue45578@roundup.psfhosted.org>


Change by Joannah Nanjekye <nanjekyejoannah at gmail.com>:


----------
title: Missing tests for he dis module -> Missing tests for the dis module

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45578>
_______________________________________

From report at bugs.python.org  Fri Oct 22 14:16:24 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 18:16:24 +0000
Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely
 DNS-based setups
In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za>
Message-ID: <1634926584.2.0.84192540172.issue5004@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

We no longer accept patches. Contributors have to create a PR on GitHub, so we can record contributions and verify the contributor license agreement.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue5004>
_______________________________________

From report at bugs.python.org  Fri Oct 22 14:22:20 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 18:22:20 +0000
Subject: [issue45571] Modules/makesetup uses wrong CFLAGS for *shared*
In-Reply-To: <1634908914.03.0.439923093863.issue45571@roundup.psfhosted.org>
Message-ID: <1634926940.64.0.000955487282487.issue45571@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 19903085c3ad7a17c8047e1556c700f2eb109931 by Miss Islington (bot) in branch '3.10':
bpo-45571: use PY_CFLAGS_NODIST for shared Modules/Setup (GH-29161)
https://github.com/python/cpython/commit/19903085c3ad7a17c8047e1556c700f2eb109931


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45571>
_______________________________________

From report at bugs.python.org  Fri Oct 22 14:28:40 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Fri, 22 Oct 2021 18:28:40 +0000
Subject: [issue45563] inspect.getframeinfo() doesn't handle frames without
 lineno
In-Reply-To: <1634853732.41.0.89193081236.issue45563@roundup.psfhosted.org>
Message-ID: <1634927320.67.0.781955167006.issue45563@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

I see this in modules frozen by the Tools/freeze/ tool.

The line numbers shown for such frozen modules in the frameinfo stack are a bit off as well, compared normal Python. Could this be an indication that there's something not working quite right, which then leads to _PyCode_CheckLineNumber() returning -1 ?

The Tools/freeze/ doesn't do anything special, BTW. All it does is load the module and then store the marshal'ed code objects in C arrays. The information read from those C arrays should be the same as what Python reads from PYC files.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45563>
_______________________________________

From report at bugs.python.org  Fri Oct 22 14:29:32 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Fri, 22 Oct 2021 18:29:32 +0000
Subject: [issue45578] Missing tests for the dis module
In-Reply-To: <1634926558.7.0.911953252083.issue45578@roundup.psfhosted.org>
Message-ID: <1634927372.24.0.249136532022.issue45578@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

maybe the latter is not a public function.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45578>
_______________________________________

From report at bugs.python.org  Fri Oct 22 14:30:18 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Fri, 22 Oct 2021 18:30:18 +0000
Subject: [issue45578] Missing tests for the dis module
In-Reply-To: <1634926558.7.0.911953252083.issue45578@roundup.psfhosted.org>
Message-ID: <1634927418.81.0.353836087261.issue45578@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

It looks like it actually

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45578>
_______________________________________

From report at bugs.python.org  Fri Oct 22 14:30:01 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 18:30:01 +0000
Subject: [issue45571] Modules/makesetup uses wrong CFLAGS for *shared*
In-Reply-To: <1634908914.03.0.439923093863.issue45571@roundup.psfhosted.org>
Message-ID: <1634927401.45.0.406871490805.issue45571@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 269bf56e3d352c415ec38f93017ba8e291ddb18a by Miss Islington (bot) in branch '3.9':
bpo-45571: use PY_CFLAGS_NODIST for shared Modules/Setup (GH-29161)
https://github.com/python/cpython/commit/269bf56e3d352c415ec38f93017ba8e291ddb18a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45571>
_______________________________________

From report at bugs.python.org  Fri Oct 22 14:48:53 2021
From: report at bugs.python.org (Sergei Lebedev)
Date: Fri, 22 Oct 2021 18:48:53 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
In-Reply-To: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org>
Message-ID: <1634928533.16.0.152039380843.issue45524@roundup.psfhosted.org>


Sergei Lebedev <slebedev at google.com> added the comment:

Is it worth also addressing the case where a @dataclass/typing.TypeDict class is defined within a function?

```                                                                                                  
from __future__ import annotations

import typing
from dataclasses import dataclass


def make_A():
  import collections

  @dataclass
  class A:
    x: collections.defaultdict

  return A


A = make_A()

@dataclass
class B(A):
  y: int

# NameError: name 'collections' is not defined
print(typing.get_type_hints(B.__init__))
```

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Fri Oct 22 14:55:25 2021
From: report at bugs.python.org (TL)
Date: Fri, 22 Oct 2021 18:55:25 +0000
Subject: [issue45579] [list.append(i) for i in list] causes high resources
 usage
Message-ID: <1634928925.4.0.945346089321.issue45579@roundup.psfhosted.org>


New submission from TL <tls.tuxla at gmail.com>:

Version:
Python 3.10.0 - Windows 11 (22000.258) x64
Python 3.9.7 - Windows 11, Manjaro Linux 21.1.5 - Kernel 5.13.13-1-MANJARO x64
CPU: 8 ? Intel? Core? i5-8300H CPU @ 2.30GHz

Steps to reproduce:
1. Create any list, for example your_list = [1, 2, 3]
2. Execute [your_list.append(i) for i in your_list]

----------
components: Interpreter Core
messages: 404813
nosy: txlbr
priority: normal
severity: normal
status: open
title: [list.append(i) for i in list] causes high resources usage
type: resource usage
versions: Python 3.10, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45579>
_______________________________________

From report at bugs.python.org  Fri Oct 22 15:00:14 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 19:00:14 +0000
Subject: [issue40210] ttk.Combobox focus-out event inheritage
In-Reply-To: <1586204301.95.0.352088098712.issue40210@roundup.psfhosted.org>
Message-ID: <1634929214.27.0.471126214405.issue40210@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Closing as there is not enough information to understand the issue and there was not response to followup questions.

----------
nosy: +iritkatriel
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40210>
_______________________________________

From report at bugs.python.org  Fri Oct 22 15:06:17 2021
From: report at bugs.python.org (Ned Deily)
Date: Fri, 22 Oct 2021 19:06:17 +0000
Subject: [issue24151] test_pydoc fails
In-Reply-To: <1431200812.83.0.50914922757.issue24151@psf.upfronthosting.co.za>
Message-ID: <1634929577.17.0.338162322779.issue24151@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24151>
_______________________________________

From report at bugs.python.org  Fri Oct 22 15:07:56 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 19:07:56 +0000
Subject: [issue34958] urllib.error.HTTPError.fp is not closed when error is
 finalized on Windows
In-Reply-To: <1539265749.67.0.788709270274.issue34958@psf.upfronthosting.co.za>
Message-ID: <1634929676.8.0.532954586723.issue34958@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34958>
_______________________________________

From report at bugs.python.org  Fri Oct 22 15:12:54 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 19:12:54 +0000
Subject: [issue45571] Modules/makesetup uses wrong CFLAGS for *shared*
In-Reply-To: <1634908914.03.0.439923093863.issue45571@roundup.psfhosted.org>
Message-ID: <1634929974.18.0.969394471367.issue45571@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45571>
_______________________________________

From report at bugs.python.org  Fri Oct 22 15:31:31 2021
From: report at bugs.python.org (AbcSxyZ)
Date: Fri, 22 Oct 2021 19:31:31 +0000
Subject: [issue45580] argparse.ArgumentParser.add_mutually_exclusive_group :
 metavar create parenthesis undefined behavior
Message-ID: <1634931090.99.0.410236903356.issue45580@roundup.psfhosted.org>


New submission from AbcSxyZ <rossi.sim at outlook.com>:

Hi,

I'm getting a kind of undefined behavior where parenthesis seem handled in a strange way. On display, it has a conflict between parenthesis of the option, and nested parenthesis within a metavar.

##?Reproduction script

```
import argparse

def main():
    parser = argparse.ArgumentParser()

    group = parser.add_mutually_exclusive_group(required=True)

    group.add_argument("-p", "--path", metavar="/var/www/html", 
            help="DocumentRoot path")
    group.add_argument("-r", "--reverse", metavar="http)s(://Host:Port",
            help="Reverse proxy address")

    parser.add_argument("--last-args")
    return parser.parse_args()

main()
```

##?Output of help menu
```
usage: crash.py [-h] (-p /var/www/html | -r http)s://Host:Port [--last-args LAST_ARGS]
```

## Expected behavior
```
usage: crash.py [-h] (-p /var/www/html | -r http)s(://Host:Port) [--last-args LAST_ARGS]
```

----------
components: Parser
messages: 404815
nosy: AbcSxyZ, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: argparse.ArgumentParser.add_mutually_exclusive_group : metavar create parenthesis undefined behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45580>
_______________________________________

From report at bugs.python.org  Fri Oct 22 15:39:51 2021
From: report at bugs.python.org (Brett Cannon)
Date: Fri, 22 Oct 2021 19:39:51 +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: <1634931591.16.0.502844725337.issue45250@roundup.psfhosted.org>


Change by Brett Cannon <brett at python.org>:


----------
keywords: +patch
pull_requests: +27443
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29170

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45250>
_______________________________________

From report at bugs.python.org  Fri Oct 22 15:41:28 2021
From: report at bugs.python.org (Brett Cannon)
Date: Fri, 22 Oct 2021 19:41:28 +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: <1634931688.03.0.414180512346.issue45250@roundup.psfhosted.org>


Brett Cannon <brett at python.org> added the comment:

> One thing I would strongly suggest for consistent terminology: Make "iterator" mean an object that has both "__next()__" and "__iter()__".

The point of this issue, though, is to not make that claim as it's inaccurate.

----------
stage: patch review -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45250>
_______________________________________

From report at bugs.python.org  Fri Oct 22 15:42:19 2021
From: report at bugs.python.org (Brett Cannon)
Date: Fri, 22 Oct 2021 19:42:19 +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: <1634931739.95.0.784158911741.issue45250@roundup.psfhosted.org>


Brett Cannon <brett at python.org> added the comment:

I also need to leave a comment on https://github.com/python/typeshed/issues/6030 if/when this is fixed.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45250>
_______________________________________

From report at bugs.python.org  Fri Oct 22 15:42:51 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Fri, 22 Oct 2021 19:42:51 +0000
Subject: [issue45581] [sqlite3] raise MemoryError if sqlite3_open_v2() returns
 SQLITE_NOMEM
Message-ID: <1634931771.8.0.677146859676.issue45581@roundup.psfhosted.org>


New submission from Erlend E. Aasland <erlend.aasland at innova.no>:

Currently, we call _pysqlite_seterror() if sqlite3_open_v2() returns != SQLITE_OK. However, if a memory failure occurs during sqlite3_open_v2(), the database handle is explicitly set to NULL. This _may_ cause _pysqlite_seterror() to segfault, since we pass it a NULL db pointer, because behaviour is undefined if we pass sqlite3_errmsg() a NULL pointer.


See also:
- https://sqlite.org/c3ref/open.html

----------
assignee: erlendaasland
components: Extension Modules
messages: 404818
nosy: erlendaasland, serhiy.storchaka
priority: normal
severity: normal
status: open
title: [sqlite3] raise MemoryError if sqlite3_open_v2() returns SQLITE_NOMEM
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45581>
_______________________________________

From report at bugs.python.org  Fri Oct 22 15:53:37 2021
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Fri, 22 Oct 2021 19:53:37 +0000
Subject: [issue45518] Invalid example for typing
In-Reply-To: <1634595219.24.0.159671466805.issue45518@roundup.psfhosted.org>
Message-ID: <1634932417.58.0.882373118255.issue45518@roundup.psfhosted.org>


Change by ?ric Araujo <merwok at netwok.org>:


----------
resolution:  -> not a bug
status: open -> pending
type: compile error -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45518>
_______________________________________

From report at bugs.python.org  Fri Oct 22 15:55:15 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Fri, 22 Oct 2021 19:55:15 +0000
Subject: [issue45581] [sqlite3] raise MemoryError if sqlite3_open_v2() returns
 SQLITE_NOMEM
In-Reply-To: <1634931771.8.0.677146859676.issue45581@roundup.psfhosted.org>
Message-ID: <1634932515.28.0.0747684517529.issue45581@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
keywords: +patch
pull_requests: +27444
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29171

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45581>
_______________________________________

From report at bugs.python.org  Fri Oct 22 15:57:34 2021
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Fri, 22 Oct 2021 19:57:34 +0000
Subject: [issue45531] field "mro" behaves strangely in dataclass
In-Reply-To: <1634685944.1.0.123359424978.issue45531@roundup.psfhosted.org>
Message-ID: <1634932654.52.0.282809628962.issue45531@roundup.psfhosted.org>


?ric Araujo <merwok at netwok.org> added the comment:

If dataclasses wanted to allow fields named `mro`, it could replace its call to `cls.mro()` with `type.mro(cls)`.  But I don?t know if there is a strong use case for such a field.

----------
nosy: +eric.araujo

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45531>
_______________________________________

From report at bugs.python.org  Fri Oct 22 16:09:13 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 22 Oct 2021 20:09:13 +0000
Subject: =?utf-8?b?W2lzc3VlNDU1NzRdIFdhcm5pbmc6IOKAmHByaW50X2VzY2FwZeKAmSBkZWZp?=
 =?utf-8?q?ned_but_not_used?=
In-Reply-To: <1634917363.52.0.444019325273.issue45574@roundup.psfhosted.org>
Message-ID: <1634933353.87.0.715871132752.issue45574@roundup.psfhosted.org>


Change by Nikita Sobolev <mail at sobolevn.me>:


----------
keywords: +patch
pull_requests: +27445
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29172

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45574>
_______________________________________

From report at bugs.python.org  Fri Oct 22 16:19:18 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 22 Oct 2021 20:19:18 +0000
Subject: =?utf-8?b?W2lzc3VlNDU1NzRdIFdhcm5pbmc6IOKAmHByaW50X2VzY2FwZeKAmSBkZWZp?=
 =?utf-8?q?ned_but_not_used?=
In-Reply-To: <1634917363.52.0.444019325273.issue45574@roundup.psfhosted.org>
Message-ID: <1634933958.59.0.88466246483.issue45574@roundup.psfhosted.org>


Change by Nikita Sobolev <mail at sobolevn.me>:


----------
components: +Parser
nosy: +lys.nikolaou, pablogsal
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45574>
_______________________________________

From report at bugs.python.org  Fri Oct 22 16:24:28 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Fri, 22 Oct 2021 20:24:28 +0000
Subject: [issue41682] [Windows] test_asyncio: Proactor
 test_sendfile_close_peer_in_the_middle_of_receiving failure
In-Reply-To: <1598923449.65.0.107960415995.issue41682@roundup.psfhosted.org>
Message-ID: <1634934268.58.0.270467765638.issue41682@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

New failure today: https://github.com/python/cpython/runs/3979900415?check_suite_focus=true


test_sendfile_close_peer_in_the_middle_of_receiving (test.test_asyncio.test_sendfile.SelectEventLoopTests) ... ok

======================================================================
FAIL: test_sendfile_close_peer_in_the_middle_of_receiving (test.test_asyncio.test_sendfile.ProactorEventLoopTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\cpython\cpython\lib\test\test_asyncio\test_sendfile.py", line 457, in test_sendfile_close_peer_in_the_middle_of_receiving
    with self.assertRaises(ConnectionError):
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: ConnectionError not raised

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41682>
_______________________________________

From report at bugs.python.org  Fri Oct 22 16:27:35 2021
From: report at bugs.python.org (Stefan Pochmann)
Date: Fri, 22 Oct 2021 20:27:35 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634934455.04.0.877462139535.issue45530@roundup.psfhosted.org>


Stefan Pochmann <stefan.pochmann at gmail.com> added the comment:

> It's not surprising the 2nd positions are rarely equal _given_ that the universe has been reduced to the 100 tuples with the same first element.

Yes, exactly.

> In any case, I don't see the point to this exercise ;-)

Just to illustrate why I disagree with what I responded to there. I'm not convinced that many matches at the first tuple position are really an indication that there'll be many matches at the second position as well, so that one should "admit defeat" and that it's "arrogance" to hope for only few matches at the second position. I'd wager it's rather typical that the matching rate at the second position is significantly lower. If you sort people by last and then first name, I think you'd get the same effect as with my above random example, for the same reason. If you sort a set of 2D coordinates, you'll even *never* get matches at the second position. Even with that SO question's data and its massive duplication (especially at the second position) *and* its correlation between first and second position (since both "sorted(x)" and "x[::2]" are derived from the same x) and its 43% matching rate at the first position, there's still only 27% matching rate at the second position (lower than the 1/3 break-even point).

> BTW, don't overlook that tuple_elem_compare can _only_ be used on the very first elements of the tuples.

Yes, that's why I only talked about PyObject_RichCompareBool there.

> > 1) Sort the list only by first position (comparing with only
> >    one tuple_elem_compare).

> Not sure what that means, exactly. (the "with only one tuple_elem_compare" part;

Just wanted to make clear it wouldn't used two tuple_elem_compare or a PyObject_RichCompareBool.

> > 2) Identify equal-first-position-runs (with tuple_elem_compare)
> > and sort each run independently (comparing only positions 1+).

> What are you aiming at? There was no motivation given here.

Much fewer comparisons, especially PyObject_RichCompareBool comparisons. For example for sorting a million pairs with first/second element chosen from a population of 100,000, I get these numbers of comparisons (per element):

            current  groupsort
------------------------------
== first     18.60      none        (PyObject_RichCompareBool)
 < first     16.19     19.60        (tuple_elem_compare)
== second     2.41      2.36        (PyObject_RichCompareBool)
 < second     2.41      2.36        (PyObject_RichCompareBool)
------------------------------
total slow   23.42      4.72        (PyObject_RichCompareBool)
total fast   16.19     19.60        (tuple_elem_compare)
------------------------------
total        39.61     24.32

(With "current" I mean before your optimizations, which I can't test yet.)

> Will, this issue report is about unsafe_tuple_compare(), so, ya, if the changes you envision aren't limited to that, I'd say you want to open a different issue report and a different PR :-)

Ok, I might try that.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Fri Oct 22 16:30:56 2021
From: report at bugs.python.org (Alex Waygood)
Date: Fri, 22 Oct 2021 20:30:56 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
In-Reply-To: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org>
Message-ID: <1634934656.72.0.15520509128.issue45524@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

@Sergei, I believe that's a much larger issue, and one that's quite difficult to solve. It's one of the principal reasons why `from __future__ import annotations` behaviour wasn't made the default in Python 3.10, as was originally the plan. (This behaviour doesn't play nicely with libraries such as pydantic that analyse annotations at runtime.) I think it's probably beyond the scope of this BPO issue :)

https://mail.python.org/archives/list/python-dev at python.org/thread/CLVXXPQ2T2LQ5MP2Y53VVQFCXYWQJHKZ/

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Fri Oct 22 16:38:46 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 22 Oct 2021 20:38:46 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
In-Reply-To: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org>
Message-ID: <1634935126.02.0.391401722336.issue45524@roundup.psfhosted.org>


Nikita Sobolev <mail at sobolevn.me> added the comment:

I completelly agree that the exable above is out of scope. Because it requires `locals()` to be modified. While this issue is focused on `globals()`.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Fri Oct 22 16:50:03 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 22 Oct 2021 20:50:03 +0000
Subject: [issue45531] field "mro" behaves strangely in dataclass
In-Reply-To: <1634685944.1.0.123359424978.issue45531@roundup.psfhosted.org>
Message-ID: <1634935803.52.0.332072861859.issue45531@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Where does dataclasses call mro()?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45531>
_______________________________________

From report at bugs.python.org  Fri Oct 22 16:57:23 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Fri, 22 Oct 2021 20:57:23 +0000
Subject: [issue45516] Add protocol description to the Traversable and
 TraversableResources documentation
In-Reply-To: <1634597903.13.0.806758851296.issue45516@roundup.psfhosted.org>
Message-ID: <1634936243.44.0.885667485379.issue45516@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
pull_requests: +27446
pull_request: https://github.com/python/cpython/pull/29173

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45516>
_______________________________________

From report at bugs.python.org  Fri Oct 22 17:02:51 2021
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Fri, 22 Oct 2021 21:02:51 +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: <1634936571.7.0.921598675758.issue40051@roundup.psfhosted.org>


?ric Araujo <merwok at netwok.org> added the comment:

Option 3 seems simple and ok to me.

----------
nosy: +eric.araujo

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40051>
_______________________________________

From report at bugs.python.org  Fri Oct 22 17:03:26 2021
From: report at bugs.python.org (Richard van den Berg)
Date: Fri, 22 Oct 2021 21:03:26 +0000
Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely
 DNS-based setups
In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za>
Message-ID: <1634936606.73.0.965213260693.issue5004@roundup.psfhosted.org>


Richard van den Berg <richard.security.consultant at gmail.com> added the comment:

In that case Stijn Hope should create the PR since he wrote the patch. Anyone else could get in trouble for using his code without proper permission.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue5004>
_______________________________________

From report at bugs.python.org  Fri Oct 22 17:11:54 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Fri, 22 Oct 2021 21:11:54 +0000
Subject: [issue45516] Add protocol description to the Traversable and
 TraversableResources documentation
In-Reply-To: <1634597903.13.0.806758851296.issue45516@roundup.psfhosted.org>
Message-ID: <1634937114.63.0.675136077688.issue45516@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
pull_requests: +27447
pull_request: https://github.com/python/cpython/pull/29174

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45516>
_______________________________________

From report at bugs.python.org  Fri Oct 22 17:18:59 2021
From: report at bugs.python.org (Vincent Bernat)
Date: Fri, 22 Oct 2021 21:18:59 +0000
Subject: [issue44665] asyncio.create_task() documentation should mention user
 needs to keep reference to the task
In-Reply-To: <1626588086.28.0.802457585502.issue44665@roundup.psfhosted.org>
Message-ID: <1634937539.73.0.63917284028.issue44665@roundup.psfhosted.org>


Vincent Bernat <python at vincent.bernat.ch> added the comment:

Hummm, I have a hard time finding a short example when `__del__` is not called until the task is finished. Sorry. I did run into this several time, for example here: https://github.com/ldo/dbussy/pull/45 (and some internal projects as well). So, it happens from time to time, but it is hard to find a simple reproducer.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44665>
_______________________________________

From report at bugs.python.org  Fri Oct 22 17:22:46 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Fri, 22 Oct 2021 21:22:46 +0000
Subject: [issue45305] Incorrect record of call_args_list when using multiple
 side_effect in mock.patch
In-Reply-To: <1632778088.54.0.273231089693.issue45305@roundup.psfhosted.org>
Message-ID: <1634937766.25.0.510015181726.issue45305@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Dave: what seems to happen here is that mock correctly reporting to you that the object you passed to the mocked func is currently `{}`. What you probably expected it to be is to be equal to what it was at exact time when it was passed, i.e. before it was modified inside the method.

That's a reasonable expectation but it means it would have to be deepcopied, which could be expensive for large structures.

Do you think that noting this nuance in the docs for call_list_args would have helped you debug it in this case?

----------
nosy: +andrei.avk

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45305>
_______________________________________

From report at bugs.python.org  Fri Oct 22 17:22:58 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Fri, 22 Oct 2021 21:22:58 +0000
Subject: [issue45305] Incorrect record of call_args_list when using multiple
 side_effect in mock.patch
In-Reply-To: <1632778088.54.0.273231089693.issue45305@roundup.psfhosted.org>
Message-ID: <1634937778.68.0.0470631881844.issue45305@roundup.psfhosted.org>


Change by Andrei Kulakov <andrei.avk at gmail.com>:


----------
nosy: +kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45305>
_______________________________________

From report at bugs.python.org  Fri Oct 22 17:24:18 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 21:24:18 +0000
Subject: [issue30570] issubclass segfaults on objects with weird __getattr__
In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za>
Message-ID: <1634937858.58.0.42958088848.issue30570@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 10.0 -> 11.0
pull_requests: +27448
pull_request: https://github.com/python/cpython/pull/29175

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30570>
_______________________________________

From report at bugs.python.org  Fri Oct 22 17:24:16 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Fri, 22 Oct 2021 21: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: <1634937856.95.0.00991134764643.issue30570@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:


New changeset 423fa1c1817abfa8c3d1bc308ddbbd8f28b69d68 by Dennis Sweeney in branch 'main':
bpo-30570: Use Py_EnterRecursiveCall() in issubclass() (GH-29048)
https://github.com/python/cpython/commit/423fa1c1817abfa8c3d1bc308ddbbd8f28b69d68


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30570>
_______________________________________

From report at bugs.python.org  Fri Oct 22 17:40:15 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Fri, 22 Oct 2021 21:40:15 +0000
Subject: [issue45563] inspect.getframeinfo() doesn't handle frames without
 lineno
In-Reply-To: <1634853732.41.0.89193081236.issue45563@roundup.psfhosted.org>
Message-ID: <1634938815.62.0.2630884023.issue45563@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

I've looked at how the importlib freeze logic works, compared to Tools/freeze/freeze.py.

The only difference I can spot is that importlib uses C to build the C array and does a compile followed by a marshal.dumps, whereas freeze.py loads all modules into memory and then runs marshal on module.__code__.

Could this cause issues with the line number calculations in 3.10 ?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45563>
_______________________________________

From report at bugs.python.org  Fri Oct 22 17:47:03 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 21:47:03 +0000
Subject: [issue30570] issubclass segfaults on objects with weird __getattr__
In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za>
Message-ID: <1634939223.79.0.0145373472836.issue30570@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset f812fef2f8f12441ce559335645433c8124e7db5 by Miss Islington (bot) in branch '3.10':
bpo-30570: Use Py_EnterRecursiveCall() in issubclass() (GH-29048)
https://github.com/python/cpython/commit/f812fef2f8f12441ce559335645433c8124e7db5


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30570>
_______________________________________

From report at bugs.python.org  Fri Oct 22 17:57:00 2021
From: report at bugs.python.org (Tim Golden)
Date: Fri, 22 Oct 2021 21:57:00 +0000
Subject: [issue14170] print unicode string error in win8 cmd console
In-Reply-To: <1330659811.63.0.966664432837.issue14170@psf.upfronthosting.co.za>
Message-ID: <1634939820.78.0.358720843522.issue14170@roundup.psfhosted.org>


Tim Golden <mail at timgolden.me.uk> added the comment:

Closing this as out-of-date. The original bug was reported against 2.7 and Win8, both of which are either end-of-life now.

No follow up in 9 years and I'm quite certain that modern Pythons handle all manner of Unicode chars on the console.

----------
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue14170>
_______________________________________

From report at bugs.python.org  Fri Oct 22 17:57:32 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 21:57:32 +0000
Subject: =?utf-8?b?W2lzc3VlNDU1NzRdIFdhcm5pbmc6IOKAmHByaW50X2VzY2FwZeKAmSBkZWZp?=
 =?utf-8?q?ned_but_not_used?=
In-Reply-To: <1634917363.52.0.444019325273.issue45574@roundup.psfhosted.org>
Message-ID: <1634939852.25.0.0984190477264.issue45574@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 4bc5473a42c5eae0928430930b897209492e849d by Nikita Sobolev in branch 'main':
bpo-45574: fix warning about `print_escape` being unused (GH-29172)
https://github.com/python/cpython/commit/4bc5473a42c5eae0928430930b897209492e849d


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45574>
_______________________________________

From report at bugs.python.org  Fri Oct 22 17:57:49 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 21:57:49 +0000
Subject: =?utf-8?b?W2lzc3VlNDU1NzRdIFdhcm5pbmc6IOKAmHByaW50X2VzY2FwZeKAmSBkZWZp?=
 =?utf-8?q?ned_but_not_used?=
In-Reply-To: <1634917363.52.0.444019325273.issue45574@roundup.psfhosted.org>
Message-ID: <1634939869.27.0.0111346692495.issue45574@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27449
pull_request: https://github.com/python/cpython/pull/29176

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45574>
_______________________________________

From report at bugs.python.org  Fri Oct 22 18:02:53 2021
From: report at bugs.python.org (Spencer Brown)
Date: Fri, 22 Oct 2021 22:02:53 +0000
Subject: [issue45579] [list.append(i) for i in list] causes high resources
 usage
In-Reply-To: <1634928925.4.0.945346089321.issue45579@roundup.psfhosted.org>
Message-ID: <1634940173.18.0.49371161675.issue45579@roundup.psfhosted.org>


Spencer Brown <spencerb21 at live.com> added the comment:

This is intentional behaviour, you actually created an infinite loop. When you iterate over a list, all Python does is track the current index through the list internally, incrementing it each time. But each iteration, you call list.append() to add a new item to the end of the list, so you're continually making it longer and preventing the iteration from ending.

Regardless of that, this probably isn't a good use of list comprehensions anyway - append() always returns None, so the result of this comprehension would be a useless list of Nones. It'd be better to just use a regular for loop, or if you're just wanting to copy the list call list.copy() or list(your_list).

----------
nosy: +Spencer Brown

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45579>
_______________________________________

From report at bugs.python.org  Fri Oct 22 18:18:28 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Fri, 22 Oct 2021 22:18:28 +0000
Subject: [issue45563] inspect.getframeinfo() doesn't handle frames without
 lineno
In-Reply-To: <1634853732.41.0.89193081236.issue45563@roundup.psfhosted.org>
Message-ID: <1634941108.27.0.924142588122.issue45563@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

Turns out this was a bug in the freeze.py script I was using. I had added a bug work-around for the modulefinder module and even though it should work as advertised, it seems to be missing some code object attributes when recreating the objects which fixed file paths.

The stdlib version uses the .replace() method which was added in Python 3.8 and that appears to work better.

Is it possible that code objects now have some extra attributes in 3.10 which aren't exposed ? E.g. things placed into ce_extras ?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45563>
_______________________________________

From report at bugs.python.org  Fri Oct 22 18:18:54 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Fri, 22 Oct 2021 22:18:54 +0000
Subject: [issue45563] inspect.getframeinfo() doesn't handle frames without
 lineno
In-Reply-To: <1634853732.41.0.89193081236.issue45563@roundup.psfhosted.org>
Message-ID: <1634941134.18.0.578804899576.issue45563@roundup.psfhosted.org>


Change by Marc-Andre Lemburg <mal at egenix.com>:


----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45563>
_______________________________________

From report at bugs.python.org  Fri Oct 22 18:20:31 2021
From: report at bugs.python.org (Brett Cannon)
Date: Fri, 22 Oct 2021 22:20:31 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1634941231.66.0.159574683508.issue45548@roundup.psfhosted.org>


Change by Brett Cannon <brett at python.org>:


----------
pull_requests: +27450
pull_request: https://github.com/python/cpython/pull/29177

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Fri Oct 22 18:49:31 2021
From: report at bugs.python.org (Sourish Basu)
Date: Fri, 22 Oct 2021 22:49:31 +0000
Subject: [issue45477] configure script cannot detect float word ordering on
 linux
In-Reply-To: <1634246393.25.0.871269149475.issue45477@roundup.psfhosted.org>
Message-ID: <1634942971.56.0.521223969493.issue45477@roundup.psfhosted.org>


Sourish Basu <sourish.basu at gmail.com> added the comment:

By enabling and disabling optimization flags one by one, I figured out it was '-ipo' (inter-procedural optimization) that was the problem. Without that flag, 'configure' is successful. However, now I have a 'make' error:

./Programs/_testembed.c(1774): error: "__builtin_types_compatible_p" is only allowed in C
          config_set_argv(&config, Py_ARRAY_LENGTH(argv), argv);
                                   ^

compilation aborted for ./Programs/_testembed.c (code 2)
make[3]: *** [Programs/_testembed.o] Error 2

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45477>
_______________________________________

From report at bugs.python.org  Fri Oct 22 19:05:47 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 22 Oct 2021 23:05:47 +0000
Subject: [issue30570] issubclass segfaults on objects with weird __getattr__
In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za>
Message-ID: <1634943947.95.0.0718832795566.issue30570@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27451
pull_request: https://github.com/python/cpython/pull/29178

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30570>
_______________________________________

From report at bugs.python.org  Fri Oct 22 19:13:50 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 23:13:50 +0000
Subject: [issue45292] Implement PEP 654: Exception Groups
In-Reply-To: <1632667049.99.0.614000687095.issue45292@roundup.psfhosted.org>
Message-ID: <1634944430.61.0.147782487015.issue45292@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:


New changeset f30ad65dbf3c6b1b5eec14dc954d65ef32327857 by Irit Katriel in branch 'main':
bpo-45292: [PEP 654] add the ExceptionGroup and BaseExceptionGroup classes (GH-28569)
https://github.com/python/cpython/commit/f30ad65dbf3c6b1b5eec14dc954d65ef32327857


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45292>
_______________________________________

From report at bugs.python.org  Fri Oct 22 19:20:11 2021
From: report at bugs.python.org (Eric Snow)
Date: Fri, 22 Oct 2021 23:20:11 +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: <1634944811.03.0.189745777174.issue45506@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:


New changeset 17c61045c51512add61a9e75e9c7343cf4e4fb82 by Eric Snow in branch 'main':
bpo-45506: Normalize _PyPathConfig.stdlib_dir when calculated. (#29040)
https://github.com/python/cpython/commit/17c61045c51512add61a9e75e9c7343cf4e4fb82


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Fri Oct 22 19:23:14 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Fri, 22 Oct 2021 23:23:14 +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: <1634944994.32.0.631822609329.issue45506@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

i'm considering this fixed based on my testing.  we still lack buildbots using out of tree setup.  i'll ponder that.  But this issue need not track that infrastructure.

----------
assignee:  -> eric.snow
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Fri Oct 22 19:26:24 2021
From: report at bugs.python.org (Dave McNulla)
Date: Fri, 22 Oct 2021 23:26:24 +0000
Subject: [issue45305] Incorrect record of call_args_list when using multiple
 side_effect in mock.patch
In-Reply-To: <1632778088.54.0.273231089693.issue45305@roundup.psfhosted.org>
Message-ID: <1634945184.37.0.29705664348.issue45305@roundup.psfhosted.org>


Dave McNulla <mcnulla at gmail.com> added the comment:

I understand. It's a thing I often forget in python that some parameters are passed by value while others are passed by reference (language for parameters I remember from C class about 30 years ago).

I do not think I would have caught that with docs, unless you start putting them in Stack Overflow! I'm only sort of kidding.

I think you can close this bug.

Thanks for the clarification,

Dave

----------
resolution:  -> not a bug

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45305>
_______________________________________

From report at bugs.python.org  Fri Oct 22 19:26:55 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 22 Oct 2021 23:26:55 +0000
Subject: [issue45582] Rewrite getpath.c in Python
Message-ID: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org>


New submission from Steve Dower <steve.dower at python.org>:

As discussed in issue42260, combining the two getpath implementations into a single Python implementation would make it more maintainable and modifiable (particularly where distros need to patch to support alternative layouts).

----------
assignee: steve.dower
components: Interpreter Core
messages: 404841
nosy: eric.snow, ncoghlan, steve.dower, vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: Rewrite getpath.c in Python
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45582>
_______________________________________

From report at bugs.python.org  Fri Oct 22 19:27:07 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 22 Oct 2021 23:27:07 +0000
Subject: [issue45582] Rewrite getpath.c in Python
In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org>
Message-ID: <1634945227.49.0.732175334567.issue45582@roundup.psfhosted.org>


Change by Steve Dower <steve.dower at python.org>:


----------
keywords: +patch
pull_requests: +27452
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29041

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45582>
_______________________________________

From report at bugs.python.org  Fri Oct 22 19:27:39 2021
From: report at bugs.python.org (Eric Snow)
Date: Fri, 22 Oct 2021 23:27:39 +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: <1634945259.63.0.818262630018.issue45506@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

Thanks for bringing this up, Greg!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Fri Oct 22 19:33:55 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 22 Oct 2021 23:33:55 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1634945635.29.0.582024628091.issue45548@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
pull_requests: +27453
pull_request: https://github.com/python/cpython/pull/29179

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Fri Oct 22 19:34:33 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 22 Oct 2021 23:34:33 +0000
Subject: [issue45582] Rewrite getpath.c in Python
In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org>
Message-ID: <1634945673.07.0.143319252894.issue45582@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

The PR has more work to do, but the overall layout/changes are more or less there, so happy to discuss feedback/etc.

Obviously there are a lot of edge cases here, but they seem to be mostly tested already. And I think we're early enough in alpha to find any major issues (or absorb any necessary minor changes - seems like trailing slashes might change on some paths).

There are also some changes/hacks into the new frozen module support, so that I can freeze getpath.py without turning it into a module. I really just want to execute the bytecode - no reason for any of its contents to stick around - and this works out pretty neatly. But if the changes to frozen modules seem off then maybe we can split it into totally separate freezing support?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45582>
_______________________________________

From report at bugs.python.org  Fri Oct 22 19:37:40 2021
From: report at bugs.python.org (Irit Katriel)
Date: Fri, 22 Oct 2021 23:37:40 +0000
Subject: [issue16889] facilitate log output starting at beginning of line
In-Reply-To: <1357610284.86.0.286455325565.issue16889@psf.upfronthosting.co.za>
Message-ID: <1634945860.93.0.347921446901.issue16889@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11.

----------
nosy: +iritkatriel
versions: +Python 3.11 -Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue16889>
_______________________________________

From report at bugs.python.org  Fri Oct 22 19:39:10 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Fri, 22 Oct 2021 23:39:10 +0000
Subject: [issue45379] Improve errors related to frozen modules.
In-Reply-To: <1633449120.03.0.98563217148.issue45379@roundup.psfhosted.org>
Message-ID: <1634945950.56.0.204365672455.issue45379@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

I was looking at the code and it seems PyImport_ImportFrozenModuleObject does not set an error on FROZEN_BAD_NAME, it just returns 0, is this intended? If I pass a bogus object, it will just return 0.
This does not seem right.

Currently, FROZEN_BAD_NAME is never passed to set_frozen_error.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45379>
_______________________________________

From report at bugs.python.org  Fri Oct 22 19:56:51 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Fri, 22 Oct 2021 23:56:51 +0000
Subject: [issue45531] field "mro" behaves strangely in dataclass
In-Reply-To: <1634685944.1.0.123359424978.issue45531@roundup.psfhosted.org>
Message-ID: <1634947011.18.0.0685696345504.issue45531@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

The problem is that dataclasses is looking for a default value for a field by looking at getattr(cls, fieldname), which returns a value when fieldname is "mro".

I think the best thing to do, at least for now, is prohibit a field named "mro".

Ultimately I'd like to see cls.mro go away (maybe being replaced by a builtin), but I realize that's not likely to happen.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45531>
_______________________________________

From report at bugs.python.org  Fri Oct 22 19:56:41 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Fri, 22 Oct 2021 23:56:41 +0000
Subject: [issue45379] Improve errors related to frozen modules.
In-Reply-To: <1633449120.03.0.98563217148.issue45379@roundup.psfhosted.org>
Message-ID: <1634947001.97.0.640490549208.issue45379@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
keywords: +patch
pull_requests: +27454
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29180

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45379>
_______________________________________

From report at bugs.python.org  Fri Oct 22 20:00:39 2021
From: report at bugs.python.org (Brett Cannon)
Date: Sat, 23 Oct 2021 00:00:39 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1634947239.9.0.315982400535.issue45548@roundup.psfhosted.org>


Change by Brett Cannon <brett at python.org>:


----------
pull_requests: +27455
pull_request: https://github.com/python/cpython/pull/29181

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Fri Oct 22 20:11:39 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Sat, 23 Oct 2021 00:11:39 +0000
Subject: [issue45566] dataclasses `test_frozen_pickle` does not use all
 possible `pickle` protocols
In-Reply-To: <1634891947.06.0.600142901544.issue45566@roundup.psfhosted.org>
Message-ID: <1634947899.6.0.276883970557.issue45566@roundup.psfhosted.org>


Change by Eric V. Smith <eric at trueblade.com>:


----------
title: `test_frozen_pickle` does not use all possible `pickle` protocols -> dataclasses `test_frozen_pickle` does not use all possible `pickle` protocols

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45566>
_______________________________________

From report at bugs.python.org  Fri Oct 22 20:12:03 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Sat, 23 Oct 2021 00:12:03 +0000
Subject: =?utf-8?q?=5Bissue45566=5D_dataclasses=E2=80=99s_=60test=5Ffrozen=5Fpickl?=
 =?utf-8?q?e=60_does_not_use_all_possible_=60pickle=60_protocols?=
In-Reply-To: <1634891947.06.0.600142901544.issue45566@roundup.psfhosted.org>
Message-ID: <1634947923.69.0.322116597031.issue45566@roundup.psfhosted.org>


Change by Eric V. Smith <eric at trueblade.com>:


----------
title: dataclasses `test_frozen_pickle` does not use all possible `pickle` protocols -> dataclasses?s `test_frozen_pickle` does not use all possible `pickle` protocols

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45566>
_______________________________________

From report at bugs.python.org  Fri Oct 22 20:22:46 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Sat, 23 Oct 2021 00:22:46 +0000
Subject: [issue45305] Unexpected record of call_args_list when passing mutable
 object to mock.patch
In-Reply-To: <1632778088.54.0.273231089693.issue45305@roundup.psfhosted.org>
Message-ID: <1634948566.88.0.10753570936.issue45305@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

This issue also came up with MagicMock on stackoverflow: https://stackoverflow.com/questions/23257227/python-mock-method-call-arguments-display-the-last-state-of-a-list/23264042

Dave: glad this helped to clear it up. For the record, the arguments in Python are passed by object reference, which is not the same as by reference or by value; - it means that mutable objects can be mutated by receiving func and immutable objs cannot be mutated. In your case it was a mutable object, you mutated it, but compared it to value that it had before mutation.

I've thought if this should be cleared up in the docs, but I think in most cases it will be fairly obvious to see what happened because the tested value will differ from expected exactly in the way that the function modifies it. But if more people run into this confusion, we should consider adding a note to MagicMock, call_args, and call_args_list (and maybe some other mock attrs).

----------
stage:  -> resolved
status: open -> closed
title: Incorrect record of call_args_list when using multiple side_effect in mock.patch -> Unexpected record of call_args_list when passing mutable object to mock.patch
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45305>
_______________________________________

From report at bugs.python.org  Fri Oct 22 20:40:05 2021
From: report at bugs.python.org (Arthur Milchior)
Date: Sat, 23 Oct 2021 00:40:05 +0000
Subject: [issue45583] Documentation of int() in datamodel.rst is out of date
Message-ID: <1634949605.24.0.0641435404763.issue45583@roundup.psfhosted.org>


New submission from Arthur Milchior <arthur at milchior.fr>:

In 3.8, int() default implementation changed, using __index__() if it is available instead of __trunc__(). The file function.rst was updated accordingly, but the redundant information in datamodel.rst contained out of date information

I offer a correction in https://github.com/python/cpython/pull/29182 (but ideally it should be added back to 3.8 python documentation)

----------
assignee: docs at python
components: Documentation
messages: 404848
nosy: ArthurMilchior, docs at python
priority: normal
severity: normal
status: open
title: Documentation of int() in datamodel.rst is out of date
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45583>
_______________________________________

From report at bugs.python.org  Fri Oct 22 20:41:03 2021
From: report at bugs.python.org (Roundup Robot)
Date: Sat, 23 Oct 2021 00:41:03 +0000
Subject: [issue45583] Documentation of int() in datamodel.rst is out of date
In-Reply-To: <1634949605.24.0.0641435404763.issue45583@roundup.psfhosted.org>
Message-ID: <1634949663.57.0.802823513454.issue45583@roundup.psfhosted.org>


Change by Roundup Robot <devnull at psf.upfronthosting.co.za>:


----------
keywords: +patch
nosy: +python-dev
nosy_count: 2.0 -> 3.0
pull_requests: +27456
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29182

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45583>
_______________________________________

From report at bugs.python.org  Fri Oct 22 20:52:57 2021
From: report at bugs.python.org (Tim Peters)
Date: Sat, 23 Oct 2021 00:52:57 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634950377.79.0.552987318387.issue45530@roundup.psfhosted.org>


Tim Peters <tim at python.org> added the comment:

Stefan, thanks - I think I understand what you're driving at now.

You're (re)discovering that sorting by lexicographic ordering rules is _inherently_ suboptimal if list elements can only be compared "starting at index 0" each time. Not just tuples, but also, e.g., lists, byte arrays, and even strings. Any sequence type whose ordering derives from lexicographic generalization of its elements' ordering.

This is quite independent of whether or not CPython tries to exploit type homogeneity.

The usual(*) solution is indeed to exploit a kind of bucket sort instead, first sorting at elements' index 0 alone, saying all those elements with the same value at index 0 constitute "a bucket", and then applying the same idea to each bucket but sorting on index 1 instead. Where those in turn are partitioned into buckets equal at index 1, and those buckets are similarly each sorted on index 2. And so on, and so on.

No doubt that can be a big win, and even in the absence of the type homogeneity tricks. It's far beyond the scope of _this_ PR, though, and is really an entirely different approach.

I've thought about it at times, but it's "a real project" to do it right. In effect, it would implement an optimized generalization of the SO OP's "automagically convert multikey to multisort" wish.

Fine by me if someone pursues that, but I don't have the energy for it, nor much interest either in doing a half-hearted job of it.

I always expected that if it came up at all, it would be in the context of sorting lists of strings.  For example, consider:

    xs = ['x' * 10_000 + str(i) for i in range(1_000_000)]
    random.shuffle(xs)

Even with type homogeneity tricks, Python's sorting of the result is very far from optimal. Every single comparison starts by burning time skipping over the (at least) ten thousands equal characters at the start.

The "bucket sort" (or it could be viewed as a form of MSD radix sort) quickly discovers that all the characters at index 0 are equal, and also all those at index 1, ..., and all those at index 9999. The "real work" of sorting is then reduced to working on the (at most) 6 characters remaining.

(*) But I'm lying ;-) The actual usual solution is to use "multikey quicksort", because it's easy to code and works "in place". But it's not a stable sort. String sorting doesn't care about that, but sorting other kinds of sequences can care a lot.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Fri Oct 22 21:31:06 2021
From: report at bugs.python.org (Arthur Milchior)
Date: Sat, 23 Oct 2021 01:31:06 +0000
Subject: [issue45584] Clarifying truncating in documentation
Message-ID: <1634952666.85.0.640050968697.issue45584@roundup.psfhosted.org>


New submission from Arthur Milchior <arthur at milchior.fr>:

While floor/ceil 's documentation are very precise, `truncate` was not explained. I actually had to search online to understand the difference between `truncate` and `floor` (admittedly, once I remembered that numbers are signed, and that floating numbers actually uses a bit for negation symbol instead of two complement, it became obvious)

I assume that I won't be the only user having this trouble, especially for people whose mother tongue is not English. So I suggest adding a clarification to help make what should be obvious to most actually explicit

----------
assignee: docs at python
components: Documentation
messages: 404850
nosy: ArthurMilchior, docs at python
priority: normal
severity: normal
status: open
title: Clarifying truncating in documentation
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45584>
_______________________________________

From report at bugs.python.org  Fri Oct 22 21:33:45 2021
From: report at bugs.python.org (Roundup Robot)
Date: Sat, 23 Oct 2021 01:33:45 +0000
Subject: [issue45584] Clarifying truncating in documentation
In-Reply-To: <1634952666.85.0.640050968697.issue45584@roundup.psfhosted.org>
Message-ID: <1634952825.55.0.00781560197865.issue45584@roundup.psfhosted.org>


Change by Roundup Robot <devnull at psf.upfronthosting.co.za>:


----------
keywords: +patch
nosy: +python-dev
nosy_count: 2.0 -> 3.0
pull_requests: +27457
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29183

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45584>
_______________________________________

From report at bugs.python.org  Fri Oct 22 22:13:01 2021
From: report at bugs.python.org (swenson)
Date: Sat, 23 Oct 2021 02:13:01 +0000
Subject: [issue20749] shutil.unpack_archive(): security concerns not documented
In-Reply-To: <1393190017.96.0.0939250007559.issue20749@psf.upfronthosting.co.za>
Message-ID: <1634955181.88.0.885506798355.issue20749@roundup.psfhosted.org>


Change by swenson <swenson at swenson.io>:


----------
keywords: +patch
nosy: +swenson
nosy_count: 3.0 -> 4.0
pull_requests: +27458
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29184

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue20749>
_______________________________________

From report at bugs.python.org  Fri Oct 22 23:14:30 2021
From: report at bugs.python.org (Stefan Pochmann)
Date: Sat, 23 Oct 2021 03:14:30 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1634958870.36.0.0109685383566.issue45530@roundup.psfhosted.org>


Stefan Pochmann <stefan.pochmann at gmail.com> added the comment:

Yes, I'm more familiar with the issue in the context of strings or lists. Your example of strings like "'x' * 10_000 + str(i)" looks like something I almost certainly used before as counterexample to someone's time complexity claim :-)

I the context of multi-criteria sort I might not have thought of it before, I guess because you usually don't have many criteria. But now this made me think we can take even more advantage of the existing tuple_elem_compare.

I the context of multi-criteria sort I might not have thought of it before, I guess because you usually don't have many criteria. But now the optimized tuple_elem_compare makes me think we can take even more advantage of it.

I think those type-specific optimized comparison functions are what I left out when I previously read the sort, that's why it was new to me. I just saw you also use powersort's merge strategy now. Kinda sad, I had seen you lament that your own strategy "remains hard to grasp why it's always correct now", while I think it's rather straightforward and had considered adding a little explanation in the doc.

Bucket sort is a name I considered, but I wrote two, so named them after their implementation (groupsort first used itertools.groupby).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Sat Oct 23 01:13:00 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 23 Oct 2021 05:13:00 +0000
Subject: [issue45511] Batch-mode input() limited to 4095 characters on *NIX
In-Reply-To: <1634560324.05.0.266580517788.issue45511@roundup.psfhosted.org>
Message-ID: <1634965980.36.0.69121147776.issue45511@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
stage:  -> test needed
title: input() method limited to 4095 characters on *NIX -> Batch-mode input() limited to 4095 characters on *NIX
versions: +Python 3.11 -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45511>
_______________________________________

From report at bugs.python.org  Sat Oct 23 01:52:58 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Sat, 23 Oct 2021 05:52:58 +0000
Subject: [issue45569] Drop support for 15-bit PyLong digits?
In-Reply-To: <1634898107.47.0.88725686674.issue45569@roundup.psfhosted.org>
Message-ID: <1634968378.27.0.835202375286.issue45569@roundup.psfhosted.org>


Terry J. Reedy <tjreedy at udel.edu> added the comment:

How about: create a fake test file test/test_xintperf with test case and test method(s) that run timeit with a suite of int operations and print report.  Create 'draft' PRs for main and 3.10 (and 3.9?).  Run just this test on buildbots.  (I believe I have seen this done.)

Improvement: write script to find buildbot results and consolidate.

Is there already a template for something like this?  If not, make one.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45569>
_______________________________________

From report at bugs.python.org  Sat Oct 23 02:13:57 2021
From: report at bugs.python.org (Michael Herrmann)
Date: Sat, 23 Oct 2021 06:13:57 +0000
Subject: [issue45585] Gzipping subprocess output produces invalid .gz file
Message-ID: <1634969637.88.0.109314303688.issue45585@roundup.psfhosted.org>


New submission from Michael Herrmann <mherrmann.at at gmail.com>:

Consider the following:

import gzip
import subprocess

with gzip.open('test.gz', 'wb') as f:
    subprocess.run(['echo', 'hi'], stdout=f)

with gzip.open('test.gz', 'rb') as f:
    print(f.read())

I'd expect "hi" to appear in my console. Instead, I'm getting "OSError: Not a gzipped file (b'hi')". I am attaching test.gz.

This appears for me on Debian 10 / Python 3.7 and Debian 11 / Python 3.9. I have not yet tested on other OSs and Python versions.

The reason why I expect the above to work is that the subprocess documentation states that the stdout parameter may be "an existing file object" and that on the other hand the documentation for gzip.open(...) states that it returns a file object.

Maybe this is related to #40885?

----------
files: test.gz
messages: 404853
nosy: mherrmann.at
priority: normal
severity: normal
status: open
title: Gzipping subprocess output produces invalid .gz file
type: behavior
versions: Python 3.7, Python 3.9
Added file: https://bugs.python.org/file50391/test.gz

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45585>
_______________________________________

From report at bugs.python.org  Sat Oct 23 02:17:00 2021
From: report at bugs.python.org (Michael Herrmann)
Date: Sat, 23 Oct 2021 06:17:00 +0000
Subject: [issue40885] Cannot pipe GzipFile into subprocess
In-Reply-To: <1591405013.03.0.805954404624.issue40885@roundup.psfhosted.org>
Message-ID: <1634969820.71.0.305846479033.issue40885@roundup.psfhosted.org>


Michael Herrmann <mherrmann.at at gmail.com> added the comment:

I just encountered what seems to be the inverse problem of this issue: #45585

----------
nosy: +mherrmann.at

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40885>
_______________________________________

From report at bugs.python.org  Sat Oct 23 02:23:29 2021
From: report at bugs.python.org (Dominic Davis-Foster)
Date: Sat, 23 Oct 2021 06:23:29 +0000
Subject: [issue45391] 3.10 objects.inv classifies UnionType as data
In-Reply-To: <1633522850.1.0.516575372895.issue45391@roundup.psfhosted.org>
Message-ID: <1634970209.38.0.657318125694.issue45391@roundup.psfhosted.org>


Change by Dominic Davis-Foster <dom1310df at googlemail.com>:


----------
nosy: +dom1310df

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45391>
_______________________________________

From report at bugs.python.org  Sat Oct 23 03:14:43 2021
From: report at bugs.python.org (Tim Golden)
Date: Sat, 23 Oct 2021 07:14:43 +0000
Subject: [issue2733] mmap resize fails on anonymous memory
In-Reply-To: <1209661457.64.0.989081565875.issue2733@psf.upfronthosting.co.za>
Message-ID: <1634973283.11.0.808552673839.issue2733@roundup.psfhosted.org>


Tim Golden <mail at timgolden.me.uk> added the comment:

https://bugs.python.org/issue40915 is related
Retargetting for 3.10+

----------
assignee:  -> tim.golden
versions: +Python 3.10, Python 3.11 -Python 2.7, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2733>
_______________________________________

From report at bugs.python.org  Sat Oct 23 03:15:19 2021
From: report at bugs.python.org (Tim Golden)
Date: Sat, 23 Oct 2021 07:15:19 +0000
Subject: [issue12562] calling mmap twice fails on Windows
In-Reply-To: <1310666402.94.0.718224462838.issue12562@psf.upfronthosting.co.za>
Message-ID: <1634973319.46.0.925635841468.issue12562@roundup.psfhosted.org>


Tim Golden <mail at timgolden.me.uk> added the comment:

(switching stage to resolved because it's closed/rejected; sorry for the noise)

----------
stage:  -> resolved

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue12562>
_______________________________________

From report at bugs.python.org  Sat Oct 23 03:19:12 2021
From: report at bugs.python.org (Tim Golden)
Date: Sat, 23 Oct 2021 07:19:12 +0000
Subject: [issue40915] multiple problems with mmap.resize()  in Windows
In-Reply-To: <1591657683.26.0.992231826575.issue40915@roundup.psfhosted.org>
Message-ID: <1634973552.21.0.931303796209.issue40915@roundup.psfhosted.org>


Change by Tim Golden <mail at timgolden.me.uk>:


----------
assignee:  -> tim.golden

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40915>
_______________________________________

From report at bugs.python.org  Sat Oct 23 03:20:55 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 23 Oct 2021 07:20:55 +0000
Subject: [issue45531] field "mro" behaves strangely in dataclass
In-Reply-To: <1634685944.1.0.123359424978.issue45531@roundup.psfhosted.org>
Message-ID: <1634973655.04.0.80770101128.issue45531@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Would not be more correct to look at cls.__dict__[fieldname]?

BTW, mro() cannot be builtin, because you should be able to override it in some classes.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45531>
_______________________________________

From report at bugs.python.org  Sat Oct 23 03:27:35 2021
From: report at bugs.python.org (Martin Panter)
Date: Sat, 23 Oct 2021 07:27:35 +0000
Subject: [issue45585] Gzipping subprocess output produces invalid .gz file
In-Reply-To: <1634969637.88.0.109314303688.issue45585@roundup.psfhosted.org>
Message-ID: <1634974055.04.0.85724448451.issue45585@roundup.psfhosted.org>


Martin Panter <vadmium+py at gmail.com> added the comment:

The subprocess module only uses the file object to get a file handle by calling the "fileno" method. See Issue 19992 about documenting this. For Python to compress the output of the child process, you would need a pipe.

Gzip file objects provide the "fileno" method, but it just returns the underlying file descriptor. Data written to that file descriptor would normally already be compressed by Python and goes straight to the OS. There is also Issue 24358 opened about whether "fileno" should be implemented.

----------
nosy: +martin.panter

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45585>
_______________________________________

From report at bugs.python.org  Sat Oct 23 04:03:04 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 23 Oct 2021 08:03:04 +0000
Subject: [issue45579] [list.append(i) for i in list] causes high resources
 usage
In-Reply-To: <1634928925.4.0.945346089321.issue45579@roundup.psfhosted.org>
Message-ID: <1634976184.79.0.00520761830035.issue45579@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

It is expected behavior. Your code is equivalent to:

_result = []
for i in your_list:
    _result.append(your_list.append(i))

which is equivalent to:

_result = []
_j = 0
while _j < len(your_list):
    i = your_list[_j]
    _result.append(your_list.append(i))
    _j += 1

It is an infinite loop (because len(your_list) is increased after your_list.append(i)), and two lists grow with every iteration.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45579>
_______________________________________

From report at bugs.python.org  Sat Oct 23 04:58:24 2021
From: report at bugs.python.org (Peter Tillema)
Date: Sat, 23 Oct 2021 08:58:24 +0000
Subject: [issue45586] Use starred expressions in list indices
Message-ID: <1634979504.27.0.148840399936.issue45586@roundup.psfhosted.org>


New submission from Peter Tillema <petertillema at solcon.nl>:

It would be nice if you could starred expressions in list indices, for example this piece of code:

```
import numpy as np

a = np.array(0)
print(a[1, *[2, 3], 4])
```

----------
components: Interpreter Core
messages: 404860
nosy: PeterTillema
priority: normal
severity: normal
status: open
title: Use starred expressions in list indices
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45586>
_______________________________________

From report at bugs.python.org  Sat Oct 23 05:06:45 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sat, 23 Oct 2021 09:06:45 +0000
Subject: [issue45586] Use starred expressions in list indices
In-Reply-To: <1634979504.27.0.148840399936.issue45586@roundup.psfhosted.org>
Message-ID: <1634980005.55.0.8372187546.issue45586@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
type:  -> enhancement
versions: +Python 3.11 -Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45586>
_______________________________________

From report at bugs.python.org  Sat Oct 23 05:11:28 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Sat, 23 Oct 2021 09:11:28 +0000
Subject: [issue45563] inspect.getframeinfo() doesn't handle frames without
 lineno
In-Reply-To: <1634853732.41.0.89193081236.issue45563@roundup.psfhosted.org>
Message-ID: <1634980288.47.0.762796091678.issue45563@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

Hmm, perhaps I should reopen the ticket, even though I now found the cause.

After all, it is possible that lineno is None and inspect.getframeinfo() cannot handle it :-)

And it may be worthwhile investigating why recreation of a code object using:

            return types.CodeType(co.co_argcount,
                                  co.co_posonlyargcount,
                                  co.co_kwonlyargcount,
                                  co.co_nlocals, co.co_stacksize,
                                  co.co_flags, co.co_code, co.co_consts,
                                  co.co_names, co.co_varnames,
                                  co.co_filename, co.co_name,
                                  co.co_firstlineno, co.co_lnotab,
                                  co.co_freevars, co.co_cellvars)

does not necessarily create a valid copy of a code object co.

----------
resolution: not a bug -> 
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45563>
_______________________________________

From report at bugs.python.org  Sat Oct 23 05:38:14 2021
From: report at bugs.python.org (E. Paine)
Date: Sat, 23 Oct 2021 09:38:14 +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: <1634981894.26.0.22642893585.issue45436@roundup.psfhosted.org>


E. Paine <xepaine13 at gmail.com> added the comment:

It turns out the `test_configure_compound` change was intentional (https://core.tcl-lang.org/tk/tktview/46c2f088) and an empty string will use the value given by the style ("If set to the empty string (the default)..." https://www.tcl.tk/man/tcl/TkCmd/ttk_widget.html#M-compound).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Sat Oct 23 06:00:17 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Sat, 23 Oct 2021 10:00:17 +0000
Subject: [issue45113] [subinterpreters][C API] Add a new function to create
 PyStructSequence from Heap.
In-Reply-To: <1634921930.2.0.317489790551.issue45113@roundup.psfhosted.org>
Message-ID: <4FDB7724-5989-4CD8-B48F-8E48F901FD4E@gmail.com>


Petr Viktorin <encukou at gmail.com> added the comment:

Pep 640 is Informational, and per PEP 1:

Informational PEPs do not necessarily represent a Python community consensus or recommendation, so users and implementers are free to ignore Informational PEPs or follow their advice.

(Will reply more tomorrow, I'm on my phone now)
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Sat Oct 23 06:14:42 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sat, 23 Oct 2021 10:14:42 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1634984082.95.0.140283853244.issue45548@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

I ran into another problem. In shared mode, Modules/Setup places the shared modules in ./Modules/ instead of the build directory ./build/lib.something/. The ./Modules/ directory is not on sys.path. getpath.c only adds the build dir to sys.path. It takes the value from ./pybuilddir.txt. The file is generated by sysconfig.py.

$ make
...
*** WARNING: renaming "_asyncio" since importing it failed: No module named 'math'

The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc                  cmath                 math               
pwd                   time    

$ find -name 'math*.so'
./Modules/math.cpython-311-x86_64-linux-gnu.so

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Sat Oct 23 06:22:24 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Sat, 23 Oct 2021 10:22:24 +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: <1634984544.12.0.53888851149.issue45113@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

Thanks, Petr. Yes, that is correct. PEP 630 (I assume you meant 630, not 640) still describes the _rationale_ very well. I guess what's needed is a Standards Track PEP based on PEP 630 (IIUC).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Sat Oct 23 07:00:18 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Sat, 23 Oct 2021 11:00:18 +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: <1634986818.38.0.679781730256.issue45113@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

> Quoting PEP 630 (active PEP):
>
>   Whenever this PEP mentions extension modules, the advice also applies to
>   built-in modules, such as the C parts of the standard library. The standard
>  library is expected to switch to per-module state early.

Maybe I should remove that part, I didn't expect applying this to stdlib would be so fast/rushed.

> Can you please point me to the official SC statement regarding this? I cannot find it.

Hmm, the best I can find is https://github.com/python/steering-council/blob/main/updates/2021-02-steering-council-update.md#february-08
It asks for no changes in 3.10 beta (no longer relevant) and a PEP -- presumably one specifically for the stdlib; PEP 630 already existed.

PEP 630 works best for new code; applying it to stdlib needs additional considerations, e.g. performance impact analysis, and preserving immutability or (un)pickleability, which certainly wasn't always tested well and caused much trouble late tn the release cycle.

> Please get explicit approval from the SC before continuing to sweep through the code base, creating heap types everywhere.

That would be nice (but myself, I won't be championing that effort any time soon).

> Given that some essential third party modules are not going down this path

OTOH, others (like cryptography & Qt) are going down this path, so I'll continue improving the support.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Sat Oct 23 07:56:47 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sat, 23 Oct 2021 11:56:47 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1634990207.81.0.392737102231.issue45548@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
pull_requests: +27459
pull_request: https://github.com/python/cpython/pull/29188

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Sat Oct 23 08:13:49 2021
From: report at bugs.python.org (=?utf-8?q?Benjamin_Sz=C5=91ke?=)
Date: Sat, 23 Oct 2021 12:13:49 +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: <1634991229.39.0.252858594827.issue45429@roundup.psfhosted.org>


Change by Benjamin Sz?ke <egyszeregy at freemail.hu>:


----------
nosy: +Livius

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45429>
_______________________________________

From report at bugs.python.org  Sat Oct 23 08:19:49 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 12:19:49 +0000
Subject: [issue45379] Improve errors related to frozen modules.
In-Reply-To: <1633449120.03.0.98563217148.issue45379@roundup.psfhosted.org>
Message-ID: <1634991588.99.0.798252962089.issue45379@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

FROZEN_EXCLUDED is set when frozen modules have no code associated with them, and the _freeze_module tool doesn't seem to be able to produce such output.

We could remove it and replace it with an assert, but that does not give us much benefit, so we should probably leave it be and just document it a little bit better.

----------
stage: patch review -> needs patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45379>
_______________________________________

From report at bugs.python.org  Sat Oct 23 08:24:39 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 12:24:39 +0000
Subject: [issue45379] Improve errors related to frozen modules.
In-Reply-To: <1633449120.03.0.98563217148.issue45379@roundup.psfhosted.org>
Message-ID: <1634991879.3.0.548300088233.issue45379@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
pull_requests: +27460
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29189

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45379>
_______________________________________

From report at bugs.python.org  Sat Oct 23 08:25:37 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 12:25:37 +0000
Subject: [issue45582] Rewrite getpath.c in Python
In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org>
Message-ID: <1634991937.37.0.0126273381278.issue45582@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
nosy: +FFY00

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45582>
_______________________________________

From report at bugs.python.org  Sat Oct 23 08:31:54 2021
From: report at bugs.python.org (=?utf-8?q?Benjamin_Sz=C5=91ke?=)
Date: Sat, 23 Oct 2021 12:31:54 +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: <1634992314.86.0.281623390386.issue45429@roundup.psfhosted.org>


Benjamin Sz?ke <egyszeregy at freemail.hu> added the comment:

A similar solution was introduced in VirtualBox some months ago. Soon, i could get back my Windows 10 developing PC and i can try this things.

https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Runtime/r3/win/timer-win.cpp#L312

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45429>
_______________________________________

From report at bugs.python.org  Sat Oct 23 08:43:40 2021
From: report at bugs.python.org (SelfAdjointOperator)
Date: Sat, 23 Oct 2021 12:43:40 +0000
Subject: [issue45587] argparse add_argument_group: distinguish title and
 description from **kwargs
Message-ID: <1634993020.24.0.371084360422.issue45587@roundup.psfhosted.org>


Change by SelfAdjointOperator <jayberry141 at gmail.com>:


----------
assignee: docs at python
components: Documentation, Library (Lib)
nosy: SelfAdjointOperator, docs at python
priority: normal
severity: normal
status: open
title: argparse add_argument_group: distinguish title and description from **kwargs
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45587>
_______________________________________

From report at bugs.python.org  Sat Oct 23 08:45:24 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sat, 23 Oct 2021 12:45:24 +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: <1634993124.85.0.241399215956.issue45113@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

> Given that some essential third party modules are not going down this path, it is unlikely that general users would ever see any benefit.

I disagree with your statement. It does not reflect my experience, too.

Heap types are a prerequisite for abi3 wheels. In order to get abi3 binary wheels, extensions must use the limited API, which means they must use heap types. Stable ABI wheels are a great benefit for extension authors, because it reduces their build matrix substantially. For instance cryptography's stable abi3 wheels work with any Python version >=3.6,<4.

Heap types and stable abi3 are also a major benefit for general users. Once Cython and the NumPy stack supports limited API and stable ABI, users no longer have to wait on builds for a new Python release. Every new minor release we get several bug reports on BPO about NumPy not working on latest release. This will go away.

----------
nosy: +christian.heimes

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Sat Oct 23 08:49:49 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 12:49:49 +0000
Subject: [issue45379] Improve errors related to frozen modules.
In-Reply-To: <1633449120.03.0.98563217148.issue45379@roundup.psfhosted.org>
Message-ID: <1634993389.73.0.461984150615.issue45379@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
pull_requests: +27461
pull_request: https://github.com/python/cpython/pull/29190

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45379>
_______________________________________

From report at bugs.python.org  Sat Oct 23 08:50:45 2021
From: report at bugs.python.org (Marten Lienen)
Date: Sat, 23 Oct 2021 12:50:45 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
Message-ID: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>


New submission from Marten Lienen <marten.lienen at gmail.com>:

There should be a `cached_method` equivalent to `cached_property` so that methods of long-lived objects can be cached easily.

----------
components: Library (Lib)
messages: 404870
nosy: martenlienen
priority: normal
severity: normal
status: open
title: cached_method similar to cached_property to cache with classes
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Sat Oct 23 08:51:22 2021
From: report at bugs.python.org (=?utf-8?q?Quang_L=C3=AA_Duy?=)
Date: Sat, 23 Oct 2021 12:51:22 +0000
Subject: [issue35957] Indentation explanation is unclear
In-Reply-To: <1549819617.52.0.344509790006.issue35957@roundup.psfhosted.org>
Message-ID: <1634993482.32.0.896414275793.issue35957@roundup.psfhosted.org>


Quang L? Duy <leduyquang753 at gmail.com> added the comment:

Reading from the source code (Parser/tokenizer.c from line 1364 as in Python 3.10), I derive these as the actual indentation rules:
? Tab makes the indentation amount the next multiple of 8.
? Among lines with the same indentation amount in the same parent line, the total number of tabs and spaces must match, in other words, the tabs' total padded width must be equal.
? If it's an indent, the total number of spaces and tabs must exceed that of the parent line.

----------
nosy: +leduyquang753

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35957>
_______________________________________

From report at bugs.python.org  Sat Oct 23 09:17:36 2021
From: report at bugs.python.org (Marten Lienen)
Date: Sat, 23 Oct 2021 13:17:36 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
In-Reply-To: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>
Message-ID: <1634995056.58.0.183478368898.issue45588@roundup.psfhosted.org>


Change by Marten Lienen <marten.lienen at gmail.com>:


----------
keywords: +patch
pull_requests: +27462
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29191

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Sat Oct 23 09:24:01 2021
From: report at bugs.python.org (SelfAdjointOperator)
Date: Sat, 23 Oct 2021 13:24:01 +0000
Subject: [issue45587] argparse add_argument_group: distinguish title and
 description from **kwargs
Message-ID: <1634995441.5.0.201395773294.issue45587@roundup.psfhosted.org>


Change by SelfAdjointOperator <jayberry141 at gmail.com>:


----------
keywords: +patch
pull_requests: +27463
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29192

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45587>
_______________________________________

From report at bugs.python.org  Sat Oct 23 09:32:14 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Sat, 23 Oct 2021 13:32:14 +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: <1634995934.31.0.18706977083.issue45113@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

Petr:
> Hmm, the best I can find is https://github.com/python/steering-council/blob/main/updates/2021-02-steering-council-update.md#february-08

Perfect, thanks!


Christian: Thanks for your input. If this was a discussion on Discourse, I'd press the L key on your message :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Sat Oct 23 09:35:56 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sat, 23 Oct 2021 13:35:56 +0000
Subject: =?utf-8?b?W2lzc3VlNDU1NzRdIFdhcm5pbmc6IOKAmHByaW50X2VzY2FwZeKAmSBkZWZp?=
 =?utf-8?q?ned_but_not_used?=
In-Reply-To: <1634917363.52.0.444019325273.issue45574@roundup.psfhosted.org>
Message-ID: <1634996156.78.0.375914284715.issue45574@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset cadf06eab75c887dfc753ca80ef35cd2a7871135 by Miss Islington (bot) in branch '3.10':
bpo-45574: fix warning about `print_escape` being unused (GH-29172) (#29176)
https://github.com/python/cpython/commit/cadf06eab75c887dfc753ca80ef35cd2a7871135


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45574>
_______________________________________

From report at bugs.python.org  Sat Oct 23 09:36:15 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Sat, 23 Oct 2021 13:36:15 +0000
Subject: =?utf-8?b?W2lzc3VlNDU1NzRdIFdhcm5pbmc6IOKAmHByaW50X2VzY2FwZeKAmSBkZWZp?=
 =?utf-8?q?ned_but_not_used?=
In-Reply-To: <1634917363.52.0.444019325273.issue45574@roundup.psfhosted.org>
Message-ID: <1634996175.25.0.501891885476.issue45574@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45574>
_______________________________________

From report at bugs.python.org  Sat Oct 23 09:37:29 2021
From: report at bugs.python.org (Tim Golden)
Date: Sat, 23 Oct 2021 13:37:29 +0000
Subject: [issue2733] mmap resize fails on anonymous memory
In-Reply-To: <1209661457.64.0.989081565875.issue2733@psf.upfronthosting.co.za>
Message-ID: <1634996249.63.0.315994167643.issue2733@roundup.psfhosted.org>


Change by Tim Golden <mail at timgolden.me.uk>:


----------
resolution:  -> later
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2733>
_______________________________________

From report at bugs.python.org  Sat Oct 23 09:37:44 2021
From: report at bugs.python.org (Tim Golden)
Date: Sat, 23 Oct 2021 13:37:44 +0000
Subject: [issue2733] mmap resize fails on anonymous memory
In-Reply-To: <1209661457.64.0.989081565875.issue2733@psf.upfronthosting.co.za>
Message-ID: <1634996264.4.0.524977192355.issue2733@roundup.psfhosted.org>


Tim Golden <mail at timgolden.me.uk> added the comment:

Superseded by issue40915

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2733>
_______________________________________

From report at bugs.python.org  Sat Oct 23 09:48:35 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Sat, 23 Oct 2021 13:48:35 +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: <1634996915.39.0.857229872108.issue45113@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

Oh, I found PEP 3121 (Extension Module Initialization and Finalization). It is a Standards Track PEP and it is accepted.

The abstract is pretty short. Let me just repost it here, for convenience:

  Extension module initialization currently has a few deficiencies. There is
  no cleanup for modules, the entry point name might give naming conflicts,
  the entry functions don't follow the usual calling convention, and multiple
  interpreters are not supported well. This PEP addresses these issues.


Quoting from the Specification section of that PEP:

  The initialization routine will be invoked once per interpreter, when the
  module is imported. It should return a new module object each time.

  In order to store per-module state in C variables, each module object will
  contain a block of memory that is interpreted only by the module. The amount
  of memory used for the module is specified at the point of creation of the
  module.

  [...]

  As all Python objects should be controlled through the Python memory
  management, usage of "static" type objects is discouraged, unless the type
  object itself has no memory-managed state.


PEP 3121 is not withdrawn; PEP 630 is not withdrawn. What is then expected of a new PEP? Or the other way around: what is missing from those two PEPs? AFAICT, PEP wise, everything is arranged and ready. Perhaps the SC can chime in and explain why another PEP is required? :)


BTW, the SC has actually asked for another _Informational_ PEP, not a Standards Track PEP, so I guess a new PEP will be very similar to PEP 630?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Sat Oct 23 09:48:43 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sat, 23 Oct 2021 13:48:43 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
In-Reply-To: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>
Message-ID: <1634996923.78.0.795199466831.issue45588@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

Are you aware of the previously reported problems with `cached_property`? https://bugs.python.org/issue43468

----------
nosy: +AlexWaygood

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Sat Oct 23 09:53:02 2021
From: report at bugs.python.org (Tim Golden)
Date: Sat, 23 Oct 2021 13:53:02 +0000
Subject: [issue2733] mmap resize fails on anonymous memory
In-Reply-To: <1209661457.64.0.989081565875.issue2733@psf.upfronthosting.co.za>
Message-ID: <1634997182.98.0.701989797072.issue2733@roundup.psfhosted.org>


Change by Tim Golden <mail at timgolden.me.uk>:


----------
resolution: later -> duplicate
superseder:  -> multiple problems with mmap.resize()  in Windows

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2733>
_______________________________________

From report at bugs.python.org  Sat Oct 23 10:33:42 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Sat, 23 Oct 2021 14:33:42 +0000
Subject: [issue15795] Zipfile.extractall does not preserve file permissions
In-Reply-To: <1346106964.12.0.723201722432.issue15795@psf.upfronthosting.co.za>
Message-ID: <1634999622.49.0.410871509876.issue15795@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

I left a review on the PR requesting for some tests, if it makes sense.

----------
nosy: +nanjekyejoannah

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15795>
_______________________________________

From report at bugs.python.org  Sat Oct 23 11:12:05 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Sat, 23 Oct 2021 15:12:05 +0000
Subject: [issue14067] Avoid more stat() calls in importlib
In-Reply-To: <1329772687.53.0.782755770398.issue14067@psf.upfronthosting.co.za>
Message-ID: <1635001925.82.0.336019074247.issue14067@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

I wonder if the circumstances changed since this is an old issue? the method looks to have a deprecation warning and changed a bit too, I stand to be corrected.

----------
nosy: +nanjekyejoannah

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue14067>
_______________________________________

From report at bugs.python.org  Sat Oct 23 11:13:02 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Sat, 23 Oct 2021 15:13:02 +0000
Subject: [issue14067] Avoid more stat() calls in importlib
In-Reply-To: <1329772687.53.0.782755770398.issue14067@psf.upfronthosting.co.za>
Message-ID: <1635001982.23.0.943788888752.issue14067@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

Related : https://bugs.python.org/issue14067

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue14067>
_______________________________________

From report at bugs.python.org  Sat Oct 23 11:18:35 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Sat, 23 Oct 2021 15:18:35 +0000
Subject: [issue45275] Make argparse print description of subcommand when
 invoke help doc on subcommand
In-Reply-To: <1632457940.29.0.512184786201.issue45275@roundup.psfhosted.org>
Message-ID: <1635002315.2.0.604101199448.issue45275@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

For me it works as well, tested on 3.7, 3.9 and 3.11 .

----------
nosy: +andrei.avk

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45275>
_______________________________________

From report at bugs.python.org  Sat Oct 23 11:18:53 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Sat, 23 Oct 2021 15:18:53 +0000
Subject: [issue19867] pickletools.OpcodeInfo.code is a string
In-Reply-To: <1386024237.29.0.240373861832.issue19867@psf.upfronthosting.co.za>
Message-ID: <1635002333.4.0.969779029612.issue19867@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

I changed to won't fix due to the note on incompatibility, until we resolve on a way forward.

----------
nosy: +nanjekyejoannah
resolution:  -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue19867>
_______________________________________

From report at bugs.python.org  Sat Oct 23 11:23:44 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 23 Oct 2021 15:23:44 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
In-Reply-To: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>
Message-ID: <1635002624.32.0.282553875461.issue45588@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

The simple implementation is:

def cached_method(func):
    return cached_property(lambda self: lru_cache()(partial(func, self)))

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Sat Oct 23 11:26:52 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Sat, 23 Oct 2021 15:26:52 +0000
Subject: [issue33439] python-config.py should be part of the stdlib
In-Reply-To: <1525695349.77.0.682650639539.issue33439@psf.upfronthosting.co.za>
Message-ID: <1635002812.85.0.856668370347.issue33439@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

I posted on Python-dev (not sure if it will help), I wanted to do this in 2019 but looks like there is still no consensus yet.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33439>
_______________________________________

From report at bugs.python.org  Sat Oct 23 11:32:41 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Sat, 23 Oct 2021 15:32:41 +0000
Subject: [issue11602] python-config code should be in sysconfig
In-Reply-To: <1300475478.49.0.935411639754.issue11602@psf.upfronthosting.co.za>
Message-ID: <1635003161.34.0.239528579514.issue11602@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

@eric.araujo curious if you still have the interest to work on this. If not, I can help open a PR.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11602>
_______________________________________

From report at bugs.python.org  Sat Oct 23 11:40:16 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 15:40:16 +0000
Subject: [issue33439] python-config.py should be part of the stdlib
In-Reply-To: <1525695349.77.0.682650639539.issue33439@psf.upfronthosting.co.za>
Message-ID: <1635003616.27.0.368577795384.issue33439@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
nosy: +FFY00

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33439>
_______________________________________

From report at bugs.python.org  Sat Oct 23 11:43:41 2021
From: report at bugs.python.org (Marten Lienen)
Date: Sat, 23 Oct 2021 15:43:41 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
In-Reply-To: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>
Message-ID: <1635003821.5.0.032448981106.issue45588@roundup.psfhosted.org>


Marten Lienen <marten.lienen at gmail.com> added the comment:

@AlexWaygood No, I was not aware of the problems. I have updated the PR by removing the lock entirely. Since the function has to be cacheable, it should be idempotent anyway, so that executing it multiple times in parallel does not make a program incorrect. This was also suggested as the a-priori best approach in the linked issue.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Sat Oct 23 11:46:06 2021
From: report at bugs.python.org (Marten Lienen)
Date: Sat, 23 Oct 2021 15:46:06 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
In-Reply-To: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>
Message-ID: <1635003966.84.0.258669930004.issue45588@roundup.psfhosted.org>


Marten Lienen <marten.lienen at gmail.com> added the comment:

@serhiy.storchaka The simple implementation is very simple but does not allow overwriting the arguments to `lru_cache` and, probably more importantly, creates a circular reference on `self`, I believe.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Sat Oct 23 11:48:03 2021
From: report at bugs.python.org (Jason R. Coombs)
Date: Sat, 23 Oct 2021 15:48:03 +0000
Subject: [issue45516] Add protocol description to the Traversable and
 TraversableResources documentation
In-Reply-To: <1634597903.13.0.806758851296.issue45516@roundup.psfhosted.org>
Message-ID: <1635004083.74.0.706094933678.issue45516@roundup.psfhosted.org>


Jason R. Coombs <jaraco at jaraco.com> added the comment:


New changeset 8ce20bbdd6d2b1277a5e74154fcdcef2cb0fee49 by Filipe La?ns in branch 'main':
bpo-45516: add protocol description to the TraversableResources documentation (#29173)
https://github.com/python/cpython/commit/8ce20bbdd6d2b1277a5e74154fcdcef2cb0fee49


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45516>
_______________________________________

From report at bugs.python.org  Sat Oct 23 11:53:25 2021
From: report at bugs.python.org (Marten Lienen)
Date: Sat, 23 Oct 2021 15:53:25 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
In-Reply-To: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>
Message-ID: <1635004405.55.0.2594897853.issue45588@roundup.psfhosted.org>


Marten Lienen <marten.lienen at gmail.com> added the comment:

An implementation based on cached_property (that therefore also inherits its locking problem) that does not create a circular reference and copies attributes (docs etc.) from the decorated function would be as follows (based on the WeaklyBoundMethod from this PR).

def cached_method_inner(func, lru_args):
    lru_args.setdefault("maxsize", None)
    def binder(self):
        method = WeaklyBoundMethod(func.__get__(self))
        cache = lru_cache(**lru_args)
        cached = cache(method)
        update_wrapper(cached, func)
        return cached
    prop = cached_property(binder)
    update_wrapper(prop, func)
    return prop

def cached_method(func=None, /, **lru_args):
    if func is not None:
        return cached_method_inner(func, lru_args)
    else:
        def decorator(late_func):
            return cached_method_inner(late_func, lru_args)
        return decorator

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Sat Oct 23 11:54:08 2021
From: report at bugs.python.org (Marten Lienen)
Date: Sat, 23 Oct 2021 15:54:08 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
In-Reply-To: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>
Message-ID: <1635004448.9.0.121979430573.issue45588@roundup.psfhosted.org>


Marten Lienen <marten.lienen at gmail.com> added the comment:

However, then the user gets error messages mentioning cached_property when they are actually using cached_method.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Sat Oct 23 11:56:10 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Sat, 23 Oct 2021 15:56:10 +0000
Subject: [issue21724] resetwarnings doesn't reset warnings registry
In-Reply-To: <1402503104.19.0.836333157517.issue21724@psf.upfronthosting.co.za>
Message-ID: <1635004570.15.0.628605266821.issue21724@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

@Julian Am leaning more into us applying a relevant fix, than adjusting the documentation.

----------
nosy: +nanjekyejoannah

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21724>
_______________________________________

From report at bugs.python.org  Sat Oct 23 12:04:04 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 16:04:04 +0000
Subject: [issue45516] Add protocol description to the Traversable and
 TraversableResources documentation
In-Reply-To: <1634597903.13.0.806758851296.issue45516@roundup.psfhosted.org>
Message-ID: <1635005044.36.0.919529509774.issue45516@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
pull_requests: +27464
pull_request: https://github.com/python/cpython/pull/29194

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45516>
_______________________________________

From report at bugs.python.org  Sat Oct 23 12:11:02 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Sat, 23 Oct 2021 16:11:02 +0000
Subject: [issue45580] argparse.ArgumentParser.add_mutually_exclusive_group :
 metavar create parenthesis undefined behavior
In-Reply-To: <1634931090.99.0.410236903356.issue45580@roundup.psfhosted.org>
Message-ID: <1635005462.66.0.566649016847.issue45580@roundup.psfhosted.org>


Nikita Sobolev <mail at sobolevn.me> added the comment:

I confirm this happens on all recent Python versions.

The source of this problem is that `argparse` uses `regex` module to replace some substrings. Direct link: https://github.com/python/cpython/blame/8ce20bbdd6d2b1277a5e74154fcdcef2cb0fee49/Lib/argparse.py#L487

Quick debug showed that without this line these tests fail:

```
======================================================================
FAIL: test_help_when_required (test.test_argparse.TestMutuallyExclusiveFirstSuppressed)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/sobolev/Desktop/cpython/Lib/test/test_argparse.py", line 2649, in test_help_when_required
    self.assertEqual(format_help(), textwrap.dedent(help))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'usage: PROG [-h] (-y)\n\noptions:\n  -h, --help  show this[42 chars]lp\n' != 'usage: PROG [-h] -y\n\noptions:\n  -h, --help  show this h[40 chars]lp\n'
- usage: PROG [-h] (-y)
?                  -  -
+ usage: PROG [-h] -y
  
  options:
    -h, --help  show this help message and exit
    -y          y help


======================================================================
FAIL: test_usage_when_required (test.test_argparse.TestMutuallyExclusiveFirstSuppressed)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/sobolev/Desktop/cpython/Lib/test/test_argparse.py", line 2639, in test_usage_when_required
    self.assertEqual(format_usage(), textwrap.dedent(expected_usage))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'usage: PROG [-h] (-y)\n' != 'usage: PROG [-h] -y\n'
- usage: PROG [-h] (-y)
?                  -  -
+ usage: PROG [-h] -y


======================================================================
FAIL: test_help_when_required (test.test_argparse.TestMutuallyExclusiveFirstSuppressedParent)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/sobolev/Desktop/cpython/Lib/test/test_argparse.py", line 2649, in test_help_when_required
    self.assertEqual(format_help(), textwrap.dedent(help))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'usage: PROG [-h] (-y)\n\noptions:\n  -h, --help  show this[42 chars]lp\n' != 'usage: PROG [-h] -y\n\noptions:\n  -h, --help  show this h[40 chars]lp\n'
- usage: PROG [-h] (-y)
?                  -  -
+ usage: PROG [-h] -y
  
  options:
    -h, --help  show this help message and exit
    -y          y help


======================================================================
FAIL: test_usage_when_required (test.test_argparse.TestMutuallyExclusiveFirstSuppressedParent)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/sobolev/Desktop/cpython/Lib/test/test_argparse.py", line 2639, in test_usage_when_required
    self.assertEqual(format_usage(), textwrap.dedent(expected_usage))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'usage: PROG [-h] (-y)\n' != 'usage: PROG [-h] -y\n'
- usage: PROG [-h] (-y)
?                  -  -
+ usage: PROG [-h] -y


----------------------------------------------------------------------
Ran 1672 tests in 23.258s

FAILED (failures=4)
test test_argparse failed
test_argparse failed (4 failures)

== Tests result: FAILURE ==

1 test failed:
    test_argparse

Total duration: 25.6 sec
Tests result: FAILURE
```

----------
nosy: +sobolevn

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45580>
_______________________________________

From report at bugs.python.org  Sat Oct 23 12:16:22 2021
From: report at bugs.python.org (Hai Shi)
Date: Sat, 23 Oct 2021 16:16:22 +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: <1635005782.17.0.621100344807.issue45113@roundup.psfhosted.org>


Hai Shi <shihai1991 at 126.com> added the comment:

> PEP 3121 is not withdrawn; PEP 630 is not withdrawn. What is then expected of a new PEP? Or the other way around: what is missing from those two PEPs?

Thanks Erlend for the relative information you provided. AFAIK, the stdlib is not the extension module strictly :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Sat Oct 23 12:25:02 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Sat, 23 Oct 2021 16:25:02 +0000
Subject: [issue45580] argparse.ArgumentParser.add_mutually_exclusive_group :
 metavar create parenthesis undefined behavior
In-Reply-To: <1634931090.99.0.410236903356.issue45580@roundup.psfhosted.org>
Message-ID: <1635006302.01.0.0653142594728.issue45580@roundup.psfhosted.org>


Nikita Sobolev <mail at sobolevn.me> added the comment:

Maybe instead we can show users something like:

```
usage: ex.py [-h] (-p '/var/www/html' | -r 'http)s(://Host:Port') [--last-args LAST_ARGS]
```

?

----------
components: +Library (Lib) -Parser
type:  -> behavior
versions: +Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45580>
_______________________________________

From report at bugs.python.org  Sat Oct 23 12:38:08 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sat, 23 Oct 2021 16:38:08 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
In-Reply-To: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>
Message-ID: <1635007088.97.0.854397330531.issue45588@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

AFAICT, the only capability added by the PR is keeping a weak reference to the instance.

This doesn't improve the hit rate and will make the hit rate worse for instances that define __hash__.  In the PR's example, two vector instances with equal coordinates would not be recognized as being equivalent.  Note, dataclasses make it trivially easy to add custom __eq__ and __hash__ support.

Users also lose the ability to limit maximum memory utilization.  Managing the combined size of many caches, one per instance, is much more difficult that setting an automatic maxsize limit on a single lru_cache.

Users further lose the ability to clear the entire cache all at once.  This can be important in testing.

AFAICT, the only benefit is that short-lived instances will be freed earlier than if they waited to age out of an lru_cache.  This would only ever matter if the instances were large, short-lived, and would never have other equivalent instances that could create a cache hit.

Lastly, I don't like the example given in the docs for the PR.  We really want the class to define __hash__ and __eq__ methods.  This doesn't just improve the hit rate, it is also necessary for avoiding bugs.  If the coordinates gets mutate, the cache has no way of knowing that its entry is invalid:
   
    v = Vector(10, 20, 30)
    print(v.norm())
    v.coordinates = (11, 22, 33)
    print(v.norm())

----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Sat Oct 23 12:40:32 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sat, 23 Oct 2021 16:40:32 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
In-Reply-To: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>
Message-ID: <1635007232.92.0.0528305793203.issue45588@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

See also:  https://docs.python.org/3/faq/programming.html#how-do-i-cache-method-calls

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Sat Oct 23 12:46:11 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 16:46:11 +0000
Subject: [issue11602] python-config code should be in sysconfig
In-Reply-To: <1300475478.49.0.935411639754.issue11602@psf.upfronthosting.co.za>
Message-ID: <1635007571.3.0.707524367801.issue11602@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
nosy: +FFY00

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11602>
_______________________________________

From report at bugs.python.org  Sat Oct 23 12:54:39 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 16:54:39 +0000
Subject: [issue1353344] python.desktop
Message-ID: <1635008079.83.0.701613620868.issue1353344@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
nosy: +FFY00

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue1353344>
_______________________________________

From report at bugs.python.org  Sat Oct 23 12:55:49 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 16:55:49 +0000
Subject: [issue22789] Compress the marshalled data in PYC files
In-Reply-To: <1415077245.4.0.700609350165.issue22789@psf.upfronthosting.co.za>
Message-ID: <1635008149.19.0.709923325543.issue22789@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
nosy: +FFY00

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22789>
_______________________________________

From report at bugs.python.org  Sat Oct 23 13:02:02 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 17:02:02 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org>
Message-ID: <1635008522.0.0.642742340957.issue45020@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
nosy: +FFY00

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Sat Oct 23 13:03:28 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 17:03:28 +0000
Subject: [issue45272] 'os.path' should not be a frozen module
In-Reply-To: <1632414295.46.0.740648553614.issue45272@roundup.psfhosted.org>
Message-ID: <1635008608.76.0.969225306691.issue45272@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
nosy: +FFY00

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45272>
_______________________________________

From report at bugs.python.org  Sat Oct 23 13:03:40 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 17:03:40 +0000
Subject: [issue45364] Add more documentation for ModuleSpec.loader_state.
In-Reply-To: <1633359113.08.0.945752109224.issue45364@roundup.psfhosted.org>
Message-ID: <1635008620.74.0.0529804596673.issue45364@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
nosy: +FFY00

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45364>
_______________________________________

From report at bugs.python.org  Sat Oct 23 13:05:11 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 17:05:11 +0000
Subject: [issue40899] Document exceptions raised by importlib.import
In-Reply-To: <1591528094.81.0.814829435189.issue40899@roundup.psfhosted.org>
Message-ID: <1635008711.86.0.715007965864.issue40899@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
nosy: +FFY00

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40899>
_______________________________________

From report at bugs.python.org  Sat Oct 23 13:33:22 2021
From: report at bugs.python.org (Guido F)
Date: Sat, 23 Oct 2021 17:33:22 +0000
Subject: [issue45589] webbrowser does not handle opens under Windows WSL
 properly
Message-ID: <1635010402.44.0.770979979986.issue45589@roundup.psfhosted.org>


New submission from Guido F <guido.fioravantti at gmail.com>:

The 'webbrowser' module throws warnings and bad RC codes when running under Windows Subsystem for Linux (WSL).

This causes libraries that depend on the 'webbrowser' module to mistakenly assume there's been an error opening a URL. An example of this behaviour can be observed running `jupyter-lab` under WSL.

Steps to reproduce:
1. Run Ubuntu (for example) under Windows WSL.
2. `python -m webbrowser https://www.python.org`

Expected result:

The wesite opens.

Actual result:

The website opens but produces a `No valid TTY` message, which also yields a non-zero return code.

I have a patch for this bug that inspects the kernel version (platform.uname) and detects WSL. This is a similar solution that other projects have implemented to tackle this problem. For example, the fish shell project: https://github.com/fish-shell/fish-shell/blob/0e06a53dff5e198c4fcefb6419a53cf1267231a1/share/functions/help.fish#L83.

----------
components: Windows
messages: 404896
nosy: guido.fioravantti, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: webbrowser does not handle opens under Windows WSL properly
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45589>
_______________________________________

From report at bugs.python.org  Sat Oct 23 13:53:34 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Sat, 23 Oct 2021 17:53:34 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635011614.05.0.49826449844.issue45548@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

FYI: I've been working with a fixed Setup file in PyRun for a long while. There are indeed a number of modules missing from Setup, since the whole logic was left behind a bit after things moved to setup.py.

The issue with _math.o is actually in the main Makefile.pre.in. The version listed there does not match the Makefile lines added via Setup. For PyRun, I had to comment out the one in Makefile.pre.in and then only add one instance to the math module and not the cmath one. This avoids a (harmless) warning during the build.

I'm not sure what the _math.o entry exists in Makefile.pre.in. It's only needed by those two modules, AFAIK.

Here's the list of modules I had to add in the past (taken from the 3.10 port):

"""
### Built-in extensions for which there are no entries in Setup.dist/Setup:

# _decimal needs more complex setup, punting on this for now
#DECIMAL_DEFS=-DCONFIG_64=1 -DASM=1
#_decimal \
#       _decimal/_decimal.c \
#       _decimal/libmpdec/basearith.c \
#       _decimal/libmpdec/constants.c \
#       _decimal/libmpdec/context.c \
#       _decimal/libmpdec/convolute.c \
#       _decimal/libmpdec/crt.c \
#       _decimal/libmpdec/difradix2.c \
#       _decimal/libmpdec/fnt.c \
#       _decimal/libmpdec/fourstep.c \
#       _decimal/libmpdec/io.c \
#       _decimal/libmpdec/memory.c \
#       _decimal/libmpdec/mpdecimal.c \
#       _decimal/libmpdec/numbertheory.c \
#       _decimal/libmpdec/sixstep.c \
#       _decimal/libmpdec/transpose.c \
#       $(DECIMAL_DEFS) \
#       -I$(srcdir)/Modules/_decimal \
#       -I$(srcdir)/Modules/_decimal/libmpdec \
#       -I$(prefix)/include -L$(exec_prefix)/lib

# _opcode
_opcode _opcode.c

# _ctypes needs to build libffi first - punting on this

# _lsprof
_lsprof _lsprof.c rotatingtree.c

# _sqlite3
SQLITE_DEFS=-DMODULE_NAME='"sqlite3"' -DSQLITE_OMIT_LOAD_EXTENSION
# @if freebsd: SQLITE_LIBS=-I/usr/local/include -L/usr/local/lib
# @if not freebsd: SQLITE_LIBS=
_sqlite3 \
        _sqlite/module.c \
        _sqlite/cache.c \
        _sqlite/connection.c \
        _sqlite/cursor.c \
        _sqlite/microprotocols.c \
        _sqlite/prepare_protocol.c \
        _sqlite/row.c \
        _sqlite/statement.c \
        _sqlite/util.c \
        $(SQLITE_DEFS) -I$(srcdir)/Modules/_sqlite \
        $(SQLITE_LIBS) \
        -I$(prefix)/include -L$(exec_prefix)/lib \
        -lsqlite3

# bz2
_bz2 _bz2module.c -lbz2

# lzma
#
# Note: Adding this can cause serious issues, since the needed lib isn't
# universally installed everywhere. See #1793 and #1794.
#
#_lzma _lzmamodule.c -llzma

# multiprocessing
_multiprocessing \
        _multiprocessing/semaphore.c \
        _multiprocessing/multiprocessing.c \
        -I$(srcdir)/Modules/_multiprocessing

# Optional add-on for multiprocessing to use shared memory
#POSIXSHMEM_LIBS=rt
POSIXSHMEM_LIBS=
_posixshmem \
        _multiprocessing/posixshmem.c \
        -I$(srcdir)/Modules/_multiprocessing \
        $(POSIXSHMEM_LIBS)

# queue
_queue _queuemodule.c
"""

Not all modules are included, since I did not need all missing ones.

----------
nosy: +lemburg

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Sat Oct 23 14:04:22 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sat, 23 Oct 2021 18:04:22 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635012262.51.0.699333528666.issue45548@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

PR GH-29179 or GH-29181 address the issue with _math.o

PR GH-29164 adds the missing modules and also introduces pkg-config lookups for dependencies.

Brett and I discussed that we have to introduce conditionals to Modules/Setup to make use of the AM_CONDITIONALs from PR GH-29164. We also have to figure out how to deal with system-libmpdec and system-cffi.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Sat Oct 23 14:18:09 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Sat, 23 Oct 2021 18:18:09 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1635012262.51.0.699333528666.issue45548@roundup.psfhosted.org>
Message-ID: <145e2c9b-d931-6770-f115-8dc8de8531cf@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

I'm using a very simple conditional logic in Setup, which is based
on sed, mostly to add platform specific variables:

In Setup:

# @if macosx: TIME_DEFS=
# @if not macosx: TIME_DEFS=-lrt
time -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal timemodule.c
$(TIME_DEFS) # -lm # time operations and variables

In Makefile:

        # Install the custom Modules/Setup file
        if test "$(MACOSX_PLATFORM)"; then \
                sed     -e 's/# @if macosx: *//' \
                        $(PYRUNDIR)/$(MODULESSETUP) > $(PYTHONDIR)/Modules/Setup; \
        elif test "$(FREEBSD_PLATFORM)"; then \
                sed     -e 's/# @if freebsd: *//' \
                        $(PYRUNDIR)/$(MODULESSETUP) > $(PYTHONDIR)/Modules/Setup; \
        else \
                sed     -e 's/# @if not macosx: *//' \
                        -e 's/# @if not freebsd: *//' \
                        $(PYRUNDIR)/$(MODULESSETUP) > $(PYTHONDIR)/Modules/Setup; \
        fi;

Setup used to be templated as well in the past, but that logic was removed
at some point. Perhaps it's time to reintroduce it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Sat Oct 23 14:28:51 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Sat, 23 Oct 2021 18:28:51 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1635012262.51.0.699333528666.issue45548@roundup.psfhosted.org>
Message-ID: <98b55d7e-c9db-2b32-d449-29514ba23efe@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 23.10.2021 20:04, Christian Heimes wrote:
> 
> PR GH-29179 or GH-29181 address the issue with _math.o

I think those patches are both taking things a bit too far.

This is a build problem, not a code problem. It's perfectly
good style to link a single file to multiple other object files
instead of copying the code into those object files.

The catch is that the makesetup logic is not smart enough to only
include the necessary Makefile line once.

The entry in Makefile.pre.in should not be needed, since the logic
for building math and cmath modules already exists in setup.py.

BTW: There's a simple trick to avoid the makesetup issue: simply
add the _math.c entry to some other module which is always linked
statically, e.g. _stat, and remove it from both math and cmath
entries in Setup, as well as the Makefile.pre.in.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Sat Oct 23 14:41:33 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Sat, 23 Oct 2021 18:41:33 +0000
Subject: [issue33439] python-config.py should be part of the stdlib
In-Reply-To: <1525695349.77.0.682650639539.issue33439@psf.upfronthosting.co.za>
Message-ID: <1635014493.95.0.668426840734.issue33439@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

It seems it could be moved to sysconfig itself -- the CLI options from python-config would fit there nicely.

----------
nosy: +petr.viktorin

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33439>
_______________________________________

From report at bugs.python.org  Sat Oct 23 14:45:53 2021
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Sat, 23 Oct 2021 18:45:53 +0000
Subject: [issue11602] python-config code should be in sysconfig
In-Reply-To: <1300475478.49.0.935411639754.issue11602@psf.upfronthosting.co.za>
Message-ID: <1635014753.18.0.5574134767.issue11602@roundup.psfhosted.org>


?ric Araujo <merwok at netwok.org> added the comment:

I don?t have specific expertise in this, so please take it!

----------
assignee: eric.araujo -> nanjekyejoannah
components: +Build -Distutils2, Library (Lib)
nosy:  -alexis, tarek
versions: +Python 3.11 -Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11602>
_______________________________________

From report at bugs.python.org  Sat Oct 23 14:47:55 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 18:47:55 +0000
Subject: [issue11602] python-config code should be in sysconfig
In-Reply-To: <1300475478.49.0.935411639754.issue11602@psf.upfronthosting.co.za>
Message-ID: <1635014875.9.0.897058492845.issue11602@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

I can help out, but would like to wait until we get a resolution in GH-25718 as it will likely conflict.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11602>
_______________________________________

From report at bugs.python.org  Sat Oct 23 14:48:44 2021
From: report at bugs.python.org (Jakub Wilk)
Date: Sat, 23 Oct 2021 18:48:44 +0000
Subject: [issue45590] distutils: Upload failed (400): Invalid value for
 blake2_256_digest
Message-ID: <1635014924.31.0.109934491156.issue45590@roundup.psfhosted.org>


New submission from Jakub Wilk <jwilk at jwilk.net>:

My "python3 setup.py sdist upload" failed with:

  Upload failed (400): Invalid value for blake2_256_digest. Error: Use a valid, hex-encoded, BLAKE2 message digest.

Apparently this is because distutils uses wrong digest size for Blake2:
https://github.com/pypa/distutils/issues/25

----------
components: Distutils
messages: 404904
nosy: christian.heimes, dstufft, eric.araujo, jwilk
priority: normal
severity: normal
status: open
title: distutils: Upload failed (400): Invalid value for blake2_256_digest
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45590>
_______________________________________

From report at bugs.python.org  Sat Oct 23 15:13:06 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sat, 23 Oct 2021 19:13:06 +0000
Subject: [issue45590] distutils: Upload failed (400): Invalid value for
 blake2_256_digest
In-Reply-To: <1635014924.31.0.109934491156.issue45590@roundup.psfhosted.org>
Message-ID: <1635016386.96.0.208716599079.issue45590@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Distutils is deprecated and should no longer be used. Please use twine to upload software to PyPI, https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45590>
_______________________________________

From report at bugs.python.org  Sat Oct 23 15:30:30 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sat, 23 Oct 2021 19:30:30 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635017430.44.0.267232309114.issue45548@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

The trick would move the math function back into the core. Mark moved the math functions out of the core on purpose, see bpo-7518.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Sat Oct 23 15:46:26 2021
From: report at bugs.python.org (Sergei Lebedev)
Date: Sat, 23 Oct 2021 19:46:26 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
In-Reply-To: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org>
Message-ID: <1635018386.87.0.890706617097.issue45524@roundup.psfhosted.org>


Sergei Lebedev <slebedev at google.com> added the comment:

Is it worth filing a separate issue for locals()? 

In my experience local classes are less common than cross-module inheritance, so I suspect that the chances of someone accidentally hitting lack of locals() forwarding are quite low. However, given how confusing the error message is, it might be worth having an issue for that. Wdyt?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Sat Oct 23 16:06:00 2021
From: report at bugs.python.org (Jacob Nilsson)
Date: Sat, 23 Oct 2021 20:06:00 +0000
Subject: [issue45586] Use starred expressions in list indices
In-Reply-To: <1634979504.27.0.148840399936.issue45586@roundup.psfhosted.org>
Message-ID: <1635019560.96.0.807997988794.issue45586@roundup.psfhosted.org>


Jacob Nilsson <jacob.nilsson at ltu.se> added the comment:

I don't understand, do you mean that lists should work like in your example? Or that your example code doesn't run?

If you mean the first issue, that is ok I guess but I've never used indexing like that outside of numpy, pandas and the like.

If you mean the second issue, it doesn't run because you are indexing a 0-dim array with 4 indices, if you instead try with a 1-dim array:

>>> import numpy as np
>>> a = np.array([0]) # 1-dim array instead of 0-dim
>>> print(a[[0, *[0, 0], 0]])
[0, 0, 0, 0]

You get the expected output.

----------
nosy: +ajoino

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45586>
_______________________________________

From report at bugs.python.org  Sat Oct 23 16:11:41 2021
From: report at bugs.python.org (Jacob Nilsson)
Date: Sat, 23 Oct 2021 20:11:41 +0000
Subject: [issue45586] Use starred expressions in list indices
In-Reply-To: <1634979504.27.0.148840399936.issue45586@roundup.psfhosted.org>
Message-ID: <1635019901.71.0.726192477016.issue45586@roundup.psfhosted.org>


Jacob Nilsson <jacob.nilsson at ltu.se> added the comment:

Oh yeah, the reason lists don't allow the starred expression has nothing to do with the starred expression itself, it's syntactically correct and in your case a[1, *[2, 3], 4] is equivalent to a[1, 2, 3, 4]. The "problem" is that lists do not allow indexing by tuples.

Perhaps the title of this issue should be changed to reflect that: "Allow lists to be indexed by tuples"

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45586>
_______________________________________

From report at bugs.python.org  Sat Oct 23 16:56:32 2021
From: report at bugs.python.org (=?utf-8?q?Gr=C3=A9gory_Starck?=)
Date: Sat, 23 Oct 2021 20:56:32 +0000
Subject: [issue45511] Batch-mode input() limited to 4095 characters on *NIX
In-Reply-To: <1634560324.05.0.266580517788.issue45511@roundup.psfhosted.org>
Message-ID: <1635022592.79.0.20998330739.issue45511@roundup.psfhosted.org>


Gr?gory Starck <g.starck at gmail.com> added the comment:

reproduced and also seen in my_fgets.

but strange. it's fgets that seems to return/insert a \n after 4096 chars read from stdin :O I dont quite get. at all haha.

now just straced that.. we see 4 read of 1024 bytes/chars. 

and with strace -s 1025 I can see the last one : 

read(0, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n", 1024) = 1024

so it's a prob in copy/paste of OS or something ?

----------
nosy: +g.starck at gmail.com
versions: +Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45511>
_______________________________________

From report at bugs.python.org  Sat Oct 23 17:12:30 2021
From: report at bugs.python.org (Yoann Aubineau)
Date: Sat, 23 Oct 2021 21:12:30 +0000
Subject: [issue21724] resetwarnings doesn't reset warnings registry
In-Reply-To: <1402503104.19.0.836333157517.issue21724@psf.upfronthosting.co.za>
Message-ID: <1635023550.23.0.519219946084.issue21724@roundup.psfhosted.org>


Change by Yoann Aubineau <yoann.aubineau at gmail.com>:


----------
nosy:  -yaubi

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21724>
_______________________________________

From report at bugs.python.org  Sat Oct 23 17:12:52 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 21:12:52 +0000
Subject: [issue40350] modulefinder chokes on numpy - dereferencing None in
 spec.loader
In-Reply-To: <1587454417.83.0.816569073565.issue40350@roundup.psfhosted.org>
Message-ID: <1635023572.1.0.514782515964.issue40350@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
pull_requests: +27465
pull_request: https://github.com/python/cpython/pull/29196

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40350>
_______________________________________

From report at bugs.python.org  Sat Oct 23 17:13:08 2021
From: report at bugs.python.org (Yoann Aubineau)
Date: Sat, 23 Oct 2021 21:13:08 +0000
Subject: [issue22098] Behavior of Structure inconsistent with
 BigEndianStructure when using __slots__
In-Reply-To: <1406584709.24.0.956833774104.issue22098@psf.upfronthosting.co.za>
Message-ID: <1635023588.27.0.782955317328.issue22098@roundup.psfhosted.org>


Change by Yoann Aubineau <yoann.aubineau at gmail.com>:


----------
nosy:  -yaubi

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22098>
_______________________________________

From report at bugs.python.org  Sat Oct 23 17:13:01 2021
From: report at bugs.python.org (Yoann Aubineau)
Date: Sat, 23 Oct 2021 21:13:01 +0000
Subject: [issue21710] --install-base option ignored?
In-Reply-To: <1402436563.61.0.260081261103.issue21710@psf.upfronthosting.co.za>
Message-ID: <1635023581.19.0.697250346349.issue21710@roundup.psfhosted.org>


Change by Yoann Aubineau <yoann.aubineau at gmail.com>:


----------
nosy:  -yaubi

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21710>
_______________________________________

From report at bugs.python.org  Sat Oct 23 17:13:06 2021
From: report at bugs.python.org (Yoann Aubineau)
Date: Sat, 23 Oct 2021 21:13:06 +0000
Subject: [issue21740] doctest doesn't allow duck-typing callables
In-Reply-To: <1402606753.04.0.326464066676.issue21740@psf.upfronthosting.co.za>
Message-ID: <1635023586.11.0.780147883474.issue21740@roundup.psfhosted.org>


Change by Yoann Aubineau <yoann.aubineau at gmail.com>:


----------
nosy:  -yaubi

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21740>
_______________________________________

From report at bugs.python.org  Sat Oct 23 17:13:11 2021
From: report at bugs.python.org (Yoann Aubineau)
Date: Sat, 23 Oct 2021 21:13:11 +0000
Subject: [issue22090] Decimal and float formatting treat '%' differently for
 infinities and nans.
In-Reply-To: <1406455723.52.0.997283705437.issue22090@psf.upfronthosting.co.za>
Message-ID: <1635023591.16.0.046941631781.issue22090@roundup.psfhosted.org>


Change by Yoann Aubineau <yoann.aubineau at gmail.com>:


----------
nosy:  -yaubi

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22090>
_______________________________________

From report at bugs.python.org  Sat Oct 23 17:13:12 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 21:13:12 +0000
Subject: [issue40350] modulefinder chokes on numpy - dereferencing None in
 spec.loader
In-Reply-To: <1587454417.83.0.816569073565.issue40350@roundup.psfhosted.org>
Message-ID: <1635023592.31.0.985479339714.issue40350@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

I opened up a new PR that should fix this properly. The root issue was that PathFinder was not setting the loader attribute for namespace packages in the spec, which it should. After fixing that, _find_module just needed to be updated to deal with NamespaceLoader.

```
$ tree namespace
namespace/
??? a.py

0 directories, 1 file
$ cat test-bpo-40350.py
import namespace.a
```

```
$ ./python
Python 3.11.0a1+ (heads/main:9e05da6224, Oct 23 2021, 20:36:14) [GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import modulefinder
>>> modulefinder.ModuleFinder('test-bpo-40350.py')
<modulefinder.ModuleFinder object at 0x7f66f7647480>
>>> f = modulefinder.ModuleFinder('test-bpo-40350.py')
>>> f.
KeyboardInterrupt
>>> m = modulefinder.ModuleFinder()
>>> f = modulefinder.ModuleFinder()
>>> f.run_script('test-bpo-40350.py')
>>> f.modules.items()
dict_items([('__main__', Module('__main__', 'test-bpo-40350.py')), ('namespace', Module('namespace', _NamespacePath(['/home/anubis/git/cpython/namespace'])))])
```

Previously:
```
$ python
Python 3.9.7 (default, Oct 10 2021, 15:13:22)
[GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import modulefinder
>>> f = modulefinder.ModuleFinder()
>>> f.run_script('test-bpo-40350.py')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.9/modulefinder.py", line 161, in run_script
    self.load_module('__main__', fp, pathname, stuff)
  File "/usr/lib/python3.9/modulefinder.py", line 357, in load_module
    self.scan_code(co, m)
  File "/usr/lib/python3.9/modulefinder.py", line 430, in scan_code
    self._safe_import_hook(name, m, fromlist, level=0)
  File "/usr/lib/python3.9/modulefinder.py", line 375, in _safe_import_hook
    self.import_hook(name, caller, level=level)
  File "/usr/lib/python3.9/modulefinder.py", line 173, in import_hook
    q, tail = self.find_head_package(parent, name)
  File "/usr/lib/python3.9/modulefinder.py", line 229, in find_head_package
    q = self.import_module(head, qname, parent)
  File "/usr/lib/python3.9/modulefinder.py", line 316, in import_module
    fp, pathname, stuff = self.find_module(partname,
  File "/usr/lib/python3.9/modulefinder.py", line 508, in find_module
    return _find_module(name, path)
  File "/usr/lib/python3.9/modulefinder.py", line 77, in _find_module
    if spec.loader.is_package(name):
AttributeError: 'NoneType' object has no attribute 'is_package'
```

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40350>
_______________________________________

From report at bugs.python.org  Sat Oct 23 17:13:03 2021
From: report at bugs.python.org (Yoann Aubineau)
Date: Sat, 23 Oct 2021 21:13:03 +0000
Subject: [issue22086] Tab indent no longer works in interpreter
In-Reply-To: <1406396060.4.0.777513387491.issue22086@psf.upfronthosting.co.za>
Message-ID: <1635023583.6.0.436947807595.issue22086@roundup.psfhosted.org>


Change by Yoann Aubineau <yoann.aubineau at gmail.com>:


----------
nosy:  -yaubi

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22086>
_______________________________________

From report at bugs.python.org  Sat Oct 23 17:13:13 2021
From: report at bugs.python.org (Yoann Aubineau)
Date: Sat, 23 Oct 2021 21:13:13 +0000
Subject: [issue22097] Linked list API for ordereddict
In-Reply-To: <1406583029.35.0.857255601544.issue22097@psf.upfronthosting.co.za>
Message-ID: <1635023593.74.0.549421005385.issue22097@roundup.psfhosted.org>


Change by Yoann Aubineau <yoann.aubineau at gmail.com>:


----------
nosy:  -yaubi

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22097>
_______________________________________

From report at bugs.python.org  Sat Oct 23 17:13:18 2021
From: report at bugs.python.org (Yoann Aubineau)
Date: Sat, 23 Oct 2021 21:13:18 +0000
Subject: [issue6785] IncompleteRead / BadStatus when parsing
 http://peakoil.mobi
In-Reply-To: <1251294693.63.0.748199046509.issue6785@psf.upfronthosting.co.za>
Message-ID: <1635023598.72.0.395680441119.issue6785@roundup.psfhosted.org>


Change by Yoann Aubineau <yoann.aubineau at gmail.com>:


----------
nosy:  -yaubi

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue6785>
_______________________________________

From report at bugs.python.org  Sat Oct 23 17:13:15 2021
From: report at bugs.python.org (Yoann Aubineau)
Date: Sat, 23 Oct 2021 21:13:15 +0000
Subject: [issue3445] Ignore missing attributes in functools.update_wrapper
In-Reply-To: <1216999615.48.0.706294847693.issue3445@psf.upfronthosting.co.za>
Message-ID: <1635023595.66.0.0251392610019.issue3445@roundup.psfhosted.org>


Change by Yoann Aubineau <yoann.aubineau at gmail.com>:


----------
nosy:  -yaubi

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue3445>
_______________________________________

From report at bugs.python.org  Sat Oct 23 17:28:44 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 21:28:44 +0000
Subject: [issue45591] PathFinder does not find namespace packages children
Message-ID: <1635024524.91.0.931449499561.issue45591@roundup.psfhosted.org>


New submission from Filipe La?ns <lains at riseup.net>:

```
$ tree namespace
namespace/
??? a.py

0 directories, 1 file
```

```
$ ./python
Python 3.9.7 (default, Oct 10 2021, 15:13:22)
[GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from importlib.machinery import PathFinder
>>> PathFinder.find_
PathFinder.find_distributions(  PathFinder.find_module(         PathFinder.find_spec(
>>> PathFinder.find_spec('namespace')
ModuleSpec(name='namespace', loader=None, submodule_search_locations=_NamespacePath(['/home/anubis/git/cpython/namespace']))
>>> PathFinder.find_spec('namespace.a')
```

Currently, it is unable to find namespace.a, but it should:

```
Python 3.11.0a1+ (heads/main:9e05da6224, Oct 23 2021, 20:36:14) [GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from importlib.machinery import PathFinder
>>> spec = PathFinder.find_spec('namespace')
>>> spec.loader.load_module('namespace.a')
<frozen importlib._bootstrap>:283: DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead
<module 'namespace.a' (<_frozen_importlib_external.NamespaceLoader object at 0x7f81b944f480>)>
```

I can make a PR, but just wanted to make sure the current behavior is not intended.

----------
messages: 404912
nosy: FFY00, brett.cannon, eric.snow, ncoghlan
priority: normal
severity: normal
status: open
title: PathFinder does not find namespace packages children

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45591>
_______________________________________

From report at bugs.python.org  Sat Oct 23 17:36:36 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 23 Oct 2021 21:36:36 +0000
Subject: [issue45592] NamespaceLoader does not implement create_module or
 exec_module
Message-ID: <1635024996.39.0.539683336304.issue45592@roundup.psfhosted.org>


New submission from Filipe La?ns <lains at riseup.net>:

NamespaceLoader currently does not implement create_module or exec_module, which is problematic since load_module is deprecated.

The create_module docstring is the same as _LoaderBasics:

```
def create_module(self, spec):
    """Use default semantics for module creation."""
```

Is it intended to be empty, or is NamespaceLoader unfinished?

If this is intended, how should we create the module instead? If there is other part of the code dealing this, via a fallback in case the loader does not implement this method, wouldn't it make sense to put that in in the loader itself for standalone use?

----------
messages: 404913
nosy: FFY00, brett.cannon, eric.snow, ncoghlan
priority: normal
severity: normal
status: open
title: NamespaceLoader does not implement create_module or exec_module

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45592>
_______________________________________

From report at bugs.python.org  Sat Oct 23 19:08:33 2021
From: report at bugs.python.org (=?utf-8?q?Maciej_Urba=C5=84ski?=)
Date: Sat, 23 Oct 2021 23:08:33 +0000
Subject: [issue45593] SpooledTemporaryFile.truncate returns None
Message-ID: <1635030512.97.0.747524706746.issue45593@roundup.psfhosted.org>


New submission from Maciej Urba?ski <rooter at kyberian.net>:

Related:
https://bugs.python.org/issue40287
https://bugs.python.org/msg319145

----------
components: Library (Lib)
messages: 404914
nosy: rooter
priority: normal
severity: normal
status: open
title: SpooledTemporaryFile.truncate returns None
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45593>
_______________________________________

From report at bugs.python.org  Sat Oct 23 19:22:00 2021
From: report at bugs.python.org (=?utf-8?q?Maciej_Urba=C5=84ski?=)
Date: Sat, 23 Oct 2021 23:22:00 +0000
Subject: [issue45593] SpooledTemporaryFile.truncate returns None
In-Reply-To: <1635030512.97.0.747524706746.issue45593@roundup.psfhosted.org>
Message-ID: <1635031320.9.0.868949371818.issue45593@roundup.psfhosted.org>


Change by Maciej Urba?ski <rooter at kyberian.net>:


----------
keywords: +patch
pull_requests: +27466
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29197

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45593>
_______________________________________

From report at bugs.python.org  Sat Oct 23 22:45:48 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Sun, 24 Oct 2021 02:45:48 +0000
Subject: [issue45586] Use starred expressions in subscripts
In-Reply-To: <1634979504.27.0.148840399936.issue45586@roundup.psfhosted.org>
Message-ID: <1635043548.06.0.715447987154.issue45586@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

Jacob wrote:
    a[[0, *[0, 0], 0]]
which passes the *list* [0, 0, 0, 0] into __getitem__. In numpy, passing lists into __getitem__ does things like array([1, 10, 100])[[2, 1]] --> array([100, 10]).

But I think Peter is requesting that the following work:
    a[0, *[0, 0], 0]
    (this is currently a SyntaxError)
and the proposal is that it would pass the *tuple* (0, 0, 0, 0) into __getitem__, indexing into each dimension of the array.

A workaround is to use a[(0, *[0, 0], 0)] -- just one extra pair of parentheses.

This is a duplicate of https://bugs.python.org/issue43812 , where it was pointed out that this is currently being proposed as part of https://www.python.org/dev/peps/pep-0646/#implications , which it appears is in the queue of things for the steering council to rule on. I'll close this as a duplicate for now, but feel free to re-open if you feel something is missing from that PEP.

----------
nosy: +Dennis Sweeney
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Tuple unpacking in getitem
title: Use starred expressions in list indices -> Use starred expressions in subscripts

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45586>
_______________________________________

From report at bugs.python.org  Sun Oct 24 00:20:36 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 24 Oct 2021 04:20:36 +0000
Subject: [issue45579] [list.append(i) for i in list] causes high resources
 usage
In-Reply-To: <1634928925.4.0.945346089321.issue45579@roundup.psfhosted.org>
Message-ID: <1635049236.5.0.0323202361171.issue45579@roundup.psfhosted.org>


Change by Raymond Hettinger <raymond.hettinger at gmail.com>:


----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45579>
_______________________________________

From report at bugs.python.org  Sun Oct 24 04:09:32 2021
From: report at bugs.python.org (Nathan Collins)
Date: Sun, 24 Oct 2021 08:09:32 +0000
Subject: [issue44805] asyncio.StreamReader.read hangs for reused socket file
 descriptors when asyncio.StreamWriter.close() is not called
In-Reply-To: <1627890323.27.0.0668623257849.issue44805@roundup.psfhosted.org>
Message-ID: <1635062972.32.0.654029279818.issue44805@roundup.psfhosted.org>


Nathan Collins <nathan.collins at gmail.com> added the comment:

Just wanted to clarify: my previous "where everything works" comment is not saying this bug doesn't exist, I just mean I missed one case in my analysis of the bug. The bug is very much there, and easy to reproduce using the example programs I attached.

Bump!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44805>
_______________________________________

From report at bugs.python.org  Sun Oct 24 04:30:10 2021
From: report at bugs.python.org (Nathan Collins)
Date: Sun, 24 Oct 2021 08:30:10 +0000
Subject: [issue45594] Feature Request: add EHOSTUNREACH subclass to
 ConnectionError
Message-ID: <1635064210.44.0.451558275384.issue45594@roundup.psfhosted.org>


New submission from Nathan Collins <nathan.collins at gmail.com>:

WHAT

It would be nice if there was a special-case subclass of the standard library OSError/ConnectionError class for C EHOSTUNREACH (a.k.a. "no route to host") errors. Currently there are special-case subclasses of ConnectionError for several other types of connection errors, namely BrokenPipeError, ConnectionAbortedError, ConnectionRefusedError and ConnectionResetError. I'm asking that a new, similar subclass called HostUnreachableError be added, corresponding to C errno EHOSTUNREACH.

HOW

I believe this is as simple as adding four lines to CPython's exceptions.c, e.g. following ECONNABORTED's special treatment via the ConnectionAbortedError subclass there.

WHY

These special case OSError/ConnectionError exceptions are useful for several reasons. First, they give human friendly names to an otherwise less helpful OSError exceptions. Second, they make it easier to write portable code, because different OSes use different C errno numbers for the corresponding C error. For example, EHOSTUNREACH is errno 113 on Linux [1] and 110 on Windows [2].

[1] https://github.com/torvalds/linux/blob/9c0c4d24ac000e52d55348961d3a3ba42065e0cf/include/uapi/asm-generic/errno.h#L96
[2] https://docs.microsoft.com/en-us/cpp/c-runtime-library/errno-constants?view=msvc-160

----------
components: Library (Lib)
messages: 404917
nosy: ntc2
priority: normal
severity: normal
status: open
title: Feature Request: add EHOSTUNREACH subclass to ConnectionError
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45594>
_______________________________________

From report at bugs.python.org  Sun Oct 24 04:35:06 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Sun, 24 Oct 2021 08:35:06 +0000
Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints
In-Reply-To: <1635018386.87.0.890706617097.issue45524@roundup.psfhosted.org>
Message-ID: <CAO_bL1zpiF4MbNsoYACPdROVrKLCpgq3wQT3R6X5YckDs5H6Xg@mail.gmail.com>


Nikita Sobolev <mail at sobolevn.me> added the comment:

In my opinion, it is never a bad thing to create a new issue :)

??, 23 ???. 2021 ?. ? 22:46, Sergei Lebedev <report at bugs.python.org>:

>
> Sergei Lebedev <slebedev at google.com> added the comment:
>
> Is it worth filing a separate issue for locals()?
>
> In my experience local classes are less common than cross-module
> inheritance, so I suspect that the chances of someone accidentally hitting
> lack of locals() forwarding are quite low. However, given how confusing the
> error message is, it might be worth having an issue for that. Wdyt?
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue45524>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45524>
_______________________________________

From report at bugs.python.org  Sun Oct 24 04:53:25 2021
From: report at bugs.python.org (Nathan Collins)
Date: Sun, 24 Oct 2021 08:53:25 +0000
Subject: [issue45594] Feature Request: add EHOSTUNREACH subclass to
 ConnectionError
In-Reply-To: <1635064210.44.0.451558275384.issue45594@roundup.psfhosted.org>
Message-ID: <1635065605.31.0.756269963677.issue45594@roundup.psfhosted.org>


Nathan Collins <nathan.collins at gmail.com> added the comment:

Apparently the existing ConnectionError and its subclasses were added as part of PEP 3151, tracked here: https://bugs.python.org/issue12555 .

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45594>
_______________________________________

From report at bugs.python.org  Sun Oct 24 04:59:30 2021
From: report at bugs.python.org (mike mcleod)
Date: Sun, 24 Oct 2021 08:59:30 +0000
Subject: [issue2628] ftplib Persistent data connection
In-Reply-To: <1208130611.58.0.0933193390026.issue2628@psf.upfronthosting.co.za>
Message-ID: <1635065970.04.0.404148098069.issue2628@roundup.psfhosted.org>


mike mcleod <mikecmcleod at gmail.com> added the comment:

Hi,

I would like to help on this issue.

----------
nosy: +mikecmcleod

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2628>
_______________________________________

From report at bugs.python.org  Sun Oct 24 05:01:25 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sun, 24 Oct 2021 09:01:25 +0000
Subject: [issue45595] [Build] Make extensions depend on header files
Message-ID: <1635066085.24.0.0932129661238.issue45595@roundup.psfhosted.org>


New submission from Christian Heimes <lists at cheimes.de>:

Any change to a Python header file triggers a rebuild of Python core objects. The extension modules are not automatically rebuild in several cases. This is slightly annoying for core development because it forces me to do ``make clean`` too often.

* setup.py adds dependencies on Includes/*.h but not on header files in "internal" and "cpython" subdirectory
* Modules/Setup and makesetup do not add a dependency on PYTHON_HEADERS
* Modules/Setup is also missing dependencies on module-specific headers, e.g. _sre.o should depend on sre.h.

----------
assignee: christian.heimes
components: Build
messages: 404921
nosy: brett.cannon, christian.heimes
priority: normal
severity: normal
status: open
title: [Build] Make extensions depend on header files
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45595>
_______________________________________

From report at bugs.python.org  Sun Oct 24 05:07:54 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sun, 24 Oct 2021 09:07:54 +0000
Subject: [issue45595] [Build] Make extensions depend on header files
In-Reply-To: <1635066085.24.0.0932129661238.issue45595@roundup.psfhosted.org>
Message-ID: <1635066474.65.0.397849033786.issue45595@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
keywords: +patch
pull_requests: +27467
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29198

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45595>
_______________________________________

From report at bugs.python.org  Sun Oct 24 05:38:17 2021
From: report at bugs.python.org (Julien Palard)
Date: Sun, 24 Oct 2021 09:38:17 +0000
Subject: [issue45596] Python opens the ./<string> file on exception while
 using -c
Message-ID: <1635068297.43.0.0595906544239.issue45596@roundup.psfhosted.org>


New submission from Julien Palard <julien+python at palard.fr>:

When running `python -c 'raise ValueError'` Python tries to open the '<string>' file, so:

    $ echo Coucou > '<string>'
    $ python -c 'raise ValueError'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
        Coucou
    ValueError

----------
messages: 404922
nosy: mdk
priority: normal
severity: normal
status: open
title: Python opens the ./<string> file on exception while using -c

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45596>
_______________________________________

From report at bugs.python.org  Sun Oct 24 05:38:45 2021
From: report at bugs.python.org (Basil Peace)
Date: Sun, 24 Oct 2021 09:38:45 +0000
Subject: [issue45597] os.path.realpath returns invalid path for junction
 pointing to letter-less volume
Message-ID: <1635068325.62.0.0976139991665.issue45597@roundup.psfhosted.org>


New submission from Basil Peace <grv87 at yandex.ru>:

If a path contains a junction pointing to a dir on a letter-less drive then `os.path.realpath` returns `Volume{<uuid>}\dir`, without `\\?\` prefix. 

This path, of course, doesn't work correctly. Actually, it looks relative.

Original issue: https://github.com/pypa/pip/issues/10597

----------
components: Windows
messages: 404923
nosy: grv87, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: os.path.realpath returns invalid path for junction pointing to letter-less volume
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45597>
_______________________________________

From report at bugs.python.org  Sun Oct 24 06:55:42 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Sun, 24 Oct 2021 10:55:42 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1635017430.44.0.267232309114.issue45548@roundup.psfhosted.org>
Message-ID: <69d227ca-4ffe-6a8a-e92d-4ed0fc76139a@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 23.10.2021 21:30, Christian Heimes wrote:
> 
> The trick would move the math function back into the core. Mark moved the math functions out of the core on purpose, see bpo-7518.

I don't follow you. With the _math.o target in Makefile.pre.in,
_math.c was always compiled into the main Python interpreter,
even with math and cmath built as shared libs.

And yes, it does export a symbol, but _Py_log1p is not going to
conflict with anything else out there :-)

The trick is essentially not changing the 3.10 status quo. It
only makes sure that _math.o is compiled in the same way as all
other Setup managed modules and moves the target from Makefile.pre.in
to the makesetup section of the final Makefile.

And it removes the warning of having multiple _math.o targets
ending up in the Makefile, which isn't problematic, since make
will always use the last definition (from the makesetup section),
but doesn't look nice either.

OTOH, _math.h and .c are really small, so perhaps it's better
to merge both into a single _math.h file and include that directly
into the modules. I believe that's what Brett's patch does, right ?

Today, only the _Py_log1p() code is actually used and then only
to address a very special case in a platform independent way
(log1p(-0.0) == -0.0), so the whole code boils down to some 10
lines of C being incorporated.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Sun Oct 24 07:15:13 2021
From: report at bugs.python.org (Eryk Sun)
Date: Sun, 24 Oct 2021 11:15:13 +0000
Subject: [issue45597] os.path.realpath returns invalid path for junction
 pointing to letter-less volume
In-Reply-To: <1635068325.62.0.0976139991665.issue45597@roundup.psfhosted.org>
Message-ID: <1635074113.77.0.644928530771.issue45597@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

This is from checking whether the \\?\ prefix can be stripped. The _getfinalpathname() call that it makes fails with the initial winerror (ERROR_PATH_NOT_FOUND), since nt._getfinalpathname() still lacks support for volume GUID paths. In this case, it assumes the path doesn't exist and removes the prefix. 

This check should be skipped for all prefixed paths if they aren't drives or UNC shares. For example, if colon_sep (i.e. ":\\") is defined:

        # The path returned by _getfinalpathname will always start with \\?\ -
        # strip off that prefix unless it was already provided on the original
        # path.
        if not had_prefix and path.startswith(prefix):
            # For UNC paths, the prefix will be \\?\UNC\
            if path.startswith(unc_prefix):
                spath = new_unc_prefix + path[len(unc_prefix):]
            # For drive paths, the root is of the form \\?\X:\
            elif path.startswith(colon_sep, len(prefix) + 1):
                spath = path[len(prefix):]
            # For all others, the prefix must be retained.
            else:
                spath = None
            if spath is not None:
                # Ensure that the non-prefixed path resolves to the same path
                try:
                    if _getfinalpathname(spath) == path:
                        path = spath
                except OSError as ex:
                    # If the path does not exist and originally did not exist, then
                    # strip the prefix anyway.
                    if ex.winerror == initial_winerror:
                        path = spath
        return path

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45597>
_______________________________________

From report at bugs.python.org  Sun Oct 24 08:05:01 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sun, 24 Oct 2021 12:05:01 +0000
Subject: [issue45598] setup.py grep_headers_for() is broken by design
Message-ID: <1635077101.64.0.462136707743.issue45598@roundup.psfhosted.org>


New submission from Christian Heimes <lists at cheimes.de>:

The setup.py helper function grep_headers_for() is used by ctypes build step to search header files for functions. The function kinda works on most platforms, but only by accident. On my system it opens all header files that match /usr/include/*.h and returns true if any (!) header file contains the string (!) "ffi_prep_cif_var". The check would also match "ffi_prep_cif_var" in a comment of an unrelated header file.

We cannot limit the search to "ffi.h" only, because that would break multiarch builds with a header file like this:

    #if defined(__i386__)
    #include "ffi-i386.h"
    #elif defined(__powerpc64__)
    #include "ffi-ppc64.h"
    ...

Solutions:

1) Use "AC_EGREP_HEADER" autoconf macro. It runs a header file through the C preprocessor
2) Use AC_LINK_IFELSE autoconf macro. This macro compiles and links code to detect if a library exports a function.
3) Re-implement any of the macros in pure Python (ugh!)
4) Just assume that libffi supports ffi_prep_cif_var, ffi_prep_closure_loc, and ffi_closure_alloc on our target platforms. According to [1] the functions have been around for over a decade.

I favor (4).

Ned, what about USING_APPLE_OS_LIBFFI? Is it still relevant?

[1] https://github.com/libffi/libffi/blame/48bdb02867edb7e9f3785ccb4bdff1087fb44246/include/ffi.h.in#L309

----------
components: Build, ctypes
messages: 404926
nosy: amaury.forgeotdarc, belopolsky, christian.heimes, meador.inge, ned.deily
priority: normal
severity: normal
status: open
title: setup.py grep_headers_for() is broken by design
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45598>
_______________________________________

From report at bugs.python.org  Sun Oct 24 08:06:09 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sun, 24 Oct 2021 12:06:09 +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: <1635077169.16.0.126838725614.issue45598@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

If we remove grep_headers_for(), then we can also close bpo-42325

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45598>
_______________________________________

From report at bugs.python.org  Sun Oct 24 08:59:01 2021
From: report at bugs.python.org (Christian Heimes)
Date: Sun, 24 Oct 2021 12:59:01 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635080341.34.0.912650476989.issue45548@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
pull_requests: +27468
pull_request: https://github.com/python/cpython/pull/29199

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Sun Oct 24 09:01:37 2021
From: report at bugs.python.org (Ian Fisher)
Date: Sun, 24 Oct 2021 13:01:37 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1635080497.79.0.594277354304.issue45335@roundup.psfhosted.org>


Change by Ian Fisher <ian at iafisher.com>:


----------
keywords: +patch
pull_requests: +27469
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29200

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Sun Oct 24 09:06:35 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 24 Oct 2021 13:06:35 +0000
Subject: =?utf-8?q?=5Bissue45566=5D_dataclasses=E2=80=99s_=60test=5Ffrozen=5Fpickl?=
 =?utf-8?q?e=60_does_not_use_all_possible_=60pickle=60_protocols?=
In-Reply-To: <1634891947.06.0.600142901544.issue45566@roundup.psfhosted.org>
Message-ID: <1635080795.84.0.516040292684.issue45566@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 07236d562e59c6650227be18fa6ffc66b18d4741 by Nikita Sobolev in branch 'main':
bpo-45566: `test_frozen_pickle` checks all `pickle` protocols (GH-29150)
https://github.com/python/cpython/commit/07236d562e59c6650227be18fa6ffc66b18d4741


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45566>
_______________________________________

From report at bugs.python.org  Sun Oct 24 09:06:52 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 24 Oct 2021 13:06:52 +0000
Subject: =?utf-8?q?=5Bissue45566=5D_dataclasses=E2=80=99s_=60test=5Ffrozen=5Fpickl?=
 =?utf-8?q?e=60_does_not_use_all_possible_=60pickle=60_protocols?=
In-Reply-To: <1634891947.06.0.600142901544.issue45566@roundup.psfhosted.org>
Message-ID: <1635080812.12.0.882266003952.issue45566@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27470
pull_request: https://github.com/python/cpython/pull/29201

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45566>
_______________________________________

From report at bugs.python.org  Sun Oct 24 09:12:10 2021
From: report at bugs.python.org (Raphael)
Date: Sun, 24 Oct 2021 13:12:10 +0000
Subject: [issue44787] Missing valid directive %D in datetime.strftime()
 documentation
In-Reply-To: <1627676685.12.0.81634911114.issue44787@roundup.psfhosted.org>
Message-ID: <1635081130.47.0.483794998822.issue44787@roundup.psfhosted.org>


Raphael <rafal1.1990 at o2.pl> added the comment:

Perhaps it could be mentioned more clearly in the datetime documentation that apart from the directives of the C89 standard, you can also use those that the underlying libc strftime() supports.

The following sentence from https://docs.python.org/3/library/time.html#time.strftime describes it well in my opinion:
"Additional directives may be supported on certain platforms, but only the ones listed here have a meaning standardized by ANSI C."

Perhaps a reference to "man strftime" would also be helpful.

----------
nosy: +Raphael

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44787>
_______________________________________

From report at bugs.python.org  Sun Oct 24 09:27:36 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Sun, 24 Oct 2021 13:27:36 +0000
Subject: [issue33439] python-config.py should be part of the stdlib
In-Reply-To: <1525695349.77.0.682650639539.issue33439@psf.upfronthosting.co.za>
Message-ID: <1635082056.76.0.159144974308.issue33439@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

Yes, this was also proposed here: https://bugs.python.org/issue11602

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33439>
_______________________________________

From report at bugs.python.org  Sun Oct 24 09:29:45 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 24 Oct 2021 13:29:45 +0000
Subject: =?utf-8?q?=5Bissue45566=5D_dataclasses=E2=80=99s_=60test=5Ffrozen=5Fpickl?=
 =?utf-8?q?e=60_does_not_use_all_possible_=60pickle=60_protocols?=
In-Reply-To: <1634891947.06.0.600142901544.issue45566@roundup.psfhosted.org>
Message-ID: <1635082185.29.0.596502590511.issue45566@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 36971fd1f490664fb62b1fab869c5637669f0967 by Miss Islington (bot) in branch '3.10':
bpo-45566: `test_frozen_pickle` checks all `pickle` protocols (GH-29150)
https://github.com/python/cpython/commit/36971fd1f490664fb62b1fab869c5637669f0967


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45566>
_______________________________________

From report at bugs.python.org  Sun Oct 24 09:33:27 2021
From: report at bugs.python.org (Hai Shi)
Date: Sun, 24 Oct 2021 13:33:27 +0000
Subject: [issue45275] Make argparse print description of subcommand when
 invoke help doc on subcommand
In-Reply-To: <1632457940.29.0.512184786201.issue45275@roundup.psfhosted.org>
Message-ID: <1635082407.39.0.404794780664.issue45275@roundup.psfhosted.org>


Hai Shi <shihai1991 at 126.com> added the comment:

Hi, Chuanlong. Would you mind to upload a demo for this question?

----------
nosy: +shihai1991

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45275>
_______________________________________

From report at bugs.python.org  Sun Oct 24 09:50:42 2021
From: report at bugs.python.org (Raphael)
Date: Sun, 24 Oct 2021 13:50:42 +0000
Subject: [issue45599] Please official support %G,
 %V and %u directives in time library
Message-ID: <1635083442.63.0.338428674269.issue45599@roundup.psfhosted.org>


New submission from Raphael <rafal1.1990 at o2.pl>:

In the time library documentation (https://docs.python.org/3/library/time.html) the directives %G, %V and %u for strftime() are missing, although they work (at least for me in Linux Mint):

$ python3
Python 3.8.10 (default, Sep 28 2021, 16:10:42) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from time import strftime
>>> strftime("%G-W%V-%u")
'2021-W42-7'

This seems to be officially supported by the datetime library since https://bugs.python.org/issue12006 or at least there is a section for the ISO 8601 week directives in the datetime documentation:
https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes

I would like to see the same for the time library.

----------
components: Library (Lib)
messages: 404933
nosy: Raphael
priority: normal
severity: normal
status: open
title: Please official support %G, %V and %u directives in time library
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45599>
_______________________________________

From report at bugs.python.org  Sun Oct 24 11:11:07 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Sun, 24 Oct 2021 15:11:07 +0000
Subject: [issue45600] First sentence in docs for os.environ
Message-ID: <1635088267.89.0.720866018266.issue45600@roundup.psfhosted.org>


New submission from Andrei Kulakov <andrei.avk at gmail.com>:

In os.eviron docs:

https://docs.python.org/3.11/library/os.html#os.environ

A mapping object representing the string environment.

Should that be "... the process environment." ?

----------
assignee: docs at python
components: Documentation
messages: 404934
nosy: andrei.avk, docs at python
priority: low
severity: normal
status: open
title: First sentence in docs for os.environ
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45600>
_______________________________________

From report at bugs.python.org  Sun Oct 24 11:25:04 2021
From: report at bugs.python.org (Eryk Sun)
Date: Sun, 24 Oct 2021 15:25:04 +0000
Subject: [issue45600] First sentence in docs for os.environ
In-Reply-To: <1635088267.89.0.720866018266.issue45600@roundup.psfhosted.org>
Message-ID: <1635089104.03.0.509935975789.issue45600@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

The os.environ description appears to be worded as the "string environment" in contrast to the os.environb "environment as byte strings". I like the emphasis on the "process environment". How about "A mapping object of key and value strings that represent the process environment"?

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45600>
_______________________________________

From report at bugs.python.org  Sun Oct 24 11:43:16 2021
From: report at bugs.python.org (Sam Bull)
Date: Sun, 24 Oct 2021 15:43:16 +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: <1635090196.87.0.622316239781.issue37658@roundup.psfhosted.org>


Change by Sam Bull <m6f6g7 at sambull.org>:


----------
nosy: +dreamsorcerer
nosy_count: 10.0 -> 11.0
pull_requests: +27471
pull_request: https://github.com/python/cpython/pull/29202

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37658>
_______________________________________

From report at bugs.python.org  Sun Oct 24 12:01:39 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sun, 24 Oct 2021 16:01:39 +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: <1635091299.17.0.686059662519.issue45429@roundup.psfhosted.org>


Change by Dong-hee Na <donghee.na at python.org>:


----------
keywords: +patch
pull_requests: +27472
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29203

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45429>
_______________________________________

From report at bugs.python.org  Sun Oct 24 12:03:37 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sun, 24 Oct 2021 16:03:37 +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: <1635091417.16.0.199084434554.issue45429@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

AS-IS:
average:  0.015609736680984497

TO-BE:
average:  2.7387380599975585e-05

Impressive result :)

----------
Added file: https://bugs.python.org/file50392/bpo-45429.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45429>
_______________________________________

From report at bugs.python.org  Sun Oct 24 12:42:54 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Sun, 24 Oct 2021 16:42:54 +0000
Subject: [issue45600] First sentence in docs for os.environ
In-Reply-To: <1635088267.89.0.720866018266.issue45600@roundup.psfhosted.org>
Message-ID: <1635093774.28.0.371086326094.issue45600@roundup.psfhosted.org>


Change by Andrei Kulakov <andrei.avk at gmail.com>:


----------
keywords: +patch
pull_requests: +27473
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29204

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45600>
_______________________________________

From report at bugs.python.org  Sun Oct 24 12:44:09 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Sun, 24 Oct 2021 16:44:09 +0000
Subject: [issue45600] First sentence in docs for os.environ
In-Reply-To: <1635088267.89.0.720866018266.issue45600@roundup.psfhosted.org>
Message-ID: <1635093849.91.0.698039767942.issue45600@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Eryk: sounds much better and clearer I think, I've put up a PR (that also does the same update to os.environb).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45600>
_______________________________________

From report at bugs.python.org  Sun Oct 24 12:44:30 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Sun, 24 Oct 2021 16:44:30 +0000
Subject: [issue45600] First sentence in docs for os.environ
In-Reply-To: <1635088267.89.0.720866018266.issue45600@roundup.psfhosted.org>
Message-ID: <1635093870.24.0.780385341358.issue45600@roundup.psfhosted.org>


Change by Andrei Kulakov <andrei.avk at gmail.com>:


----------
nosy: +kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45600>
_______________________________________

From report at bugs.python.org  Sun Oct 24 13:31:57 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 24 Oct 2021 17:31:57 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
In-Reply-To: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>
Message-ID: <1635096717.86.0.840806022086.issue45588@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

For comparison, here is a recipe that I was originally going to include in the FAQ entry but later decided against it.

It only had an advantage over @lru_cache with instances so large that we can't wait for them to age out of the cache.  It shouldn't be used if new, equivalent instances to be created; otherwise, the hit rate would fall.  The class needs to be weak-referenceable, so __weakref__ needs to be a listed field when __slots__ are defined.  Also, @weak_lru is slower than @lru_cache.  

Compared to @cached_method in the current PR, @weak_lru creates a single unified cache rather than many separate caches.  This gives lower space overhead, allows a collective maxsize to be specified, and gives central control over cache statistics and clearing.  If the instances support hashing and equality tests, the @weak_lru recipe increases the hit rate across instances that are equivalent but not identical.

That said, @cached_method is much faster than @weak_lru because it doesn't need to create a new ref() on every call and it doesn't need a pure python wrapper.

-----------------------------------------------------

import functools
import weakref

def weak_lru(maxsize=128, typed=False):
    'LRU Cache decorator that keeps a weak reference to "self"'

    proxy = weakref.proxy

    def decorator(func):

        _func = functools.lru_cache(maxsize, typed)(func)

        @functools.wraps(func)
        def wrapper(self, /, *args, **kwargs):
            return _func(proxy(self), *args, **kwargs)

        return wrapper

    return decorator

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Sun Oct 24 14:35:37 2021
From: report at bugs.python.org (Marten Lienen)
Date: Sun, 24 Oct 2021 18:35:37 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
In-Reply-To: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>
Message-ID: <1635100537.3.0.806029746386.issue45588@roundup.psfhosted.org>


Marten Lienen <marten.lienen at gmail.com> added the comment:

Central control over the cache and its parameters is definitely a big plus. In my use case, the objects hold references to large blocks of GPU memory that should be freed as soon as possible. Additionally, I use cached_method to cache expensive hash calculations which the alternatives cannot do because they would run into bottomless recursion.

Caching methods looks to be significantly more complex than caching functions because there are multiple possible priorities, e.g. fast gc, performance, cross-instance cache hits, caching __hash__. Do you think, in the face of these ambiguities, that the stdlib should potentially just not cover this? Though there is already the shared, global cache alternative in applying @lru_cache to a method.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Sun Oct 24 15:42:31 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Sun, 24 Oct 2021 19:42:31 +0000
Subject: =?utf-8?q?=5Bissue45566=5D_dataclasses=E2=80=99s_=60test=5Ffrozen=5Fpickl?=
 =?utf-8?q?e=60_does_not_use_all_possible_=60pickle=60_protocols?=
In-Reply-To: <1634891947.06.0.600142901544.issue45566@roundup.psfhosted.org>
Message-ID: <1635104551.24.0.527526477706.issue45566@roundup.psfhosted.org>


Change by Eric V. Smith <eric at trueblade.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45566>
_______________________________________

From report at bugs.python.org  Sun Oct 24 16:36:23 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 24 Oct 2021 20:36:23 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
In-Reply-To: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>
Message-ID: <1635107783.74.0.712129904668.issue45588@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

> In my use case, the objects hold references to large blocks 
> of GPU memory that should be freed as soon as possible. 

That makes sense.  I can see why you reached for weak references.

Would it be a workable alternative to have an explicit close() method to free the underlying resources?  We do this with StringIO instances because relying on reference counting or GC is a bit fragile.


> Additionally, I use cached_method to cache expensive hash 
> calculations which the alternatives cannot do because they 
> would run into bottomless recursion.

This is a new concern.  Can you provide a minimal example that recurses infinitely with @lru_cache but not with @cached_method?  Offhand, I can't think of an example.


> Do you think, in the face of these ambiguities, that the
> stdlib should potentially just not cover this?

Perhaps this should be put on PyPI rather than in the standard library. 

The core problem is that having @cached_method in the standard library tells users that this is the recommended and preferred way to cache methods.  However in most cases they would be worse off.  And it isn't easy to know when @cached_method would be a win or to assess the loss of other optimizations like __slots__ and key-sharing dicts.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Sun Oct 24 16:56:31 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 24 Oct 2021 20:56:31 +0000
Subject: [issue45599] Please official support %G,
 %V and %u directives in time library
In-Reply-To: <1635083442.63.0.338428674269.issue45599@roundup.psfhosted.org>
Message-ID: <1635108991.29.0.407867127794.issue45599@roundup.psfhosted.org>


Change by Raymond Hettinger <raymond.hettinger at gmail.com>:


----------
versions:  -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45599>
_______________________________________

From report at bugs.python.org  Sun Oct 24 17:02:13 2021
From: report at bugs.python.org (Irit Katriel)
Date: Sun, 24 Oct 2021 21:02:13 +0000
Subject: [issue45596] Python opens the ./<string> file on exception while
 using -c
In-Reply-To: <1635068297.43.0.0595906544239.issue45596@roundup.psfhosted.org>
Message-ID: <1635109333.62.0.0927053952423.issue45596@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Can you check on 3.11? I believe it was fixed under issue1514420.

----------
nosy: +iritkatriel
resolution:  -> duplicate
superseder:  -> Traceback display code can attempt to open a file named "<stdin>"

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45596>
_______________________________________

From report at bugs.python.org  Sun Oct 24 17:03:43 2021
From: report at bugs.python.org (Richard Hinerfeld)
Date: Sun, 24 Oct 2021 21:03:43 +0000
Subject: [issue45601] test_tk and test_ttk_guionly fail with resource not
 availiable
Message-ID: <1635109423.03.0.279475515853.issue45601@roundup.psfhosted.org>


New submission from Richard Hinerfeld <rhinerfeldhou at gmail.com>:

Please note that test_tk and test_ttk_guionly fail when running testall
when compiling 3.8.9 python from source code.
Compiling on Linux Debian 64-bit bullseye 11.1.0 on a 2008 Mac Book.

----------
components: Build
files: TestTK.txt
messages: 404942
nosy: rhinerfeld1
priority: normal
severity: normal
status: open
title: test_tk and test_ttk_guionly fail with resource not availiable
type: compile error
versions: Python 3.8
Added file: https://bugs.python.org/file50393/TestTK.txt

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45601>
_______________________________________

From report at bugs.python.org  Sun Oct 24 17:06:00 2021
From: report at bugs.python.org (Irit Katriel)
Date: Sun, 24 Oct 2021 21:06:00 +0000
Subject: [issue45596] Python opens the ./<string> file on exception while
 using -c
In-Reply-To: <1635068297.43.0.0595906544239.issue45596@roundup.psfhosted.org>
Message-ID: <1635109560.75.0.212755329956.issue45596@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Actually I can check too :)

And it was fixed:

iritkatriel at Irits-MBP cpython % echo Coucou > '<string>'
iritkatriel at Irits-MBP cpython % ./python.exe -c 'raise ValueError'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ValueError
iritkatriel at Irits-MBP cpython %

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45596>
_______________________________________

From report at bugs.python.org  Sun Oct 24 17:07:28 2021
From: report at bugs.python.org (Irit Katriel)
Date: Sun, 24 Oct 2021 21:07:28 +0000
Subject: [issue45596] Python opens the ./<string> file on exception while
 using -c
In-Reply-To: <1635068297.43.0.0595906544239.issue45596@roundup.psfhosted.org>
Message-ID: <1635109648.96.0.651651270631.issue45596@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45596>
_______________________________________

From report at bugs.python.org  Sun Oct 24 17:11:47 2021
From: report at bugs.python.org (Richard Hinerfeld)
Date: Sun, 24 Oct 2021 21:11:47 +0000
Subject: [issue45601] test_tk and test_ttk_guionly fail with resource not
 availiable
In-Reply-To: <1635109423.03.0.279475515853.issue45601@roundup.psfhosted.org>
Message-ID: <1635109907.92.0.804377012242.issue45601@roundup.psfhosted.org>


Richard Hinerfeld <rhinerfeldhou at gmail.com> added the comment:

running build_scripts
copying and adjusting /home/richard/Python-3.8.9/Tools/scripts/pydoc3 -> build/scripts-3.8
copying and adjusting /home/richard/Python-3.8.9/Tools/scripts/idle3 -> build/scripts-3.8
copying and adjusting /home/richard/Python-3.8.9/Tools/scripts/2to3 -> build/scripts-3.8
changing mode of build/scripts-3.8/pydoc3 from 644 to 755
changing mode of build/scripts-3.8/idle3 from 644 to 755
changing mode of build/scripts-3.8/2to3 from 644 to 755
renaming build/scripts-3.8/pydoc3 to build/scripts-3.8/pydoc3.8
renaming build/scripts-3.8/idle3 to build/scripts-3.8/idle3.8
renaming build/scripts-3.8/2to3 to build/scripts-3.8/2to3-3.8
./python  ./Tools/scripts/run_tests.py -v test_ttk_guionly
/home/richard/Python-3.8.9/python -u -W default -bb -E -m test -r -w -j 0 -u all,-largefile,-audio,-gui -v test_ttk_guionly
== CPython 3.8.9 (default, Oct 24 2021, 15:58:53) [GCC 10.2.1 20210110]
== Linux-5.10.0-9-amd64-x86_64-with-glibc2.29 little-endian
== cwd: /home/richard/Python-3.8.9/build/test_python_34348
== CPU count: 2
== encodings: locale=UTF-8, FS=utf-8
Using random seed 6980064
0:00:00 load avg: 0.32 Run tests in parallel using 4 child processes
0:00:00 load avg: 0.32 [1/1] test_ttk_guionly skipped (resource denied)
test_ttk_guionly skipped -- Use of the 'gui' resource not enabled

== Tests result: SUCCESS ==

1 test skipped:
    test_ttk_guionly

Total duration: 957 ms
Tests result: SUCCESS

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45601>
_______________________________________

From report at bugs.python.org  Sun Oct 24 22:14:22 2021
From: report at bugs.python.org (Richard Hinerfeld)
Date: Mon, 25 Oct 2021 02:14:22 +0000
Subject: [issue37569] Complete your registration to Python tracker
In-Reply-To: <20211024205710.A861252B24E@bugs.ams1.psf.io>
Message-ID: <CAOTk90oMXUdpSSYZY2Vmh1QE6b5GUqF28Di-k=+PaNtXRuqRQA@mail.gmail.com>


Richard Hinerfeld <rhinerfeldhou at gmail.com> added the comment:

I just get an error when  I visit the URL

On Sun, Oct 24, 2021 at 4:57 PM Python tracker <report at bugs.python.org>
wrote:

> To complete your registration of the user "rhinerfeld1" with
> Python tracker, please visit the following URL:
>
>
> https://bugs.python.org/?@action=confrego&otk=MxJ6fZghVQdh3dhyE1fj8I7bFrmjfve9
>
>

----------
nosy: +rhinerfeld1

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37569>
_______________________________________

From report at bugs.python.org  Sun Oct 24 22:25:53 2021
From: report at bugs.python.org (Arthur Milchior)
Date: Mon, 25 Oct 2021 02:25:53 +0000
Subject: [issue45602] The grammar misses links that are present everywhere else
Message-ID: <1635128753.08.0.122680667814.issue45602@roundup.psfhosted.org>


New submission from Arthur Milchior <arthur at milchior.fr>:

The grammar, in https://docs.python.org/3/reference/grammar.html , lacks some utilities that the remaining of the documentation have.
While it remains usable, it is hard to navigate. As an example https://www.python.org/dev/peps/pep-0634/ 's "star_named_exrpsession" and "block" links to the general grammar page, and indeed can't link to the specific rules as there are no anchor on them.
This would also allow a related improvement: being able to click on a rule R in the right side of a declaration and go to the definition of R. Given the recursive nature of grammar, that would transform a sequence of search into a sequence of click (and even allow to use the browser's "back" to go back to the previous definition, or to open the new definition in a new tab)

As far as I can tell, the first action would be to add a new kind of token on Doc/tools/extensions/peg_highlight.py , so that we distinguish the left and the right part of the rule. The left part (the name of the declared rule) would be easy to recognize as it always start on the beginning of the line and end with :.
The second action would be that, for each declaration D, the html would contain an anchor "#D". And each time D would appear on the right hand side of a rule, it would be in a link to #D

I suspect that adding those links and anchor could be done by overriding the default formatter or highlighter, but I don't understand pygment well enough to know what should be done here

----------
assignee: docs at python
components: Documentation
messages: 404946
nosy: Arthur-Milchior, docs at python
priority: normal
severity: normal
status: open
title: The grammar misses links that are present everywhere else
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45602>
_______________________________________

From report at bugs.python.org  Sun Oct 24 23:21:52 2021
From: report at bugs.python.org (Tim Peters)
Date: Mon, 25 Oct 2021 03:21:52 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1635132112.06.0.896533266164.issue45530@roundup.psfhosted.org>


Tim Peters <tim at python.org> added the comment:

To be concrete, here's an implementation of a full-blown, stable lexicographic sort based on "bucket refinement". `xs` is a list of sequences to be sorted in lexicographic order. The types of the sequences don't matter (lists, tuples, strings, ...). Indeed, since list elements are never compared against each other directly, they don't even have to be the same sequence type.

This is already faster in pure Python than list.sort() for cases like:

    xs = [random.choices(range(100000), k=random.randrange(5, 30))
          for i in range(1000000)]

However, for cases like strings of the form

    'x' * 10_000 + str(i)

it's very much slower than list.sort(), despite that it "should be" very much faster. That appears mostly due to the:

            t.sort(key=lambda x: x[k])
            xs[lo : hi] = t

lines. list.sort() doesn't accept `lo` and `hi` arguments, so sorting _just_ a slice requires copying that slice into a temp list, sorting the temp, then copying the sorted temp back in. So dealing with a single `x` position in the string prefixes effectively requires physically copying the entire list twice over - mad overhead to copy the list 20 thousand times.

While the need doesn't come up all that often, I'd support adding optional `lo` and `hi` arguments to `list.sort()`. This isn't the first time the lack has turned a slick approach into a timing disaster for me ;-)

About list.sort()'s merge strategy, I'm glad to be rid of the original. It's not just correctness, it's the effort of _reasoning_ about its consequences. It was about a full decade before the first proof was published of that it really is a worst-case O(N log N) sort. listsort.txt didn't contain a proof because the only proof attempts I had were so complicated not even _I_ found them compelling ;-)

Vincent Jug? in particular started at the other end, looking for a merge strategy that made proof straightforward instead of Byzantine. It's straightforward under the "powersort" strategy too, although it relies on "well known" results about approximations to optimal binary search trees.

    def lexisort(xs):
        buckets = [(0, len(xs), 0)]
        while buckets:
            lo, hi, k = buckets.pop()
            t = []
            for i in range(lo, hi):
                x = xs[i]
                if k >= len(x):
                    xs[lo] = x
                    lo += 1
                else:
                    t.append(x)
            t.sort(key=lambda x: x[k])
            xs[lo : hi] = t
            while lo < hi:
                pivotk = xs[lo][k]
                i = lo + 1
                while i < hi and xs[i][k] == pivotk:
                    i += 1
                if i - lo > 1:
                    buckets.append((lo, i, k + 1))
                lo = i
            assert lo == hi

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Sun Oct 24 23:27:33 2021
From: report at bugs.python.org (Tim Peters)
Date: Mon, 25 Oct 2021 03:27:33 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1635132453.43.0.846329066957.issue45530@roundup.psfhosted.org>


Tim Peters <tim at python.org> added the comment:


New changeset 51ed2c56a1852cd6b09c85ba81312dc9782772ce by Tim Peters in branch 'main':
bpo-45530: speed listobject.c's unsafe_tuple_compare() (GH-29076)
https://github.com/python/cpython/commit/51ed2c56a1852cd6b09c85ba81312dc9782772ce


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Sun Oct 24 23:28:14 2021
From: report at bugs.python.org (Tim Peters)
Date: Mon, 25 Oct 2021 03:28:14 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1635132494.3.0.645535775855.issue45530@roundup.psfhosted.org>


Change by Tim Peters <tim at python.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Sun Oct 24 23:59:29 2021
From: report at bugs.python.org (Dean)
Date: Mon, 25 Oct 2021 03:59:29 +0000
Subject: [issue45603] [Windows]
Message-ID: <1635134369.55.0.048722857986.issue45603@roundup.psfhosted.org>


New submission from Dean <hl2guide at gmail.com>:

Running on Windows 10 Home PC, I'm running into an issue with Windows user account privileges and updating Python packages.

Upgrading a package (e.g. pip) with a lower-level user on Windows can result in a broken pip package (message of "no 'pip' package can be found").

It can be fixed by running (as admin):
python -m ensurepip

Then running an upgrade command as Admin.

Please consider enforcing Admin privileges for this action (upgrading packages).

----------
components: Library (Lib)
messages: 404949
nosy: hl2guide
priority: normal
severity: normal
status: open
title: [Windows]
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45603>
_______________________________________

From report at bugs.python.org  Mon Oct 25 00:00:30 2021
From: report at bugs.python.org (Dean)
Date: Mon, 25 Oct 2021 04:00:30 +0000
Subject: [issue45603] [Windows] account privileges and updating Python packages
In-Reply-To: <1635134369.55.0.048722857986.issue45603@roundup.psfhosted.org>
Message-ID: <1635134430.32.0.231682314723.issue45603@roundup.psfhosted.org>


Change by Dean <hl2guide at gmail.com>:


----------
title: [Windows] -> [Windows] account privileges and updating Python packages

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45603>
_______________________________________

From report at bugs.python.org  Mon Oct 25 03:41:52 2021
From: report at bugs.python.org (Martin)
Date: Mon, 25 Oct 2021 07:41:52 +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: <1635147712.77.0.796750414608.issue43656@roundup.psfhosted.org>


Martin <martin.schroeder at nerdluecht.de> added the comment:

> Can we determine if they came from an initialized object or from object in the middle of initialization?

That would be very nice because inside __init__ is the only place where we have to deal with partly initialized objects. But I think Python does not provide a way to detect this state.

Although I would very much like having FrameSummary robust to any kind error, I acknowledge that this might not be possible.

It might be frustrating for beginners, but I think the only way to "fix" this, is by having people implement their `repr`s correctly.

The documentation currently says[1]:

> This is typically used for debugging, so it is important that the representation is information-rich and unambiguous.

It should be added that __repr__ might be used to display partly initialized objects during debugging and therefore should deal with these gracefully.

[1] https://docs.python.org/3/reference/datamodel.html#object.__repr__

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Mon Oct 25 04:16:51 2021
From: report at bugs.python.org (E. Paine)
Date: Mon, 25 Oct 2021 08:16:51 +0000
Subject: [issue45601] test_tk and test_ttk_guionly fail with resource not
 availiable
In-Reply-To: <1635109423.03.0.279475515853.issue45601@roundup.psfhosted.org>
Message-ID: <1635149811.94.0.858358600263.issue45601@roundup.psfhosted.org>


E. Paine <xepaine13 at gmail.com> added the comment:

By using "-u all,-largefile,-audio,-gui", you are specifying to enable all special resources except 'largefile', 'audio' and 'gui'. Since the ttk tests require the 'gui' resource to run, the tests are skipped. (please see https://docs.python.org/3/library/test.html#running-tests-using-the-command-line-interface)

----------
components: +Tests -Build
nosy: +epaine

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45601>
_______________________________________

From report at bugs.python.org  Mon Oct 25 04:19:23 2021
From: report at bugs.python.org (Ian)
Date: Mon, 25 Oct 2021 08:19:23 +0000
Subject: [issue34798] pprint ignores the compact parameter for dicts
In-Reply-To: <1537886741.82.0.545547206417.issue34798@psf.upfronthosting.co.za>
Message-ID: <1635149963.59.0.30794679177.issue34798@roundup.psfhosted.org>


Ian <iansedano at gmail.com> added the comment:

I came across this and was confused by it too. I also don't understand the justification with not having dicts to be affected by the `compact` parameter.

If the "compact form" is having separate entries or elements on one line, instead of having each element separated by a new line, then it seems like inconsistent behavior.

**If a dict is short enough, it will appear in "compact form", just like a list.**

If a dict is too long for the width, then each item will appear in "expanded form", also like a list.
However, the actual compact parameter only affects sequence items. Why is this?

There is no reason given in #19132. It does mention a review, but it doesn't seem to be available, or I don't know how to get to it, to understand the reason for that decision.

----------
nosy: +iansedano

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34798>
_______________________________________

From report at bugs.python.org  Mon Oct 25 04:25:46 2021
From: report at bugs.python.org (miss-islington)
Date: Mon, 25 Oct 2021 08:25:46 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635150346.3.0.56018894949.issue45548@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset fa26245a1c1aa938cce391348d6bd879da357522 by Christian Heimes in branch 'main':
bpo-45548: Remove _math.c workarounds for pre-C99 libm (GH-29179)
https://github.com/python/cpython/commit/fa26245a1c1aa938cce391348d6bd879da357522


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Mon Oct 25 04:34:21 2021
From: report at bugs.python.org (Peter Tillema)
Date: Mon, 25 Oct 2021 08:34:21 +0000
Subject: [issue45586] Use starred expressions in subscripts
In-Reply-To: <1634979504.27.0.148840399936.issue45586@roundup.psfhosted.org>
Message-ID: <1635150861.84.0.465904301581.issue45586@roundup.psfhosted.org>


Peter Tillema <petertillema at solcon.nl> added the comment:

Right, I should have clarified it a bit more. I'm using NumPy arrays because they allow indexing like this, where the input arguments are converted to a tuple. So
   a[1, 2, *[3, 4]]
is different than
   a[[1, 2, *[3, 4]]]

This indeed only works on NumPy arrays, although I would like to see such feature implemented for real lists!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45586>
_______________________________________

From report at bugs.python.org  Mon Oct 25 04:45:45 2021
From: report at bugs.python.org (Eryk Sun)
Date: Mon, 25 Oct 2021 08:45:45 +0000
Subject: [issue45603] [Windows] account privileges and updating Python packages
In-Reply-To: <1635134369.55.0.048722857986.issue45603@roundup.psfhosted.org>
Message-ID: <1635151545.16.0.0985970471362.issue45603@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

The pip package installer is not part of Python's standard library. Issues with pip should be reported at the following site:

https://github.com/pypa/pip/issues

Note that pip 20.0+ automatically switches to a --user installation if the user lacks the required access for a system installation.

----------
nosy: +eryksun
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45603>
_______________________________________

From report at bugs.python.org  Mon Oct 25 05:25:07 2021
From: report at bugs.python.org (Christian Heimes)
Date: Mon, 25 Oct 2021 09:25:07 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635153907.98.0.129542965511.issue45548@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
pull_requests: +27474
pull_request: https://github.com/python/cpython/pull/29206

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Mon Oct 25 05:39:53 2021
From: report at bugs.python.org (Romuald Brunet)
Date: Mon, 25 Oct 2021 09:39:53 +0000
Subject: [issue45511] Batch-mode input() limited to 4095 characters on *NIX
In-Reply-To: <1634560324.05.0.266580517788.issue45511@roundup.psfhosted.org>
Message-ID: <1635154793.37.0.00706438501593.issue45511@roundup.psfhosted.org>


Romuald Brunet <romuald.brunet at gmail.com> added the comment:

This does not seems to be a copypaste issue.

I've re-tested using xdotool to "manually" type 5000 characters in to a X terminal (gnome-terminal and xterm, to be sure) and got the same result.

I also have 4 read(0, "...") with the last one ending with a "\n", that's a very strange behavior


I tried to test the same thing on a macOS version, but the input() / terminal would not let me insert more than 1024 characters

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45511>
_______________________________________

From report at bugs.python.org  Mon Oct 25 05:48:51 2021
From: report at bugs.python.org (Raphael)
Date: Mon, 25 Oct 2021 09:48:51 +0000
Subject: [issue45599] Please officially support %G,
 %V and %u directives in time library
In-Reply-To: <1635083442.63.0.338428674269.issue45599@roundup.psfhosted.org>
Message-ID: <1635155331.64.0.518758096804.issue45599@roundup.psfhosted.org>


Change by Raphael <rafal1.1990 at o2.pl>:


----------
title: Please official support %G, %V and %u directives in time library -> Please officially support %G, %V and %u directives in time library

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45599>
_______________________________________

From report at bugs.python.org  Mon Oct 25 05:58:39 2021
From: report at bugs.python.org (Marten Lienen)
Date: Mon, 25 Oct 2021 09:58:39 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
In-Reply-To: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>
Message-ID: <1635155919.32.0.3871959929.issue45588@roundup.psfhosted.org>


Marten Lienen <marten.lienen at gmail.com> added the comment:

The lru_cache can trigger infinite recursion if it is used to cache a hash computation because the cache look-up itself requires the hash.

from functools import lru_cache

class CachedHash:
    @lru_cache
    def __hash__(self):
        # Expensive calculation because we are caching a big matrix for example.
        return 0

hashed = CachedHash()
hash(hashed) # => RecursionError: maximum recursion depth exceeded while calling a Python object

Even though this looks contrived, it is actually my use case. cached_property is not directly applicable because __hash__ needs to be a method and I wanted to avoid caching as an instance attribute because my class is a frozen dataclass. The dataclass thing also makes close() awkward because then I would have an outwardly resource-ful dataclass which is against the spirit of a dataclass.

I will think about putting this on pypi instead.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Mon Oct 25 06:04:59 2021
From: report at bugs.python.org (=?utf-8?q?Gr=C3=A9gory_Starck?=)
Date: Mon, 25 Oct 2021 10:04:59 +0000
Subject: [issue45511] Batch-mode input() limited to 4095 characters on *NIX
In-Reply-To: <1634560324.05.0.266580517788.issue45511@roundup.psfhosted.org>
Message-ID: <1635156299.52.0.263249265745.issue45511@roundup.psfhosted.org>


Gr?gory Starck <g.starck at gmail.com> added the comment:

> This does not seems to be a copypaste issue.

well. it's either not a prob in my_fgets()/fgets IMO. what the process reads on its stdin is already corrupted/broken.

but I'm interrested in knowing more about the issue/original cause.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45511>
_______________________________________

From report at bugs.python.org  Mon Oct 25 06:24:56 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 25 Oct 2021 10:24:56 +0000
Subject: [issue45292] Implement PEP 654: Exception Groups
In-Reply-To: <1632667049.99.0.614000687095.issue45292@roundup.psfhosted.org>
Message-ID: <1635157496.5.0.886648075116.issue45292@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
pull_requests: +27475
pull_request: https://github.com/python/cpython/pull/29207

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45292>
_______________________________________

From report at bugs.python.org  Mon Oct 25 07:08:34 2021
From: report at bugs.python.org (Mitar)
Date: Mon, 25 Oct 2021 11:08:34 +0000
Subject: [issue24739] allow argparse.FileType to accept newline argument
In-Reply-To: <1438049324.32.0.674993969885.issue24739@psf.upfronthosting.co.za>
Message-ID: <1635160114.76.0.776817171531.issue24739@roundup.psfhosted.org>


Mitar <mmitar at gmail.com> added the comment:

I think the issue is that it is hard to subclass it. Ideally, call to open would be made through a new _open method which would then call it, and one could easily subclass that method if/when needed.

----------
nosy: +mitar

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24739>
_______________________________________

From report at bugs.python.org  Mon Oct 25 07:45:49 2021
From: report at bugs.python.org (Eryk Sun)
Date: Mon, 25 Oct 2021 11:45:49 +0000
Subject: [issue45511] Batch-mode input() limited to 4095 characters on *NIX
In-Reply-To: <1634560324.05.0.266580517788.issue45511@roundup.psfhosted.org>
Message-ID: <1635162349.54.0.500604579391.issue45511@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

> but I'm interrested in knowing more about the issue/original cause.

When the readline module is imported in interactive mode, the PyOS_ReadlineFunctionPointer function pointer is set to call_readline(), which uses GNU Readline. Otherwise PyOS_Readline() calls PyOS_StdioReadline(), which calls my_fgets() and thus C standard I/O fgets().

In Linux, when the terminal is in canonical mode, a low-level read() is buffered with a limit of 4096 bytes. If the limit is exceeded, the call returns just the first 4095 bytes plus a trailing newline. You can verify this with os.read(0, 5000). GNU Readline disables canonical mode and works with the terminal at a lower level. I am far from an expert with Unix terminals, but here's the basics of something that allows input() to read more than 4096 characters without having to import the readline module.

    import sys
    import termios

    LFLAG = 3
    settings = termios.tcgetattr(sys.stdin.fileno())
    settings[LFLAG] &= ~termios.ICANON
    termios.tcsetattr(sys.stdin.fileno(), termios.TCSANOW, settings)

    try:
        s = input()
    finally:
        settings[LFLAG] |= termios.ICANON
        termios.tcsetattr(sys.stdin.fileno(), termios.TCSANOW, settings)

    print(len(s))

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45511>
_______________________________________

From report at bugs.python.org  Mon Oct 25 09:07:00 2021
From: report at bugs.python.org (Martin Rueckl)
Date: Mon, 25 Oct 2021 13:07:00 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635167220.7.0.19209676733.issue45438@roundup.psfhosted.org>


Martin Rueckl <enigma at nbubu.de> added the comment:

Can confirm for 3.9.7 as well.

----------
nosy: +martinitus

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Mon Oct 25 10:01:19 2021
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 25 Oct 2021 14:01:19 +0000
Subject: [issue45601] test_tk and test_ttk_guionly fail with resource not
 availiable
In-Reply-To: <1635109423.03.0.279475515853.issue45601@roundup.psfhosted.org>
Message-ID: <1635170479.52.0.969515471881.issue45601@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:

The failure that you saw was due to a change in Tcl/Tk 8.6.11; we recently updated our tests to handle that change in bpo-45436; the fixes have not been released at any version yet, but the fixes have been applied back to 3.7.  The "resource not available" not is due to your `-u` flags, as noted by E. Paine.

----------
nosy: +zach.ware
resolution:  -> out of date
stage:  -> resolved
status: open -> closed
type: compile error -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45601>
_______________________________________

From report at bugs.python.org  Mon Oct 25 10:03:31 2021
From: report at bugs.python.org (Zachary Ware)
Date: Mon, 25 Oct 2021 14:03:31 +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: <1635170611.97.0.654813868379.issue45436@roundup.psfhosted.org>


Zachary Ware <zachary.ware at gmail.com> added the comment:

Thanks for tracking that down!  Any word on the tk Menu type parameter change?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Mon Oct 25 10:07:16 2021
From: report at bugs.python.org (Devin Prescott)
Date: Mon, 25 Oct 2021 14:07:16 +0000
Subject: [issue44319] setup openssl failed on linux
In-Reply-To: <1622922030.41.0.294175639013.issue44319@roundup.psfhosted.org>
Message-ID: <1635170836.99.0.163347704402.issue44319@roundup.psfhosted.org>


Devin Prescott <devincprescott at gmail.com> added the comment:

This docker file will get you the same environment:

## Build Command ##
#    docker build --rm -t centos7/builder .
## Run Command ##
#    docker run --rm -it centos7/builder
# INSIDE DOCKER:
#    make -j $(nproc)

FROM centos:7

###################################
##   Update & Get Dependencies   ##
###################################

RUN yum -y update

RUN yum -y install deltarpm epel-release
RUN yum -y groups install Development\ Tools
RUN yum -y install libtemplate-perl wget make gcc perl-core pcre-devel zlib-devel
RUN yum -y install libffi-devel bzip2-devel pkgconfig
RUN yum install -y openssl11 openssl11-devel openssl11-libs openssl11-static
RUN mkdir -p /home/builder
WORKDIR /home/builder

###################################
##    Enable SCL Dev Toolset8    ##
###################################
RUN yum -y install centos-release-scl
RUN yum-config-manager --enable rhel-server-rhscl-7-rpms
RUN yum -y install devtoolset-8
RUN scl enable devtoolset-8 bash

###################################
##    Prep Build for Python-3    ##
###################################
RUN wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz
RUN tar xzf Python-3.10.0.tgz
WORKDIR Python-3.10.0

RUN /home/builder/Python-3.10.0/configure --enable-optimizations --with-lto --with-system-ffi --with-computed-gotos --enable-loadable-sqlite-extensions --with-openssl=/usr/lib64/openssl11 --with-openssl-rpath=auto

----------
title: setup openssl faild on linux (ubuntu 20.04) -> setup openssl failed on linux

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44319>
_______________________________________

From report at bugs.python.org  Mon Oct 25 10:20:58 2021
From: report at bugs.python.org (Martin Rueckl)
Date: Mon, 25 Oct 2021 14:20:58 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635171658.58.0.940922108755.issue45438@roundup.psfhosted.org>


Change by Martin Rueckl <enigma at nbubu.de>:


----------
keywords: +patch
pull_requests: +27476
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29212

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Mon Oct 25 10:34:49 2021
From: report at bugs.python.org (Alex Wells)
Date: Mon, 25 Oct 2021 14:34:49 +0000
Subject: [issue45604] multiprocessing.log_to_stderr missing documentation for
 parameter
Message-ID: <1635172489.58.0.649582586734.issue45604@roundup.psfhosted.org>


New submission from Alex Wells <alex.wells at diamond.ac.uk>:

The documentation for multiprocessing.log_to_stderr() specifies that the method takes no parameters. However, intellisense in VSCode and debugging the method both show that there is a single parameter, "level", whose default value is None. 
Documentation here:
https://docs.python.org/3.7/library/multiprocessing.html#multiprocessing.log_to_stderr

The parameter appears to be a shorthand to allow you to both get the logger and specify the required log level in one step, rather than two. The code that handles the "level" parameter appears to do what I'd expect it to do.

I think the documentation simply needs a few words written about the parameter.

Thanks.

----------
assignee: docs at python
components: Documentation
messages: 404965
nosy: AlexWells, docs at python
priority: normal
severity: normal
status: open
title: multiprocessing.log_to_stderr missing documentation for parameter
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45604>
_______________________________________

From report at bugs.python.org  Mon Oct 25 10:41:06 2021
From: report at bugs.python.org (Martin Rueckl)
Date: Mon, 25 Oct 2021 14:41:06 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635172866.64.0.917880690097.issue45438@roundup.psfhosted.org>


Martin Rueckl <enigma at nbubu.de> added the comment:

I just created a PR and signed the contributor agreement. Waiting for it to update :-) Comments welcome!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Mon Oct 25 10:52:36 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 25 Oct 2021 14:52:36 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635173556.2.0.499122146008.issue45438@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

There are two ways to fix the larger issue.

1. Make issubclass(types.GenericAlias, type) returning True, and also make isinstance(typing.List[int], type) returning True and issubclass(typing._GenericAlias, type) returning True, and analyze every place in the interpreter and the stdlib which calls isinstance(..., type) or issubclass(..., type) and ensure that they work with types.GenericAlias and typing._GenericAlias and their instances as well as with ordinary types, fix them and add tests for them. And perhaps do the same for types.UnionType, typing._UnionGenericAlias, typing.TypeVar, typing.NewType, etc, etc.

2. Make isinstance(list[int], type) returning False. It would be nice to ad also tests for the same cases as in option 1, but it is not so urgent, and I expect that in most cases the current behavior which matches the status quo is expected.

I tried to implement option 1, but it is just too much places, so it would take a large amount of time which I do not have right now. First than invest my time in this I want to make sure which option is desirable in long term.

Guido, Ivan, Ken Jin, what would you say?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Mon Oct 25 10:56:59 2021
From: report at bugs.python.org (E. Paine)
Date: Mon, 25 Oct 2021 14:56:59 +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: <1635173819.67.0.975099268608.issue45436@roundup.psfhosted.org>


E. Paine <xepaine13 at gmail.com> added the comment:

> Any word on the tk Menu type parameter change?

I haven't submitted a bug report yet and want to do a little more research before I do so (the Tcl ticket system is quite difficult to search)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Mon Oct 25 10:58:48 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 25 Oct 2021 14:58:48 +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: <1635173928.45.0.274815682348.issue45436@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Are there changes in handling empty values for other options? If yes, we perhaps need to add version-dependent tests for empty values instead of just skipping this case.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45436>
_______________________________________

From report at bugs.python.org  Mon Oct 25 10:59:49 2021
From: report at bugs.python.org (Ivan Levkivskyi)
Date: Mon, 25 Oct 2021 14:59:49 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635173989.84.0.317499662298.issue45438@roundup.psfhosted.org>


Ivan Levkivskyi <levkivskyi at gmail.com> added the comment:

> Was it mistake to make isinstance(list[int], type) returning True?

What was the motivation for this? At first glance returning True looks wrong.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Mon Oct 25 11:22:39 2021
From: report at bugs.python.org (=?utf-8?b?0JDQvdC00YDQtdC5INCa0LDQt9Cw0L3RhtC10LI=?=)
Date: Mon, 25 Oct 2021 15:22:39 +0000
Subject: [issue45605] Return False from __contains__ method if object not
 hashable for set and dict
Message-ID: <1635175359.85.0.710145859229.issue45605@roundup.psfhosted.org>


New submission from ?????? ???????? <heckad at yandex.ru>:

Now if do something like `[] in set()` python raise an exception, but if an object isn't hashable then we know for sure that it isn't in the set. Propose return False for these cases.

P.S. I would like to make a patch

----------
components: Library (Lib)
messages: 404971
nosy: heckad
priority: normal
severity: normal
status: open
title: Return False from __contains__ method if object not hashable for set and dict
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45605>
_______________________________________

From report at bugs.python.org  Mon Oct 25 11:30:10 2021
From: report at bugs.python.org (Tim Golden)
Date: Mon, 25 Oct 2021 15:30:10 +0000
Subject: [issue40915] multiple problems with mmap.resize()  in Windows
In-Reply-To: <1591657683.26.0.992231826575.issue40915@roundup.psfhosted.org>
Message-ID: <1635175810.17.0.990928373642.issue40915@roundup.psfhosted.org>


Change by Tim Golden <mail at timgolden.me.uk>:


----------
keywords: +patch
pull_requests: +27477
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29213

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40915>
_______________________________________

From report at bugs.python.org  Mon Oct 25 11:30:09 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Mon, 25 Oct 2021 15:30:09 +0000
Subject: [issue45605] Return False from __contains__ method if object not
 hashable for set and dict
In-Reply-To: <1635175359.85.0.710145859229.issue45605@roundup.psfhosted.org>
Message-ID: <1635175809.87.0.825862580332.issue45605@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

That seems like a pretty big change that could break a lot of existing code. I suggest writing a wrapper around "in" if you want this behavior.

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45605>
_______________________________________

From report at bugs.python.org  Mon Oct 25 11:35:08 2021
From: report at bugs.python.org (=?utf-8?b?0JDQvdC00YDQtdC5INCa0LDQt9Cw0L3RhtC10LI=?=)
Date: Mon, 25 Oct 2021 15:35:08 +0000
Subject: [issue45605] Return False from __contains__ method if object not
 hashable for set and dict
In-Reply-To: <1635175359.85.0.710145859229.issue45605@roundup.psfhosted.org>
Message-ID: <1635176108.54.0.247216888464.issue45605@roundup.psfhosted.org>


?????? ???????? <heckad at yandex.ru> added the comment:

Can you please specify in what cases we need to get an exception instead of False? It just seems very strange to me to rely on this behaviour.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45605>
_______________________________________

From report at bugs.python.org  Mon Oct 25 11:42:42 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Mon, 25 Oct 2021 15:42:42 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635176562.17.0.580136629004.issue45438@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

I really don't recall if we even seriously considered what isinstance(list[int], type) should return. PEP 585 doesn't mention it. I presume it falls out of the way it's being tested and the way list[int] passes most attribute requests on to the origin (i.e., to list).

Given that this has returned True for two releases now I'm very reluctant to changing this now. So our best option is pursuing Serhiy's option 1, at least partially. The fix for the OP should be simple enough, right?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Mon Oct 25 11:46:38 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Mon, 25 Oct 2021 15:46:38 +0000
Subject: [issue45605] Return False from __contains__ method if object not
 hashable for set and dict
In-Reply-To: <1635175359.85.0.710145859229.issue45605@roundup.psfhosted.org>
Message-ID: <1635176798.91.0.225779883568.issue45605@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

I don't have any code that would care, but if there's one thing I've learned in 15 years of python core development, it's that this will break someone's code.

If you want more feedback, you should probably bring this up for discussion on the python-ideas mailing list.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45605>
_______________________________________

From report at bugs.python.org  Mon Oct 25 12:08:38 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 25 Oct 2021 16:08:38 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635178118.24.0.677669630971.issue45438@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Two years is not so long for a bug. We fixed 8-year and 12-year bugs.

The issue is that this feature is internally inconsistent (isinstance() is not consistent with issubclass()), the C implementation of list[int] is not consistent with the Python implementation of List[int], and a lot of code was not tested with this feature, so we perhaps have a lot of bugs in the stdlib and in the third-party libraries. Are we going to backport changes for making code working with GenericAlias as a type to 3.9 and 3.10? If not, we will actually add new features in 3.11 and keep 3.9 and 3.10 broken. If yes, these changes can have larger effect than just making isinstance(list[int], type) returning False, and they can break more code.

Note also that isinstance(List[int], type) was True before 3.7, and we intentionally made it False in 3.7 (it was required significant rewriting of the typing module and introducing __mro_entries__). Do we want to revert this decision?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Mon Oct 25 12:12:12 2021
From: report at bugs.python.org (paul j3)
Date: Mon, 25 Oct 2021 16:12:12 +0000
Subject: [issue24739] allow argparse.FileType to accept newline argument
In-Reply-To: <1438049324.32.0.674993969885.issue24739@psf.upfronthosting.co.za>
Message-ID: <1635178332.33.0.0102317403352.issue24739@roundup.psfhosted.org>


paul j3 <ajipanca at gmail.com> added the comment:

Adding `newline` to `FileType` requires modifying both the `__init__` and `__call__` methods.  That's nearly the whole class.  I'd copy and edit, and forget about subclassing.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24739>
_______________________________________

From report at bugs.python.org  Mon Oct 25 12:13:53 2021
From: report at bugs.python.org (paul j3)
Date: Mon, 25 Oct 2021 16:13:53 +0000
Subject: [issue45587] argparse add_argument_group: distinguish title and
 description from **kwargs
Message-ID: <1635178433.4.0.357933457328.issue45587@roundup.psfhosted.org>


Change by paul j3 <ajipanca at gmail.com>:


----------
nosy: +paul.j3

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45587>
_______________________________________

From report at bugs.python.org  Mon Oct 25 12:15:27 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Mon, 25 Oct 2021 16:15:27 +0000
Subject: [issue45605] Return False from __contains__ method if object not
 hashable for set and dict
In-Reply-To: <1635175359.85.0.710145859229.issue45605@roundup.psfhosted.org>
Message-ID: <1635178527.47.0.63367042067.issue45605@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

This is a duplicate of issue18510. It was also discussed on the Python-Dev mailing list (maybe more than once). If you have some new arguments or something in past 8 years made the old arguments no longer valid please open a new discussion on the mailing list.

----------
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> dict.__contains__ and dict.keys().__contains__ raises exception instead of returning False

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45605>
_______________________________________

From report at bugs.python.org  Mon Oct 25 12:25:52 2021
From: report at bugs.python.org (Christian Heimes)
Date: Mon, 25 Oct 2021 16:25:52 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635179152.57.0.168823526259.issue45548@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:


New changeset 77e3f224d6ae6d38e5fc899fb5eaadf2b7c255a1 by Christian Heimes in branch 'main':
bpo-45548: Remove checks for finite and gamma (GH-29206)
https://github.com/python/cpython/commit/77e3f224d6ae6d38e5fc899fb5eaadf2b7c255a1


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Mon Oct 25 12:25:39 2021
From: report at bugs.python.org (paul j3)
Date: Mon, 25 Oct 2021 16:25:39 +0000
Subject: [issue41592] Make _SubParsersAction public
In-Reply-To: <1597864894.48.0.159581898725.issue41592@roundup.psfhosted.org>
Message-ID: <1635179139.06.0.308918263074.issue41592@roundup.psfhosted.org>


paul j3 <ajipanca at gmail.com> added the comment:

`add_argument` also returns a Action subclass object.  All of those subclasses are "private".  While that return reference is usually ignored, sometimes it is useful to it, assigning it to a variable or list.  The documentation could be clearer about access to Action objects.

----------
nosy: +paul.j3

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41592>
_______________________________________

From report at bugs.python.org  Mon Oct 25 12:32:34 2021
From: report at bugs.python.org (paul j3)
Date: Mon, 25 Oct 2021 16:32:34 +0000
Subject: [issue45580] argparse.ArgumentParser.add_mutually_exclusive_group :
 metavar create parenthesis undefined behavior
In-Reply-To: <1634931090.99.0.410236903356.issue45580@roundup.psfhosted.org>
Message-ID: <1635179554.55.0.514389108081.issue45580@roundup.psfhosted.org>


paul j3 <ajipanca at gmail.com> added the comment:

The usage formatting is fragile, with many associated bug reports.  Until someone does a major rewrite, it is best to avoid special characters, especially `()` and `[]` in the `dest` or `metavar`.

Usage uses () to encolde mutually_exclusive_groups and [] to mark non-required arguments.  Don't confuse your users (or argparse) with other uses of these characters.

----------
nosy: +paul.j3

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45580>
_______________________________________

From report at bugs.python.org  Mon Oct 25 12:36:15 2021
From: report at bugs.python.org (Eric Pederson)
Date: Mon, 25 Oct 2021 16:36:15 +0000
Subject: [issue41592] Make _SubParsersAction public
In-Reply-To: <1597864894.48.0.159581898725.issue41592@roundup.psfhosted.org>
Message-ID: <1635179775.89.0.5418741685.issue41592@roundup.psfhosted.org>


Eric Pederson <ericacm at gmail.com> added the comment:

But is _SubParsersAction really private if there are methods on it that are required to use (add_parser())?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41592>
_______________________________________

From report at bugs.python.org  Mon Oct 25 12:39:19 2021
From: report at bugs.python.org (paul j3)
Date: Mon, 25 Oct 2021 16:39:19 +0000
Subject: [issue45275] Make argparse print description of subcommand when
 invoke help doc on subcommand
In-Reply-To: <1632457940.29.0.512184786201.issue45275@roundup.psfhosted.org>
Message-ID: <1635179959.62.0.0410289955201.issue45275@roundup.psfhosted.org>


paul j3 <ajipanca at gmail.com> added the comment:

Are you expecting the subcommand help to show the 'help' line that the main help shows?

    subparsers.add_parser('a', help='a help')

add_parser takes all of the parameters that `ArgumentParser` takes, including description and epilog.  

I don't think we need to add anything to add_parser.

----------
nosy: +paul.j3

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45275>
_______________________________________

From report at bugs.python.org  Mon Oct 25 12:44:43 2021
From: report at bugs.python.org (paul j3)
Date: Mon, 25 Oct 2021 16:44:43 +0000
Subject: [issue45504] [argparse] Entering a partial config_parser flag works
 with subparsers
In-Reply-To: <1634522504.9.0.975535352366.issue45504@roundup.psfhosted.org>
Message-ID: <1635180283.62.0.95030720048.issue45504@roundup.psfhosted.org>


paul j3 <ajipanca at gmail.com> added the comment:

As a default option flags can be abbreviated (unless there's a conflict).  Recent version have a allow_abbrev parameter that lets you turn this off.

----------
nosy: +paul.j3

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45504>
_______________________________________

From report at bugs.python.org  Mon Oct 25 12:46:20 2021
From: report at bugs.python.org (paul j3)
Date: Mon, 25 Oct 2021 16:46:20 +0000
Subject: [issue45235] argparse does not preserve namespace with subparser
 defaults
In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org>
Message-ID: <1635180380.46.0.0389402154094.issue45235@roundup.psfhosted.org>


Change by paul j3 <ajipanca at gmail.com>:


----------
nosy: +paul.j3

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45235>
_______________________________________

From report at bugs.python.org  Mon Oct 25 12:54:17 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Mon, 25 Oct 2021 16:54:17 +0000
Subject: [issue33439] python-config.py should be part of the stdlib
In-Reply-To: <1525695349.77.0.682650639539.issue33439@psf.upfronthosting.co.za>
Message-ID: <1635180857.2.0.168901967984.issue33439@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

`Misc/python-config.in` ultimately becomes a Python script that prints things to stdout.  It isn't written to be a module as is.  Any work to make it one is effectively writing entirely new code to do what it does.

To keep a single source of truth for `python-config` behavior instead of having two as we do today (as doko noted in bpo-16235), while still exposing the values it provides for use from Python I suggest:

1. Get rid of the `Misc/python-config.in` python code.
2. Use `Misc/python-config.sh.in` exclusively.
3. Enhancing _that_ to be able to generate a tiny data-only `sysconfig.configure` module. 
4. Invoke `python-config.sh --generate-sysconfig-bits` during build time to generate a `sysconfig/configure.py`.

This should reduce the maintenance burden and is kinder to cross-compiliation builds (which we generally are lousy at supporting despite their importance to the world, so our bar today is merely "not regressing").


All that said, in what contexts would having anything that python-config produces today be available from sysconfig be useful?

----------
nosy: +gregory.p.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33439>
_______________________________________

From report at bugs.python.org  Mon Oct 25 14:01:12 2021
From: report at bugs.python.org (Christian Heimes)
Date: Mon, 25 Oct 2021 18:01:12 +0000
Subject: [issue45595] [Build] Make extensions depend on header files
In-Reply-To: <1635066085.24.0.0932129661238.issue45595@roundup.psfhosted.org>
Message-ID: <1635184872.99.0.597805561759.issue45595@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:


New changeset 81669d1b7bd668d1bd0fab92836e8b5e7976e362 by Christian Heimes in branch 'main':
bpo-45595: Make extensions depend on header files (GH-29198)
https://github.com/python/cpython/commit/81669d1b7bd668d1bd0fab92836e8b5e7976e362


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45595>
_______________________________________

From report at bugs.python.org  Mon Oct 25 14:02:01 2021
From: report at bugs.python.org (Christian Heimes)
Date: Mon, 25 Oct 2021 18:02:01 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635184921.7.0.177340397019.issue45548@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:


New changeset ece916e92ce76cfdbfd208605a6fc827db0fbd52 by Christian Heimes in branch 'main':
bpo-45548: Add missing extensions to Modules/Setup (GH-29199)
https://github.com/python/cpython/commit/ece916e92ce76cfdbfd208605a6fc827db0fbd52


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Mon Oct 25 14:10:45 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Mon, 25 Oct 2021 18:10:45 +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: <1635185445.69.0.518241290693.issue43656@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

I've been thinking that perhaps it makes sense to special case printing of `self` argument in `__init__` methods. The same exact issue happens with PDB `args` command in `__init__` methods.

My idea is that in the __init__, you generally don't want to print `self`  arg and trying to do so can cause this type of unexpected errors.

The reason is that __repr__ is not designed to be used for objects with unfinished initialization, because even if it doesn't break, it will give you incomplete or even misleading representation.

In case when __init__ has some complex logic that can raise an exception, it's likely that other local variables will help you identify the object. If there is no complex logic or other arguments, and __init__ still failed, you can say that there wasn't yet an actual object that can be uniquely represented.

Therefore I think it makes sense to simply omit representing `self` arg (or first arg of the method) in both `StackSummary.extract()` and PDB `args` command. It may break some existing code but I think it would be a small amount of code affected. Because of this it can only go into 3.11 version. I feel like on the balance it would be a good change to make, but I'm curious to hear other opinions.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Mon Oct 25 14:12:41 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 25 Oct 2021 18:12:41 +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: <1635185561.54.0.138969014598.issue43656@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Martin, would you like to submit a patch with this addition to the doc?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Mon Oct 25 14:16:15 2021
From: report at bugs.python.org (paul j3)
Date: Mon, 25 Oct 2021 18:16:15 +0000
Subject: [issue45235] argparse does not preserve namespace with subparser
 defaults
In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org>
Message-ID: <1635185775.31.0.127064192707.issue45235@roundup.psfhosted.org>


paul j3 <ajipanca at gmail.com> added the comment:

I haven't studied or tested this change, but it looks like a partial retraction of

https://bugs.python.org/issue9351 
argparse set_defaults on subcommands should override top level set_defaults

Originally the main namespace was passed to the subparser.  Steven Bethard changed it so that the subparser got a fresh namespace, and all values were copied to the main namespace.

I and others raised the question of how it affected user provided values 

https://bugs.python.org/issue27859
argparse - subparsers does not retain namespace

Looks like this patch tries to solve some problems by moving the self._defaults step to the end of parser_know_args.  I view that change with some trepidation.  Handling defaults is tricky enough, with setting them at the start, but then only passing them through 'type' at the end if they still match the original strings.

Mostly I've been telling StackOverflow questioners that it best not to use the same argument 'dest' in both the main and subparsers.  Flags can be the same, but the 'dest' should be different to avoid conflicts over which default has priority.

Again, I haven't tested this change, but I have a gut feeling it could have backward compatibility issues.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45235>
_______________________________________

From report at bugs.python.org  Mon Oct 25 14:24:16 2021
From: report at bugs.python.org (Christian Heimes)
Date: Mon, 25 Oct 2021 18:24:16 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635186256.98.0.95592149868.issue45548@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
pull_requests: +27478
pull_request: https://github.com/python/cpython/pull/29216

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Mon Oct 25 14:38:31 2021
From: report at bugs.python.org (Christian Heimes)
Date: Mon, 25 Oct 2021 18:38:31 +0000
Subject: [issue45595] [Build] Make extensions depend on header files
In-Reply-To: <1635066085.24.0.0932129661238.issue45595@roundup.psfhosted.org>
Message-ID: <1635187111.28.0.196164556198.issue45595@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45595>
_______________________________________

From report at bugs.python.org  Mon Oct 25 14:47:04 2021
From: report at bugs.python.org (paul j3)
Date: Mon, 25 Oct 2021 18:47:04 +0000
Subject: [issue45235] argparse does not preserve namespace with subparser
 defaults
In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org>
Message-ID: <1635187624.3.0.813992936461.issue45235@roundup.psfhosted.org>


paul j3 <ajipanca at gmail.com> added the comment:

I just downloaded this `argparse.py`.

This change makes it impossible to use a subparser argument if it is defined in the user provided namespace, or by the main parser.  It blocks not only subparser default, but also user input.

It has reverted the 9351 patch which dates to 2014.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45235>
_______________________________________

From report at bugs.python.org  Mon Oct 25 14:53:14 2021
From: report at bugs.python.org (Christian Heimes)
Date: Mon, 25 Oct 2021 18:53:14 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635187994.2.0.478804068656.issue45548@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:


New changeset 2b8677a3cd855eb3a579894c64588eab0e006269 by Christian Heimes in branch 'main':
bpo-45548: FreeBSD doesn't like auto vars in makesetup (GH-29216)
https://github.com/python/cpython/commit/2b8677a3cd855eb3a579894c64588eab0e006269


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Mon Oct 25 15:16:44 2021
From: report at bugs.python.org (Brett Cannon)
Date: Mon, 25 Oct 2021 19:16:44 +0000
Subject: [issue45591] PathFinder does not find namespace packages children
In-Reply-To: <1635024524.91.0.931449499561.issue45591@roundup.psfhosted.org>
Message-ID: <1635189404.2.0.0324565685093.issue45591@roundup.psfhosted.org>


Brett Cannon <brett at python.org> added the comment:

You didn't specify the path to search in to find `a`. https://docs.python.org/3/library/importlib.html#importlib.machinery.PathFinder.find_spec says that PathFinder only has class methods, which means find_spec() won't know where 'namespace' is, so the search will fail to find anything, hence returning None.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45591>
_______________________________________

From report at bugs.python.org  Mon Oct 25 15:16:37 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Mon, 25 Oct 2021 19:16:37 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635189397.51.0.402285160518.issue45438@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

> The issue is that this feature is internally inconsistent (isinstance() is not consistent with issubclass()),

issubclass(x, list[int]) rejects the second argument for reasons explained in the PEP. I don't think from that reasoning you can infer that list[int] is not a type. Rather the contrary -- if it's not a type the PEP could just have said "it's not a type" but it doesn't, it says "it's unacceptable as second arg to issubclass()". In fact, the PEP uses language ("instances of parameterized collections") that makes me think in the PEP author's mind list[int] *is* a type.

> the C implementation of list[int] is not consistent with the Python implementation of List[int],

Consistency with typing was not a goal of the PEP.

> and a lot of code was not tested with this feature,

What other places are there that are broken because of this?

> so we perhaps have a lot of bugs in the stdlib and in the third-party libraries.

Without more evidence this sounds like speculation. *With* evidence you might well convince me.

> Are we going to backport changes for making code working with GenericAlias as a type to 3.9 and 3.10?

I'm fine with backporting the fix in the PR, GH-29212.

> If not, we will actually add new features in 3.11 and keep 3.9 and 3.10 broken. If yes, these changes can have larger effect than just making isinstance(list[int], type) returning False, and they can break more code.

Are there other fixes you already know about besides GH-29212? That PR seems 100% beneficial.

> Note also that isinstance(List[int], type) was True before 3.7, and we intentionally made it False in 3.7 (it was required significant rewriting of the typing module and introducing __mro_entries__). Do we want to revert this decision?

I don't recall why we changed that, I thought it was a side effect of making the implementation faster, not because of a decision that we didn't want these to be treated as types. I looked at inspect.py in 3.6, and it seems its formatannotation() has a special case for annotations that come from the typing module (like List[int]). I guess nobody thought to have a test for that, so the bug in inspect.py slipped by when it was introduced in 3.9 -- we're relying on Raymond's keen eye here. But if we had had such a test, and it had alerted us to the problem in 3.9 when types.GenericAlias was introduced, I expect that we would have fixed it just like martinitus does in his PR.

Anyway, I am willing to be swayed by evidence, but this bug in inspect.py isn't enough.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Mon Oct 25 15:18:19 2021
From: report at bugs.python.org (Brett Cannon)
Date: Mon, 25 Oct 2021 19:18:19 +0000
Subject: [issue45592] NamespaceLoader does not implement create_module or
 exec_module
In-Reply-To: <1635024996.39.0.539683336304.issue45592@roundup.psfhosted.org>
Message-ID: <1635189499.22.0.407361411299.issue45592@roundup.psfhosted.org>


Brett Cannon <brett at python.org> added the comment:

create_module() being empty is on purpose: https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.create_module . You only define create_module() if you need a specific type of object for the module instance.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45592>
_______________________________________

From report at bugs.python.org  Mon Oct 25 15:20:55 2021
From: report at bugs.python.org (Rasmus Bondesson)
Date: Mon, 25 Oct 2021 19:20:55 +0000
Subject: [issue45606] pathlib.Path.glob() does not list dangling symlink when
 pattern is the exact filenane
Message-ID: <1635189655.12.0.290768542952.issue45606@roundup.psfhosted.org>


New submission from Rasmus Bondesson <raekmannen at gmail.com>:

Create a symlink that points to file that doesn't exist:

    ln -s /nonexisting_file my_symlink

Then try to glob for that symlink from Python using pathlib:

    python3
    >>> import pathlib
    >>> list(pathlib.Path(".").glob("my_symlink"))
    []
    >>> list(pathlib.Path(".").glob("my_symlink*"))
    [PosixPath('my_symlink')]

I'm a bit surprised that these two globs do not return the same results. Personally I would expect both to find the symlink.

Is this behaviour a bug or is it intentional?

----------
components: Library (Lib)
messages: 404996
nosy: raek
priority: normal
severity: normal
status: open
title: pathlib.Path.glob() does not list dangling symlink when pattern is the exact filenane
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45606>
_______________________________________

From report at bugs.python.org  Mon Oct 25 15:23:27 2021
From: report at bugs.python.org (Roundup Robot)
Date: Mon, 25 Oct 2021 19:23:27 +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: <1635189807.6.0.324753929111.issue45466@roundup.psfhosted.org>


Change by Roundup Robot <devnull at psf.upfronthosting.co.za>:


----------
keywords: +patch
nosy: +python-dev
nosy_count: 2.0 -> 3.0
pull_requests: +27479
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/29217

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45466>
_______________________________________

From report at bugs.python.org  Mon Oct 25 16:03:44 2021
From: report at bugs.python.org (Sam Bull)
Date: Mon, 25 Oct 2021 20:03:44 +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: <1635192224.98.0.643627632351.issue37658@roundup.psfhosted.org>


Sam Bull <m6f6g7 at sambull.org> added the comment:

Can I get a review? 
https://github.com/python/cpython/pull/29202

Seems like a simple mistake given the original description of this issue:

> 1. the inner task is completed and the outer task will receive the result ? transport and protocol in this case
> 2. The inner task is cancelled and no connection was established

The try/except blocks clearly add a 3rd condition, where the inner task is completed and a TimeoutError is raised without returning the result.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37658>
_______________________________________

From report at bugs.python.org  Mon Oct 25 16:21:36 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Mon, 25 Oct 2021 20:21:36 +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: <1635193296.8.0.725466020818.issue45466@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
nosy:  -terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45466>
_______________________________________

From report at bugs.python.org  Mon Oct 25 16:24:21 2021
From: report at bugs.python.org (Selim Belhaouane)
Date: Mon, 25 Oct 2021 20:24:21 +0000
Subject: [issue15795] Zipfile.extractall does not preserve file permissions
In-Reply-To: <1346106964.12.0.723201722432.issue15795@psf.upfronthosting.co.za>
Message-ID: <1635193461.62.0.672992623028.issue15795@roundup.psfhosted.org>


Change by Selim Belhaouane <selim.belhaouane at gmail.com>:


----------
nosy: +selimb

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15795>
_______________________________________

From report at bugs.python.org  Mon Oct 25 16:38:01 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 25 Oct 2021 20:38:01 +0000
Subject: [issue45607] Make it possible to enrich an exception's error message
Message-ID: <1635194281.32.0.0583100270803.issue45607@roundup.psfhosted.org>


New submission from Irit Katriel <iritkatriel at gmail.com>:

The requirement comes from Hypothesis, see
https://github.com/python/cpython/pull/28569#discussion_r730338369

It is necessary there to add a note to an exception describing which test case it comes from. The note should be printed by __str__ of this exception. 


class Explanation(Exception):
    __module__ = "builtins"
    def __str__(self) -> str:
        return f"\n{self.args[0]}"

try:
    why = "Failed!"
    raise AssertionError(why)
except Exception as e:
    msg = "    You can reproduce this error by ...\n    ..."
    raise Explanation(msg) from e

    # Ideally something more like:
    e.__note__ = msg
    raise

----------
components: Interpreter Core
messages: 404999
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: Make it possible to enrich an exception's error message
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45607>
_______________________________________

From report at bugs.python.org  Mon Oct 25 16:54:13 2021
From: report at bugs.python.org (Jeremy)
Date: Mon, 25 Oct 2021 20:54:13 +0000
Subject: [issue45545] chdir __exit__ is not safe
In-Reply-To: <1634770485.18.0.358610816486.issue45545@roundup.psfhosted.org>
Message-ID: <1635195253.27.0.00386047522228.issue45545@roundup.psfhosted.org>


Change by Jeremy <ucodery at gmail.com>:


----------
keywords: +patch
pull_requests: +27481
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29218

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Mon Oct 25 17:00:36 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 25 Oct 2021 21:00:36 +0000
Subject: [issue23556] [doc] Scope for raise without argument is different in
 Python 2 and 3
In-Reply-To: <1425212072.31.0.66074782686.issue23556@psf.upfronthosting.co.za>
Message-ID: <1635195636.72.0.956798225429.issue23556@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Martin's patch needs to be converted to a GitHub PR and then reviewed.

----------
keywords: +easy -patch
nosy: +iritkatriel
title: Scope for raise without argument is different in Python 2 and 3 -> [doc] Scope for raise without argument is different in Python 2 and 3
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23556>
_______________________________________

From report at bugs.python.org  Mon Oct 25 17:23:53 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 25 Oct 2021 21:23:53 +0000
Subject: [issue13298] Result type depends on order of operands for bytes and
 bytearray
In-Reply-To: <1320020077.78.0.866789839878.issue13298@psf.upfronthosting.co.za>
Message-ID: <1635197033.49.0.0607155245373.issue13298@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11.

----------
nosy: +iritkatriel
versions: +Python 3.11 -Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue13298>
_______________________________________

From report at bugs.python.org  Mon Oct 25 17:26:45 2021
From: report at bugs.python.org (Eric Snow)
Date: Mon, 25 Oct 2021 21:26:45 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org>
Message-ID: <1635197205.05.0.41392284179.issue45020@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:


New changeset 6afb285ff0790471a6858e44f85d143f07fda70c by Eric Snow in branch 'main':
bpo-45020: Add tests for the -X "frozen_modules" option. (gh-28997)
https://github.com/python/cpython/commit/6afb285ff0790471a6858e44f85d143f07fda70c


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Mon Oct 25 17:29:04 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 25 Oct 2021 21:29:04 +0000
Subject: [issue11477] Incorrect operand precedence when implementing sequences
 in C
In-Reply-To: <1299965091.63.0.267715976543.issue11477@psf.upfronthosting.co.za>
Message-ID: <1635197344.77.0.719876185532.issue11477@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced on 3.11.

----------
nosy: +iritkatriel
versions: +Python 3.11 -Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11477>
_______________________________________

From report at bugs.python.org  Mon Oct 25 17:33:59 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 25 Oct 2021 21:33:59 +0000
Subject: [issue31594] Make bytes and bytearray maketrans accept dictionaries
 as first argument as it's done in str
In-Reply-To: <1506442370.8.0.709979428059.issue31594@psf.upfronthosting.co.za>
Message-ID: <1635197639.92.0.702853988005.issue31594@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed
type: behavior -> enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31594>
_______________________________________

From report at bugs.python.org  Mon Oct 25 17:36:47 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 25 Oct 2021 21:36:47 +0000
Subject: [issue35174] Calling for super().__str__ seems to call self.__repr__
 in list subclass
In-Reply-To: <1541472494.47.0.788709270274.issue35174@psf.upfronthosting.co.za>
Message-ID: <1635197807.06.0.174726520346.issue35174@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
resolution:  -> not a bug
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35174>
_______________________________________

From report at bugs.python.org  Mon Oct 25 17:40:00 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Mon, 25 Oct 2021 21:40:00 +0000
Subject: [issue45608] [sqlite3] some DB-API attributes are undocumented
Message-ID: <1635198000.59.0.313242486667.issue45608@roundup.psfhosted.org>


New submission from Erlend E. Aasland <erlend.aasland at innova.no>:

Some DB-API 2.0 attributes are undocumented:

- apilevel
- threadsafety
- paramstyle

These attributes should be documented.


See also:
- bpo-8196
- https://discuss.python.org/t/is-sqlite3-threadsafety-the-same-thing-as-sqlite3-threadsafe-from-the-c-library/11463

----------
assignee: docs at python
components: Documentation
messages: 405004
nosy: docs at python, erlendaasland, lemburg
priority: normal
severity: normal
status: open
title: [sqlite3] some DB-API attributes are undocumented
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45608>
_______________________________________

From report at bugs.python.org  Mon Oct 25 17:42:17 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Mon, 25 Oct 2021 21:42:17 +0000
Subject: [issue45608] [sqlite3] some DB-API attributes are undocumented
In-Reply-To: <1635198000.59.0.313242486667.issue45608@roundup.psfhosted.org>
Message-ID: <1635198137.17.0.434029882804.issue45608@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
keywords: +patch
pull_requests: +27482
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29219

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45608>
_______________________________________

From report at bugs.python.org  Mon Oct 25 17:44:25 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 25 Oct 2021 21:44:25 +0000
Subject: [issue33552] f-strings and string annotations
In-Reply-To: <1526540586.49.0.682650639539.issue33552@psf.upfronthosting.co.za>
Message-ID: <1635198265.97.0.359849938368.issue33552@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33552>
_______________________________________

From report at bugs.python.org  Mon Oct 25 17:57:18 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 25 Oct 2021 21:57:18 +0000
Subject: [issue17569] urllib2 urlopen truncates https pages after 32768
 characters
In-Reply-To: <1364516150.61.0.364872176062.issue17569@psf.upfronthosting.co.za>
Message-ID: <1635199038.74.0.35101878011.issue17569@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Python 2.7 is no longer maintained. Please create a new issue if you are seeing this problem on 3.9+.

----------
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17569>
_______________________________________

From report at bugs.python.org  Mon Oct 25 18:02:27 2021
From: report at bugs.python.org (Irit Katriel)
Date: Mon, 25 Oct 2021 22:02:27 +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: <1635199347.01.0.692692391184.issue21876@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
nosy: +vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21876>
_______________________________________

From report at bugs.python.org  Mon Oct 25 18:17:37 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Mon, 25 Oct 2021 22:17:37 +0000
Subject: [issue45591] PathFinder does not find namespace packages children
In-Reply-To: <1635024524.91.0.931449499561.issue45591@roundup.psfhosted.org>
Message-ID: <1635200257.31.0.533555699968.issue45591@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

Ah, this was not obvious to me! I did not specify a path, but as it defaults to `sys.path` and `namespace.a` is available there, I was expecting it to find it.
One of the things that threw me off was the first arguments being called `fullname`, which I assumed implied that `PathFinder` was able to do a recursive search.


This indeed works:
```
$ ./python
Python 3.11.0a1+ (heads/main:9e05da6224, Oct 23 2021, 20:36:14) [GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from importlib.machinery import PathFinder
>>> spec = PathFinder.find_spec('namespace')
>>> PathFinder.find_spec('a', path=spec.submodule_search_locations)
ModuleSpec(name='a', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f245d0d3e80>, origin='/home/anubis/git/cpython/namespace/a.py')
```

I should have validated if normal packages also had the same behavior, which they do, before opening this -.-

I am curious, what is `fullname` supposed to mean then? "full" in what sense?

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45591>
_______________________________________

From report at bugs.python.org  Mon Oct 25 18:50:53 2021
From: report at bugs.python.org (Ezio Melotti)
Date: Mon, 25 Oct 2021 22:50:53 +0000
Subject: [issue2771] Test issue
In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za>
Message-ID: <1635202253.79.0.733458576384.issue2771@roundup.psfhosted.org>


Change by Ezio Melotti <ezio.melotti at gmail.com>:


----------
assignee: ezio.melotti -> python-dev
versions: +Python 3.11 -Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2771>
_______________________________________

From report at bugs.python.org  Mon Oct 25 18:51:56 2021
From: report at bugs.python.org (Ezio Melotti)
Date: Mon, 25 Oct 2021 22:51:56 +0000
Subject: [issue2771] Test issue
In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za>
Message-ID: <1635202316.15.0.0781188481627.issue2771@roundup.psfhosted.org>


Change by Ezio Melotti <ezio.melotti at gmail.com>:


----------
assignee:  -> python-dev

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2771>
_______________________________________

From report at bugs.python.org  Mon Oct 25 18:51:34 2021
From: report at bugs.python.org (Ezio Melotti)
Date: Mon, 25 Oct 2021 22:51:34 +0000
Subject: [issue2771] Test issue
In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za>
Message-ID: <1635202294.06.0.807969774227.issue2771@roundup.psfhosted.org>


Change by Ezio Melotti <ezio.melotti at gmail.com>:


----------
assignee: python-dev -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2771>
_______________________________________

From report at bugs.python.org  Mon Oct 25 18:52:09 2021
From: report at bugs.python.org (Ezio Melotti)
Date: Mon, 25 Oct 2021 22:52:09 +0000
Subject: [issue2771] Test issue
In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za>
Message-ID: <1635202329.29.0.990489548724.issue2771@roundup.psfhosted.org>


Change by Ezio Melotti <ezio.melotti at gmail.com>:


----------
assignee: python-dev -> ezio.melotti

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2771>
_______________________________________

From report at bugs.python.org  Mon Oct 25 19:18:12 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Mon, 25 Oct 2021 23:18:12 +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: <1635203892.84.0.33013811552.issue45607@roundup.psfhosted.org>


Change by Guido van Rossum <guido at python.org>:


----------
nosy: +gvanrossum

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45607>
_______________________________________

From report at bugs.python.org  Mon Oct 25 19:18:56 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Mon, 25 Oct 2021 23:18:56 +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: <1635203936.3.0.440997124593.issue45607@roundup.psfhosted.org>


Change by Guido van Rossum <guido at python.org>:


----------
nosy: +Zac Hatfield-Dodds

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45607>
_______________________________________

From report at bugs.python.org  Mon Oct 25 19:27:59 2021
From: report at bugs.python.org (paul j3)
Date: Mon, 25 Oct 2021 23:27: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: <1635204479.84.0.06343190333.issue45235@roundup.psfhosted.org>


paul j3 <ajipanca at gmail.com> added the comment:

parser = argparse.ArgumentParser()
    sub = parser.add_subparsers()
    example_subparser = sub.add_parser("example")
    example_subparser.add_argument("--flag", default=10)
    print(parser.parse_args(["example","--flag=15"], argparse.Namespace(flag=20)))

still returns flag=20

User input should override values set by the provided Namespace.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45235>
_______________________________________

From report at bugs.python.org  Mon Oct 25 19:43:48 2021
From: report at bugs.python.org (John Andersen)
Date: Mon, 25 Oct 2021 23:43:48 +0000
Subject: [issue39846] Register .whl as a unpack format in shutil unpack
In-Reply-To: <1583317455.42.0.20954925139.issue39846@roundup.psfhosted.org>
Message-ID: <1635205428.33.0.0166198533222.issue39846@roundup.psfhosted.org>


John Andersen <johnandersenpdx at gmail.com> added the comment:

I ran into this today. Using a wrapper function around _make_zipfile due to https://github.com/python/cpython/blob/d5650a1738fe34f6e1db4af5f4c4edb7cae90a36/Lib/shutil.py#L817-L819 where there is a check for if the format is zip then don't pass owner and group.

```
def make_whlfile(*args, owner=None, group=None, **kwargs):
    return shutil._make_zipfile(*args, **kwargs)


shutil.register_archive_format("whl", make_whlfile, description="Wheel file")
shutil.register_unpack_format(
    "whl", [".whl"], shutil._unpack_zipfile, description="Wheel file"
)
```

----------
nosy: +pdxjohnny

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39846>
_______________________________________

From report at bugs.python.org  Mon Oct 25 19:51:03 2021
From: report at bugs.python.org (paul j3)
Date: Mon, 25 Oct 2021 23:51:03 +0000
Subject: [issue41592] Make _SubParsersAction public
In-Reply-To: <1597864894.48.0.159581898725.issue41592@roundup.psfhosted.org>
Message-ID: <1635205863.7.0.520608855602.issue41592@roundup.psfhosted.org>


paul j3 <ajipanca at gmail.com> added the comment:

A _SubParsersAction is private to the extent that users should not attempt to create it directly, and thus don't need to know the details - beyond what's documented:

"The add_subparsers() method is normally called with no arguments and returns a special action object. This object has a single method, add_parser(), which takes a command name and any ArgumentParser constructor arguments, and returns an ArgumentParser object that can be modified as usual."

All action objects have methods like __call__ and format_usage. The subparsers Action has other methods, but add_parser is the only new "public" method.

There's a tension in writing documentation between getting all details just right, and providing just enough for most users.  As it is, many new users are over whelmed by the documentation.

My understanding is that the "private/public" designation is a convenience for users, and not enforced by Python developers.  

I gather though that some corporate users have policies that prohibit modification of "private" objects, supposedly due to a fear that Python could modify or eliminate those objects without proper notification.  Somehow the "public" documentation sets that part of the code in stone.  My experience here is that it's easier modify the documentation to fit the code than the other way around :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41592>
_______________________________________

From report at bugs.python.org  Mon Oct 25 20:05:29 2021
From: report at bugs.python.org (Steven W)
Date: Tue, 26 Oct 2021 00:05:29 +0000
Subject: [issue45504] [argparse] Entering a partial config_parser flag works
 with subparsers
In-Reply-To: <1634522504.9.0.975535352366.issue45504@roundup.psfhosted.org>
Message-ID: <1635206729.83.0.99250422003.issue45504@roundup.psfhosted.org>


Steven W <steven at swills.me> added the comment:

Thanks. This can be closed.

https://docs.python.org/3/library/argparse.html

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45504>
_______________________________________

From report at bugs.python.org  Mon Oct 25 20:15:33 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Tue, 26 Oct 2021 00:15:33 +0000
Subject: [issue45545] chdir __exit__ is not safe
In-Reply-To: <1634770485.18.0.358610816486.issue45545@roundup.psfhosted.org>
Message-ID: <1635207333.62.0.216539045175.issue45545@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

Alternatively, can't we just os.chdir(self._old_cwd) in __enter__ and preemptively fail? IMO it's probably better to just straight up fail if we can chdir back to the original directory than to have relatively fragile recovery logic.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Mon Oct 25 20:16:53 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Tue, 26 Oct 2021 00:16:53 +0000
Subject: [issue45545] chdir __exit__ is not safe
In-Reply-To: <1634770485.18.0.358610816486.issue45545@roundup.psfhosted.org>
Message-ID: <1635207413.63.0.0656824892026.issue45545@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

s/if we can chdir/if we can't chdir/

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Mon Oct 25 20:20:59 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Tue, 26 Oct 2021 00:20:59 +0000
Subject: [issue45545] chdir __exit__ is not safe
In-Reply-To: <1634770485.18.0.358610816486.issue45545@roundup.psfhosted.org>
Message-ID: <1635207659.98.0.32401972026.issue45545@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
pull_requests: +27483
pull_request: https://github.com/python/cpython/pull/29220

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Mon Oct 25 20:35:58 2021
From: report at bugs.python.org (Andre Roberge)
Date: Tue, 26 Oct 2021 00:35:58 +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: <1635208558.74.0.169851974934.issue45607@roundup.psfhosted.org>


Change by Andre Roberge <andre.roberge at gmail.com>:


----------
nosy: +aroberge

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45607>
_______________________________________

From report at bugs.python.org  Mon Oct 25 20:36:34 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Tue, 26 Oct 2021 00:36:34 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
In-Reply-To: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>
Message-ID: <1635208594.76.0.183508104816.issue45588@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

> The lru_cache can trigger infinite recursion if it is used 
> to cache a hash computation because the cache look-up itself 
> requires the hash.

Yes, I see the problem.  Am not sure whether I should add a note to the docs for this.


> The dataclass thing also makes close() awkward because
> then I would have an outwardly resource-ful dataclass 
> which is against the spirit of a dataclass.

If you think of a dataclass as just a data holder like a mutable named tuple, I can see where the notion of the "spirit of dataclass" comes from.

However, if you think of it as a code generator for handling the boilerplate code in a more complex class, the only "spirit" is to do anything that any other class does.

For objects that hold resources, an explicit close() method is common and well supported (i.e. contextlib.closing and generator.close()).  It is a perfectly reasonable thing to do.

That said, it's a matter of taste.  Just do what works best for you.


> I will think about putting this on pypi instead.

If you do post it, let me know.  I'll add a link to it from the FAQ entry.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Mon Oct 25 20:36:45 2021
From: report at bugs.python.org (Ethan Furman)
Date: Tue, 26 Oct 2021 00:36:45 +0000
Subject: [issue2628] ftplib Persistent data connection
In-Reply-To: <1208130611.58.0.0933193390026.issue2628@psf.upfronthosting.co.za>
Message-ID: <1635208605.95.0.701716886417.issue2628@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:

We don't have a CLA from jbell.  I've sent an email asking him to do so... we'll see what happens.

----------
nosy: +ethan.furman

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2628>
_______________________________________

From report at bugs.python.org  Mon Oct 25 20:42:26 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Tue, 26 Oct 2021 00:42:26 +0000
Subject: [issue45609] Specialize STORE_SUBSCR
Message-ID: <1635208946.04.0.990921573614.issue45609@roundup.psfhosted.org>


New submission from Dennis Sweeney <sweeney.dennis650 at gmail.com>:

See the issue here for lots of data from before specializing: https://github.com/faster-cpython/ideas/issues/105

See https://gist.github.com/sweeneyde/91855e50feb9992b604ddda2d4f1511e for specialization data, pyperformance benchmarks, and microbenchmarks.

Right now the PR draft specializes list[int], dict[str], and bytearray[int], although I don't if the bytearray opcode should be kept. I considered specializing dict[object], but I figured the overhead of PyDict_SetItem isn't that much less than PyObject_SetItem.

----------
components: Interpreter Core
messages: 405015
nosy: Dennis Sweeney
priority: normal
severity: normal
status: open
title: Specialize STORE_SUBSCR
type: performance
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45609>
_______________________________________

From report at bugs.python.org  Mon Oct 25 20:44:54 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Tue, 26 Oct 2021 00:44:54 +0000
Subject: [issue45609] Specialize STORE_SUBSCR
In-Reply-To: <1635208946.04.0.990921573614.issue45609@roundup.psfhosted.org>
Message-ID: <1635209094.19.0.794577633615.issue45609@roundup.psfhosted.org>


Change by Dennis Sweeney <sweeney.dennis650 at gmail.com>:


----------
keywords: +patch
pull_requests: +27484
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29221

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45609>
_______________________________________

From report at bugs.python.org  Mon Oct 25 20:48:38 2021
From: report at bugs.python.org (Zac Hatfield-Dodds)
Date: Tue, 26 Oct 2021 00:48:38 +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: <1635209318.94.0.913884114798.issue45607@roundup.psfhosted.org>


Zac Hatfield-Dodds <zac.hatfield.dodds at gmail.com> added the comment:

This code shows my current best workaround based on a wrapper exception, with the traceback below annotating the additional details that I'd prefer to omit for clarity:


$ python example.py
Traceback (most recent call last):
  File "example.py", line 8, in <module>
    raise AssertionError(why)
AssertionError: Failed!
                                                                        # These lines are
The above exception was the direct cause of the following exception:    # confusing for new 
                                                                        # users, and they
Traceback (most recent call last):                                      # only exist due 
  File "example.py", line 10, in <module>                               # to implementation
    raise Explanation(msg) from e                                       # via the Explanation
Explanation:                                                            # wrapper type :-(
    You can reproduce this error by ...
    ...


The motivation for this is that we'd like to use ExceptionGroup to indicate that `MultipleFailures` is a group of exceptions, and replace our current print()-based method of reporting the details of the inner exceptions.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45607>
_______________________________________

From report at bugs.python.org  Mon Oct 25 20:55:14 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Tue, 26 Oct 2021 00:55:14 +0000
Subject: [issue11477] Incorrect operand precedence when implementing sequences
 in C
In-Reply-To: <1299965091.63.0.267715976543.issue11477@psf.upfronthosting.co.za>
Message-ID: <1635209714.42.0.645975829537.issue11477@roundup.psfhosted.org>


Gregory P. Smith <greg at krypto.org> added the comment:

Given that a lot of code is presumably relying on this (see the notes from 2015)... I wouldn't be surprised if this turns into a wart we document but not actually fix. :/

Or a conditional behavior we control via a `from __future__ import correct_extension_operator_precedence` on a per file / per Notebook basis.

Ever actually flipping the default sounds difficult without disruption.  We'd need input from the community where extensions that rely on it have been produced and widely deployed.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11477>
_______________________________________

From report at bugs.python.org  Mon Oct 25 20:57:42 2021
From: report at bugs.python.org (Eric Snow)
Date: Tue, 26 Oct 2021 00:57:42 +0000
Subject: [issue45096] Update Tools/freeze to make use of
 Tools/scripts/freeze_modules.py?
In-Reply-To: <1630698228.01.0.74483718816.issue45096@roundup.psfhosted.org>
Message-ID: <1635209862.89.0.325321586198.issue45096@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
keywords: +patch
pull_requests: +27485
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29222

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45096>
_______________________________________

From report at bugs.python.org  Mon Oct 25 21:30:45 2021
From: report at bugs.python.org (Ned Deily)
Date: Tue, 26 Oct 2021 01:30:45 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1635211845.5.0.016951545977.issue45350@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

Note that we have since discovered that the fix for this problem inadvertently did not make it into the 3.10.0 release. It is in the current 3.10 branch and will be in 3.10.1, the first bugfix release for 3.10.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Mon Oct 25 22:04:19 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Tue, 26 Oct 2021 02:04:19 +0000
Subject: [issue45545] chdir __exit__ is not safe
In-Reply-To: <1634770485.18.0.358610816486.issue45545@roundup.psfhosted.org>
Message-ID: <1635213859.72.0.94311674797.issue45545@roundup.psfhosted.org>


Barry A. Warsaw <barry at python.org> added the comment:

Does a LBYL strategy actually fix the problem?  E.g. what if the directory gets rm'd between __enter__ and __exit__?  Maybe we shouldn't try to be clever at all and just leave it to the user to decide what to do, and how to handle any chdir-back failures?  Keep it simple?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Mon Oct 25 22:29:21 2021
From: report at bugs.python.org (IYism)
Date: Tue, 26 Oct 2021 02:29:21 +0000
Subject: [issue45610] Cookies with longer paths are listed before cookies with
 shorter paths.
Message-ID: <1635215361.47.0.617081190698.issue45610@roundup.psfhosted.org>


New submission from IYism <admin at iyism.com>:

E.g:
Set-Cookie: a=1; Domain=test.com;      Path=/
Set-Cookie: a=2; Domain=demo.test.com; Path=/

Browser send Cookie: a=2; a=1


According to the agreed specification, a=2 should be read first, not a=1

But the wrong behavior of python is that the cookie reads a=1 by default

----------
components: Library (Lib)
messages: 405020
nosy: FFY00, IYism
priority: normal
pull_requests: 27486
severity: normal
status: open
title: Cookies with longer paths are listed before cookies with shorter paths.
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45610>
_______________________________________

From report at bugs.python.org  Mon Oct 25 23:31:26 2021
From: report at bugs.python.org (Jeremy)
Date: Tue, 26 Oct 2021 03:31:26 +0000
Subject: [issue45545] chdir __exit__ is not safe
In-Reply-To: <1634770485.18.0.358610816486.issue45545@roundup.psfhosted.org>
Message-ID: <1635219086.11.0.0989524719053.issue45545@roundup.psfhosted.org>


Jeremy <ucodery at gmail.com> added the comment:

A LBYL won't always raise errors early as you point out. It will give earlier warnings for a lot of cases, but makes contextlib.chdir usable in less places than os.chdir.
Some return paths will always be errors, and some will be technically recoverable but too difficult to detect and or fragile. That's why I think any solution should incorporate the `ignore_errors` flag. Its pretty ugly to wrap a context manager in a try: except: just because you were trying to clean up after whatever you were doing but the cwd changed in unexpected ways, maybe out of your control.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Tue Oct 26 00:00:41 2021
From: report at bugs.python.org (Ming Hua)
Date: Tue, 26 Oct 2021 04:00:41 +0000
Subject: [issue36675] Doctest directives and comments missing from code samples
In-Reply-To: <1555757030.56.0.8094269644.issue36675@roundup.psfhosted.org>
Message-ID: <1635220841.47.0.903801818028.issue36675@roundup.psfhosted.org>


Change by Ming Hua <plateauwolf at qq.com>:


----------
nosy: +minghua

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36675>
_______________________________________

From report at bugs.python.org  Tue Oct 26 00:48:06 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Tue, 26 Oct 2021 04:48:06 +0000
Subject: [issue45545] chdir __exit__ is not safe
In-Reply-To: <1635219086.11.0.0989524719053.issue45545@roundup.psfhosted.org>
Message-ID: <9BB1C624-10A5-41CB-9B97-186334ED3634@python.org>


Barry A. Warsaw <barry at python.org> added the comment:

> A LBYL won't always raise errors early as you point out. It will give earlier warnings for a lot of cases, but makes contextlib.chdir usable in less places than os.chdir.
> Some return paths will always be errors, and some will be technically recoverable but too difficult to detect and or fragile. That's why I think any solution should incorporate the `ignore_errors` flag. Its pretty ugly to wrap a context manager in a try: except: just because you were trying to clean up after whatever you were doing but the cwd changed in unexpected ways, maybe out of your control.

How common do you expect such errors to be though?  Do you expect them to be more or less common than with os.chdir()?  Do you expect the mitigations to be any different than with a failing os.chdir()?

I?ve certainly written a chdir context manager several times and for the use cases I care about, I?ve never had such a failure, at least not one that wasn?t caused by some other underlying bug, which I was glad wasn?t silenced.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Tue Oct 26 00:56:26 2021
From: report at bugs.python.org (Barry A. Warsaw)
Date: Tue, 26 Oct 2021 04:56:26 +0000
Subject: [issue22789] Compress the marshalled data in PYC files
In-Reply-To: <1415077245.4.0.700609350165.issue22789@psf.upfronthosting.co.za>
Message-ID: <1635224186.63.0.822902436901.issue22789@roundup.psfhosted.org>


Change by Barry A. Warsaw <barry at python.org>:


----------
nosy: +barry

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22789>
_______________________________________

From report at bugs.python.org  Tue Oct 26 01:18:43 2021
From: report at bugs.python.org (Tom Pohl)
Date: Tue, 26 Oct 2021 05:18:43 +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: <1635225523.27.0.03815657728.issue45466@roundup.psfhosted.org>


Tom Pohl <thomas.pohl at gmail.com> added the comment:

Thanks, Terry, for the hint.

The idea got some support on python-ideas, so I thought it is worthwhile to do a PR. As a first-time contributor, I now have to wait for approval for the pipeline to run...

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45466>
_______________________________________

From report at bugs.python.org  Tue Oct 26 01:37:29 2021
From: report at bugs.python.org (Eryk Sun)
Date: Tue, 26 Oct 2021 05:37:29 +0000
Subject: [issue45545] chdir __exit__ is not safe
In-Reply-To: <1634770485.18.0.358610816486.issue45545@roundup.psfhosted.org>
Message-ID: <1635226649.21.0.321508781.issue45545@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

> Alternatively, can't we just os.chdir(self._old_cwd) in __enter__ and preemptively fail? 

If the context manager isn't going to address the long-path case reliably using either a file-descriptor approach or repeated relative chdir() calls, then I think failing early like this is the next best choice.

The previous directory getting deleted is a random environment error, which can be left up to the caller. In POSIX, it might be avoidable using a file-descriptor approach, but POSIX doesn't actually guarantee that fchdir() will succeed if the file descriptor refers to a deleted directory.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Tue Oct 26 03:07:03 2021
From: report at bugs.python.org (surbhi nahta)
Date: Tue, 26 Oct 2021 07:07:03 +0000
Subject: [issue16235] Add python-config.sh for use during cross compilation.
In-Reply-To: <1350251714.79.0.226527559426.issue16235@psf.upfronthosting.co.za>
Message-ID: <1635232023.19.0.88280541868.issue16235@roundup.psfhosted.org>


surbhi nahta <snahta at sevenmentor.com> added the comment:

Hi,

I am also having the same issue and found the best answer on the below site -

https://python-9.jimdosite.com/

----------
nosy: +nahtasurbhi123

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue16235>
_______________________________________

From report at bugs.python.org  Tue Oct 26 03:23:28 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 26 Oct 2021 07:23:28 +0000
Subject: [issue37095] [Feature Request]: Add zstd support in tarfile
In-Reply-To: <1559187768.11.0.7498103877.issue37095@roundup.psfhosted.org>
Message-ID: <1635233008.08.0.719657209511.issue37095@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
nosy: +erlendaasland

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37095>
_______________________________________

From report at bugs.python.org  Tue Oct 26 03:40:20 2021
From: report at bugs.python.org (Ian Currie)
Date: Tue, 26 Oct 2021 07:40:20 +0000
Subject: [issue45611] pprint - low width overrides depth folding
Message-ID: <1635234020.63.0.301729210201.issue45611@roundup.psfhosted.org>


New submission from Ian Currie <iansedano at gmail.com>:

Reproducible example:

>>> from pprint import pprint
>>> data = [["aaaaaaaaaaaaaaaaaa"],[2],[3],[4],[5]]
>>> pprint(data)
[["aaaaaaaaaaaaaaaaaa"], [2], [3], [4], [5]]

>>> pprint(data, depth=1)
[[...], [...], [...], [...], [...]]

>>> pprint(data, depth=1, width=7)
[[...],
 [...],
 [...],
 [...],
 [...]]

>>> pprint(data, depth=1, width=6)
[['aaaaaaaaaaaaaaaaaa'],
 [2],
 [3],
 [4],
 [5]]

The depth "folds" everything deeper than 1 level. Then if you lower the width of the output enough, what was once on one line, will now be split by newlines.

The bug is, if you lower the width below seven characters. Which is the length of `[[...],`  It seems to override the `depth` parameter and print the everything with no folding. This is true of deeply nested structures too.

Expected behavior: for the folding `...` to remain.

Why put the width so low?

I came across this because of the behavior of `compact`:

By default, if a data structure can fit on one line, it will be displayed on one line. `compact` only affects sequences that are longer than the given width.

**There is no way to force compact as False for short items**, so as to make sure all items, even short ones, appear on their own line.

[1,2,3] - will always appear on its own line, there is no way to make it appear like:

[1,
 2,
 3]

The only way is by setting a very low width.

----------
components: Library (Lib)
messages: 405027
nosy: iansedano
priority: normal
severity: normal
status: open
title: pprint - low width overrides depth folding
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45611>
_______________________________________

From report at bugs.python.org  Tue Oct 26 03:42:14 2021
From: report at bugs.python.org (Martin)
Date: Tue, 26 Oct 2021 07:42:14 +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: <1635234134.93.0.959501296489.issue43656@roundup.psfhosted.org>


Martin <martin.schroeder at nerdluecht.de> added the comment:

Irit, I'm unsure about the wording. Something like ":meth:`__repr__` should always succeed, even if errors prevent a full description of the object."? "... even if the object is only partly initialized."?

Andrei, I think you can not simply omit the first argument. For virtually all methods, `self` is an important value for debugging. It could be omitted for __init__, but that would break consistency. Also, __init__ could call other methods that help initialize the object and therefore also deal with partly initialized objects.

I really think one important part of the solution to this problem is making people aware, that under some rare conditions, repr might receive a partly initialized object.

I'm also still convinced that the other part of the solution is a way to customize the behavior of StackSummary.extract and friends.
Context: I have written a tool (https://github.com/moi90/experitur) to run batches of (machine learning) experiments (so it is not interactive). In case of an error, the traceback is dumped into a file, together with the respective local variables (using `traceback.TracebackException.from_exception(...).format()`). I want this to succeed *in any case*, even if I was too ignorant to implement correct `__repr__`s in my experiment code (which is mostly on-time-use, so why should I care).

In the end, this whole problem only affects users of `capture_locals=True`, so we could just change the semantics of this parameter a bit:
False: do nothing, True: use repr (as before), <any callable>: use this callable to convert the value to a string.
This way, we could avoid adding an additional parameter to many of the methods in traceback AND give users an easy way to customize exception formatting for easy debugging.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Tue Oct 26 03:53:36 2021
From: report at bugs.python.org (Jacob Nilsson)
Date: Tue, 26 Oct 2021 07:53:36 +0000
Subject: [issue45586] Use starred expressions in subscripts
In-Reply-To: <1634979504.27.0.148840399936.issue45586@roundup.psfhosted.org>
Message-ID: <1635234816.55.0.0472534915528.issue45586@roundup.psfhosted.org>


Jacob Nilsson <jacob.nilsson at ltu.se> added the comment:

Ok, I see.

>>> a[1, 2, *[3, 4]]
Would still faith with PEP 646 because lists don't accept tuples, right?
>>> a[(1, 2, *[3, 4])]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: list indices must be integers or slices, not tuple

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45586>
_______________________________________

From report at bugs.python.org  Tue Oct 26 04:12:44 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 26 Oct 2021 08:12:44 +0000
Subject: [issue45612] [doc] add sqlite3 module docstring
Message-ID: <1635235964.69.0.602737413779.issue45612@roundup.psfhosted.org>


New submission from Erlend E. Aasland <erlend.aasland at innova.no>:

Currently, the sqlite3 module docstring is the old pysqlite copyright comment in the start of Lib/sqlite3/__init__.py. This is not very helpful to the general user. Suggesting to add a more helpful docstring, a la the 're' or 'array' modules (those two were randomly picked among stdlib modules with helpful docstrings).

----------
assignee: docs at python
components: Documentation
messages: 405030
nosy: docs at python, erlendaasland
priority: normal
severity: normal
status: open
title: [doc] add sqlite3 module docstring
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45612>
_______________________________________

From report at bugs.python.org  Tue Oct 26 04:14:44 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 26 Oct 2021 08:14:44 +0000
Subject: [issue45612] [doc] add sqlite3 module docstring
In-Reply-To: <1635235964.69.0.602737413779.issue45612@roundup.psfhosted.org>
Message-ID: <1635236084.03.0.0263820166694.issue45612@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
keywords: +patch
pull_requests: +27488
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29224

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45612>
_______________________________________

From report at bugs.python.org  Tue Oct 26 04:23:56 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 26 Oct 2021 08:23:56 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635236636.59.0.168420018461.issue45548@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
pull_requests: +27489
pull_request: https://github.com/python/cpython/pull/29225

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Tue Oct 26 04:26:56 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 26 Oct 2021 08:26:56 +0000
Subject: [issue10572] Move test sub-packages to Lib/test
In-Reply-To: <1290991979.58.0.262973706564.issue10572@psf.upfronthosting.co.za>
Message-ID: <1635236816.91.0.390445466919.issue10572@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

A side-effect of keeping tests inside the package, is that they appear in the package contents module docstring, which may be slightly confusing to new users.

>>> import sqlite3
>>> help(sqlite3)
Help on package sqlite3:

NAME
    sqlite3

DESCRIPTION

[...]

PACKAGE CONTENTS
    dbapi2
    dump
    test (package)



Regarding history: Serhiy already moved the sqlite3 test files (see commit 3e19409d6443c66a6a7d62f58b2bb4e8330e56c4 of 2021-09-13). If one worries about needing to add the --follow switch to git log, or possibly backporting issues, that train already left the station:

$ git log --oneline Lib/sqlite3/test/test_dbapi.py | wc -l
       4
$ git log --follow --oneline Lib/sqlite3/test/test_dbapi.py | wc -l
      71


So, I'm +1 regarding moving the sqlite3 tests :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue10572>
_______________________________________

From report at bugs.python.org  Tue Oct 26 04:58:51 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 26 Oct 2021 08:58:51 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635238731.71.0.480794985514.issue45548@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:


New changeset b5ee79494b2e0d484b7cf59f6746010e22567702 by Christian Heimes in branch 'main':
bpo-45548: makesetup improvements (GH-29225)
https://github.com/python/cpython/commit/b5ee79494b2e0d484b7cf59f6746010e22567702


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Tue Oct 26 05:26:31 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 26 Oct 2021 09:26:31 +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: <1635240391.71.0.45619799944.issue43656@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

Martin, how about something like:

"This is typically used for debugging, so it is important that the representation is information-rich and unambiguous. Furthermore, this function should not raise exceptions because that can make it inappropriate for use in some debugging contexts. "

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Tue Oct 26 05:59:35 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Tue, 26 Oct 2021 09:59:35 +0000
Subject: [issue45604] multiprocessing.log_to_stderr missing documentation for
 parameter
In-Reply-To: <1635172489.58.0.649582586734.issue45604@roundup.psfhosted.org>
Message-ID: <1635242375.66.0.614222352242.issue45604@roundup.psfhosted.org>


Change by Nikita Sobolev <mail at sobolevn.me>:


----------
keywords: +patch
nosy: +sobolevn
nosy_count: 2.0 -> 3.0
pull_requests: +27490
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29226

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45604>
_______________________________________

From report at bugs.python.org  Tue Oct 26 06:17:56 2021
From: report at bugs.python.org (Martin Rueckl)
Date: Tue, 26 Oct 2021 10:17:56 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635243476.54.0.0162847806102.issue45438@roundup.psfhosted.org>


Martin Rueckl <enigma at nbubu.de> added the comment:

Just my two cents as a new contributor but long time user:

- isinstance(list[int], type) returning False seems incredibly un-intuitive to me. I always see generics (e.g. list without type parameter) as higher kinded types, where passing a type argument via [] turns the hkt into a concrete type.

- Backporting to 3.9 and 3.10 should be no issue

- I am not deep enough in pythons type system to judge whether my PR is consistent/good. I really just tried out what works and "feels consistent".

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Tue Oct 26 06:45:36 2021
From: report at bugs.python.org (Chih-Hsuan Yen)
Date: Tue, 26 Oct 2021 10:45:36 +0000
Subject: [issue37095] [Feature Request]: Add zstd support in tarfile
In-Reply-To: <1559187768.11.0.7498103877.issue37095@roundup.psfhosted.org>
Message-ID: <1635245136.88.0.322533268655.issue37095@roundup.psfhosted.org>


Change by Chih-Hsuan Yen <yan12125+foss at gmail.com>:


----------
nosy:  -yan12125

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37095>
_______________________________________

From report at bugs.python.org  Tue Oct 26 08:04:37 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 26 Oct 2021 12:04:37 +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: <1635249877.46.0.254524808308.issue45613@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45613>
_______________________________________

From report at bugs.python.org  Tue Oct 26 08:05:24 2021
From: report at bugs.python.org (mike mcleod)
Date: Tue, 26 Oct 2021 12:05:24 +0000
Subject: [issue2628] ftplib Persistent data connection
In-Reply-To: <1635208605.95.0.701716886417.issue2628@roundup.psfhosted.org>
Message-ID: <CANrVhVGxaaXr7Jwp9QZ51d5guzYEj7-jqy9TduJaOTAOkC98hw@mail.gmail.com>


mike mcleod <mikecmcleod at gmail.com> added the comment:

Hi Ethan,

Thanks, awaiting reply..

Regards,
Mike

On Tue, 26 Oct 2021 at 01:36, Ethan Furman <report at bugs.python.org> wrote:

>
> Ethan Furman <ethan at stoneleaf.us> added the comment:
>
> We don't have a CLA from jbell.  I've sent an email asking him to do so...
> we'll see what happens.
>
> ----------
> nosy: +ethan.furman
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue2628>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2628>
_______________________________________

From report at bugs.python.org  Tue Oct 26 08:05:47 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 26 Oct 2021 12:05:47 +0000
Subject: [issue45614] traceback of exception with non-unicode __module__
Message-ID: <1635249947.08.0.737111193049.issue45614@roundup.psfhosted.org>


New submission from Irit Katriel <iritkatriel at gmail.com>:

This test currently fails for both C and python tracebacks:

    def test_exception_modulename_not_unicode(self):
        class X(Exception):
            def __str__(self):
                return "I am X"

        X.__module__ = 42

        err = self.get_report(X())
        exp = f'<unknown>.{X.__qualname__}: I am X'
        self.assertEqual(exp, err)

----------
components: Interpreter Core, Library (Lib)
messages: 405037
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: traceback of exception with non-unicode __module__
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45614>
_______________________________________

From report at bugs.python.org  Tue Oct 26 08:04:50 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 26 Oct 2021 12:04:50 +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: <1635249890.82.0.948120815503.issue45613@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
nosy: +paul.moore

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45613>
_______________________________________

From report at bugs.python.org  Tue Oct 26 08:04:26 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 26 Oct 2021 12:04:26 +0000
Subject: [issue45613] [sqlite3] set threadsafety attribute based on default
 SQLite threaded mode
Message-ID: <1635249866.52.0.876924087674.issue45613@roundup.psfhosted.org>


New submission from Erlend E. Aasland <erlend.aasland at innova.no>:

Currently, the sqlite3 DB-API 2.0 attribute 'threadsafety' is hard-coded to 1, meaning "threads may share the module, but not connections". This is not always true, since it depends on the default SQLite threaded mode, selected at compile-time with the SQLITE_THREADSAFE define.

SQLite's default compile-time threaded mode is SQLITE_THREADSAFE=1, also known as "serialized threaded mode", meaning SQLite can be safely used by multiple threads with no restriction. This mode equals DB-API 2.0 threadsafety level 3: threads may share the module, connections and cursors.

On macOS 11.6, the system supplied Python 3 and SQLite 3 uses SQLITE_THREADSAFE=2 (also known as "multi-thread mode"), meaning SQLite can be safely used by multiple threads provided that no single database connection is used simultaneously in two or more threads. This mode equals DB-API 2.0 threadsafety level 1: threads may share the module, but not connections.

With SQLITE_THREADSAFE=0 (also known as "single-thread mode"), meaning all mutexes are disabled and SQLite is unsafe to use in more than a single thread at once. This mode equals DB-API 2.0 threadsafety level 0: threads may not share the module.


Suggesting to set the 'treadsafety' dynamically at sqlite3 module load time, either via Lib/sqlite3/dbapi2.py, or in C during module init (slightly faster).


See also:

- https://www.python.org/dev/peps/pep-0249/
- https://sqlite.org/threadsafe.html
- https://discuss.python.org/t/is-sqlite3-threadsafety-the-same-thing-as-sqlite3-threadsafe-from-the-c-library/11463/11

----------
assignee: erlendaasland
components: Extension Modules
messages: 405035
nosy: erlendaasland, lemburg
priority: normal
severity: normal
status: open
title: [sqlite3] set threadsafety attribute based on default SQLite threaded mode
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45613>
_______________________________________

From report at bugs.python.org  Tue Oct 26 08:07:42 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 26 Oct 2021 12:07:42 +0000
Subject: [issue45614] traceback of exception with non-unicode __module__
In-Reply-To: <1635249947.08.0.737111193049.issue45614@roundup.psfhosted.org>
Message-ID: <1635250062.11.0.263507881504.issue45614@roundup.psfhosted.org>


Irit Katriel <iritkatriel at gmail.com> added the comment:

In C it is missing the '.' between <unknown> and the qualname. In python it raises an exception when trying to + the module field with a string.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45614>
_______________________________________

From report at bugs.python.org  Tue Oct 26 08:09:26 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Tue, 26 Oct 2021 12:09:26 +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: <4c64fd08-e321-acfd-cbcf-27163c4fe121@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

+1 on setting the attributes dynamically. Other DB-API modules use a
similar approach.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45613>
_______________________________________

From report at bugs.python.org  Tue Oct 26 08:13:44 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 26 Oct 2021 12:13:44 +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: <1635250424.1.0.934061949928.issue45613@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

FYI, it is also possible to change the threaded mode using sqlite3_config(), however that API is not exposed to the sqlite3 module, and there is no plans for doing so in the near future :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45613>
_______________________________________

From report at bugs.python.org  Tue Oct 26 08:36:23 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 26 Oct 2021 12:36:23 +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: <1635251783.08.0.339386250138.issue45613@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
keywords: +patch
pull_requests: +27491
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29227

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45613>
_______________________________________

From report at bugs.python.org  Tue Oct 26 08:41:04 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 26 Oct 2021 12:41:04 +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: <1635252064.94.0.0935669909864.issue45613@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

BTW, I've verified that the overhead of adding this query is negligible.

$ python -m pyperf compare_to --min-speed 1 main.json patched.json 
Benchmark hidden because not significant (1): sqlite_synth

git switch -
Switched to branch 'main'
$ ./python.exe -m timeit "import sqlite3; sqlite3.threadsafety"
1000000 loops, best of 5: 225 nsec per loop
$ git switch -
Switched to branch 'sqlite-threadsafety'
$ ./python.exe -m timeit "import sqlite3; sqlite3.threadsafety"
1000000 loops, best of 5: 221 nsec per loop

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45613>
_______________________________________

From report at bugs.python.org  Tue Oct 26 09:17:02 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 26 Oct 2021 13:17:02 +0000
Subject: [issue45614] traceback of exception with non-unicode __module__
In-Reply-To: <1635249947.08.0.737111193049.issue45614@roundup.psfhosted.org>
Message-ID: <1635254222.14.0.0532220939679.issue45614@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
nosy: +erlendaasland

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45614>
_______________________________________

From report at bugs.python.org  Tue Oct 26 10:00:23 2021
From: report at bugs.python.org (Mark Shannon)
Date: Tue, 26 Oct 2021 14:00:23 +0000
Subject: [issue40512] [subinterpreters] Meta issue: per-interpreter GIL
In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org>
Message-ID: <1635256823.32.0.599259901639.issue40512@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
nosy: +Mark.Shannon
nosy_count: 9.0 -> 10.0
pull_requests: +27492
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29228

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40512>
_______________________________________

From report at bugs.python.org  Tue Oct 26 10:02:09 2021
From: report at bugs.python.org (Eric Snow)
Date: Tue, 26 Oct 2021 14:02:09 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <1633551663.5.0.531821025802.issue45395@roundup.psfhosted.org>
Message-ID: <1635256929.44.0.20911764746.issue45395@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

FYI, I figured out the problem on my end.  I wasn't using an installed python.  Once I did it worked fine.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Tue Oct 26 10:05:49 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Tue, 26 Oct 2021 14:05:49 +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: <1635257149.54.0.862900387256.issue45113@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:

PEP 630 has motivations and technical notes. What needs to be documented better is how both applies to stdlib.
Specifically:
- list the behavior changes when static types are converted to heap types (mutability, pickleability, any more?), and document how to undo them when the new behavior is not better
- explain performance impacts, how to measure and analyze this
- what to watch out for and test

Whether that should be a new PEP or added to 630 doesn't matter much, IMO.

Then, any introduction of PEP 630 should be done deliberately, analyzing the pros and cons for each module separately. It should not be a mass change, and it should involve explaining the motivations & specific implications to module maintainers.

Since this is out of scope in this issue (and any other one on bpo, as far as I know), I invite discussion over at https://github.com/encukou/abi3/issues/21

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________

From report at bugs.python.org  Tue Oct 26 10:16:16 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Tue, 26 Oct 2021 14:16:16 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <1635256929.44.0.20911764746.issue45395@roundup.psfhosted.org>
Message-ID: <f3baadbf-ffc9-cc00-687e-0838870032e3@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 26.10.2021 16:02, Eric Snow wrote:
> 
> FYI, I figured out the problem on my end.  I wasn't using an installed python.  Once I did it worked fine.

Oh, you mean you tried using it directly from the source tree ?
I don't think I ever tried that direct route.

When building PyRun, I first install to a temporary directory and
then use this to run the freeze.py tool, generate the frozen .c
files and run make to have the executable built.

I've pretty much finished the port to 3.10.

I'll try the main version in the next couple of days. There's currently
a lot of work going on for the makesetup / Setup files
(https://bugs.python.org/issue45548). I'm waiting for that to stabilize.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Tue Oct 26 10:17:53 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 26 Oct 2021 14:17:53 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635257873.45.0.863843426205.issue45548@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Brett, we can use AM_CONDITIONAL() to conditionally enable/disable a feature and AC_CONFIG_FILES() to create a Modules/Setup from a template:

Example:

The conditional

    AM_CONDITIONAL([HAVE_SCPROXY], [test "$ac_sys_system" = "Darwin"])

sets HAVE_SCPROXY_FALSE and HAVE_NIS_SCPROXY based on the check.

On macOS:

    HAVE_SCPROXY_FALSE='#'
    HAVE_SCPROXY_TRUE=''

On Linux:

    HAVE_SCPROXY_FALSE=''
    HAVE_SCPROXY_TRUE='#'

We can either do something like:

    *shared*
    @HAVE_SCPROXY_TRUE at _scproxy _scproxy.c -framework SystemConfiguration -framework CoreFoundation

or:

    *disabled*
    @HAVE_SCPROXY_FALSE*_scproxy

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Tue Oct 26 10:18:29 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 26 Oct 2021 14:18:29 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635257909.82.0.661955815754.issue45548@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Typo, the last line should read "@HAVE_SCPROXY_FALSE at _scproxy"

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Tue Oct 26 10:42:00 2021
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Tue, 26 Oct 2021 14:42:00 +0000
Subject: [issue16235] Add python-config.sh for use during cross compilation.
In-Reply-To: <1350251714.79.0.226527559426.issue16235@psf.upfronthosting.co.za>
Message-ID: <1635259320.44.0.265082175552.issue16235@roundup.psfhosted.org>


Change by ?ric Araujo <merwok at netwok.org>:


----------
Removed message: https://bugs.python.org/msg405026

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue16235>
_______________________________________

From report at bugs.python.org  Tue Oct 26 11:15:44 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Tue, 26 Oct 2021 15:15:44 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1635257873.45.0.863843426205.issue45548@roundup.psfhosted.org>
Message-ID: <8ea2cb04-2017-152b-f5a5-f437d45baf33@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 26.10.2021 16:17, Christian Heimes wrote:
> 
> Christian Heimes <lists at cheimes.de> added the comment:
> 
> Brett, we can use AM_CONDITIONAL() to conditionally enable/disable a feature and AC_CONFIG_FILES() to create a Modules/Setup from a template:
> 
> Example:
> 
> The conditional
> 
>     AM_CONDITIONAL([HAVE_SCPROXY], [test "$ac_sys_system" = "Darwin"])
> 
> sets HAVE_SCPROXY_FALSE and HAVE_NIS_SCPROXY based on the check.

I think it would be more helpful (and generate a lot fewer such
macros), if we'd just test for platforms and then use those in the
Setup.in template.

Some other things:

I saw that you stripped off lots of -I and -L options from the Setup
lines. Are those now unconditionally taken from somewhere else,
without possibility to override them ?

You also removed the structure of the listings, which makes things
like dependencies between e.g. _multibytecodec and the CJK codecs
unclear, the notes about audio, the comments on building the _md5
and sha* modules, etc.

Since Setup is a (potentially) hand edited file, it's good to leave
as much useful information in that file as possible, to not
accidentally create setups which don't work and to have references
which may help in finding the right compile options.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Tue Oct 26 11:17:10 2021
From: report at bugs.python.org (Irit Katriel)
Date: Tue, 26 Oct 2021 15:17:10 +0000
Subject: [issue45615] Missing test for type of error when printing traceback
 for non-exception
Message-ID: <1635261430.95.0.190322958386.issue45615@roundup.psfhosted.org>


New submission from Irit Katriel <iritkatriel at gmail.com>:

In C code, there is a check in print_exception that the value passed in is of type exception, and it raises TypeError otherwise. This check is not covered by tests, and indeed it is hard to reach it with tests because the _testcapi module has this check as well, which blocks it before the interpreter's check is reached.


In traceback.py, there is no such check so this happens: 
>>> traceback.print_exception(12)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/iritkatriel/src/cpython-654/Lib/traceback.py", line 121, in print_exception
    value, tb = _parse_value_tb(exc, value, tb)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/iritkatriel/src/cpython-654/Lib/traceback.py", line 102, in _parse_value_tb
    raise TypeError(f"Expected exception, got {exc}")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Expected exception, got 12

----------
components: Interpreter Core, Library (Lib)
messages: 405048
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: Missing test for type of error when printing traceback for non-exception
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45615>
_______________________________________

From report at bugs.python.org  Tue Oct 26 11:39:29 2021
From: report at bugs.python.org (Kartik Subbarao)
Date: Tue, 26 Oct 2021 15:39:29 +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: <1635262769.17.0.988384643646.issue42367@roundup.psfhosted.org>


Change by Kartik Subbarao <subbarao at computer.org>:


----------
nosy: +kartiksubbarao

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42367>
_______________________________________

From report at bugs.python.org  Tue Oct 26 12:08:46 2021
From: report at bugs.python.org (paul j3)
Date: Tue, 26 Oct 2021 16:08:46 +0000
Subject: [issue45235] argparse does not preserve namespace with subparser
 defaults
In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org>
Message-ID: <1635264526.68.0.954705077774.issue45235@roundup.psfhosted.org>


Change by paul j3 <ajipanca at gmail.com>:


----------
stage: resolved -> test needed
status: closed -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45235>
_______________________________________

From report at bugs.python.org  Tue Oct 26 12:10:47 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Tue, 26 Oct 2021 16:10:47 +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: <1635264647.14.0.757771949216.issue43656@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Martin: It's true that exceptions raised in other methods called from __init__ would still have this issue, but I feel like ~90% of it would be solved by the proposed fix.

It does introduce an inconsistency but it does so because it reflects the inconsistency of `self` being NOT initialized in __init__ and `self` being initialized in all other methods used after __init__. It makes intuitive sense that you don't get a repr of an object before it exists in a full state.

The doc fix is useful in itself, but I'm not sure it's enough given the issue reported by Joe with new students getting this error. When they get this error, they will not understand why it happens, what's the connection between the error and the argument that needs to be provided to fix it, and whether it's the correct fix or not.

If they *do* understand it, fixing the __repr__ is probably the best solution, and then no fix on our side is required.

My concern with adding a safe repr argument is that code using that argument can be copy pasted unknowingly and then it's not explicit/obvious that it will silence the errors raised due to broken __repr__'s. (including __repr__'s that are broken even outside of __init__ method).

If such an parameter is added, it's much better to make it a new parameter, to avoid backwards incompatible change, which means it can be backported.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Tue Oct 26 12:43:01 2021
From: report at bugs.python.org (Brett Cannon)
Date: Tue, 26 Oct 2021 16:43:01 +0000
Subject: [issue45591] PathFinder does not find namespace packages children
In-Reply-To: <1635024524.91.0.931449499561.issue45591@roundup.psfhosted.org>
Message-ID: <1635266581.45.0.447542887141.issue45591@roundup.psfhosted.org>


Brett Cannon <brett at python.org> added the comment:

> I am curious, what is `fullname` supposed to mean then? "full" in what sense?

You can still specify the full name of the module you're trying to import, but you also need to pass in the location information for that module. So the code does `fullname.rpartition(".")[-1]` to get the name of the module that you're looking for. So `PathFinder.find_spec('namespace.a', path=spec.submodule_search_locations)` should also work.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45591>
_______________________________________

From report at bugs.python.org  Tue Oct 26 12:46:04 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Tue, 26 Oct 2021 16:46:04 +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: <1635266764.06.0.943387328225.issue45615@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
nosy: +erlendaasland

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45615>
_______________________________________

From report at bugs.python.org  Tue Oct 26 12:49:34 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Tue, 26 Oct 2021 16:49:34 +0000
Subject: [issue45591] PathFinder does not find namespace packages children
In-Reply-To: <1635024524.91.0.931449499561.issue45591@roundup.psfhosted.org>
Message-ID: <1635266974.98.0.404358635291.issue45591@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

Thank you for clarifying, that does work. This is surprising behavior to me, do you recall what was the reasoning for this design? Or is there some discussion you can point me to? And sorry for bothering, I know I am asking too many questions, but I'd like to understand the importlib design ?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45591>
_______________________________________

From report at bugs.python.org  Tue Oct 26 13:30:32 2021
From: report at bugs.python.org (Jeremy)
Date: Tue, 26 Oct 2021 17:30:32 +0000
Subject: [issue45545] chdir __exit__ is not safe
In-Reply-To: <1634770485.18.0.358610816486.issue45545@roundup.psfhosted.org>
Message-ID: <1635269432.36.0.599849604434.issue45545@roundup.psfhosted.org>


Jeremy <ucodery at gmail.com> added the comment:

> How common do you expect such errors to be though?  Do you expect them to be more or less common than with os.chdir()?  Do you expect the mitigations to be any different than with a failing os.chdir()?

It has come up for me with some frequency. But I'm sure my use case is an outlier, stress testing filesystems and working on backup/restore. The thing about needing to access long paths is that you have to do it with these leaps of <= PATH_MAX until you get close enough to the end. Whether you use relative paths or open fds, you have to get there slowly and then walk back along the same path. This would be greatly simplified by contextlib.chdir if it isn't restricted to absolute paths; otherwise it will remain as much a manual effort as ever.

It also has to do with the scope of any try block. If we leave any exceptions to bubble up to the caller, then any code in the with block is also being guarded. Presumably the caller used chdir because they want to do more os operations in the with block, but they won't be able to sort out if the ENOENT or similar error was from the context manager or their own, perhaps more critical, os operations.


> If the context manager isn't going to address the long-path case reliably using either a file-descriptor approach or repeated relative chdir() calls, then I think failing early like this is the next best choice.

I thought about going down the fd road but as not every platform can chdir to a fd, the relative way back would have to be implemented anyways. It didn't seem worth it to have different platforms behave differently on exiting the context manager.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45545>
_______________________________________

From report at bugs.python.org  Tue Oct 26 13:42:58 2021
From: report at bugs.python.org (Christian Heimes)
Date: Tue, 26 Oct 2021 17:42:58 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635270178.14.0.392143042916.issue45548@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Brett removed a lot of stuff in 01cf4fb9c1aa567484c2ffb1b11f9b3fe9949b05 to make the file more readable. I removed unnecessary -D, -I, and -L to make the file even more readable. You can pass custom flags to ./configure.

Setup should not be edited by hand. Customizations go to Setup.local.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Tue Oct 26 13:51:15 2021
From: report at bugs.python.org (Gabe R. )
Date: Tue, 26 Oct 2021 17:51:15 +0000
Subject: [issue45616] Python Launcher Matches 3.10 instead of 3.1
Message-ID: <1635270674.96.0.337719561337.issue45616@roundup.psfhosted.org>


New submission from Gabe R.  <gabrielcroper at gmail.com>:

I have both Python 3.1-64 and 3.10-64 installed on the same Windows machine. If I attempt to launch Python 3.1 using the command `py -3.1-64`, the launcher incorrectly starts Python 3.10.

----------
components: Windows
messages: 405054
nosy: Marsfan, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Python Launcher Matches 3.10 instead of 3.1
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45616>
_______________________________________

From report at bugs.python.org  Tue Oct 26 14:29:17 2021
From: report at bugs.python.org (Gregory P. Smith)
Date: Tue, 26 Oct 2021 18:29:17 +0000
Subject: [issue42367] Restore os.makedirs ability to apply mode to all
 directories created
In-Reply-To: <1605520451.51.0.153670810596.issue42367@roundup.psfhosted.org>
Message-ID: <1635272957.79.0.176995149819.issue42367@roundup.psfhosted.org>


Change by Gregory P. Smith <greg at krypto.org>:


----------
versions: +Python 3.11 -Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42367>
_______________________________________

From report at bugs.python.org  Tue Oct 26 14:47:34 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Tue, 26 Oct 2021 18:47:34 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1635270178.14.0.392143042916.issue45548@roundup.psfhosted.org>
Message-ID: <ac98ba15-649c-ecb5-71b9-ce2f731a3b7b@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 26.10.2021 19:42, Christian Heimes wrote:
> 
> Brett removed a lot of stuff in 01cf4fb9c1aa567484c2ffb1b11f9b3fe9949b05 to make the file more readable. I removed unnecessary -D, -I, and -L to make the file even more readable. You can pass custom flags to ./configure.

Could Brett or you please add those notes back ? There's no other place
where such details are documented. We've lost important information and
I would like to get this back into Setup and ideally add more
information to make it easier for users or admins to customize
their build.

Regarding the -I and -L flags, my question was whether these are
now added elsewhere, since the code would not compile without
e.g. -I$(srcdir)/Include/internal.

I've gone through the Makefile and found that these are already
added via PY_CFLAGS_NODIST, so they are indeed not needed in Setup.
That's great :-)

Please be careful when moving e.g. -I or -L options which point to
non-Python directories. If such options get moved into e.g.
PY_CFLAGS_NODIST, there's no way to override them via options
given in Setup.

Having the -D defined in the relevant code is a lot better. Thanks
for that :-)

> Setup should not be edited by hand. Customizations go to Setup.local.

Editing Setup.local instead of Setup is not documented anywhere ?!
Both files are read, so I guess it's not all that relevant which
of the two are edited.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Tue Oct 26 15:12:54 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Tue, 26 Oct 2021 19:12:54 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <ac98ba15-649c-ecb5-71b9-ce2f731a3b7b@egenix.com>
Message-ID: <0d34a6ff-5b9a-add9-7dc4-efe6d7dbd75a@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 26.10.2021 20:47, Marc-Andre Lemburg wrote:
>> Brett removed a lot of stuff in 01cf4fb9c1aa567484c2ffb1b11f9b3fe9949b05 to make the file more readable. I removed unnecessary -D, -I, and -L to make the file even more readable. You can pass custom flags to ./configure.
> 
> Could Brett or you please add those notes back ? There's no other place
> where such details are documented. We've lost important information and
> I would like to get this back into Setup and ideally add more
> information to make it easier for users or admins to customize
> their build.

I could also edit the file and add those back, after you're done
with the refactoring.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Tue Oct 26 15:20:29 2021
From: report at bugs.python.org (Kelly Brazil)
Date: Tue, 26 Oct 2021 19:20:29 +0000
Subject: [issue45617] sys.stdin does not iterate correctly on '\r' line
 separator
Message-ID: <1635276029.13.0.174464623283.issue45617@roundup.psfhosted.org>


New submission from Kelly Brazil <kellyjonbrazil at gmail.com>:

When iterating on sys.stdin lines, '\r\n' and '\n' are handled correctly, but '\r' is not handled, though it is documented that it should be supported.

Example code:
import sys

for line in sys.stdin:
    print(repr(line))

Results in Python 3.8.9:
$ echo -e 'line1\nline2\nline3' | python3 linetest.py 
'line1\n'
'line2\n'
'line3\n'

$ echo -e 'line1\r\nline2\r\nline3' | python3 linetest.py 
'line1\r\n'
'line2\r\n'
'line3\n'

$ echo -e 'line1\rline2\rline3' | python3 linetest.py 
'line1\rline2\rline3\n'

----------
messages: 405057
nosy: kbrazil
priority: normal
severity: normal
status: open
title: sys.stdin does not iterate correctly on '\r' line separator
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45617>
_______________________________________

From report at bugs.python.org  Tue Oct 26 15:58:13 2021
From: report at bugs.python.org (paul j3)
Date: Tue, 26 Oct 2021 19:58:13 +0000
Subject: [issue45504] [argparse] Entering a partial config_parser flag works
 with subparsers
In-Reply-To: <1634522504.9.0.975535352366.issue45504@roundup.psfhosted.org>
Message-ID: <1635278293.74.0.138076941724.issue45504@roundup.psfhosted.org>


Change by paul j3 <ajipanca at gmail.com>:


----------
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45504>
_______________________________________

From report at bugs.python.org  Tue Oct 26 17:01:16 2021
From: report at bugs.python.org (Kelly Brazil)
Date: Tue, 26 Oct 2021 21:01:16 +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: <1635282076.23.0.643177857552.issue45617@roundup.psfhosted.org>


Change by Kelly Brazil <kellyjonbrazil at gmail.com>:


----------
components: +Library (Lib)

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45617>
_______________________________________

From report at bugs.python.org  Tue Oct 26 17:07:35 2021
From: report at bugs.python.org (lance robotson)
Date: Tue, 26 Oct 2021 21:07:35 +0000
Subject: [issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6
In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org>
Message-ID: <1635282455.27.0.325781098111.issue44828@roundup.psfhosted.org>


lance robotson <robotsun at gmail.com> added the comment:

This issue is happening for me in with my installation of python 3.10 running the release version of mac os monterey 12.0.1 running on an intel mac, I noticed this behavior trying to open or save files in IDLE.

----------
nosy: +robotson

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Tue Oct 26 17:11:34 2021
From: report at bugs.python.org (Steve Dower)
Date: Tue, 26 Oct 2021 21:11:34 +0000
Subject: [issue42260] [C API] Add _PyInterpreterState_SetConfig(): reconfigure
 an interpreter
In-Reply-To: <1604501121.18.0.0957616798897.issue42260@roundup.psfhosted.org>
Message-ID: <1635282694.29.0.354717441571.issue42260@roundup.psfhosted.org>


Change by Steve Dower <steve.dower at python.org>:


----------
pull_requests:  -27312

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42260>
_______________________________________

From report at bugs.python.org  Tue Oct 26 17:56:53 2021
From: report at bugs.python.org (Tim Golden)
Date: Tue, 26 Oct 2021 21:56:53 +0000
Subject: [issue40915] multiple problems with mmap.resize()  in Windows
In-Reply-To: <1591657683.26.0.992231826575.issue40915@roundup.psfhosted.org>
Message-ID: <1635285413.63.0.528649015359.issue40915@roundup.psfhosted.org>


Tim Golden <mail at timgolden.me.uk> added the comment:


New changeset aea5ecc458084e01534ea6a11f4181f369869082 by Tim Golden in branch 'main':
bpo-40915: Fix mmap resize bugs on Windows (GH-29213)
https://github.com/python/cpython/commit/aea5ecc458084e01534ea6a11f4181f369869082


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40915>
_______________________________________

From report at bugs.python.org  Tue Oct 26 17:57:56 2021
From: report at bugs.python.org (Tim Golden)
Date: Tue, 26 Oct 2021 21:57:56 +0000
Subject: [issue40915] multiple problems with mmap.resize()  in Windows
In-Reply-To: <1591657683.26.0.992231826575.issue40915@roundup.psfhosted.org>
Message-ID: <1635285476.3.0.232202234529.issue40915@roundup.psfhosted.org>


Change by Tim Golden <mail at timgolden.me.uk>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40915>
_______________________________________

From report at bugs.python.org  Tue Oct 26 18:34:59 2021
From: report at bugs.python.org (Maciej Olko)
Date: Tue, 26 Oct 2021 22:34:59 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
Message-ID: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>


New submission from Maciej Olko <maciej.olko at gmail.com>:

Since the release of Docutils 0.18 today building Python documentation fails.

In CPython repository we have Sphinx pinned to 3.2.1, which has too loose requirement for Docutils version in install_requires ? docutils>=0.12.

Example of failing build: https://github.com/python/python-docs-pl/runs/4009459257.

My suggestion is to pin down docutils in docs requirements.

----------
assignee: docs at python
components: Documentation
messages: 405060
nosy: Maciej Olko, docs at python
priority: normal
severity: normal
status: open
title: Documentation builds fail with Sphinx 3.2.1
type: crash
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Tue Oct 26 18:39:10 2021
From: report at bugs.python.org (Maciej Olko)
Date: Tue, 26 Oct 2021 22:39:10 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635287950.74.0.964934218202.issue45618@roundup.psfhosted.org>


Change by Maciej Olko <maciej.olko at gmail.com>:


----------
versions:  -Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Tue Oct 26 18:39:21 2021
From: report at bugs.python.org (Maciej Olko)
Date: Tue, 26 Oct 2021 22:39:21 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635287961.31.0.0804731524395.issue45618@roundup.psfhosted.org>


Change by Maciej Olko <maciej.olko at gmail.com>:


----------
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Tue Oct 26 18:45:06 2021
From: report at bugs.python.org (Maciej Olko)
Date: Tue, 26 Oct 2021 22:45:06 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635288306.43.0.444361503578.issue45618@roundup.psfhosted.org>


Maciej Olko <maciej.olko at gmail.com> added the comment:

The pin can be removed after bumping Sphinx to at least 3.5.4, which introduced upper limit for docutils version.

https://github.com/sphinx-doc/sphinx/commit/9263eea38379822e053c67ad1d17036d724c5e41

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Tue Oct 26 18:55:45 2021
From: report at bugs.python.org (Maciej Olko)
Date: Tue, 26 Oct 2021 22:55:45 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635288945.14.0.440144245889.issue45618@roundup.psfhosted.org>


Change by Maciej Olko <maciej.olko at gmail.com>:


----------
keywords: +patch
pull_requests: +27493
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29230

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Tue Oct 26 19:05:06 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Tue, 26 Oct 2021 23:05:06 +0000
Subject: [issue45586] Use starred expressions in subscripts
In-Reply-To: <1634979504.27.0.148840399936.issue45586@roundup.psfhosted.org>
Message-ID: <1635289506.18.0.608191831578.issue45586@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

Yes, I don't believe the PEP is suggesting any changes to list.__getitem__. If you want to suggest such enhancements, I would suggest first sending a message to the python-ideas mailing list or on discuss.python.org.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45586>
_______________________________________

From report at bugs.python.org  Tue Oct 26 20:45:37 2021
From: report at bugs.python.org (Richard Xia)
Date: Wed, 27 Oct 2021 00:45:37 +0000
Subject: [issue42738] subprocess: don't close all file descriptors by default
 (close_fds=False)
In-Reply-To: <1608897183.26.0.576206535349.issue42738@roundup.psfhosted.org>
Message-ID: <1635295537.66.0.356791473776.issue42738@roundup.psfhosted.org>


Richard Xia <richardxia at richardxia.com> added the comment:

I'd like to provide another, non-performance-related use case for changing the default value of Popen's close_fds parameters back to False.

In some scenarios, a (non-Python) parent process may want its descendant processes to inherit a particular file descriptor and for each descendant process to pass on that file descriptor its own children. In this scenario, a Python program may just be an intermediate script that calls out to multiple subprocesses, and closing the inheritable file descriptors by default would interfere with the parent process's ability to pass on that file descriptor to descendants.

As a concrete example, we have a (non-Python) build system and task runner that orchestrates many tasks to run in parallel. Some of those tasks end up invoking Python scripts that use subprocess.run() to run other programs. Our task runner intentionally passes an inheritable file descriptor that is unique to each task as a form of a keep-alive token; if the child processes continue to pass inheritable file descriptors to their children, then we can determine whether all of the processes spawned from a task have terminated by checking whither the last open handle to that file descriptor has been closed. This is particularly important when a processes exits before its children, sometimes uncleanly due to being force killed by the system or by a user.

In our use case, Python's default value of close_fds=True interferes with our tracking scheme, since it prevents Python's subprocesses from inheriting that file descriptor, even though that file descriptor has intentionally been made inheritable.

While we are able to work around the issue by explicitly setting close_fds=False in as much of our Python code as possible, it's difficult to enforce this globally since we have many small Python scripts. We also have no control over any third party libraries that may possibly call Popen.

Regarding security, PEP 446 already makes it so that any files opened from within a Python program are non-inheritable by default, which I agree is a good default. One can make the argument that it's not Python's job to enforce a security policy on file descriptors that a Python process has inherited from a parent process, since Python cannot distinguish from descriptors that were accidentally or intentionally inherited.

----------
nosy: +richardxia

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42738>
_______________________________________

From report at bugs.python.org  Tue Oct 26 21:12:27 2021
From: report at bugs.python.org (Yu Liu)
Date: Wed, 27 Oct 2021 01:12:27 +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: <1635297147.29.0.65788258773.issue45616@roundup.psfhosted.org>


Yu Liu <yuliu2016> added the comment:

Had a quick look in the launcher file. Maybe something like this?

diff --git a/PC/launcher.c b/PC/launcher.c
index fbfb49a..a965a9d 100644
--- a/PC/launcher.c
+++ b/PC/launcher.c
@@ -542,7 +542,7 @@ find_python_by_version(wchar_t const * wanted_ver)
     }
     for (i = 0; i < num_installed_pythons; i++, ip++) {
         n = wcslen(ip->version);
-        if (n > wlen)
+        if (n != wlen)
             n = wlen;
         if ((wcsncmp(ip->version, wanted_ver, n) == 0) &&
             /* bits == 0 => don't care */

----------
nosy: +yuliu2016

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45616>
_______________________________________

From report at bugs.python.org  Tue Oct 26 21:13:19 2021
From: report at bugs.python.org (Yu Liu)
Date: Wed, 27 Oct 2021 01:13:19 +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: <1635297199.17.0.977651531448.issue45616@roundup.psfhosted.org>


Yu Liu <yuliu2016> added the comment:

Had a quick look at the launcher file. Maybe something like this?

diff --git a/PC/launcher.c b/PC/launcher.c
index fbfb49a..a965a9d 100644
--- a/PC/launcher.c
+++ b/PC/launcher.c
@@ -542,7 +542,7 @@ find_python_by_version(wchar_t const * wanted_ver)
     }
     for (i = 0; i < num_installed_pythons; i++, ip++) {
         n = wcslen(ip->version);
-        if (n > wlen)
+        if (n != wlen)
             n = wlen;
         if ((wcsncmp(ip->version, wanted_ver, n) == 0) &&
             /* bits == 0 => don't care */

----------
nosy: +yuliu2016

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45616>
_______________________________________

From report at bugs.python.org  Tue Oct 26 22:28:00 2021
From: report at bugs.python.org (Arthur Milchior)
Date: Wed, 27 Oct 2021 02:28:00 +0000
Subject: [issue45619] Mentioning structural pattern matching in the list of
 binding
Message-ID: <1635301679.85.0.944511615119.issue45619@roundup.psfhosted.org>


New submission from Arthur Milchior <arthur at milchior.fr>:

https://docs.python.org/3/reference/executionmodel.html list all of the way a variable may be bound. However, it seems that it was not updated. Indeed, structural pattern matching in 3.10 also allows to bind a variable and is not mentionned.

As a related issue, the sentence is far too long and really would need to be broken down. At the very least, the special case "and targets that are identifiers if" is not clear, it is not indicated whether this case extends to the end of the sentence or is just local

----------
assignee: docs at python
components: Documentation
messages: 405066
nosy: Arthur-Milchior, docs at python
priority: normal
severity: normal
status: open
title: Mentioning structural pattern matching in the list of binding
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45619>
_______________________________________

From report at bugs.python.org  Tue Oct 26 22:32:15 2021
From: report at bugs.python.org (Arthur Milchior)
Date: Wed, 27 Oct 2021 02:32:15 +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: <1635301935.5.0.461456512989.issue45619@roundup.psfhosted.org>


Change by Arthur Milchior <arthur at milchior.fr>:


----------
keywords: +patch
pull_requests: +27495
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29232

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45619>
_______________________________________

From report at bugs.python.org  Tue Oct 26 23:02:04 2021
From: report at bugs.python.org (Eryk Sun)
Date: Wed, 27 Oct 2021 03:02:04 +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: <1635303724.94.0.242298179474.issue45617@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

> '\r' is not handled, though it is documented that it 
> should be supported.

Where is it documented that sys.stdin uses universal newlines mode? The newline behavior isn't documented in the sys module [1], though it should be. It's hard coded in create_stdio() in Python/pylifecycle.c [2]. In Windows it uses universal-translated mode. On all other platforms, it uses "\n", which includes "\r\n" but not "\r".

---
[1] https://docs.python.org/3/library/sys.html#sys.stdin
[2] https://github.com/python/cpython/blob/v3.10.0/Python/pylifecycle.c#L2216

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45617>
_______________________________________

From report at bugs.python.org  Tue Oct 26 23:42:58 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Wed, 27 Oct 2021 03:42:58 +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: <1635306178.6.0.103473086752.issue45619@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

Thanks!

----------
nosy: +gvanrossum

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45619>
_______________________________________

From report at bugs.python.org  Tue Oct 26 23:55:31 2021
From: report at bugs.python.org (Ned Deily)
Date: Wed, 27 Oct 2021 03:55:31 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635306931.5.0.723979707009.issue45618@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
nosy: +lukasz.langa, mdk, pablogsal
priority: normal -> release blocker
versions: +Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Wed Oct 27 01:06:07 2021
From: report at bugs.python.org (Ned Deily)
Date: Wed, 27 Oct 2021 05:06: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: <1635311167.13.0.475098379502.issue44828@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

Marc, thanks for providing the patch for Tk. There are some issues with it, though, at least when used with IDLE. I built a Python 3.10.0+ universal2 installer, like what we provide on python.org, with just the updated Tk and tested it on macOS 10.9, 10.13, 10.14, 10.15, 11 and 12.

First, and most important, there seems to be a typo in the fix that causes the dialog panel to break on macOS 10.14: 

-	if ([NSApp macOSVersion] > 101400) {
+	if ( osVersion >= 101400 && osVersion < 120000) {

That ">=" should be just an ">" as before, I think. At least, making that change unbreaks 10.14.

Second, while the filedialog panel now works on macOS 12 (Monterey) with the patch, there are some side effects, at least when using CMD-S (Save) in a new IDLE edit window. After pressing CMD-S, some small object appears on the screen very briefly (too quickly for me to recognize what it is) and then the expected Save filedialog panel appears; however, unlike on all the other operating system levels tested, the keyboard focus is not on the filename text field in the panel. So when the user starts typing the file name, nothing happens until they do something, like clicking on the file name field, to manually move the keyboard focus to that field. I think most users would find that confusing. I don't know if there's any way to change that, either in Tk, tkinter, or IDLE. But it does seem to be a regression. The same binaries work fine on all of the other macOS versions I tested.

Any ideas?

(Although it's not an IDLE bug, I've added IDLE to the components list since it is impacted by this issue.)

----------
assignee:  -> terry.reedy
components: +IDLE
nosy: +lukasz.langa, pablogsal, terry.reedy
priority: normal -> release blocker
title: Using tkinter.filedialog crashes on macOS Python 3.9.6 -> tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves
versions: +Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Wed Oct 27 01:11:19 2021
From: report at bugs.python.org (Ned Deily)
Date: Wed, 27 Oct 2021 05:11:19 +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: <1635311479.72.0.385798290228.issue44828@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
assignee: terry.reedy -> ned.deily

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Wed Oct 27 01:39:20 2021
From: report at bugs.python.org (Sonia)
Date: Wed, 27 Oct 2021 05:39:20 +0000
Subject: [issue45620] A misleading url in 'Floating Point Arithmetic' page
Message-ID: <1635313160.15.0.740336077946.issue45620@roundup.psfhosted.org>


New submission from Sonia <hsiaohanwu at gmail.com>:

The url of [The Perils of Floating Point](http://www.lahey.com/float.htm) seems a bit weird in the page https://docs.python.org/3/tutorial/floatingpoint.html. It redirects me to a webpage that sells dugs. Not sure if the resource was meant to find this: http://www.stat.cmu.edu/~brian/711/week03/perils-of-floating-point.pdf

----------
messages: 405070
nosy: hanhantw
priority: normal
severity: normal
status: open
title: A misleading url in 'Floating Point Arithmetic' page
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45620>
_______________________________________

From report at bugs.python.org  Wed Oct 27 02:03:02 2021
From: report at bugs.python.org (Alexey Izbyshev)
Date: Wed, 27 Oct 2021 06:03:02 +0000
Subject: [issue42738] subprocess: don't close all file descriptors by default
 (close_fds=False)
In-Reply-To: <1608897183.26.0.576206535349.issue42738@roundup.psfhosted.org>
Message-ID: <1635314582.22.0.8502752888.issue42738@roundup.psfhosted.org>


Alexey Izbyshev <izbyshev at ispras.ru> added the comment:

> As a concrete example, we have a (non-Python) build system and task runner that orchestrates many tasks to run in parallel. Some of those tasks end up invoking Python scripts that use subprocess.run() to run other programs. Our task runner intentionally passes an inheritable file descriptor that is unique to each task as a form of a keep-alive token; if the child processes continue to pass inheritable file descriptors to their children, then we can determine whether all of the processes spawned from a task have terminated by checking whither the last open handle to that file descriptor has been closed. This is particularly important when a processes exits before its children, sometimes uncleanly due to being force killed by the system or by a user.

I don't see how such scheme could be usable in a general-purpose build system. Python is just one example of a program that closes file descriptors for child processes, but there might be arbitrary more. In general, there is no guarantee that a descriptor would be inherited in a process tree if it contains at least one process running code that you don't fully control. To properly control process trees, I'd suggest to consider prctl(PR_SET_CHILD_SUBREAPER) or PID namespaces on Linux and job objects on Windows (don't know about other OSes).

> Regarding security, PEP 446 already makes it so that any files opened from within a Python program are non-inheritable by default, which I agree is a good default. One can make the argument that it's not Python's job to enforce a security policy on file descriptors that a Python process has inherited from a parent process, since Python cannot distinguish from descriptors that were accidentally or intentionally inherited.

While I agree that such argument could be made, closing FDs for children also affects FDs opened by C extensions, which are not subject to PEP 446. And this is important not only for security: for example, it's easy to create a deadlock if one process is blocked on a read() from a pipe, which it expects to be closed at a proper moment, but the pipe write end is leaked to some unrelated long-running process which keeps it alive indefinitely without being aware of it.

And again, even if subprocess didn't close FDs by default (or somehow closed only non-inherited FDs), how could this be used in a wider picture? Any third-party library (even written in Python) could still decide to close e.g. some range of descriptors, so one wouldn't be able to rely on FD inheritance in a general setting, just as one can't rely on inheritance of environment variables (works most of the time, but no promises). Traditional Unix things like inheritance across fork()/exec() and no O_CLOEXEC by default are convenient for quick hacks, but my impression is that such defaults are considered to be design bugs in the modern setting by many.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42738>
_______________________________________

From report at bugs.python.org  Wed Oct 27 03:07:58 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Wed, 27 Oct 2021 07:07:58 +0000
Subject: [issue45620] A misleading url in 'Floating Point Arithmetic' page
In-Reply-To: <1635313160.15.0.740336077946.issue45620@roundup.psfhosted.org>
Message-ID: <1635318478.67.0.475489514788.issue45620@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

I was unable to replicate this. I see the correct article 
"The Perils of Floating Point" at lahey.com/float.htm. Is the site still incorrect for you, or did the Lahey site fix the issue?

----------
assignee:  -> docs at python
components: +Documentation
nosy: +Dennis Sweeney, docs at python

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45620>
_______________________________________

From report at bugs.python.org  Wed Oct 27 03:20:17 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Wed, 27 Oct 2021 07:20:17 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635319217.77.0.724055880627.issue45618@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
nosy: +erlendaasland

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Wed Oct 27 03:37:27 2021
From: report at bugs.python.org (Tim Golden)
Date: Wed, 27 Oct 2021 07:37:27 +0000
Subject: [issue45621] Small fixes to mmap
Message-ID: <1635320247.38.0.208723521187.issue45621@roundup.psfhosted.org>


New submission from Tim Golden <mail at timgolden.me.uk>:

Following issue40915 a few small items still need to be addressed, mostly cosmetic / naming:

* A comment should have been removed but wasn't
* A comment should have been added but wasn't
* The use of the string "TEST" should be avoided in tests particularly where there is a shared namespace and therefore the chance of a collision

----------
assignee: tim.golden
messages: 405073
nosy: tim.golden
priority: low
severity: normal
status: open
title: Small fixes to mmap
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45621>
_______________________________________

From report at bugs.python.org  Wed Oct 27 03:41:19 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Wed, 27 Oct 2021 07:41:19 +0000
Subject: [issue42545] Check that all symbols in the limited ABI are exported
In-Reply-To: <1606942339.51.0.833109264536.issue42545@roundup.psfhosted.org>
Message-ID: <1635320479.45.0.611541655549.issue42545@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

Pablo, can this be closed?

----------
nosy: +erlendaasland

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42545>
_______________________________________

From report at bugs.python.org  Wed Oct 27 04:25:28 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Wed, 27 Oct 2021 08:25:28 +0000
Subject: [issue42738] subprocess: don't close all file descriptors by default
 (close_fds=False)
In-Reply-To: <1608897183.26.0.576206535349.issue42738@roundup.psfhosted.org>
Message-ID: <1635323128.62.0.934649238851.issue42738@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

Gregory P. Smith wrote:
> A higher level "best practices for launching child processes module" with APIs reflecting explicit intents (performance vs security vs simplicity) rather than requiring users to understand subprocess platform specific details may be a good idea at this point (on PyPI I assume).

Interesting that you say that. subprocess was originally written with exactly this idea in mind - to create a module which deals with all the platform details, so that the user doesn't have to know about them: https://www.python.org/dev/peps/pep-0324/#motivation

On the topic itself: I believe Python should come with safe and usable defaults, but provide ways to enable alternative approaches which have more performance if the user so decides (by e.g. passing in a parameter). In such cases, the user then becomes responsible for understanding the implications.

Since there already is a parameter, expert users can already gain more performance by using it and then explicitly only closing FDs the users knows can/should be closed in the new process.

Perhaps there's a middle ground: have subprocess only loop over the first 64k FDs per default and not all possible ones.

----------
nosy: +lemburg

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42738>
_______________________________________

From report at bugs.python.org  Wed Oct 27 04:38:26 2021
From: report at bugs.python.org (=?utf-8?q?Florin_Sp=C4=83tar?=)
Date: Wed, 27 Oct 2021 08:38:26 +0000
Subject: [issue45622] BlockingIOError: [Errno 11] Resource temporarily
 unavailable when performing SSL handshake on Solaris
Message-ID: <1635323906.56.0.962809052121.issue45622@roundup.psfhosted.org>


New submission from Florin Sp?tar <florin.spatar at gmail.com>:

Trying to connect to an uWSGI (or any other) server, from Solaris, will fail with the following error:

-bash-3.00# /opt/opsware/agent/bin/python3 client.py 
/tmp/client.py:9: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
  context = ssl.SSLContext(ssl.PROTOCOL_TLS)
Exception in thread Thread-1 (make_connection):
Traceback (most recent call last):
  File "/opt/opsware/agent/lib/python3.10/threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "/opt/opsware/agent/lib/python3.10/threading.py", line 946, in run
    self._target(*self._args, **self._kwargs)
  File "/tmp/client.py", line 13, in make_connection
    with context.wrap_socket(sock, server_hostname=hostname) as ssock:
  File "/opt/opsware/agent/lib/python3.10/ssl.py", line 512, in wrap_socket
    return self.sslsocket_class._create(
  File "/opt/opsware/agent/lib/python3.10/ssl.py", line 1070, in _create
    self.do_handshake()
  File "/opt/opsware/agent/lib/python3.10/ssl.py", line 1341, in do_handshake
    self._sslobj.do_handshake()
BlockingIOError: [Errno 11] Resource temporarily unavailable

I used the following client code (based on https://docs.python.org/3.10/library/ssl.html#socket-creation):

import socket
import ssl
import threading

hostname = '192.168.135.9'
port = 1004

def make_connection():
	context = ssl.SSLContext(ssl.PROTOCOL_TLS)

	with socket.create_connection((hostname, port)) as sock:
		sock.settimeout(300) # use non-blocking I/O
		with context.wrap_socket(sock, server_hostname=hostname) as ssock:
			print(ssock.version())


t=threading.Thread(target=make_connection)
t.start()
t.join()

This works fine on multiple Linux distros, AIX, and HP-UX. It even seems to work on Solaris Sparc. There seems to be an issue only on Solaris (5.10/5.11) x86.
Furthermore, in order to reproduce the issue, the SSL handshake needs to be performed from a thread and use non-blocking I/O. If I use blocking I/O or don't use thread, the issue doesn't reproduce anymore.

The issues first started to appear in python 3.8.5 when I switched from openssl 1.0.2u to 1.1.1k. The issue is still reproducible with python 3.10 and openssl 3.0.0

----------
assignee: christian.heimes
components: SSL
files: client.py
messages: 405076
nosy: christian.heimes, florinspatar
priority: normal
severity: normal
status: open
title: BlockingIOError: [Errno 11] Resource temporarily unavailable when performing SSL handshake on Solaris
type: behavior
versions: Python 3.10, Python 3.8
Added file: https://bugs.python.org/file50394/client.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45622>
_______________________________________

From report at bugs.python.org  Wed Oct 27 05:01:00 2021
From: report at bugs.python.org (Sonia)
Date: Wed, 27 Oct 2021 09:01:00 +0000
Subject: [issue45620] A misleading url in 'Floating Point Arithmetic' page
In-Reply-To: <1635313160.15.0.740336077946.issue45620@roundup.psfhosted.org>
Message-ID: <1635325260.23.0.881637550506.issue45620@roundup.psfhosted.org>


Sonia <hsiaohanwu at gmail.com> added the comment:

I was redirect to https://www.hmbags.tw 
so is this my internet problem?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45620>
_______________________________________

From report at bugs.python.org  Wed Oct 27 05:04:48 2021
From: report at bugs.python.org (Sonia)
Date: Wed, 27 Oct 2021 09:04:48 +0000
Subject: [issue45620] A misleading url in 'Floating Point Arithmetic' page
In-Reply-To: <1635313160.15.0.740336077946.issue45620@roundup.psfhosted.org>
Message-ID: <1635325488.52.0.318702867521.issue45620@roundup.psfhosted.org>


Sonia <hsiaohanwu at gmail.com> added the comment:

It shows the drug ad slogan even with the google search result.
I searched 'The Perils of Floating Point lahey'

----------
Added file: https://bugs.python.org/file50395/?? 2021-10-27 ??5.02.02.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45620>
_______________________________________

From report at bugs.python.org  Wed Oct 27 05:45:52 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 27 Oct 2021 09:45:52 +0000
Subject: [issue44511] Improve the bytecode for mapping patterns
In-Reply-To: <1624666320.05.0.738166042939.issue44511@roundup.psfhosted.org>
Message-ID: <1635327952.03.0.944635094817.issue44511@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:


New changeset 82a662e5216a9b3969054c540a759a9493468510 by Brandt Bucher in branch 'main':
bpo-44511: Improve the bytecode for class and mapping patterns (GH-26922)
https://github.com/python/cpython/commit/82a662e5216a9b3969054c540a759a9493468510


----------
nosy: +Mark.Shannon

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44511>
_______________________________________

From report at bugs.python.org  Wed Oct 27 06:01:20 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 27 Oct 2021 10:01:20 +0000
Subject: [issue45388] Use JUMP_FORWARD for all forward jumps.
In-Reply-To: <1633514784.49.0.280393257711.issue45388@roundup.psfhosted.org>
Message-ID: <1635328880.41.0.887469973968.issue45388@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45388>
_______________________________________

From report at bugs.python.org  Wed Oct 27 06:12:52 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 27 Oct 2021 10:12:52 +0000
Subject: [issue45622] BlockingIOError: [Errno 11] Resource temporarily
 unavailable when performing SSL handshake on Solaris
In-Reply-To: <1635323906.56.0.962809052121.issue45622@roundup.psfhosted.org>
Message-ID: <1635329572.33.0.466238654942.issue45622@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Thanks for the detailed bug report.

Since the code works on Linux and other platforms as well as OpenSSL 1.0.2, it is likely a platform bug or a platform-specific issue with OpenSSL. Unfortunately I don't know how to investigate this issue.

----------
assignee: christian.heimes -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45622>
_______________________________________

From report at bugs.python.org  Wed Oct 27 06:21:53 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 27 Oct 2021 10:21:53 +0000
Subject: [issue43683] Handle generator (and coroutine) state in the bytecode.
In-Reply-To: <1617209103.34.0.926095267338.issue43683@roundup.psfhosted.org>
Message-ID: <1635330113.36.0.862246367708.issue43683@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:

Damien, thanks for catching this.

The change was not intended.

There are two kind of exceptions raised by send.
1. Where a pre-condition is not met, e.g. a generator is already ruuning (caller errors)
2. When the generator/coroutine raises an exception (callee exceptions).

(1) does not change the state of the generator, (2) does.

Sending non-None to a generator that has not started falls into kind 1, IMO. So we should revert the change.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43683>
_______________________________________

From report at bugs.python.org  Wed Oct 27 06:22:02 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 27 Oct 2021 10:22:02 +0000
Subject: [issue43683] Handle generator (and coroutine) state in the bytecode.
In-Reply-To: <1617209103.34.0.926095267338.issue43683@roundup.psfhosted.org>
Message-ID: <1635330122.2.0.310807951228.issue43683@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
priority: normal -> release blocker

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43683>
_______________________________________

From report at bugs.python.org  Wed Oct 27 06:30:32 2021
From: report at bugs.python.org (egorpugin)
Date: Wed, 27 Oct 2021 10:30:32 +0000
Subject: [issue45623] static build is broken
Message-ID: <1635330632.5.0.689915843766.issue45623@roundup.psfhosted.org>


New submission from egorpugin <egor.pugin at gmail.com>:

Static build is not working any more since 3.10.

'winver' member is only defined with dll build.

See master - 'winver' call which is not available for windows+static build.
https://github.com/python/cpython/blob/main/Lib/site.py#L292

See 3.9 file - no 'winver' call.
https://github.com/python/cpython/blob/1016ef37904c7ddc16fb18d3369b2a78cf428fa4/Lib/site.py#L266

Error:
```
1>EXEC : Fatal Python error : init_import_site: Failed to import the site module
1>Python runtime state: initialized
1>Traceback (most recent call last):
1>  File "D:\dev\swst\pkg\8b\0a\10a9\src\sdir\Lib\site.py", line 657, in <module>
1>    main()
1>  File "D:\dev\swst\pkg\8b\0a\10a9\src\sdir\Lib\site.py", line 643, in main
1>    known_paths = addusersitepackages(known_paths)
1>  File "D:\dev\swst\pkg\8b\0a\10a9\src\sdir\Lib\site.py", line 380, in addusersitepackages
1>    user_site = getusersitepackages()
1>  File "D:\dev\swst\pkg\8b\0a\10a9\src\sdir\Lib\site.py", line 367, in getusersitepackages
1>    USER_SITE = _get_path(userbase)
1>  File "D:\dev\swst\pkg\8b\0a\10a9\src\sdir\Lib\site.py", line 332, in _get_path
1>    ver_nodot = sys.winver.replace('.', '')
1>AttributeError: module 'sys' has no attribute 'winver'
```

----------
messages: 405082
nosy: egorpugin
priority: normal
severity: normal
status: open
title: static build is broken
type: behavior
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45623>
_______________________________________

From report at bugs.python.org  Wed Oct 27 07:03:09 2021
From: report at bugs.python.org (Carl Friedrich Bolz-Tereick)
Date: Wed, 27 Oct 2021 11:03:09 +0000
Subject: [issue45624] test_graphlib.py depends on iteration order of sets
Message-ID: <1635332589.87.0.491015468348.issue45624@roundup.psfhosted.org>


New submission from Carl Friedrich Bolz-Tereick <cfbolz at gmx.de>:

test_graphlib fails on PyPy because it depends on the iteration order of sets. Will open a PR soon.

----------
messages: 405084
nosy: Carl.Friedrich.Bolz
priority: normal
severity: normal
status: open
title: test_graphlib.py depends on iteration order of sets

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45624>
_______________________________________

From report at bugs.python.org  Wed Oct 27 07:03:05 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 27 Oct 2021 11:03:05 +0000
Subject: [issue43683] Handle generator (and coroutine) state in the bytecode.
In-Reply-To: <1617209103.34.0.926095267338.issue43683@roundup.psfhosted.org>
Message-ID: <1635332585.96.0.591145065447.issue43683@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:

Just to be clear, it is the behavior change that should be reverted, not necessarily the new bytecode.

In fact we should probably push on with (2) and add an exception handler wrapping the whole generator except the GEN_START. That way a GEN_START exception will not clear the generator.
GEN_START might need to do a bit of trickery like setting lasti back to -1.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43683>
_______________________________________

From report at bugs.python.org  Wed Oct 27 07:04:08 2021
From: report at bugs.python.org (Carl Friedrich Bolz-Tereick)
Date: Wed, 27 Oct 2021 11:04:08 +0000
Subject: [issue45624] test_graphlib.py depends on iteration order of sets
In-Reply-To: <1635332589.87.0.491015468348.issue45624@roundup.psfhosted.org>
Message-ID: <1635332648.37.0.340121805085.issue45624@roundup.psfhosted.org>


Carl Friedrich Bolz-Tereick <cfbolz at gmx.de> added the comment:

here's the traceback running on pypy3.9-alpha:

======================================================================
FAIL: test_simple_cases (test.test_graphlib.TestTopologicalSort)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/cfbolz/projects/small-commits-pypy/lib-python/3/test/test_graphlib.py", line 39, in test_simple_cases
    [(3, 5, 7), (11, 8), (2, 10, 9)],
  File "/home/cfbolz/projects/small-commits-pypy/lib-python/3/test/test_graphlib.py", line 19, in _test_graph
    self.assertEqual(list(static_order_with_groups(ts)), list(expected))
AssertionError: Lists differ: [(3, 7, 5), (8, 11), (2, 9, 10)] != [(3, 5, 7), (11, 8), (2, 10, 9)]

First differing element 0:
(3, 7, 5)
(3, 5, 7)

- [(3, 7, 5), (8, 11), (2, 9, 10)]
+ [(3, 5, 7), (11, 8), (2, 10, 9)]

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45624>
_______________________________________

From report at bugs.python.org  Wed Oct 27 07:12:25 2021
From: report at bugs.python.org (Petr Viktorin)
Date: Wed, 27 Oct 2021 11:12:25 +0000
Subject: [issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)
In-Reply-To: <1602963425.44.0.576962569847.issue42064@roundup.psfhosted.org>
Message-ID: <1635333145.87.0.373617128292.issue42064@roundup.psfhosted.org>


Petr Viktorin <encukou at gmail.com> added the comment:


New changeset 8f24b7dbcbd83311dad510863d8cb41f0e91b464 by Erlend Egeberg Aasland in branch 'main':
bpo-42064: Convert `sqlite3` global state to module state (GH-29073)
https://github.com/python/cpython/commit/8f24b7dbcbd83311dad510863d8cb41f0e91b464


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42064>
_______________________________________

From report at bugs.python.org  Wed Oct 27 07:18:17 2021
From: report at bugs.python.org (Carl Friedrich Bolz-Tereick)
Date: Wed, 27 Oct 2021 11:18:17 +0000
Subject: [issue45624] test_graphlib.py depends on iteration order of sets
In-Reply-To: <1635332589.87.0.491015468348.issue45624@roundup.psfhosted.org>
Message-ID: <1635333497.35.0.55946287176.issue45624@roundup.psfhosted.org>


Change by Carl Friedrich Bolz-Tereick <cfbolz at gmx.de>:


----------
keywords: +patch
pull_requests: +27496
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29233

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45624>
_______________________________________

From report at bugs.python.org  Wed Oct 27 07:24:24 2021
From: report at bugs.python.org (egorpugin)
Date: Wed, 27 Oct 2021 11:24:24 +0000
Subject: [issue45623] static build is broken
In-Reply-To: <1635330632.5.0.689915843766.issue45623@roundup.psfhosted.org>
Message-ID: <1635333864.85.0.299411775355.issue45623@roundup.psfhosted.org>


Change by egorpugin <egor.pugin at gmail.com>:


----------
components: +Library (Lib)

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45623>
_______________________________________

From report at bugs.python.org  Wed Oct 27 07:31:36 2021
From: report at bugs.python.org (Fred)
Date: Wed, 27 Oct 2021 11:31:36 +0000
Subject: [issue40990] Make http.server support SSL
In-Reply-To: <1592311907.03.0.0583719503418.issue40990@roundup.psfhosted.org>
Message-ID: <1635334296.0.0.850280010802.issue40990@roundup.psfhosted.org>


Fred <eldmannen at gmail.com> added the comment:

How is this going? Any progress?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40990>
_______________________________________

From report at bugs.python.org  Wed Oct 27 07:38:05 2021
From: report at bugs.python.org (Fred)
Date: Wed, 27 Oct 2021 11:38:05 +0000
Subject: [issue45625] Add support for top-level await
Message-ID: <1635334685.92.0.999778106074.issue45625@roundup.psfhosted.org>


New submission from Fred <eldmannen at gmail.com>:

I want top-level await without any boilerplate code or setup.
Just write a "await" statement on line 1 without any indention.

    #!/usr/bin/env python3
    import asyncio
    await asyncio.sleep(1)


I don't want to have to call asyncio.run(main()), and I don't  want to have to put the await inside an async function.

----------
components: Interpreter Core
messages: 405088
nosy: Fred
priority: normal
severity: normal
status: open
title: Add support for top-level await
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45625>
_______________________________________

From report at bugs.python.org  Wed Oct 27 07:53:27 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Wed, 27 Oct 2021 11:53:27 +0000
Subject: [issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)
In-Reply-To: <1602963425.44.0.576962569847.issue42064@roundup.psfhosted.org>
Message-ID: <1635335607.98.0.850988731104.issue42064@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
pull_requests: +27497
pull_request: https://github.com/python/cpython/pull/29234

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42064>
_______________________________________

From report at bugs.python.org  Wed Oct 27 08:15:50 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Wed, 27 Oct 2021 12:15:50 +0000
Subject: [issue42545] Check that all symbols in the limited ABI are exported
In-Reply-To: <1606942339.51.0.833109264536.issue42545@roundup.psfhosted.org>
Message-ID: <1635336950.71.0.114187421732.issue42545@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

We are missing documentation in the devguide. We could close this and open an issue in the devguide :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42545>
_______________________________________

From report at bugs.python.org  Wed Oct 27 08:19:11 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Wed, 27 Oct 2021 12:19:11 +0000
Subject: [issue40866] Use PyModule_AddType() in posix module initialisation
In-Reply-To: <1591302632.33.0.545094297594.issue40866@roundup.psfhosted.org>
Message-ID: <1635337151.97.0.44826346005.issue40866@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
resolution:  -> out of date

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40866>
_______________________________________

From report at bugs.python.org  Wed Oct 27 08:27:15 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 27 Oct 2021 12:27:15 +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: <1635337635.61.0.298453331875.issue45256@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
pull_requests: +27498
pull_request: https://github.com/python/cpython/pull/29235

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45256>
_______________________________________

From report at bugs.python.org  Wed Oct 27 08:45:36 2021
From: report at bugs.python.org (=?utf-8?b?0JDRgNGC0ZHQvCDQmNC60L7QvdC90LjQutC+0LI=?=)
Date: Wed, 27 Oct 2021 12:45:36 +0000
Subject: [issue34046] subparsers -> add_parser doesn't support hyphen char '-'
In-Reply-To: <1530721199.23.0.56676864532.issue34046@psf.upfronthosting.co.za>
Message-ID: <1635338736.85.0.139256252487.issue34046@roundup.psfhosted.org>


????? ????????? <tryauuum at gmail.com> added the comment:

I've also struggled with this. The subparser documentation describes them as a tool to "split up functionality into a number of sub-commands". 
>From the reader's point of view it's not obvious that such "sub-commands" cannot start with --

----------
nosy: +tryauuum

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34046>
_______________________________________

From report at bugs.python.org  Wed Oct 27 08:57:54 2021
From: report at bugs.python.org (John Howroyd)
Date: Wed, 27 Oct 2021 12:57:54 +0000
Subject: [issue45626] Email part with content type message is multipart.
Message-ID: <1635339474.91.0.560715467663.issue45626@roundup.psfhosted.org>


New submission from John Howroyd <jdhowroyd at googlemail.com>:

>From the library documentation, it is an intended feature that an email part with content_maintype == "message" is treated as multipart.  This does not seem to be compliant to MIME specification nor expected semantics.  The attached email (from the dnc wikileaks collection) is a good example where this logic breaks down.

Code:
import pathlib
pth = "16155.eml" # path to example
import email
import email.parser
parser = email.parser.BytesParser()
fl = pth.open("rb")
eml = parser.parse(fl)
pts = [p for p in eml.walk()]
len(pts) # returns 52

Here pts[0] is the root part of content_type 'multipart/report'.
Then pts[1] has content_type 'multipart/alternative' containing the 'text/plain' pts[2] and the 'text/html' pts[3] (which most email clients would consider the message (of this email).  All good so far.

The problem is that pts[4] of content_type 'message/delivery-status' which has pts[4].is_multipart() [True] and contains 46 sub parts as returned by pts[4].get_payload(): these are pts[5], ... , pts[50]. Finally, pts[51] has content_type 'text/rfc822-headers' which is fine.

Each of the subparts of pts[4] (pts[5:51]) have "" returned by pts[n].get_payload() as their content is treated as headers. Where as pts[4].as_bytes includes the header (and separating blank line) for that part; namely, b'Content-Type: message/delivery-status\n\n'.

Looking at the raw file and in particular the MIME boundary makers it would seem to me that pts[4] should not be considered multipart and that there is no indication from a content-type of 'message/delivery-status' should or even could be considered an (rfc822) email.

Moreover, as the main developer of a system to forensically analyse large (million +) corpora of emails this behaviour of treating parts even of the specific content-type 'message/rfc822' is undisarable; typically, these occur as part of bounce messages and have their content-disposition set to 'attachment'.  As a developer what would seem more natural in the case that this behaviour is wanted would be to test parts for the content-type 'message/rfc822' and pass the .get_payload(decode=True) to the bytes parser parser.parse() method.

I appreciate the need to support backwards compatibility, so presumably this would require an addition to email.policy to govern which parts should be treated as multipart.  I would be more than happy to submit a patch for this but fear it would be rejected out of hand (as the original intent is clearly to parse out contained emails).

----------
components: Library (Lib)
files: 16155.eml
messages: 405091
nosy: jdhowroyd
priority: normal
severity: normal
status: open
title: Email part with content type message is multipart.
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file50396/16155.eml

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45626>
_______________________________________

From report at bugs.python.org  Wed Oct 27 09:08:38 2021
From: report at bugs.python.org (Anthony Sottile)
Date: Wed, 27 Oct 2021 13:08:38 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635340118.63.0.742631957842.issue45548@roundup.psfhosted.org>


Anthony Sottile <asottile at umich.edu> added the comment:

I'm seeing some weird breakage in the deadsnakes builds, presumably due to this change:

```
...
2021-10-27T08:55:21.9485959Z x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -g -fdebug-prefix-map=/tmp/code=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector -Wformat -Werror=format-security    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden  -I../Include/internal -IObjects -IInclude -IPython -I. -I../Include -Wdate-time -D_FORTIFY_SOURCE=2   -DPy_BUILD_CORE_BUILTIN  -c ../Modules/_blake2/blake2module.c -o Modules/_blake2/blake2module.o
2021-10-27T08:55:22.0563233Z Assembler messages:
2021-10-27T08:55:22.0565823Z Fatal error: can't create Modules/_blake2/blake2module.o: No such file or directory
2021-10-27T08:55:22.0622105Z Makefile:2177: recipe for target 'Modules/_blake2/blake2module.o' failed
...
```

https://github.com/deadsnakes/python3.11-nightly/actions/runs/1389342824

I believe this is due to https://github.com/python/cpython/pull/29225/files#diff-aac314cb71e95912e95795a4f4a278f2e75a5bc28e93f52e338185c8e7f7d7eaL225

----------
nosy: +Anthony Sottile

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Wed Oct 27 09:10:44 2021
From: report at bugs.python.org (Kinshuk Dua)
Date: Wed, 27 Oct 2021 13:10:44 +0000
Subject: [issue23556] [doc] Scope for raise without argument is different in
 Python 2 and 3
In-Reply-To: <1425212072.31.0.66074782686.issue23556@psf.upfronthosting.co.za>
Message-ID: <1635340244.16.0.379476742511.issue23556@roundup.psfhosted.org>


Change by Kinshuk Dua <kinshuk.dua2019 at vitstudent.ac.in>:


----------
keywords: +patch
nosy: +kinshukdua
nosy_count: 7.0 -> 8.0
pull_requests: +27499
pull_request: https://github.com/python/cpython/pull/29236

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23556>
_______________________________________

From report at bugs.python.org  Wed Oct 27 09:16:46 2021
From: report at bugs.python.org (Alexandru Ardelean)
Date: Wed, 27 Oct 2021 13:16:46 +0000
Subject: [issue45627] OpenSSL 1.1.1 still implements some disable-flags for
 Blake2, Scrypt
Message-ID: <1635340606.96.0.794905902875.issue45627@roundup.psfhosted.org>


New submission from Alexandru Ardelean <ardeleanalex at gmail.com>:

This follows update https://bugs.python.org/issue43669

Which is present in Python 3.10

Some OpenSSL 1.1.1 can be built without Blake2 support or Scrypt.

SHA3 and SHAKE do not seem to have any enable/disable flags.

This results in compiler errors where EVP_blake2b512, EVP_blake2s256, EVP_PBE_scrypt and PKCS5_v2_scrypt_keyivgen can be un-defined.

This is unfortunate behavior on the part of OpenSSL 1.1.1.

So, for BLAKE2 and SCRYPT, we should still check that the OPENSSL_NO_SCRYPT and OPENSSL_NO_BLAKE2 defines are not-define.

----------
assignee: christian.heimes
components: Build, Extension Modules, SSL
messages: 405093
nosy: Alexandru Ardelean, christian.heimes
priority: normal
severity: normal
status: open
title: OpenSSL 1.1.1 still implements some disable-flags for Blake2, Scrypt
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45627>
_______________________________________

From report at bugs.python.org  Wed Oct 27 09:23:02 2021
From: report at bugs.python.org (Alexandru Ardelean)
Date: Wed, 27 Oct 2021 13:23:02 +0000
Subject: [issue45627] OpenSSL 1.1.1 still implements some disable-flags for
 Blake2, Scrypt
In-Reply-To: <1635340606.96.0.794905902875.issue45627@roundup.psfhosted.org>
Message-ID: <1635340982.81.0.278810768569.issue45627@roundup.psfhosted.org>


Alexandru Ardelean <ardeleanalex at gmail.com> added the comment:

Note: PKCS5_v2_scrypt_keyivgen() will not cause an error, but EVP_PBE_scrypt() will

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45627>
_______________________________________

From report at bugs.python.org  Wed Oct 27 09:24:22 2021
From: report at bugs.python.org (Marc Culler)
Date: Wed, 27 Oct 2021 13:24: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: <1635341062.6.0.321344916222.issue44828@roundup.psfhosted.org>


Marc Culler <marc.culler at gmail.com> added the comment:

Thanks, Ned, for finding my mistake which you generously called a typo.
I have fixed the inequality in the Tk fossil repository.  Incidentally, there is now a core-8-6-12-rc branch of Tk, also containing the fix.  So it should not be too long before 8.6.12 is released.

I will look at the code and check whether I see the UFO that you report.  As you know, all that Tk does is to open an NSOpenPanel.  Once that is open it is completely handled by the OS.  Tk sees no events from the modal interaction and does not have any way of controlling any aspect of the dialog.  So the only hope would be that it is possible to set some configuration option before opening the NSOpenPanel which would somehow cause the OS to assign focus to the correct widget.  I will try to investigate what options are available.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Wed Oct 27 09:24:27 2021
From: report at bugs.python.org (Alexandru Ardelean)
Date: Wed, 27 Oct 2021 13:24:27 +0000
Subject: [issue45627] OpenSSL 1.1.1 still implements some disable-flags for
 Blake2, Scrypt
In-Reply-To: <1635340606.96.0.794905902875.issue45627@roundup.psfhosted.org>
Message-ID: <1635341067.95.0.882376593591.issue45627@roundup.psfhosted.org>


Change by Alexandru Ardelean <ardeleanalex at gmail.com>:


----------
keywords: +patch
pull_requests: +27500
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29237

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45627>
_______________________________________

From report at bugs.python.org  Wed Oct 27 09:27:00 2021
From: report at bugs.python.org (Mark Shannon)
Date: Wed, 27 Oct 2021 13:27:00 +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: <1635341220.6.0.729345139985.issue45256@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
pull_requests: +27501
pull_request: https://github.com/python/cpython/pull/29238

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45256>
_______________________________________

From report at bugs.python.org  Wed Oct 27 09:31:05 2021
From: report at bugs.python.org (Damien George)
Date: Wed, 27 Oct 2021 13:31:05 +0000
Subject: [issue43683] Handle generator (and coroutine) state in the bytecode.
In-Reply-To: <1617209103.34.0.926095267338.issue43683@roundup.psfhosted.org>
Message-ID: <1635341465.2.0.275985096639.issue43683@roundup.psfhosted.org>


Damien George <damien.p.george at gmail.com> added the comment:

Thanks for confirming the bug.

Sending non-None to a not-started generator could arguably be case (2), because that's exactly the semantics introduced by the commit that broke the test case :)

Honestly I don't have a strong opinion on which way this goes.  But I think it would be interesting to know if there was code out there that relied on the original behaviour.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43683>
_______________________________________

From report at bugs.python.org  Wed Oct 27 09:41:42 2021
From: report at bugs.python.org (Eric V. Smith)
Date: Wed, 27 Oct 2021 13:41:42 +0000
Subject: [issue45620] A misleading url in 'Floating Point Arithmetic' page
In-Reply-To: <1635313160.15.0.740336077946.issue45620@roundup.psfhosted.org>
Message-ID: <1635342102.96.0.0657471689759.issue45620@roundup.psfhosted.org>


Eric V. Smith <eric at trueblade.com> added the comment:

The link on the doc page also works for me, sending me to http://www.lahey.com/float.htm.

I think the problem is with @hanhantw's browser or ISP, or similar. I'm going to close this.

----------
nosy: +eric.smith
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45620>
_______________________________________

From report at bugs.python.org  Wed Oct 27 09:51:00 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 27 Oct 2021 13:51:00 +0000
Subject: [issue45627] OpenSSL 1.1.1 still implements some disable-flags for
 Blake2, Scrypt
In-Reply-To: <1635340606.96.0.794905902875.issue45627@roundup.psfhosted.org>
Message-ID: <1635342660.75.0.559245482195.issue45627@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Python 3.10 and newer require OpenSSL 1.1.1+ with blake2, sha3, scrypt, and similar features enabled. The required feature set is specified in PEP 644, https://www.python.org/dev/peps/pep-0644/#compatibility . Python requires the features, because I want to keep our test matrix small and guarantee the presence of a minimal feature set.

Why do you want to build OpenSSL without blake2 or scrypt?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45627>
_______________________________________

From report at bugs.python.org  Wed Oct 27 10:14:56 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Wed, 27 Oct 2021 14:14:56 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1635344096.44.0.143779336401.issue45356@roundup.psfhosted.org>


Change by Andrei Kulakov <andrei.avk at gmail.com>:


----------
keywords: +patch
nosy: +andrei.avk
nosy_count: 8.0 -> 9.0
pull_requests: +27502
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/29239

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Wed Oct 27 10:21:50 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 27 Oct 2021 14:21:50 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635344510.23.0.660984146092.issue45618@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +27503
pull_request: https://github.com/python/cpython/pull/29240

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Wed Oct 27 10:21:38 2021
From: report at bugs.python.org (Ned Deily)
Date: Wed, 27 Oct 2021 14:21:38 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635344498.39.0.0344199195464.issue45618@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:


New changeset bcee6aa31550cfecdc3acecbd0e4447bb0051887 by m-aciek in branch 'main':
bpo-45618: Fix documentation build by pinning Docutils version to 0.17.1 (GH-29230)
https://github.com/python/cpython/commit/bcee6aa31550cfecdc3acecbd0e4447bb0051887


----------
nosy: +ned.deily

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Wed Oct 27 10:26:00 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Wed, 27 Oct 2021 14:26:00 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1635344760.54.0.129394067695.issue45356@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

I've put up a PR; I'm not sure it's the best way to fix it. I will look more into it and will try to post some details about the PR later today.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Wed Oct 27 10:34:25 2021
From: report at bugs.python.org (Ned Deily)
Date: Wed, 27 Oct 2021 14:34:25 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635345265.06.0.65931746142.issue45618@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
pull_requests: +27504
pull_request: https://github.com/python/cpython/pull/29241

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Wed Oct 27 10:37:25 2021
From: report at bugs.python.org (Ned Deily)
Date: Wed, 27 Oct 2021 14:37:25 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635345445.61.0.723492131551.issue45618@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:


New changeset 2b7b7c7320cd856df5439afc3c984873678c27d8 by Miss Islington (bot) in branch '3.10':
bpo-45618: Fix documentation build by pinning Docutils version to 0.17.1 (GH-29230) (GH-29240)
https://github.com/python/cpython/commit/2b7b7c7320cd856df5439afc3c984873678c27d8


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Wed Oct 27 11:04:53 2021
From: report at bugs.python.org (Ned Deily)
Date: Wed, 27 Oct 2021 15:04:53 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635347093.0.0.619497311413.issue45618@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:


New changeset 30c1f18ee62cef301e18488b80b4d329290f7b95 by Ned Deily in branch '3.9':
[3.9] bpo-45618: Fix documentation build by pinning Docutils version to 0.17.1 (GH-29230) (GH-29241)
https://github.com/python/cpython/commit/30c1f18ee62cef301e18488b80b4d329290f7b95


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Wed Oct 27 11:19:30 2021
From: report at bugs.python.org (Kelly Brazil)
Date: Wed, 27 Oct 2021 15:19:30 +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: <1635347970.28.0.307500478394.issue45617@roundup.psfhosted.org>


Kelly Brazil <kellyjonbrazil at gmail.com> added the comment:

'\r' support is implicitly documented under the sys.stdin section[0]:

"These streams are regular text files like those returned by the open() function. Their parameters are chosen as follows..."

By following the link to the open()[1] docs, it says:

"newline controls how universal newlines mode works (it only applies to text mode). It can be None, '', '\n', '\r', and '\r\n'. It works as follows:

When reading input from the stream, if newline is None, universal newlines mode is enabled. Lines in the input can end in '\n', '\r', or '\r\n', and these are translated into '\n' before being returned to the caller. If it is '', universal newlines mode is enabled, but line endings are returned to the caller untranslated. If it has any of the other legal values, input lines are only terminated by the given string, and the line ending is returned to the caller untranslated."

When inspecting a newly created sys.stdin object I see that it creates an instance of _io.TextIOWrapper and its newlines attribute is set to None:

>>> sys.stdin
<_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>
>>> print(sys.stdin.newlines)
None

Note: an oddity here is that the attribute name is newlines instead of newline.

Interestingly, when opening STDIN directly it seems to work fine:

import sys
for line in open(0, sys.stdin.mode):
    print(repr(line))

Result:
$ echo -e 'line1\rline2\rline3' | python3 linetest.py 
'line1\n'
'line2\n'
'line3\n'

So, perhaps the sys.stdin documentation should be updated to reflect this exception or it could be considered a bug to make its behavior consistent?

[0]https://docs.python.org/3/library/sys.html#sys.stdin
[1]https://docs.python.org/3/library/functions.html#open

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45617>
_______________________________________

From report at bugs.python.org  Wed Oct 27 11:22:09 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Wed, 27 Oct 2021 15:22:09 +0000
Subject: [issue45609] Specialize STORE_SUBSCR
In-Reply-To: <1635208946.04.0.990921573614.issue45609@roundup.psfhosted.org>
Message-ID: <1635348129.28.0.709021945525.issue45609@roundup.psfhosted.org>


Change by Dennis Sweeney <sweeney.dennis650 at gmail.com>:


----------
pull_requests: +27505
pull_request: https://github.com/python/cpython/pull/29242

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45609>
_______________________________________

From report at bugs.python.org  Wed Oct 27 11:23:13 2021
From: report at bugs.python.org (Ivo Grondman)
Date: Wed, 27 Oct 2021 15:23:13 +0000
Subject: [issue45628] TimedRotatingFileHandler backupCount not working
Message-ID: <1635348193.15.0.970239577461.issue45628@roundup.psfhosted.org>


New submission from Ivo Grondman <python at grondman.net>:

Using the TimedRotatingFileHandler with a non-zero backupCount, I get different behaviour between versions 3.9 and 3.10.

Attached is a small example. Running it with 3.9 gives me two backups at most even if I run the script for a long time. Running it with 3.10 does not delete old backup files at all and just keeps writing new ones.

----------
components: Library (Lib), macOS
files: logrotate.py
messages: 405104
nosy: ivogrondman, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: TimedRotatingFileHandler backupCount not working
versions: Python 3.10
Added file: https://bugs.python.org/file50397/logrotate.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45628>
_______________________________________

From report at bugs.python.org  Wed Oct 27 11:40:45 2021
From: report at bugs.python.org (Ned Deily)
Date: Wed, 27 Oct 2021 15:40:45 +0000
Subject: [issue45628] TimedRotatingFileHandler backupCount not working
In-Reply-To: <1635348193.15.0.970239577461.issue45628@roundup.psfhosted.org>
Message-ID: <1635349245.39.0.124589892225.issue45628@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
components:  -macOS
nosy: +vinay.sajip -ned.deily, ronaldoussoren

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45628>
_______________________________________

From report at bugs.python.org  Wed Oct 27 11:42:12 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 27 Oct 2021 15:42:12 +0000
Subject: [issue45629] Tools/freeze needs tests in the test suite.
Message-ID: <1635349332.56.0.690000934648.issue45629@roundup.psfhosted.org>


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

I found that Tools/freeze doesn't get tested.  It has a "test" directory but it's more of a rudimentary sanity check that must be run manually.  Since the tool isn't tested through our test suite, there's a high likelihood it can get broken without anyone realizing it.  The risk has increased with recent changes to frozen modules.  So such tests would be valuable.

The tool requires that Python be installed.  In the context of our test suite, this means configuring with a temp dir prefix and then re-building.  We must do it in a separate directory to avoid affecting other tests.

I'm planning on adding a test that does the following:

1. create a temp dir (TMPDIR)
2. copy the repo to TMPDIR/cpython
3. run configure there with --prefix=TMPDIR/python-installation
4. run make -j
5. run make install -j
6. write a simple script to TMPDIR/app.py
7. run the "freeze" tool on it, with minimal options
8. run the frozen app and verify it worked

Note that there needs to be enough disk space for all that (which not all buildbots have).  Also, the test will be relatively slow due to having to re-build.

There aren't any other tests that re-build Python or the like, so I'm a little hesitant to set precedent.  Perhaps that's why there weren't any tests already.  However, I don't see any significant reasons to not add the test (as long as it doesn't lead to spurious failures).

----------
assignee: eric.snow
components: Demos and Tools
messages: 405105
nosy: eric.snow, lemburg
priority: normal
severity: normal
stage: test needed
status: open
title: Tools/freeze needs tests in the test suite.
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45629>
_______________________________________

From report at bugs.python.org  Wed Oct 27 11:42:55 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 27 Oct 2021 15:42:55 +0000
Subject: [issue45629] Tools/freeze needs tests in the test suite.
In-Reply-To: <1635349332.56.0.690000934648.issue45629@roundup.psfhosted.org>
Message-ID: <1635349375.38.0.00380403895345.issue45629@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
keywords: +patch
pull_requests: +27506
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/29222

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45629>
_______________________________________

From report at bugs.python.org  Wed Oct 27 11:44:34 2021
From: report at bugs.python.org (Sam Gross)
Date: Wed, 27 Oct 2021 15:44:34 +0000
Subject: [issue28737] Document that tp_dealloc handler must call
 PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set
In-Reply-To: <1479487656.43.0.616591816842.issue28737@psf.upfronthosting.co.za>
Message-ID: <1635349474.95.0.182165251373.issue28737@roundup.psfhosted.org>


Change by Sam Gross <colesbury at gmail.com>:


----------
assignee: docs at python -> colesbury

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28737>
_______________________________________

From report at bugs.python.org  Wed Oct 27 11:45:26 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 27 Oct 2021 15:45:26 +0000
Subject: [issue45096] Update Tools/freeze to make use of
 Tools/scripts/freeze_modules.py?
In-Reply-To: <1630698228.01.0.74483718816.issue45096@roundup.psfhosted.org>
Message-ID: <1635349526.33.0.642031011113.issue45096@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
pull_requests:  -27485

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45096>
_______________________________________

From report at bugs.python.org  Wed Oct 27 11:45:43 2021
From: report at bugs.python.org (Eric Snow)
Date: Wed, 27 Oct 2021 15:45:43 +0000
Subject: [issue45096] Update Tools/freeze to make use of
 Tools/scripts/freeze_modules.py?
In-Reply-To: <1630698228.01.0.74483718816.issue45096@roundup.psfhosted.org>
Message-ID: <1635349543.3.0.354972051699.issue45096@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
stage: patch review -> needs patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45096>
_______________________________________

From report at bugs.python.org  Wed Oct 27 11:47:45 2021
From: report at bugs.python.org (penguin_wwy)
Date: Wed, 27 Oct 2021 15:47:45 +0000
Subject: [issue45630] Dump CodeObject API for debugging
Message-ID: <1635349665.14.0.891838928636.issue45630@roundup.psfhosted.org>


New submission from penguin_wwy <940375606 at qq.com>:

What the title says.

----------
components: Interpreter Core
messages: 405106
nosy: penguin_wwy
priority: normal
severity: normal
status: open
title: Dump CodeObject API for debugging
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45630>
_______________________________________

From report at bugs.python.org  Wed Oct 27 12:05:17 2021
From: report at bugs.python.org (penguin_wwy)
Date: Wed, 27 Oct 2021 16:05:17 +0000
Subject: [issue45630] Dump CodeObject API for debugging
In-Reply-To: <1635349665.14.0.891838928636.issue45630@roundup.psfhosted.org>
Message-ID: <1635350717.52.0.882532018722.issue45630@roundup.psfhosted.org>


Change by penguin_wwy <940375606 at qq.com>:


----------
keywords: +patch
pull_requests: +27507
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29243

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45630>
_______________________________________

From report at bugs.python.org  Wed Oct 27 12:12:52 2021
From: report at bugs.python.org (paul j3)
Date: Wed, 27 Oct 2021 16:12:52 +0000
Subject: [issue34046] subparsers -> add_parser doesn't support hyphen char '-'
In-Reply-To: <1530721199.23.0.56676864532.issue34046@psf.upfronthosting.co.za>
Message-ID: <1635351172.38.0.831655623317.issue34046@roundup.psfhosted.org>


paul j3 <ajipanca at gmail.com> added the comment:

????? ?????????, developers and experienced users are familiar with other programs, such as 'svn' which is used as an example

svn checkout, svn update, and svn commit

Also the use of '--foo' as flagged/optional(s) argument is so familiar to developers, that it does nor occur us that new users might want to use that form here.  While there's no explicit prohibition of using the dash, non of the examples use it.  Examples are a good starting place when using new features.

If this problem came up more often, I'd recommend modifying the `add_parser` method to raise an error if the user provides a dashed command name (or alias).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34046>
_______________________________________

From report at bugs.python.org  Wed Oct 27 12:19:18 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Wed, 27 Oct 2021 16:19:18 +0000
Subject: [issue44525] Implement CALL_FUNCTION adaptive interpreter
 optimizations
In-Reply-To: <1624890138.2.0.824780513801.issue44525@roundup.psfhosted.org>
Message-ID: <1635351558.72.0.402022469396.issue44525@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Unfortunately, PR 26934 has broken thes 390x RHEL7 LTO 3.x buildbot as you can see before. As per the buildbot maintenance procedures, we will need to revert this PR unless is fixed in 24 hours.

@markshannon @Fidget-Spinner

----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44525>
_______________________________________

From report at bugs.python.org  Wed Oct 27 12:22:26 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Wed, 27 Oct 2021 16:22:26 +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: <1635351746.81.0.521826272625.issue45256@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Unfortunately, seems that https://github.com/python/cpython/pull/28937 has broken the AMD64 FreeBSD Shared 3.x buildbot:

https://buildbot.python.org/all/#/builders/483/builds/1003/steps/5/logs/stdio

The buildbot was green until we merged this

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45256>
_______________________________________

From report at bugs.python.org  Wed Oct 27 12:36:51 2021
From: report at bugs.python.org (paul j3)
Date: Wed, 27 Oct 2021 16:36:51 +0000
Subject: [issue45631] missing unittests for overlapping dest when using
 subparsers
Message-ID: <1635352611.83.0.329101262928.issue45631@roundup.psfhosted.org>


New submission from paul j3 <ajipanca at gmail.com>:

https://bugs.python.org/issue45235
argparse does not preserve namespace with subparser defaults

was passed and put into the latest release with rather obvious buggy behavior.  

This means that the unittest file does not adequately test for overlapping 'dest' in the main and subparsers.  It probably also does not test many (any?) cases of user provided namespace.

Issue9351 added a test, but it only tested defaults set with 

parser.set_defaults(foo=1)
xparser.set_defaults(foo=2)

not the more common practice of setting defaults in add_argument.

45235 adds one test, but again only for 

xparser.set_defaults(foo=1)

It doesn't test for user inputs, as with

['X','--foo=3']

----------
messages: 405110
nosy: ALSchwalm, paul.j3, rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: missing unittests for overlapping dest when using subparsers

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45631>
_______________________________________

From report at bugs.python.org  Wed Oct 27 12:43:26 2021
From: report at bugs.python.org (Eryk Sun)
Date: Wed, 27 Oct 2021 16:43:26 +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: <1635353006.6.0.300062999736.issue45617@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

> like those returned by the open() function. Their parameters are 
> chosen as follows..."

The `newline` argument for sys.std* isn't documented, but it should be. It happens to be newline='\n' on every platform except Windows.

> its newlines attribute is set to None

The `newlines` attribute is based on the `newlines` attribute of the incremental decoder. It defaults to None if the decoder lacks this attribute. AFAIK, only the universal newlines decoder, io.IncrementalNewlineDecoder, implements this attribute. If it's not None, the value is a string or tuple that tracks the types of newlines that have been seen thus far. For example:

    >>> fdr, fdw = os.pipe()
    >>> f = open(fdr, 'r', newline=None, closefd=False)
    >>> os.write(fdw, b'a\r\n')
    3
    >>> f.readline()
    'a\n'
    >>> f.newlines
    '\r\n'
    >>> os.write(fdw, b'a\n')
    2
    >>> f.readline()
    'a\n'
    >>> f.newlines
    ('\n', '\r\n')

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45617>
_______________________________________

From report at bugs.python.org  Wed Oct 27 12:46:18 2021
From: report at bugs.python.org (Sam Gross)
Date: Wed, 27 Oct 2021 16:46:18 +0000
Subject: [issue28737] Document that tp_dealloc handler must call
 PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set
In-Reply-To: <1479487656.43.0.616591816842.issue28737@psf.upfronthosting.co.za>
Message-ID: <1635353178.88.0.391975585175.issue28737@roundup.psfhosted.org>


Sam Gross <colesbury at gmail.com> added the comment:

Antoine Pitrou already fixed the "noddy4" example (now renamed to "custom4") and updated the newtypes_tutorial, but I think it's still worth mentioning PyObject_GC_Untrack in a few additional places.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28737>
_______________________________________

From report at bugs.python.org  Wed Oct 27 12:53:21 2021
From: report at bugs.python.org (Ned Deily)
Date: Wed, 27 Oct 2021 16:53:21 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635353601.71.0.800492082865.issue45618@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
pull_requests: +27509
pull_request: https://github.com/python/cpython/pull/29245

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Wed Oct 27 12:53:25 2021
From: report at bugs.python.org (Kelly Brazil)
Date: Wed, 27 Oct 2021 16:53:25 +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: <1635353605.04.0.464035783014.issue45617@roundup.psfhosted.org>


Kelly Brazil <kellyjonbrazil at gmail.com> added the comment:

Also, I believe this docstring is being inherited, but this is also where it seems that '\r' is documented to work with sys.stdin:

>>> print(sys.stdin.__doc__)
Character and line based layer over a BufferedIOBase object, buffer.

encoding gives the name of the encoding that the stream will be
decoded or encoded with. It defaults to locale.getpreferredencoding(False).

errors determines the strictness of encoding and decoding (see
help(codecs.Codec) or the documentation for codecs.register) and
defaults to "strict".

newline controls how line endings are handled. It can be None, '',
'\n', '\r', and '\r\n'.  It works as follows:

* On input, if newline is None, universal newlines mode is
  enabled. Lines in the input can end in '\n', '\r', or '\r\n', and
  these are translated into '\n' before being returned to the
  caller. If it is '', universal newline mode is enabled, but line
  endings are returned to the caller untranslated. If it has any of
  the other legal values, input lines are only terminated by the given
  string, and the line ending is returned to the caller untranslated.

* On output, if newline is None, any '\n' characters written are
  translated to the system default line separator, os.linesep. If
  newline is '' or '\n', no translation takes place. If newline is any
  of the other legal values, any '\n' characters written are translated
  to the given string.

If line_buffering is True, a call to flush is implied when a call to
write contains a newline character.

I understand that sys.stdin is slightly different than an actual file being opened in text mode, but the documentation seems to suggest that it works pretty much the same. Though, in practice there is a slight difference in behavior.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45617>
_______________________________________

From report at bugs.python.org  Wed Oct 27 13:03:45 2021
From: report at bugs.python.org (Sam Gross)
Date: Wed, 27 Oct 2021 17:03:45 +0000
Subject: [issue28737] Document that tp_dealloc handler must call
 PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set
In-Reply-To: <1479487656.43.0.616591816842.issue28737@psf.upfronthosting.co.za>
Message-ID: <1635354225.9.0.854395764666.issue28737@roundup.psfhosted.org>


Change by Sam Gross <colesbury at gmail.com>:


----------
keywords: +patch
pull_requests: +27510
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29246

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28737>
_______________________________________

From report at bugs.python.org  Wed Oct 27 13:09:40 2021
From: report at bugs.python.org (Tim Golden)
Date: Wed, 27 Oct 2021 17:09:40 +0000
Subject: [issue45621] Small fixes to mmap
In-Reply-To: <1635320247.38.0.208723521187.issue45621@roundup.psfhosted.org>
Message-ID: <1635354580.12.0.316779710487.issue45621@roundup.psfhosted.org>


Change by Tim Golden <mail at timgolden.me.uk>:


----------
keywords: +patch
pull_requests: +27511
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29247

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45621>
_______________________________________

From report at bugs.python.org  Wed Oct 27 13:24:21 2021
From: report at bugs.python.org (doraeric)
Date: Wed, 27 Oct 2021 17:24:21 +0000
Subject: [issue45632] Strange readline save history behaviour in site.py
Message-ID: <1635355461.27.0.071759404055.issue45632@roundup.psfhosted.org>


New submission from doraeric <benson.doraemon at gmail.com>:

I noticed that in site.py, it saves history to a hard-coded location if the current history length is 0. The history is considered as not loaded if the length is 0, but it may be actually loaded from a empty file. In this case, the history is save to hard-coded ~/.python_history, and maybe another user-defined location in PYTHONSTARTUP file.

I think a better solution is to export some config or functions from site.py, so users can explicitly disable the atexit callback from site.py.

---
[site.py] https://github.com/python/cpython/blob/b9cdd0fb9c463c2503a4d854bb6529a9db58fe1b/Lib/site.py#L470-L491

----------
components: Library (Lib)
messages: 405114
nosy: doraeric
priority: normal
severity: normal
status: open
title: Strange readline save history behaviour in site.py
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45632>
_______________________________________

From report at bugs.python.org  Wed Oct 27 13:39:12 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Wed, 27 Oct 2021 17:39:12 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1635356352.28.0.8274013547.issue45356@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

I missed that this is assigned to Raymond, hope we didn't duplicate any effort (it only took me a short while to do the PR). Apologies..

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Wed Oct 27 13:48:11 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 27 Oct 2021 17:48:11 +0000
Subject: [issue45623] static build is broken
In-Reply-To: <1635330632.5.0.689915843766.issue45623@roundup.psfhosted.org>
Message-ID: <1635356891.08.0.647284234992.issue45623@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Steve changed the line in comment dd18001c308f / bpo-41627.

----------
assignee:  -> steve.dower
components: +Windows
nosy: +christian.heimes, paul.moore, steve.dower, tim.golden, zach.ware

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45623>
_______________________________________

From report at bugs.python.org  Wed Oct 27 13:48:51 2021
From: report at bugs.python.org (Christian Heimes)
Date: Wed, 27 Oct 2021 17:48:51 +0000
Subject: [issue45623] static build is broken
In-Reply-To: <1635330632.5.0.689915843766.issue45623@roundup.psfhosted.org>
Message-ID: <1635356931.87.0.376807403042.issue45623@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Full commit hash is dd18001c308fb3bb65006c91d95f6639583a3420

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45623>
_______________________________________

From report at bugs.python.org  Wed Oct 27 13:57:03 2021
From: report at bugs.python.org (Ned Deily)
Date: Wed, 27 Oct 2021 17:57:03 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635357423.09.0.978883401302.issue45618@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

All of the open branches are affected by this since we also have to build documentation for security-fix-only branches when releases. PRs for 3.7 and 3.6 forthcoming.

----------
versions: +Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Wed Oct 27 14:28:11 2021
From: report at bugs.python.org (Julien Palard)
Date: Wed, 27 Oct 2021 18:28:11 +0000
Subject: [issue45633] Py_GT listed twice in Doc/extending/newtypes.rst
Message-ID: <1635359291.67.0.00111122399866.issue45633@roundup.psfhosted.org>


New submission from Julien Palard <julien+python at palard.fr>:

In Doc/extending/newtypes one can read:

> This function is called with two Python objects and the operator as arguments, where the operator is one of Py_EQ, Py_NE, Py_LE, Py_GT, Py_LT or Py_GT.

It bet one of them should be Py_GE.

(I let this one as an easy first contrib.)

----------
assignee: docs at python
components: Documentation
keywords: easy
messages: 405119
nosy: docs at python, mdk
priority: normal
severity: normal
status: open
title: Py_GT listed twice in Doc/extending/newtypes.rst

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45633>
_______________________________________

From report at bugs.python.org  Wed Oct 27 15:15:25 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Wed, 27 Oct 2021 19:15:25 +0000
Subject: [issue28737] Document that tp_dealloc handler must call
 PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set
In-Reply-To: <1479487656.43.0.616591816842.issue28737@psf.upfronthosting.co.za>
Message-ID: <1635362125.93.0.953698437527.issue28737@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 35e1ff38ee67ee543d9fcb268c3552c5397f9b3f by Sam Gross in branch 'main':
bpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() (GH-29246)
https://github.com/python/cpython/commit/35e1ff38ee67ee543d9fcb268c3552c5397f9b3f


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28737>
_______________________________________

From report at bugs.python.org  Wed Oct 27 15:15:30 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 27 Oct 2021 19:15:30 +0000
Subject: [issue28737] Document that tp_dealloc handler must call
 PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set
In-Reply-To: <1479487656.43.0.616591816842.issue28737@psf.upfronthosting.co.za>
Message-ID: <1635362130.76.0.717227202322.issue28737@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27512
pull_request: https://github.com/python/cpython/pull/29248

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28737>
_______________________________________

From report at bugs.python.org  Wed Oct 27 15:37:39 2021
From: report at bugs.python.org (Sam Gross)
Date: Wed, 27 Oct 2021 19:37:39 +0000
Subject: [issue28737] Document that tp_dealloc handler must call
 PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set
In-Reply-To: <1479487656.43.0.616591816842.issue28737@psf.upfronthosting.co.za>
Message-ID: <1635363459.5.0.573588970361.issue28737@roundup.psfhosted.org>


Change by Sam Gross <colesbury at gmail.com>:


----------
pull_requests: +27513
pull_request: https://github.com/python/cpython/pull/29249

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28737>
_______________________________________

From report at bugs.python.org  Wed Oct 27 16:21:54 2021
From: report at bugs.python.org (Andrei Kulakov)
Date: Wed, 27 Oct 2021 20:21:54 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1635366114.51.0.639965729698.issue45356@roundup.psfhosted.org>


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

I've looked more into it, the issue is that even before an object can be tested with `isinstance()`, both inspect.classify_class_attrs and in pydoc, classdoc local function `spill()` use a `getattr()` call, which triggers the property.

So I think my PR is going in the right direction, adding guards in the inspect function and in two `spill()` functions. If `isinstance()` can be fixed to detect class properties correctly, these guards can be simplified but they still need to be there, I think.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Wed Oct 27 16:53:42 2021
From: report at bugs.python.org (Brett Cannon)
Date: Wed, 27 Oct 2021 20:53:42 +0000
Subject: [issue45591] PathFinder does not find namespace packages children
In-Reply-To: <1635024524.91.0.931449499561.issue45591@roundup.psfhosted.org>
Message-ID: <1635368022.09.0.783947512853.issue45591@roundup.psfhosted.org>


Brett Cannon <brett at python.org> added the comment:

The full name argument approach comes from PEP 302.

But you want the full name as you are otherwise missing potentially key information for the finder. For instance, if you manipulate __path__, then it's just some random directory you're searching in. But searching for what? What if you want custom logic based on what package you're searching under?

Because the import system is designed to be flexible enough to let you import from a URL or SQLite database as well as DSL files, providing all of the available information becomes important.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45591>
_______________________________________

From report at bugs.python.org  Wed Oct 27 16:58:12 2021
From: report at bugs.python.org (Brett Cannon)
Date: Wed, 27 Oct 2021 20:58:12 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635368292.6.0.657626546162.issue45548@roundup.psfhosted.org>


Brett Cannon <brett at python.org> added the comment:

> Could Brett or you please add those notes back ? There's no other place
where such details are documented.

It really depends on what "details" you're referring to. Most of what I removed were things like "Module by <person>", or saying _json.c is for "json accelerator" which is obvious to me. Anything that seemed pertinent to compilation I left in.

So if there's something you specifically want to add back in that you think is important then please feel free to as I'm done editing the file for my purposes at the moment.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Wed Oct 27 17:02:56 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Wed, 27 Oct 2021 21:02:56 +0000
Subject: [issue45634] [sqlite3] don't combine error checks when adding integer
 constants
Message-ID: <1635368576.72.0.458292729425.issue45634@roundup.psfhosted.org>


New submission from Erlend E. Aasland <erlend.aasland at innova.no>:

In Modules/_sqlite/module.c, add_integer_constants() accumulates the return values of repeated PyModule_AddIntMacro() calls. We should change this to instead bailing immediately on error.

----------
components: Extension Modules
messages: 405124
nosy: erlendaasland
priority: normal
severity: normal
status: open
title: [sqlite3] don't combine error checks when adding integer constants
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45634>
_______________________________________

From report at bugs.python.org  Wed Oct 27 17:03:20 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Wed, 27 Oct 2021 21:03:20 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1635368600.56.0.455714301932.issue45562@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
pull_requests: +27514
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29250

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Wed Oct 27 17:05:14 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Wed, 27 Oct 2021 21:05:14 +0000
Subject: [issue45634] [sqlite3] don't combine error checks when adding integer
 constants
In-Reply-To: <1635368576.72.0.458292729425.issue45634@roundup.psfhosted.org>
Message-ID: <1635368714.36.0.118634492714.issue45634@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
keywords: +patch
pull_requests: +27515
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29251

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45634>
_______________________________________

From report at bugs.python.org  Wed Oct 27 17:19:23 2021
From: report at bugs.python.org (Maciej Olko)
Date: Wed, 27 Oct 2021 21:19:23 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635369563.28.0.888689638128.issue45618@roundup.psfhosted.org>


Maciej Olko <maciej.olko at gmail.com> added the comment:

For what it's worth I have just successfully built documentation on 3.7 and 3.6 branches locally.  It looks like Sphinx 2.3.1 used there doesn't use this part of docutils API that have changed recently.

Sphinx 2.3.1 has requirement of "docutils>=0.12", just like 3.2.1.

We can pin docutils version to current (0.18) "just in case" to prevent a breakage in the future or do nothing ? maybe it won't break ? maybe the docutils API used is narrow enough.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Wed Oct 27 17:27:06 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 27 Oct 2021 21:27:06 +0000
Subject: [issue45635] Tidy up error handling in traceback.c / python run.c
Message-ID: <1635370026.46.0.0220648873339.issue45635@roundup.psfhosted.org>


New submission from Irit Katriel <iritkatriel at gmail.com>:

They do things like 

    err = PyFile_WriteString("TypeError: print_exception(): Exception expected for value, ", f);
    err += PyFile_WriteString(Py_TYPE(value)->tp_name, f);
    err += PyFile_WriteString(" found\n", f);

which means that PyFile_XXX functions are called after error. They should return (abort printing the exception) instead.


It gets even more interesting with PyFile_WriteObject calls - this function asserts that the exception is not set, so the code calls PyErr_Clear() before calling PyFile_WriteObject(). It should avoid making the call altogether.

----------
assignee: iritkatriel
messages: 405126
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: Tidy up error handling in traceback.c / python run.c

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45635>
_______________________________________

From report at bugs.python.org  Wed Oct 27 17:27:24 2021
From: report at bugs.python.org (Irit Katriel)
Date: Wed, 27 Oct 2021 21:27:24 +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: <1635370044.7.0.575181022127.issue45635@roundup.psfhosted.org>


Change by Irit Katriel <iritkatriel at gmail.com>:


----------
components: +Interpreter Core
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45635>
_______________________________________

From report at bugs.python.org  Wed Oct 27 17:27:42 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 27 Oct 2021 21:27:42 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1635370062.93.0.796750531385.issue45562@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27516
pull_request: https://github.com/python/cpython/pull/29252

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Wed Oct 27 17:27:42 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 27 Oct 2021 21:27:42 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1635370062.41.0.0801389112469.issue45562@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 10bbd41ba8c88bc102df108a4e0444abc7c5ea43 by Pablo Galindo Salgado in branch 'main':
bpo-45562: Print tokenizer debug messages to stderr (GH-29250)
https://github.com/python/cpython/commit/10bbd41ba8c88bc102df108a4e0444abc7c5ea43


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Wed Oct 27 17:33:29 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Wed, 27 Oct 2021 21:33:29 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1635370409.13.0.445616269009.issue45562@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Wed Oct 27 17:36:50 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Wed, 27 Oct 2021 21:36:50 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635370610.74.0.408469756003.issue45438@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:


New changeset d02ffd1b5c0fd8dec6dd2f7e3f2b0cfae48b7899 by Martin Rueckl in branch 'main':
bpo-45438: format of inspect.Signature with generic builtins (#29212)
https://github.com/python/cpython/commit/d02ffd1b5c0fd8dec6dd2f7e3f2b0cfae48b7899


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Wed Oct 27 17:36:49 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 27 Oct 2021 21:36:49 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635370609.66.0.826769439881.issue45438@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +27517
pull_request: https://github.com/python/cpython/pull/29253

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Wed Oct 27 17:36:53 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 27 Oct 2021 21:36:53 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635370613.85.0.978734020843.issue45438@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27518
pull_request: https://github.com/python/cpython/pull/29254

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Wed Oct 27 17:41:36 2021
From: report at bugs.python.org (paul j3)
Date: Wed, 27 Oct 2021 21:41: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: <1635370896.22.0.376820847545.issue45235@roundup.psfhosted.org>


paul j3 <ajipanca at gmail.com> added the comment:

I should study previous posts in more detail, but here are some thoughts on correctly handling user namespace.

At the start of `parse_known_args`, there's a

        if namespace is None:
            namespace = Namespace()

We need to hang on to a copy of this namespace, e.g. call it

        import copy
        orig_namespace = copy.copy(namespace)

In _SubParsersAction.__call__, pass this copy to the subparser (instead of None):

    subnamespace, arg_strings = parser.parse_known_args(arg_strings, orig_namespace)
        for key, value in vars(subnamespace).items():
            setattr(namespace, key, value)

Prior to 9351, the main namespace was passed to the subparser

    namespace, arg_strings = parser.parse_known_args(arg_strings, namespace)

The trick is to get orig_namespace from the main parse_known_args to SubParsersAction.__call__ method.

in a 9351 post I explore the idea of allowing the user to specify a 'sub_namespace' for the subparser.

https://bugs.python.org/msg230056

In any case, this is a complicated issue that needs careful thought and more extensive testing.  I didn't entirely like the original 9351 change, but since that's been part of argparse for many years, we need to very careful about clobbering it.

----------
status: pending -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45235>
_______________________________________

From report at bugs.python.org  Wed Oct 27 17:44:47 2021
From: report at bugs.python.org (paul j3)
Date: Wed, 27 Oct 2021 21:44:47 +0000
Subject: [issue9351] argparse set_defaults on subcommands should override top
 level set_defaults
In-Reply-To: <1279894012.43.0.0678646409.issue9351@psf.upfronthosting.co.za>
Message-ID: <1635371087.11.0.224620881211.issue9351@roundup.psfhosted.org>


paul j3 <ajipanca at gmail.com> added the comment:

A new patch, https://bugs.python.org/issue45235 has clobbered this patch.

It has also exposed the inadequate unittesting for the case(s) where the 'dest' of main namespace, subparser namespace, user provided namespace overlap.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue9351>
_______________________________________

From report at bugs.python.org  Wed Oct 27 17:45:51 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Wed, 27 Oct 2021 21:45:51 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1635371151.65.0.353854817286.issue45562@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset 038f45230892235e806ef227dfd9484b95687823 by Miss Islington (bot) in branch '3.10':
bpo-45562: Print tokenizer debug messages to stderr (GH-29250) (GH-29252)
https://github.com/python/cpython/commit/038f45230892235e806ef227dfd9484b95687823


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Wed Oct 27 17:57:11 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 27 Oct 2021 21:57:11 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635371831.21.0.271037619974.issue45438@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset ce7a6afb797d2ffde45e9e902516b8437c8f9e31 by Miss Islington (bot) in branch '3.10':
bpo-45438: format of inspect.Signature with generic builtins (GH-29212)
https://github.com/python/cpython/commit/ce7a6afb797d2ffde45e9e902516b8437c8f9e31


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Wed Oct 27 18:00:27 2021
From: report at bugs.python.org (miss-islington)
Date: Wed, 27 Oct 2021 22:00:27 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635372027.34.0.449629889287.issue45438@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 21150c6fa330f80747d698e4b883c7b4801a25bd by Miss Islington (bot) in branch '3.9':
bpo-45438: format of inspect.Signature with generic builtins (GH-29212)
https://github.com/python/cpython/commit/21150c6fa330f80747d698e4b883c7b4801a25bd


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Wed Oct 27 18:07:05 2021
From: report at bugs.python.org (Maciej Olko)
Date: Wed, 27 Oct 2021 22:07:05 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635372425.63.0.362603798986.issue45618@roundup.psfhosted.org>


Maciej Olko <maciej.olko at gmail.com> added the comment:

It occurs that the documentation builds without warnings on most recent Sphinx -- version 4.2.0. Probably we should bump the version in 3.11, 3.10 and 3.9 to 4.2.0. That would enable us to remove the pin on docutils.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Wed Oct 27 18:09:10 2021
From: report at bugs.python.org (Maciej Olko)
Date: Wed, 27 Oct 2021 22:09:10 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635372550.96.0.921857179537.issue45618@roundup.psfhosted.org>


Maciej Olko <maciej.olko at gmail.com> added the comment:

I'm sorry for the confusion. I might have make more checking on my side before proposing a fix.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Wed Oct 27 18:13:52 2021
From: report at bugs.python.org (Brandt Bucher)
Date: Wed, 27 Oct 2021 22:13:52 +0000
Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP
Message-ID: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org>


New submission from Brandt Bucher <brandtbucher at gmail.com>:

...as discussed in https://github.com/faster-cpython/ideas/issues/101.

This change merges all BINARY_*/INPLACE_* instructions, except for a few special cases:

- BINARY_ADD/INPLACE_ADD, which interact with sq_concat/sq_inplace_concat and already have their own specialization family.
- BINARY_MULTIPLY/INPLACE_MULTIPLY, which interact with sq_repeat/sq_inplace_repeat and already have their own specialization family.
- BINARY_POWER/INPLACE_POWER, which are technically ternary operators under-the-hood.
- BINARY_MODULO/INPLACE_MODULO, which contain a special fast path for string formatting (but likely can be rolled in later as a specialization).

It has no mean impact on pyperformance, shrinks the eval loop, and makes it much simpler to implement operator specializations.

----------
assignee: brandtbucher
components: Interpreter Core
messages: 405136
nosy: Mark.Shannon, brandtbucher, gvanrossum
priority: normal
severity: normal
status: open
title: Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP
type: performance
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45636>
_______________________________________

From report at bugs.python.org  Wed Oct 27 18:15:15 2021
From: report at bugs.python.org (Brandt Bucher)
Date: Wed, 27 Oct 2021 22:15:15 +0000
Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP
In-Reply-To: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org>
Message-ID: <1635372915.37.0.997107231938.issue45636@roundup.psfhosted.org>


Change by Brandt Bucher <brandtbucher at gmail.com>:


----------
keywords: +patch
pull_requests: +27519
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29255

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45636>
_______________________________________

From report at bugs.python.org  Wed Oct 27 18:28:11 2021
From: report at bugs.python.org (Maciej Olko)
Date: Wed, 27 Oct 2021 22:28:11 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635373691.63.0.751334712076.issue45618@roundup.psfhosted.org>


Change by Maciej Olko <maciej.olko at gmail.com>:


----------
pull_requests: +27520
pull_request: https://github.com/python/cpython/pull/29256

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Wed Oct 27 18:30:08 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Wed, 27 Oct 2021 22:30:08 +0000
Subject: [issue45591] PathFinder does not find namespace packages children
In-Reply-To: <1635024524.91.0.931449499561.issue45591@roundup.psfhosted.org>
Message-ID: <1635373808.49.0.509819855485.issue45591@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

Okay, I think that makes sense to me. Thank you!!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45591>
_______________________________________

From report at bugs.python.org  Wed Oct 27 18:54:54 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Wed, 27 Oct 2021 22:54:54 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635375294.66.0.194943989774.issue45438@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

Can we close this?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Wed Oct 27 19:14:30 2021
From: report at bugs.python.org (Marc Culler)
Date: Wed, 27 Oct 2021 23:14:30 +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: <1635376470.28.0.106243717396.issue44828@roundup.psfhosted.org>


Marc Culler <marc.culler at gmail.com> added the comment:

Hi Ned,  I think this problem is fixed now in the tip of the Tk macosx_filedialog branch.  I am attaching the tkMacOSXDialog.c file from that branch.  I think you should be able to just replace the version in 8.6.11 and be able to build a working version.  I have tested on macOS 10.14, 10.15, 11 and 12.  Can you please test on your systems?

If it looks OK I will merge the changes into 8.6.12-rc so they will appear in the 8.6.12 release when that happens.  It should be fairly soon.

----------
Added file: https://bugs.python.org/file50398/tkMacOSXDialog.c

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Wed Oct 27 19:26:30 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Wed, 27 Oct 2021 23:26:30 +0000
Subject: [issue45637] The fallback to find the current frame in the gdb
 helpers fails for inlined frames
Message-ID: <1635377190.26.0.872789937299.issue45637@roundup.psfhosted.org>


New submission from Pablo Galindo Salgado <pablogsal at gmail.com>:

This code does not work in the presence of inlined Python calls:

https://github.com/python/cpython/blob/d02ffd1b5c0fd8dec6dd2f7e3f2b0cfae48b7899/Tools/gdb/libpython.py#L1804-L1813

----------
components: Interpreter Core
messages: 405140
nosy: Mark.Shannon, pablogsal
priority: normal
severity: normal
status: open
title: The fallback to find the current frame in the gdb helpers fails for inlined frames
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45637>
_______________________________________

From report at bugs.python.org  Wed Oct 27 19:31:09 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Wed, 27 Oct 2021 23:31:09 +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: <1635377469.72.0.670432682618.issue45637@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
keywords: +patch
pull_requests: +27521
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29257

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45637>
_______________________________________

From report at bugs.python.org  Wed Oct 27 20:05:44 2021
From: report at bugs.python.org (Skip Montanaro)
Date: Thu, 28 Oct 2021 00:05:44 +0000
Subject: [issue45638] Does ccbench still require 2.6 compatibility?
Message-ID: <1635379544.92.0.412444620127.issue45638@roundup.psfhosted.org>


New submission from Skip Montanaro <skip.montanaro at gmail.com>:

At the top of Tools/ccbench/ccbench.py is this comment dating from 2010 (probably in the initial version):

# This file should be kept compatible with both Python 2.6 and Python >= 3.0.

Is there still a need for 2.6 compatibility in what is essentially a test script? There are probably only a few changes necessary to remove 2.x compatibility, but it seems odd to retain them when even the Python library documentation no longer has versionchanged/versionadded directives referencing Python 2.x.

----------
messages: 405141
nosy: skip.montanaro
priority: normal
severity: normal
status: open
title: Does ccbench still require 2.6 compatibility?
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45638>
_______________________________________

From report at bugs.python.org  Wed Oct 27 20:16:06 2021
From: report at bugs.python.org (wim glenn)
Date: Thu, 28 Oct 2021 00:16:06 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1635380166.84.0.399685129208.issue45356@roundup.psfhosted.org>


wim glenn <wim.glenn at gmail.com> added the comment:

added Graham Dumpleton to nosy list in case he has some useful insight here, I think the PR from issue19072 may have been adapted from grahamd's patch originally?

----------
nosy: +grahamd

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Wed Oct 27 20:42:49 2021
From: report at bugs.python.org (Graham Dumpleton)
Date: Thu, 28 Oct 2021 00:42:49 +0000
Subject: [issue45356] Calling `help` executes @classmethod @property decorated
 methods
In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org>
Message-ID: <1635381769.02.0.958933471614.issue45356@roundup.psfhosted.org>


Graham Dumpleton <Graham.Dumpleton at gmail.com> added the comment:

Too much to grok right now.

There is already a convention for what a decorator wraps. It is __wrapped__.

https://github.com/python/cpython/blob/3405792b024e9c6b70c0d2355c55a23ac84e1e67/Lib/functools.py#L70

Don't use __func__ as that has other defined meaning in Python related to bound methods and possibly other things as well and overloading on that will break other stuff.

In part I suspect a lot of the problems here are because things like classmethod and functools style decorators are not proper transparent object proxies, which is the point of what the wrapt package was trying to solve so that accessing stuff on the wrapper behaves as much as possible as if it was done on what was wrapped, including things like isinstance checks.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45356>
_______________________________________

From report at bugs.python.org  Wed Oct 27 21:54:43 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Thu, 28 Oct 2021 01:54:43 +0000
Subject: [issue30570] issubclass segfaults on objects with weird __getattr__
In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za>
Message-ID: <1635386083.94.0.811163391355.issue30570@roundup.psfhosted.org>


Change by Dennis Sweeney <sweeney.dennis650 at gmail.com>:


----------
pull_requests: +27522
pull_request: https://github.com/python/cpython/pull/29258

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30570>
_______________________________________

From report at bugs.python.org  Wed Oct 27 21:56:48 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Thu, 28 Oct 2021 01:56:48 +0000
Subject: [issue30570] issubclass segfaults on objects with weird __getattr__
In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za>
Message-ID: <1635386208.88.0.432024041351.issue30570@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

I think this broke some buildbots.

https://buildbot.python.org/all/#/builders/256/builds/264
https://buildbot.python.org/all/#/builders/370/builds/263

I opened a PR to temporarily decrease the recursion limit so that the C stack doesn't overflow in these new test.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30570>
_______________________________________

From report at bugs.python.org  Wed Oct 27 22:33:35 2021
From: report at bugs.python.org (Adam Konrad)
Date: Thu, 28 Oct 2021 02:33:35 +0000
Subject: [issue45639] Support modern image formats in MIME types
Message-ID: <1635388414.48.0.724029722643.issue45639@roundup.psfhosted.org>


New submission from Adam Konrad <kixorz at gmail.com>:

Modern image types webp and avif are not recognized by the mimetypes module.

Problem: Many tools are written in Python and running on macOS. Good example is the AWS CLI. Running commands like "s3 sync" will save files with .webp and .avif extensions with incorrect "binary/octet-stream" Content-Type to S3. This creates additional problems with serving these resources over HTTP.

The webp and avif image types are supported by most browsers: https://caniuse.com/#feat=webp
https://caniuse.com/#feat=avif

While webp is fully supported and largely used, it is not officially registered with IANA.

Avif is currently less popular, it is fully registered with IANA.
https://www.iana.org/assignments/media-types/media-types.xhtml

Please consider the attached GitHub PR as a fix to these MIME Content-Type issues.

----------
components: Library (Lib)
messages: 405145
nosy: adamkonrad
priority: normal
severity: normal
status: open
title: Support modern image formats in MIME types
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45639>
_______________________________________

From report at bugs.python.org  Wed Oct 27 22:35:27 2021
From: report at bugs.python.org (Adam Konrad)
Date: Thu, 28 Oct 2021 02:35:27 +0000
Subject: [issue45639] Support modern image formats in MIME types
In-Reply-To: <1635388414.48.0.724029722643.issue45639@roundup.psfhosted.org>
Message-ID: <1635388527.06.0.335005847456.issue45639@roundup.psfhosted.org>


Change by Adam Konrad <kixorz at gmail.com>:


----------
keywords: +patch
pull_requests: +27523
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29259

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45639>
_______________________________________

From report at bugs.python.org  Wed Oct 27 22:53:34 2021
From: report at bugs.python.org (Sonia)
Date: Thu, 28 Oct 2021 02:53:34 +0000
Subject: [issue45620] A misleading url in 'Floating Point Arithmetic' page
In-Reply-To: <1635313160.15.0.740336077946.issue45620@roundup.psfhosted.org>
Message-ID: <1635389614.34.0.0517154276315.issue45620@roundup.psfhosted.org>


Sonia <hsiaohanwu at gmail.com> added the comment:

Thanks!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45620>
_______________________________________

From report at bugs.python.org  Wed Oct 27 23:04:26 2021
From: report at bugs.python.org (Arthur Milchior)
Date: Thu, 28 Oct 2021 03:04:26 +0000
Subject: [issue45640] Production tokens are not clickable
Message-ID: <1635390266.57.0.202926795869.issue45640@roundup.psfhosted.org>


New submission from Arthur Milchior <arthur at milchior.fr>:

In the current documentation, production tokens are not clickable. For example in https://docs.python.org/3/reference/expressions.html#yield-expressions , you highlight `yield_from` as a token but do not link to it.
I suppose that the goal, when using :token:`yeld_from`, was to ensure that the token links to its definition. However, Sphinx require to use :token:`~python-grammar:yeld_from` for the link to appear. 

I suggest adding ~python-grammar after each token:.

----------
assignee: docs at python
components: Documentation
messages: 405147
nosy: Arthur-Milchior, docs at python
priority: normal
severity: normal
status: open
title: Production tokens are not clickable
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45640>
_______________________________________

From report at bugs.python.org  Wed Oct 27 23:09:41 2021
From: report at bugs.python.org (Arthur Milchior)
Date: Thu, 28 Oct 2021 03:09:41 +0000
Subject: [issue45640] Production tokens are not clickable
In-Reply-To: <1635390266.57.0.202926795869.issue45640@roundup.psfhosted.org>
Message-ID: <1635390581.22.0.674275219155.issue45640@roundup.psfhosted.org>


Change by Arthur Milchior <arthur at milchior.fr>:


----------
keywords: +patch
pull_requests: +27525
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29260

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45640>
_______________________________________

From report at bugs.python.org  Thu Oct 28 02:12:35 2021
From: report at bugs.python.org (Ned Deily)
Date: Thu, 28 Oct 2021 06:12:35 +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: <1635401555.05.0.649224131698.issue44828@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

Thanks for the quick response, Marc. The results of testing were mixed. The good news: the new version did seem to solve the Monterey problem of the "UFO" and the loss of keyboard focus. However, the new version causes new problems on other releases.

- On 10.14 and earlier systems, I observed the following new behavior in IDLE: on doing a Save from an Edit Window (either with CMD-S or click on the Save menu item), the Save file pane appears as expected but, after entering the file name and clicking Save on the pane, the Save file pane is not dismissed although the file is actually saved under the expected file name. Clicking on the pane's Save button again brings up a "file already exists, do you want to overwrite" message and after clicking OK to that, both the "overwrite" pane and the underlying Save pane are dismissed.

- On 10.15 only, I stumbled across this behavior (and verified it did not occur with the unpatched 8.6.11 nor does it seem to occur anywhere but on 10.15): in a new IDLE edit window, type some text, then Save to a file (CMD-S). Now alter the text and then use Save As (CMD-SHIFT-S) to attempt to save to another file name. Upon entering CMD-SHIFT-S (or clicking on the Save As... menu item), Tk crashes. I've attached a few crash dumps.

----------
Added file: https://bugs.python.org/file50399/Python_2021-10-27-231033_pyb15.crash

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Thu Oct 28 02:12:54 2021
From: report at bugs.python.org (Ned Deily)
Date: Thu, 28 Oct 2021 06:12: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: <1635401574.17.0.186181660203.issue44828@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


Added file: https://bugs.python.org/file50400/Python_2021-10-27-231308_pyb15.crash

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Thu Oct 28 02:13:10 2021
From: report at bugs.python.org (Ned Deily)
Date: Thu, 28 Oct 2021 06:13: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: <1635401590.99.0.664426454041.issue44828@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


Added file: https://bugs.python.org/file50401/Python_2021-10-27-231507_pyb15.crash

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Thu Oct 28 02:38:12 2021
From: report at bugs.python.org (Dev Kumar)
Date: Thu, 28 Oct 2021 06:38:12 +0000
Subject: [issue45641] Error In opening a file through Idle
Message-ID: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org>


New submission from Dev Kumar <devesh.dk373 at gmail.com>:

there is an error that is occurring in opening a file or program & after that python is started hanging & not even quitting.
And also the file which is open by python is not even saving or executing.

----------
assignee: terry.reedy
components: IDLE, macOS
messages: 405149
nosy: devesh.dk373, ned.deily, ronaldoussoren, terry.reedy
priority: normal
severity: normal
status: open
title: Error In opening a file through Idle
type: crash
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45641>
_______________________________________

From report at bugs.python.org  Thu Oct 28 03:24:09 2021
From: report at bugs.python.org (Alexandru Ardelean)
Date: Thu, 28 Oct 2021 07:24:09 +0000
Subject: [issue45627] OpenSSL 1.1.1 still implements some disable-flags for
 Blake2, Scrypt
In-Reply-To: <1635340606.96.0.794905902875.issue45627@roundup.psfhosted.org>
Message-ID: <1635405849.54.0.824310519499.issue45627@roundup.psfhosted.org>


Alexandru Ardelean <ardeleanalex at gmail.com> added the comment:

Apologies for the slow reply.

It was the end of work-day when I submitted the bug & patch.
I know, not a good method, but I do what I can :)

So, OpenWrt's OpenSSL does not build BLAKE2 by default.
See: https://github.com/openwrt/openwrt/blob/master/package/libs/openssl/Makefile#L190

Scrypt is on by default. In the sense that there is no disable flag.

I only care about BLAKE2, but I was trying not to half-ass the implementation, given that Scrypt is also disable-able.

Now there are 2 options that I feel could be reasonable (anyone is free to disagree with me here):
1. this is patch upstream as I'm trying here
2. keep this patch downstream (i.e. just in our tree for OpenWrt's Python) until OpenSSL (or OpenWrt) enables BLAKE2 by default

There are several options that feel a bit more difficult (to me):
3. Enable OpenSSL BLAKE2 on by default in OpenWrt core; this may also work, but requires some discussion with the OpenWrt core-team that handles OpenSSL; though usually OpenWrt tries to be minimal, so I'm feeling there would be some resistance 
4. Not build hashlib (in Python) if BLAKE2 is not enabled in OpenSSL ; this is doable, but maybe a bit too complicated (for what is worth); it can cause support issues (in OpenWrt) like "hey, where did hashlib go?"

I may have missed a few possible options. But these are the more obvious ones.

Moving forward, I am fine with either of the first 2 options.
I am feeling that option 2 is closer to what is desired by upstream Python (which I am fine to do).

Thank you :)
Alex

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45627>
_______________________________________

From report at bugs.python.org  Thu Oct 28 03:26:45 2021
From: report at bugs.python.org (swgmma)
Date: Thu, 28 Oct 2021 07:26:45 +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: <1635406005.83.0.714431483239.issue30082@roundup.psfhosted.org>


swgmma <jason.nader at protonmail.com> added the comment:

Just added a commit implementing `force_hide_console`.

What is the most trivial way to test it's behaviour?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Thu Oct 28 03:27:22 2021
From: report at bugs.python.org (Steven D'Aprano)
Date: Thu, 28 Oct 2021 07:27:22 +0000
Subject: [issue45641] Error In opening a file through Idle
In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org>
Message-ID: <1635406042.01.0.270095115265.issue45641@roundup.psfhosted.org>


Steven D'Aprano <steve+python at pearwood.info> added the comment:

You need to give us some steps to reproduce this error, or we cannot even begin to try to fix it.

What are the minimum steps needed to reproduce the error?

----------
nosy: +steven.daprano

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45641>
_______________________________________

From report at bugs.python.org  Thu Oct 28 03:28:19 2021
From: report at bugs.python.org (Steven D'Aprano)
Date: Thu, 28 Oct 2021 07:28:19 +0000
Subject: [issue45641] Error In opening a file through Idle
In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org>
Message-ID: <1635406099.65.0.324187211234.issue45641@roundup.psfhosted.org>


Steven D'Aprano <steve+python at pearwood.info> added the comment:

Please read:

https://stackoverflow.com/help/minimal-reproducible-example

http://www.sscce.org/

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45641>
_______________________________________

From report at bugs.python.org  Thu Oct 28 03:48:22 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 07:48:22 +0000
Subject: [issue44904] Classmethod properties are erroneously "called" in
 multiple modules
In-Reply-To: <1628803001.12.0.882298478545.issue44904@roundup.psfhosted.org>
Message-ID: <1635407302.97.0.993150534229.issue44904@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27527
pull_request: https://github.com/python/cpython/pull/29262

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44904>
_______________________________________

From report at bugs.python.org  Thu Oct 28 03:48:17 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 07:48:17 +0000
Subject: [issue44904] Classmethod properties are erroneously "called" in
 multiple modules
In-Reply-To: <1628803001.12.0.882298478545.issue44904@roundup.psfhosted.org>
Message-ID: <1635407297.86.0.125202918313.issue44904@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +27526
pull_request: https://github.com/python/cpython/pull/29261

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44904>
_______________________________________

From report at bugs.python.org  Thu Oct 28 03:48:28 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 28 Oct 2021 07:48:28 +0000
Subject: [issue44904] Classmethod properties are erroneously "called" in
 multiple modules
In-Reply-To: <1628803001.12.0.882298478545.issue44904@roundup.psfhosted.org>
Message-ID: <1635407308.96.0.890647217783.issue44904@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset b1302abcc8a4be5f39b4d60a1ce28032b77655b3 by Alex Waygood in branch 'main':
bpo-44904: Fix classmethod property bug in doctest module (GH-28838)
https://github.com/python/cpython/commit/b1302abcc8a4be5f39b4d60a1ce28032b77655b3


----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44904>
_______________________________________

From report at bugs.python.org  Thu Oct 28 04:08:18 2021
From: report at bugs.python.org (Dev Kumar)
Date: Thu, 28 Oct 2021 08:08:18 +0000
Subject: [issue45641] Error In opening a file through Idle
In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org>
Message-ID: <1635408498.41.0.668491725062.issue45641@roundup.psfhosted.org>


Dev Kumar <devesh.dk373 at gmail.com> added the comment:

For that,
First, open IDlE
Then click file & then click on Open 
After that it's showing the error THE OPEN FILE OPERATION FAILED. 
Note: I didn't open any file

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45641>
_______________________________________

From report at bugs.python.org  Thu Oct 28 04:09:23 2021
From: report at bugs.python.org (Dev Kumar)
Date: Thu, 28 Oct 2021 08:09:23 +0000
Subject: [issue45641] Error In opening a file through Idle
In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org>
Message-ID: <1635408563.92.0.900059202484.issue45641@roundup.psfhosted.org>


Change by Dev Kumar <devesh.dk373 at gmail.com>:


Added file: https://bugs.python.org/file50402/Screen Shot 2021-10-28 at 1.39.08 PM.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45641>
_______________________________________

From report at bugs.python.org  Thu Oct 28 04:09:56 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 08:09:56 +0000
Subject: [issue44904] Classmethod properties are erroneously "called" in
 multiple modules
In-Reply-To: <1628803001.12.0.882298478545.issue44904@roundup.psfhosted.org>
Message-ID: <1635408596.85.0.294950908114.issue44904@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 1f45cc0dfa9a8febfc256411c803b4536719db97 by Miss Islington (bot) in branch '3.10':
bpo-44904: Fix classmethod property bug in doctest module (GH-28838)
https://github.com/python/cpython/commit/1f45cc0dfa9a8febfc256411c803b4536719db97


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44904>
_______________________________________

From report at bugs.python.org  Thu Oct 28 04:11:51 2021
From: report at bugs.python.org (Dev Kumar)
Date: Thu, 28 Oct 2021 08:11:51 +0000
Subject: [issue45641] Error In opening a file through Idle
In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org>
Message-ID: <1635408711.6.0.372383895786.issue45641@roundup.psfhosted.org>


Change by Dev Kumar <devesh.dk373 at gmail.com>:


Added file: https://bugs.python.org/file50403/Screen Shot 2021-10-28 at 1.41.31 PM.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45641>
_______________________________________

From report at bugs.python.org  Thu Oct 28 04:13:53 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 08:13:53 +0000
Subject: [issue44904] Classmethod properties are erroneously "called" in
 multiple modules
In-Reply-To: <1628803001.12.0.882298478545.issue44904@roundup.psfhosted.org>
Message-ID: <1635408833.9.0.106445109445.issue44904@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 8365a5b5abe51cbe4151d89a5d0a993273320067 by Miss Islington (bot) in branch '3.9':
bpo-44904: Fix classmethod property bug in doctest module (GH-28838)
https://github.com/python/cpython/commit/8365a5b5abe51cbe4151d89a5d0a993273320067


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44904>
_______________________________________

From report at bugs.python.org  Thu Oct 28 04:14:23 2021
From: report at bugs.python.org (Alexandru Ardelean)
Date: Thu, 28 Oct 2021 08:14:23 +0000
Subject: [issue45627] OpenSSL 1.1.1 still implements some disable-flags for
 Blake2, Scrypt
In-Reply-To: <1635340606.96.0.794905902875.issue45627@roundup.psfhosted.org>
Message-ID: <1635408863.9.0.276345310622.issue45627@roundup.psfhosted.org>


Alexandru Ardelean <ardeleanalex at gmail.com> added the comment:

So, I've read through:

https://www.python.org/dev/peps/pep-0644/#compatibility


I also stumbled over:
https://lwn.net/Articles/841664/

Which also led to:
https://www.python.org/dev/peps/pep-0644/#libressl-support

The answer is loud and clear now: will keep this downstream.

Thank you and apologies for the noise.

----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45627>
_______________________________________

From report at bugs.python.org  Thu Oct 28 04:14:20 2021
From: report at bugs.python.org (Dev Kumar)
Date: Thu, 28 Oct 2021 08:14:20 +0000
Subject: [issue45641] Error In opening a file through Idle
In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org>
Message-ID: <1635408860.62.0.85662897948.issue45641@roundup.psfhosted.org>


Dev Kumar <devesh.dk373 at gmail.com> added the comment:

This is the File which is opening every time and not even saving it.

----------
Added file: https://bugs.python.org/file50404/Screen Shot 2021-10-28 at 1.40.04 PM.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45641>
_______________________________________

From report at bugs.python.org  Thu Oct 28 04:19:06 2021
From: report at bugs.python.org (Stefan Pochmann)
Date: Thu, 28 Oct 2021 08:19:06 +0000
Subject: [issue45530] Improve listobject.c's unsafe_tuple_compare()
In-Reply-To: <1634679689.66.0.398090356022.issue45530@roundup.psfhosted.org>
Message-ID: <1635409146.83.0.982367473923.issue45530@roundup.psfhosted.org>


Stefan Pochmann <stefan.pochmann at gmail.com> added the comment:

> This is already faster in pure Python than list.sort() for cases like:

Seems to depend on the system, it's slower on my laptop but faster on GCE:

Python 3.10.0 on my laptop:
 7.42 s  lexisort
 6.83 s  sort
 5.07 s  groupsort

Python 3.9.2 on Google Compute Engine:
 2.09 s  lexisort
 2.64 s  list.sort
 1.52 s  groupsort

This is my groupsort btw:

def groupsort(xs):
    xs.sort(key=itemgetter(0))
    start = 0
    n = len(xs)
    tail = itemgetter(slice(1, None))
    for i in range(1, n+1):
        if i == n or xs[i-1][0] < xs[i][0]:
            sublist = xs[start:i]
            sublist.sort(key=tail)
            xs[start:i] = sublist
            start = i

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45530>
_______________________________________

From report at bugs.python.org  Thu Oct 28 04:44:35 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 28 Oct 2021 08:44:35 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635410675.06.0.386270634215.issue45438@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

> issubclass(x, list[int]) rejects the second argument for reasons explained in the PEP.

1. One problem is that isinstance(x, type) != issubclass(type(x), type)
if x is list[int]. It is unprecedented, I cannot recall any other case
in which isinstance() and issubclas() are inconsistent. Ant it breaks
code because these two expressions are often considered equivalent and
interchangeable in refactoring.

2. Other problem is that isinstance(x, type) is used as a guard before
using x as a type. `isinstance(obj, type) and issubclass(obj,
SomeClass)` is a common idiom, because issubclass() raises an exception
if its first argument is not a type. It is now broken for list[int].


> What other places are there that are broken because of this?
$ find Lib -name '*.py' \! -path '*/test*' -exec egrep 'isinstance.*,
type\)' '{}' + | wc -l
55

In msg403826 I showed few examples from just two files, but there are
tens more potential examples. I'll show them all if I have enough of
spare time.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Thu Oct 28 04:46:34 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 28 Oct 2021 08:46:34 +0000
Subject: [issue45627] OpenSSL 1.1.1 still implements some disable-flags for
 Blake2, Scrypt
In-Reply-To: <1635340606.96.0.794905902875.issue45627@roundup.psfhosted.org>
Message-ID: <1635410794.45.0.70779576676.issue45627@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Ah, OpenWRT. :)

Thanks for you detailed explanation. I kinda agree that it makes sense for small, embedded systems like OpenWRT to reduce the size of binaries. After all storage and memory are precious on these systems.

PEP 644 favors usability over flexibility. 3rd party library developers can now rely on the presence of hashlib features. Before 3.10 they could not be sure that a Python build had certain features.

A downstream patch in OpenWRT makes sense.

By the way, you might be interested in --with-builtin-hashlib-hashes configure flag. It lets you disable builtin modules like _md5 and _sha3. The shared libraries are large. If you disable the builtin blake2 module, then certain features like MAC and tree hashing are not working.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45627>
_______________________________________

From report at bugs.python.org  Thu Oct 28 04:49:14 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 28 Oct 2021 08:49:14 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635410954.75.0.873112583942.issue45438@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

See also issue40296.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Thu Oct 28 05:02:25 2021
From: report at bugs.python.org (Alexandru Ardelean)
Date: Thu, 28 Oct 2021 09:02:25 +0000
Subject: [issue45627] OpenSSL 1.1.1 still implements some disable-flags for
 Blake2, Scrypt
In-Reply-To: <1635340606.96.0.794905902875.issue45627@roundup.psfhosted.org>
Message-ID: <1635411745.81.0.851126391141.issue45627@roundup.psfhosted.org>


Alexandru Ardelean <ardeleanalex at gmail.com> added the comment:

> Thanks for you detailed explanation. I kinda agree that it makes sense for small, embedded systems like OpenWRT to reduce the size of binaries. After all storage and memory are precious on these systems.

So, OpenWrt is not as tiny as it used to be.
A large part is due to the Linux kernel increasing in default size.
But other libs do a small increase as well (with each new revision).
I think a new micro-OpenWrt (or similar project) would be required in some future to support the devices with less than 4 MB of flash and less than 32 MB of RAM.
OpenWrt last supported the 4/32 combination in 2018 (with the 18.06 release).
(But that's another topic I for when I retire maybe :p )

I think where users still install Python is where they have at least 64/128 MB of persistent storage/flash memory.

I am still surprised about the desire of users to install Python on such devices (even after doing this for ~7 years of [co-]maintaining it it on OpenWrt).
The Turris devices/routers (are one example that) use a lot of CPython for some userspace stuff.

> PEP 644 favors usability over flexibility. 3rd party library developers can now rely on the presence of hashlib features. Before 3.10 they could not be sure that a Python build had certain features.

Ack.

> A downstream patch in OpenWRT makes sense.

I've started down that path.
But guess what... I hit LibreSSL (on the host build) :P
Now I have a bigger job (than I thought) to update to 3.10
But that's fine.
These events are rare, and I do enjoy to fix them (when I can).

> By the way, you might be interested in --with-builtin-hashlib-hashes configure flag. It lets you disable builtin modules like _md5 and _sha3. The shared libraries are large. If you disable the builtin blake2 module, then certain features like MAC and tree hashing are not working.

I would not add too many flags in the Python build (on our side).
For now we have some ways to "modularize" a Python installation.
It's basically a hack-job of splitting Core-Python libraries into separate packages.
That's when someone really wants to do a minimal installation of Python, and add only 2-3 libraries on top.
Essentially, we build Python with all defaults possible, then some libs (.so & .py files) get packaged together (like ssl.py and _ssl.so from python).
The more immediate benefits (in this example) are that you can avoid installing OpenSSL libs on your device, but have some Python.

I know... crazy stuff, but people seem to do it.

I do admit some Python fans and developers would cringe at this but ?\_(?)_/?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45627>
_______________________________________

From report at bugs.python.org  Thu Oct 28 05:05:39 2021
From: report at bugs.python.org (Ronald Oussoren)
Date: Thu, 28 Oct 2021 09:05:39 +0000
Subject: [issue45641] Error In opening a file through Idle
In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org>
Message-ID: <1635411939.96.0.97835956348.issue45641@roundup.psfhosted.org>


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

Are you using macOS 12 (Monterey)?

I get an error as well using that version of the OS (see open-error). The error happens within a second or two after opening the open dialog, without interacting with the dialog in any way. This is on an M1 laptop running macOS 12.0.1.

This is likely the same issue as described in #44828. In particular, I get the same error message when I run the reproducer script in that issue. 

I'm adding the Tkinter component as well because this is likely a problem

----------
components: +Tkinter
Added file: https://bugs.python.org/file50405/open-error.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45641>
_______________________________________

From report at bugs.python.org  Thu Oct 28 05:07:30 2021
From: report at bugs.python.org (Eryk Sun)
Date: Thu, 28 Oct 2021 09:07:30 +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: <1635412050.34.0.627790712488.issue30082@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

> What is the most trivial way to test it's behaviour?

With CREATE_NO_WINDOW, the child process is attached to a console that has no window. Thus calling GetConsoleWindow() in the child returns NULL without an error. OTOH, if the child has no console (e.g. DETACHED_PROCESS or executing "pythonw.exe"), then GetConsoleWindow() returns NULL with the last error set to ERROR_INVALID_HANDLE (6). For example:

    script = r'''
    import sys
    import ctypes
    kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)
    kernel32.GetConsoleWindow.restype = ctypes.c_void_p
    ctypes.set_last_error(0)
    result = kernel32.GetConsoleWindow()
    status = bool(result or ctypes.get_last_error())
    sys.exit(status)
    '''
    args = [sys.executable, '-c', script]

The child's exit status will be 0 if CREATE_NO_WINDOW works as expected. Otherwise the exit status will be 1.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Thu Oct 28 05:19:25 2021
From: report at bugs.python.org (Dev Kumar)
Date: Thu, 28 Oct 2021 09:19:25 +0000
Subject: [issue45641] Error In opening a file through Idle
In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org>
Message-ID: <1635412765.72.0.632535453087.issue45641@roundup.psfhosted.org>


Dev Kumar <devesh.dk373 at gmail.com> added the comment:

Yes,
 I also have a MacBook Air M1 & I recently updated it to macOS 12.0.1. 
How to get rid of this error ??

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45641>
_______________________________________

From report at bugs.python.org  Thu Oct 28 05:25:21 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 28 Oct 2021 09:25:21 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635413121.03.0.740779230317.issue45548@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
pull_requests: +27528
pull_request: https://github.com/python/cpython/pull/29263

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Thu Oct 28 05:26:35 2021
From: report at bugs.python.org (Craig Dowkes)
Date: Thu, 28 Oct 2021 09:26:35 +0000
Subject: [issue45642] Unable to save
Message-ID: <1635413195.38.0.0518815063217.issue45642@roundup.psfhosted.org>


New submission from Craig Dowkes <craig.dowkes at gmail.com>:

I recently updated to Mac OS Montery 12.0.1 and am now unable to open or save any idle files. Running on a 2021 M1 iMac. I get the save dialogue box but then also an error box as shown in the attached picture. Failed to connect to the open and save panel service.

----------
files: Screenshot 2021-10-28 at 10.24.11 am.jpg
messages: 405168
nosy: craig.dowkes
priority: normal
severity: normal
status: open
title: Unable to save
type: performance
versions: Python 3.10
Added file: https://bugs.python.org/file50406/Screenshot 2021-10-28 at 10.24.11 am.jpg

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45642>
_______________________________________

From report at bugs.python.org  Thu Oct 28 05:47:23 2021
From: report at bugs.python.org (Steven D'Aprano)
Date: Thu, 28 Oct 2021 09:47:23 +0000
Subject: [issue45641] Error In opening a file through Idle
In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org>
Message-ID: <1635414443.15.0.580342639029.issue45641@roundup.psfhosted.org>


Steven D'Aprano <steve+python at pearwood.info> added the comment:

See issue #45642

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45641>
_______________________________________

From report at bugs.python.org  Thu Oct 28 05:47:42 2021
From: report at bugs.python.org (Steven D'Aprano)
Date: Thu, 28 Oct 2021 09:47:42 +0000
Subject: [issue45642] Unable to save
In-Reply-To: <1635413195.38.0.0518815063217.issue45642@roundup.psfhosted.org>
Message-ID: <1635414462.62.0.798630805564.issue45642@roundup.psfhosted.org>


Steven D'Aprano <steve+python at pearwood.info> added the comment:

See issue #45641

----------
nosy: +steven.daprano

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45642>
_______________________________________

From report at bugs.python.org  Thu Oct 28 05:55:33 2021
From: report at bugs.python.org (Dev Kumar)
Date: Thu, 28 Oct 2021 09:55:33 +0000
Subject: [issue45641] Error In opening a file through Idle
In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org>
Message-ID: <1635414933.01.0.772725969341.issue45641@roundup.psfhosted.org>


Dev Kumar <devesh.dk373 at gmail.com> added the comment:

Ya, I saw it, same thing is happening with me.
But now what?
what is the solution?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45641>
_______________________________________

From report at bugs.python.org  Thu Oct 28 05:57:42 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 28 Oct 2021 09:57:42 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635415062.19.0.230738452827.issue45548@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:


New changeset 4c95fb4640c0247903562dae4478158b348cea6d by Christian Heimes in branch 'main':
bpo-45548: Fix out-of-tree and Debian builds (GH-29263)
https://github.com/python/cpython/commit/4c95fb4640c0247903562dae4478158b348cea6d


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Thu Oct 28 06:11:25 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Thu, 28 Oct 2021 10:11: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: <1635415885.47.0.179198308852.issue30570@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset d56375a0dd4cee162081b173310298a3d32af293 by Dennis Sweeney in branch 'main':
bpo-30570: Fix segfault on buildbots caused by stack overflow from recursion in tests (GH-29258)
https://github.com/python/cpython/commit/d56375a0dd4cee162081b173310298a3d32af293


----------
nosy: +pablogsal

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30570>
_______________________________________

From report at bugs.python.org  Thu Oct 28 06:31:03 2021
From: report at bugs.python.org (Gareth Rees)
Date: Thu, 28 Oct 2021 10:31:03 +0000
Subject: [issue45643] SIGSTKFLT is missing from the signals module on Linux
Message-ID: <1635417063.88.0.746261778756.issue45643@roundup.psfhosted.org>


New submission from Gareth Rees <gdr at garethrees.org>:

BACKGROUND

On Linux, "man 7 signal" includes SIGSTKFLT in its table of "various other signals":

    Signal     Value   Action  Comment
    ???????????????????????????????????????????????????????????????
    SIGSTKFLT  -,16,-   Term   Stack fault on coprocessor (unused)

Here "-,16,-" means that the signal is defined with the value 16 on x86 and ARM but not on Alpha, SPARC or MIPS. I believe that the intention was to use SIGSTKFLT for stack faults on the x87 math coprocessor, but this was either removed or never implemented, so that the signal is defined in /usr/include/signal.h but not used by the Linux kernel.


USE CASE

SIGSTKFLT is one of a handful of signals that are not used by the kernel, so that user-space programs are free to use it for their own purposes, for example for inter-thread or inter-process pre-emptive communication.

Accordingly, it would be nice if the name SIGSTKFLT were available in the Python signal module on the platforms where the signal is available, for use and reporting in these cases.

----------
components: Library (Lib)
messages: 405174
nosy: gdr at garethrees.org
priority: normal
severity: normal
status: open
title: SIGSTKFLT is missing from the signals module on Linux
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45643>
_______________________________________

From report at bugs.python.org  Thu Oct 28 06:40:14 2021
From: report at bugs.python.org (Craig Dowkes)
Date: Thu, 28 Oct 2021 10:40:14 +0000
Subject: [issue45641] Error In opening a file through Idle
In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org>
Message-ID: <1635417614.3.0.394125048771.issue45641@roundup.psfhosted.org>


Craig Dowkes <craig.dowkes at gmail.com> added the comment:

Same issue for me on Mac OS 12.0.1 hoping for a quick solution to this

----------
nosy: +craig.dowkes

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45641>
_______________________________________

From report at bugs.python.org  Thu Oct 28 06:42:38 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 28 Oct 2021 10:42:38 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1635417758.74.0.972571844165.issue45562@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

Hi Pablo,

I think you missed one instance:

   print_escape(stdout, tok->cur, tok->inp - tok->cur);

Cheers

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Thu Oct 28 06:45:25 2021
From: report at bugs.python.org (Gareth Rees)
Date: Thu, 28 Oct 2021 10:45:25 +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: <1635417925.35.0.931426786846.issue45643@roundup.psfhosted.org>


Change by Gareth Rees <gdr at garethrees.org>:


----------
keywords: +patch
pull_requests: +27529
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29266

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45643>
_______________________________________

From report at bugs.python.org  Thu Oct 28 07:24:38 2021
From: report at bugs.python.org (swgmma)
Date: Thu, 28 Oct 2021 11:24:38 +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: <1635420278.88.0.0318535499182.issue30082@roundup.psfhosted.org>


swgmma <jason.nader at protonmail.com> added the comment:

For users who simply want to hide a process' window and do not have intimate knowledge of how the window is created by Windows, is it feasible to just have one option that handles all cases? Or do we have to implement both `force_hide` and `force_hide_console` and let users figure out which to use from the docs?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Thu Oct 28 07:48:39 2021
From: report at bugs.python.org (E. Paine)
Date: Thu, 28 Oct 2021 11:48:39 +0000
Subject: [issue45641] Error In opening a file through Idle
In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org>
Message-ID: <1635421719.93.0.107577645546.issue45641@roundup.psfhosted.org>


E. Paine <xepaine13 at gmail.com> added the comment:

> This is likely the same issue as described in #44828

I agree; Ned and Marc are working on it. I doubt the patch will be ready for 3.9.8, but it'll probably be in 3.9.9 and 3.10.1.

----------
nosy: +epaine

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45641>
_______________________________________

From report at bugs.python.org  Thu Oct 28 08:14:13 2021
From: report at bugs.python.org (Mark Shannon)
Date: Thu, 28 Oct 2021 12:14:13 +0000
Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP
In-Reply-To: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org>
Message-ID: <1635423253.72.0.864124904831.issue45636@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:

Do you have results for pyperformance?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45636>
_______________________________________

From report at bugs.python.org  Thu Oct 28 08:21:49 2021
From: report at bugs.python.org (Mark Shannon)
Date: Thu, 28 Oct 2021 12:21:49 +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: <1635423709.19.0.359786543833.issue45637@roundup.psfhosted.org>


Change by Mark Shannon <mark at hotpy.org>:


----------
pull_requests: +27530
pull_request: https://github.com/python/cpython/pull/29267

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45637>
_______________________________________

From report at bugs.python.org  Thu Oct 28 08:27:44 2021
From: report at bugs.python.org (Marc Culler)
Date: Thu, 28 Oct 2021 12:27: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: <1635424064.51.0.0689895477811.issue44828@roundup.psfhosted.org>


Marc Culler <marc.culler at gmail.com> added the comment:

Thanks for doing all the testing, Ned.  I guess that the path forward is now clear.  I will revert to the 8.6.11 code for 10.15 and earlier and use the new code for 11 and later.  Of course the 8.6.11 code already has two cases, for 10.14 and earlier and 10.15 and later.  So I will have some code cleanup to do.

The UFO, by the way, was a standalone file dialog which was first being rendered as a separate window and then immediately attached to the parent window as a sheet.  This was easier to see on a slower machine, like a VMWare VM which does not have graphics acceleration.

Evidently the big change for 10.15 was that the file dialog was changed so that it became managed by a separate process, rather than just borrowing the current process's event queue.  The reason, supposedly, was to make it so that an app running in a sandbox could still read and write the user's files.  It seems that Apple had a hard time making this work, and the UFO as well as the assertion error suggest to me that they still haven't figured it out.  So I thnk we can expect more trouble with the next OS.  At least we have a year before that adventure starts.

Needless to say, having some documentation from Apple would be much more pleasant than the trial and error method that we are forced to use now.  But we know better than to expect that.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Thu Oct 28 08:42:06 2021
From: report at bugs.python.org (Marc Culler)
Date: Thu, 28 Oct 2021 12:42:06 +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: <1635424926.03.0.19966282481.issue44828@roundup.psfhosted.org>


Marc Culler <marc.culler at gmail.com> added the comment:

Hmmm, the 10.15 segfault seems to occur when writing the filename into the entry widget on the dialog.  So maybe it is actually an issue with reference counting an NSString.  I will have to look at that more carefully.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Thu Oct 28 08:54:53 2021
From: report at bugs.python.org (Christian Heimes)
Date: Thu, 28 Oct 2021 12:54:53 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635425693.31.0.172066152789.issue45548@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
pull_requests: +27531
pull_request: https://github.com/python/cpython/pull/29268

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Thu Oct 28 08:59:07 2021
From: report at bugs.python.org (Chris Wesseling)
Date: Thu, 28 Oct 2021 12:59:07 +0000
Subject: [issue45644] Make json.tool soak up input before opening output for
 writing
Message-ID: <1635425947.02.0.769956758277.issue45644@roundup.psfhosted.org>


New submission from Chris Wesseling <chris.wesseling at xs4all.nl>:

json.tool is very cute and handy for making json readable.

But rewriting a file in place requires tools like sponge (on POSIX) or a tmpfile, because 

$ python -m json.tool foo.json foo.json

results in an empty foo.json.

I propose soaking up the infile before opening the outfile for writing, to prevent that. Much like sort -o does, but without the explicit flag.
The patch I have prepared changes no behaviours, other than preventing an empty file... (still I see this as an enhancement and not a bug fix)

----------
messages: 405182
nosy: CharString
priority: normal
severity: normal
status: open
title: Make json.tool soak up input before opening output for writing
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45644>
_______________________________________

From report at bugs.python.org  Thu Oct 28 08:59:15 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Thu, 28 Oct 2021 12:59:15 +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: <1635425955.91.0.0725884831931.issue45637@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset f291404a802d6a1bc50f817c7a26ff3ac9a199ff by Mark Shannon in branch 'main':
bpo-45637: Store the frame pointer in the cframe (GH-29267)
https://github.com/python/cpython/commit/f291404a802d6a1bc50f817c7a26ff3ac9a199ff


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45637>
_______________________________________

From report at bugs.python.org  Thu Oct 28 08:59:53 2021
From: report at bugs.python.org (Chris Wesseling)
Date: Thu, 28 Oct 2021 12:59: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: <1635425993.21.0.856469004533.issue45644@roundup.psfhosted.org>


Change by Chris Wesseling <chris.wesseling at xs4all.nl>:


----------
keywords: +patch
pull_requests: +27532
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29269

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45644>
_______________________________________

From report at bugs.python.org  Thu Oct 28 09:09:44 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Thu, 28 Oct 2021 13:09:44 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1635426584.77.0.232338454602.issue45562@roundup.psfhosted.org>


Change by Pablo Galindo Salgado <pablogsal at gmail.com>:


----------
pull_requests: +27534
pull_request: https://github.com/python/cpython/pull/29270

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Thu Oct 28 09:21:21 2021
From: report at bugs.python.org (Mark Shannon)
Date: Thu, 28 Oct 2021 13:21:21 +0000
Subject: [issue45630] Dump CodeObject API for debugging
In-Reply-To: <1635349665.14.0.891838928636.issue45630@roundup.psfhosted.org>
Message-ID: <1635427281.9.0.928746479623.issue45630@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:

What is the motivation for this?

I see it could be useful when modifying the compiler, but there is already code for dumping the CFG in the compiler.
https://github.com/python/cpython/blob/main/Python/compile.c#L7565

----------
nosy: +Mark.Shannon

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45630>
_______________________________________

From report at bugs.python.org  Thu Oct 28 10:12:52 2021
From: report at bugs.python.org (PABLO LOBATO DE LA CRUZ)
Date: Thu, 28 Oct 2021 14:12:52 +0000
Subject: [issue45645] Deep recursion terminates script execution with no error
 (Windows, Python 3.9)
Message-ID: <1635430372.32.0.809866843445.issue45645@roundup.psfhosted.org>


New submission from PABLO LOBATO DE LA CRUZ <pablolob at ucm.es>:

Deep recursion crashes on Windows (Python 3.9) when the depth limit is increased and no error is shown.
Seems to work fine on other systems that I have tried (Linux and MacOS).
Please find attached the script to reproduce the error.
Expected and other systems output:

Calculated N2
Try block finished correctly
This is the finally block

Output:

Calculated N2

----------
components: Windows
files: forstack.py
messages: 405185
nosy: pablolob, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Deep recursion terminates script execution with no error (Windows, Python 3.9)
type: crash
versions: Python 3.9
Added file: https://bugs.python.org/file50407/forstack.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45645>
_______________________________________

From report at bugs.python.org  Thu Oct 28 10:27:57 2021
From: report at bugs.python.org (Marc Culler)
Date: Thu, 28 Oct 2021 14:27:57 +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: <1635431277.95.0.568970347097.issue44828@roundup.psfhosted.org>


Marc Culler <marc.culler at gmail.com> added the comment:

Hi Ned.  Here is one more attempt, hopefully the final one.  I tested with IDLE on 10.14 (VM), 10.15(hard), 11(hard), 12(VM).  I used Python 3.10.0.  I replaced libtk8.6.dylib with the Tk lib compiled from the tip of the macosx_filedialog branch.  I could not reproduce any of the issues that you reported.  (But I hope you will retry as well, since just replacing the tkMacOSXDialog.c file in 8.6.11 is not the same as using the soon-to-be 8.6.12 release candidate.)

I will attach the tkMacOSXDialog.c that I used.

----------
Added file: https://bugs.python.org/file50408/tkMacOSXDialog.c

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Thu Oct 28 10:37:50 2021
From: report at bugs.python.org (Ken Jin)
Date: Thu, 28 Oct 2021 14:37:50 +0000
Subject: [issue44525] Implement CALL_FUNCTION adaptive interpreter
 optimizations
In-Reply-To: <1624890138.2.0.824780513801.issue44525@roundup.psfhosted.org>
Message-ID: <1635431870.57.0.386178955728.issue44525@roundup.psfhosted.org>


Change by Ken Jin <kenjin4096 at gmail.com>:


----------
pull_requests: +27535
pull_request: https://github.com/python/cpython/pull/29271

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44525>
_______________________________________

From report at bugs.python.org  Thu Oct 28 10:42:22 2021
From: report at bugs.python.org (Arthur Milchior)
Date: Thu, 28 Oct 2021 14:42:22 +0000
Subject: [issue45646] The documentation wrongly uses or_expr for star
 expresion in displays
Message-ID: <1635432142.42.0.274045830946.issue45646@roundup.psfhosted.org>


New submission from Arthur Milchior <arthur at milchior.fr>:

According to the current documentation, I believe there is an error in
list_display, set_display and dict_display.
According to list display, this is a valid expression
[* l1 ^ l2]
parsed as
list_display:
  "["
  starred_list:
    starred_item:
      "*"
      or_expr:
        xor_expr:
          xor_expr: "l1"
          "^"
          and_expr: "l2"
  "]"  

I add the full derivation from and_expr to l2 at the end of the report, it's not important for this topic. 

The same issue is present for set. For dictionary it is also present, but instead the error is in key_datum.

I have no idea what would be the proper correction.
Indeed [*l1+l2] is valid (in 3.9) at least. So it's not like the element after a star is restricted to be an atom.

At the very least, I believe it should be clearly indicated that, contrary to what the name indicates, "or_expr" do not mean that we accept any or, nor any expression. It just mean that 
*some_complex_expression
is interpreted as
* (some_complex_expression)
and that it is valid iff some_complex_expression is valid



            shift_expr:
              a_expr:
                m_expr:
                  power:
                    primary:
                      atom:
                        identifier:
                          "l2"

----------
assignee: docs at python
components: Documentation
messages: 405187
nosy: Arthur-Milchior, docs at python
priority: normal
severity: normal
status: open
title: The documentation wrongly uses or_expr for star expresion in displays
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45646>
_______________________________________

From report at bugs.python.org  Thu Oct 28 10:50:56 2021
From: report at bugs.python.org (Arthur Milchior)
Date: Thu, 28 Oct 2021 14:50:56 +0000
Subject: [issue45646] "expression" is erroneous in the doc
In-Reply-To: <1635432142.42.0.274045830946.issue45646@roundup.psfhosted.org>
Message-ID: <1635432656.79.0.110041534906.issue45646@roundup.psfhosted.org>


Arthur Milchior <arthur at milchior.fr> added the comment:

https://docs.python.org/3/reference/expressions.html#grammar-token-python-grammar-expression is wrong
This line state:
`expression             ::=  conditional_expression | lambda_expr`
and it is a problem because, by the way sphinx understand reference, this mean that any people who use the token `expression` will be linked to this particular line.
For example in https://docs.python.org/3/reference/expressions.html#grammar-token-python-grammar-key_datum
`key_datum          ::=  expression ":" expression | "**" or_expr`
while clearly a key_datum is not expecting only a conditional expression or a lambda expression.

Admittedly, you can derive, from  expression:
* conditional_expression
* or_test
* and_test
* not_test
* comparison
* or_expr
* xor_expr
* and_expr
* shift_expr
* a_expr
* m_expr
* u_expr
* power
* primary
* atom

in this order, so in practice you can probably derive most of the expressions. However, I doubt that this is what the documentation meant here, and clearly not practical.

----------
title: The documentation wrongly uses or_expr for star expresion in displays -> "expression" is erroneous in the doc

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45646>
_______________________________________

From report at bugs.python.org  Thu Oct 28 10:51:26 2021
From: report at bugs.python.org (Arthur Milchior)
Date: Thu, 28 Oct 2021 14:51:26 +0000
Subject: [issue45647] "expression" is erroneous in the doc
Message-ID: <1635432686.87.0.829733368222.issue45647@roundup.psfhosted.org>


New submission from Arthur Milchior <arthur at milchior.fr>:

https://docs.python.org/3/reference/expressions.html#grammar-token-python-grammar-expression is wrong
This line state:
`expression             ::=  conditional_expression | lambda_expr`
and it is a problem because, by the way sphinx understand reference, this mean that any people who use the token `expression` will be linked to this particular line.
For example in https://docs.python.org/3/reference/expressions.html#grammar-token-python-grammar-key_datum
`key_datum          ::=  expression ":" expression | "**" or_expr`
while clearly a key_datum is not expecting only a conditional expression or a lambda expression.

Admittedly, you can derive, from  expression:
* conditional_expression
* or_test
* and_test
* not_test
* comparison
* or_expr
* xor_expr
* and_expr
* shift_expr
* a_expr
* m_expr
* u_expr
* power
* primary
* atom

in this order, so in practice you can probably derive most of the expressions. However, I doubt that this is what the documentation meant here, and clearly not practical.

----------
assignee: docs at python
components: Documentation
messages: 405189
nosy: Arthur-Milchior, docs at python
priority: normal
severity: normal
status: open
title: "expression" is erroneous in the doc
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45647>
_______________________________________

From report at bugs.python.org  Thu Oct 28 10:51:55 2021
From: report at bugs.python.org (Arthur Milchior)
Date: Thu, 28 Oct 2021 14:51:55 +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: <1635432715.53.0.00410101547262.issue45646@roundup.psfhosted.org>


Change by Arthur Milchior <arthur at milchior.fr>:


----------
title: "expression" is erroneous in the doc -> Star expression in comprehension wrongly indicates to use or_expression after the star

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45646>
_______________________________________

From report at bugs.python.org  Thu Oct 28 10:53:42 2021
From: report at bugs.python.org (Ken Jin)
Date: Thu, 28 Oct 2021 14:53:42 +0000
Subject: [issue45648] Better tp_version_tag overflow checks in specializer
In-Reply-To: <1635432807.78.0.734832288442.issue45648@roundup.psfhosted.org>
Message-ID: <1635432822.28.0.0363046163315.issue45648@roundup.psfhosted.org>


Change by Ken Jin <kenjin4096 at gmail.com>:


----------
keywords: +patch
pull_requests: +27536
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29272

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45648>
_______________________________________

From report at bugs.python.org  Thu Oct 28 10:53:27 2021
From: report at bugs.python.org (Ken Jin)
Date: Thu, 28 Oct 2021 14:53:27 +0000
Subject: [issue45648] Better tp_version_tag overflow checks in specializer
Message-ID: <1635432807.78.0.734832288442.issue45648@roundup.psfhosted.org>


New submission from Ken Jin <kenjin4096 at gmail.com>:

Unless I'm mistaken, the current code in Python/specialize.c doesn't check for valid tp_version_tag, so version tag could overflow and it wouldn't know any better.

Ideally, we should add more robust tests for when tp_version_tag overflows, but that's a project for another day.

----------
messages: 405190
nosy: Mark.Shannon, kj
priority: normal
severity: normal
status: open
title: Better tp_version_tag overflow checks in specializer
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45648>
_______________________________________

From report at bugs.python.org  Thu Oct 28 10:54:01 2021
From: report at bugs.python.org (Arthur Milchior)
Date: Thu, 28 Oct 2021 14:54:01 +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: <1635432841.98.0.795123399493.issue45646@roundup.psfhosted.org>


Arthur Milchior <arthur at milchior.fr> added the comment:

Message 405188 was supposed to be another bug report. My bad.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45646>
_______________________________________

From report at bugs.python.org  Thu Oct 28 11:02:56 2021
From: report at bugs.python.org (Mark Shannon)
Date: Thu, 28 Oct 2021 15:02:56 +0000
Subject: [issue44525] Implement CALL_FUNCTION adaptive interpreter
 optimizations
In-Reply-To: <1624890138.2.0.824780513801.issue44525@roundup.psfhosted.org>
Message-ID: <1635433376.19.0.246897990407.issue44525@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:


New changeset 0a1a36b74bdf8da286924a1c9652853b1c46f536 by Ken Jin in branch 'main':
bpo-44525: Add recursive checks for `CALL_FUNCTION_BUILTIN_O` (GH-29271)
https://github.com/python/cpython/commit/0a1a36b74bdf8da286924a1c9652853b1c46f536


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44525>
_______________________________________

From report at bugs.python.org  Thu Oct 28 11:15:07 2021
From: report at bugs.python.org (Mark Shannon)
Date: Thu, 28 Oct 2021 15:15:07 +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: <1635434107.38.0.348675525607.issue45256@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:


New changeset 7f61d9d84843e3445f62eb00c47902f0daa30a72 by Mark Shannon in branch 'main':
bpo-45256: Rationalize code around Python-to-Python calls a bit. (GH-29235)
https://github.com/python/cpython/commit/7f61d9d84843e3445f62eb00c47902f0daa30a72


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45256>
_______________________________________

From report at bugs.python.org  Thu Oct 28 11:40:01 2021
From: report at bugs.python.org (Chris Wesseling)
Date: Thu, 28 Oct 2021 15:40:01 +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: <1635435601.1.0.112811006852.issue45644@roundup.psfhosted.org>


Change by Chris Wesseling <chris.wesseling at protonmail.com>:


----------
pull_requests: +27537
pull_request: https://github.com/python/cpython/pull/29273

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45644>
_______________________________________

From report at bugs.python.org  Thu Oct 28 11:59:21 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Thu, 28 Oct 2021 15:59:21 +0000
Subject: [issue45649] Add tarinfo.Path
Message-ID: <1635436761.88.0.225530702286.issue45649@roundup.psfhosted.org>


New submission from Filipe La?ns <lains at riseup.net>:

It would be helpful to have a pathlib-compatible object in tarfile, similarly to zipfile.Path.

----------
components: Library (Lib)
messages: 405194
nosy: FFY00, jaraco
priority: normal
severity: normal
status: open
title: Add tarinfo.Path
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45649>
_______________________________________

From report at bugs.python.org  Thu Oct 28 12:00:57 2021
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 28 Oct 2021 16:00:57 +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: <1635436857.08.0.0936596537844.issue45641@roundup.psfhosted.org>


Change by Terry J. Reedy <tjreedy at udel.edu>:


----------
assignee: terry.reedy -> 
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves
title: Error In opening a file through Idle -> Error In opening a file through tkinter on macOS Monterey

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45641>
_______________________________________

From report at bugs.python.org  Thu Oct 28 12:02:11 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 16:02:11 +0000
Subject: [issue39679] functools: singledispatchmethod doesn't work with
 classmethod
In-Reply-To: <1582053375.25.0.178240077179.issue39679@roundup.psfhosted.org>
Message-ID: <1635436931.96.0.141191251876.issue39679@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 97388c204b557f30e48a2b2ef826868702204cf2 by Alex Waygood in branch '3.9':
[3.9] bpo-39679: Fix `singledispatchmethod` `classmethod`/`staticmethod` bug (GH-29087)
https://github.com/python/cpython/commit/97388c204b557f30e48a2b2ef826868702204cf2


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39679>
_______________________________________

From report at bugs.python.org  Thu Oct 28 12:03:07 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 16:03:07 +0000
Subject: [issue39679] functools: singledispatchmethod doesn't work with
 classmethod
In-Reply-To: <1582053375.25.0.178240077179.issue39679@roundup.psfhosted.org>
Message-ID: <1635436987.35.0.492704010805.issue39679@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks for the 3.9 fix, Alex! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39679>
_______________________________________

From report at bugs.python.org  Thu Oct 28 12:14:45 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 16:14:45 +0000
Subject: [issue45629] Tools/freeze needs tests in the test suite.
In-Reply-To: <1635349332.56.0.690000934648.issue45629@roundup.psfhosted.org>
Message-ID: <1635437685.01.0.930849857633.issue45629@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:


New changeset 13d9205f4057eeeef80a25d410ad123876dc60cd by Eric Snow in branch 'main':
bpo-45629: Add a test for the "freeze" tool. (gh-29222)
https://github.com/python/cpython/commit/13d9205f4057eeeef80a25d410ad123876dc60cd


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45629>
_______________________________________

From report at bugs.python.org  Thu Oct 28 12:15:24 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 16:15:24 +0000
Subject: [issue45629] Tools/freeze needs tests in the test suite.
In-Reply-To: <1635349332.56.0.690000934648.issue45629@roundup.psfhosted.org>
Message-ID: <1635437724.35.0.701232933182.issue45629@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45629>
_______________________________________

From report at bugs.python.org  Thu Oct 28 12:47:19 2021
From: report at bugs.python.org (Kier Davis)
Date: Thu, 28 Oct 2021 16:47:19 +0000
Subject: [issue45650] cgitb does not emit CGI headers when format='text'
Message-ID: <1635439639.23.0.69927337911.issue45650@roundup.psfhosted.org>


New submission from Kier Davis <me at kierdavis.com>:

## Context ##

* Python is executing a script on behalf of a web server (e.g. Apache httpd) following the CGI protocol.
* cgitb is enabled and configured to use the 'text' format.
* An unhandled exception occurs before any CGI response headers have been emitted.


## Expected behaviour ##

A valid response is returned from the CGI script to the web server and ultimately to the client.


## Observed behaviour ##

The response is rejected by the web server because it does not begin with a valid CGI header block.

    [cgi:error] [pid xxxxx] [client xxx.xxx.xxx.xxx:xxxxx] malformed header from script 'web.py': Bad header: <p>A problem occurred in a Pyt

Any traceback info included (if display=1) gets discarded and the web server returns its own Internal Server Error response instead.


## Comments ##

A valid response is observed if format='html'. This bug only concerns format='text'.
The behaviour is the same regardless of whether display=0 or display=1.

I imagine this is because cgitb.reset (which emits the headers) is only called when format='html'.
We could resolve this by always calling cgitb.reset regardless of the format, or by introducing separate text-format and HTML-format versions of cgitb.reset.
I'm happy to prepare a patch if you agree on the approach.

----------
components: Library (Lib)
files: repro_cgitb_not_emitting_headers_in_text_mode.py
messages: 405198
nosy: kierdavis
priority: normal
severity: normal
status: open
title: cgitb does not emit CGI headers when format='text'
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/file50409/repro_cgitb_not_emitting_headers_in_text_mode.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45650>
_______________________________________

From report at bugs.python.org  Thu Oct 28 13:06:24 2021
From: report at bugs.python.org (Pablo Galindo Salgado)
Date: Thu, 28 Oct 2021 17:06:24 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1635440784.21.0.617406114532.issue45562@roundup.psfhosted.org>


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:


New changeset cdc7a5827754bec83970bb052d410d55f85b3fff by Pablo Galindo Salgado in branch 'main':
bpo-45562: Ensure all tokenizer debug messages are printed to stderr (GH-29270)
https://github.com/python/cpython/commit/cdc7a5827754bec83970bb052d410d55f85b3fff


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Thu Oct 28 13:06:34 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 17:06:34 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1635440794.49.0.880701732459.issue45562@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27538
pull_request: https://github.com/python/cpython/pull/29275

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Thu Oct 28 13:09:04 2021
From: report at bugs.python.org (penguin_wwy)
Date: Thu, 28 Oct 2021 17:09:04 +0000
Subject: [issue45630] Dump CodeObject API for debugging
In-Reply-To: <1635349665.14.0.891838928636.issue45630@roundup.psfhosted.org>
Message-ID: <1635440944.48.0.00876540963877.issue45630@roundup.psfhosted.org>


penguin_wwy <940375606 at qq.com> added the comment:

This interface can dump code at any time, not just at compile time.

Can observe the comparison before and after dynamic optimization(eg. specialize and super instr), and can also observe the instructions actually executed.

Another situation is to execute the dump by command line in gdb/lldb(eg. `expression _PyCode_DebugDump(co, "test")`), when debugging.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45630>
_______________________________________

From report at bugs.python.org  Thu Oct 28 13:09:35 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 17:09:35 +0000
Subject: [issue45651] -X frozen_modules not defaulting to "on" on Windows?
Message-ID: <1635440975.82.0.890486444721.issue45651@roundup.psfhosted.org>


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

(forked from https://bugs.python.org/issue45020#msg404344)

On Mon, Oct 18, 2021 at 7:14 PM Guido van Rossum <report at bugs.python.org> wrote:
> I built on Windows with default options (PCbuild\build.bat) and it looks like the frozen modules are used by default even though I am running in the source directory. (I put a printf() call in unmarshal_frozen_code().)

We need to verify if this is still the case.  First we need to make sure there's a test that checks the default (both when running out of the source tree and when not).  I suspect the case Guido observed hasn't been fixed yet.

----------
components: Interpreter Core
messages: 405201
nosy: FFY00, eric.snow
priority: normal
severity: normal
status: open
title: -X frozen_modules not defaulting to "on" on Windows?
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45651>
_______________________________________

From report at bugs.python.org  Thu Oct 28 13:10:34 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 28 Oct 2021 17:10:34 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1635441034.67.0.454662337135.issue45562@roundup.psfhosted.org>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

Thanks, Pablo :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Thu Oct 28 13:10:42 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 17:10:42 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <CALFfu7B_=ExxDr_uQYeZGkGXeTok1UjCxfn7XT2bm4axEyY25Q@mail.gmail.com>
Message-ID: <CALFfu7BWz2DSShUK308BowTVeYfS7RyG5mxTS=kRJ6uQz5k4_A@mail.gmail.com>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

On Mon, Oct 18, 2021 at 7:14 PM Guido van Rossum <report at bugs.python.org> wrote:
> Is gh-28940 only for UNIX?
> I built on Windows with default options (PCbuild\build.bat) and it looks like the frozen modules are used by default even though I am running in the source directory. (I put a printf() call in unmarshal_frozen_code().)

FYI, I opened https://bugs.python.org/issue45651 for sorting this out.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Thu Oct 28 13:11:25 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 17:11:25 +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: <1635441085.21.0.537688534975.issue45651@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
title: -X frozen_modules not defaulting to "on" on Windows? -> -X frozen_modules not defaulting to "off" on Windows when running in source tree?

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45651>
_______________________________________

From report at bugs.python.org  Thu Oct 28 13:15:22 2021
From: report at bugs.python.org (Ned Deily)
Date: Thu, 28 Oct 2021 17:15: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: <1635441322.62.0.601964092197.issue44828@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:

> Here is one more attempt, hopefully the final one.

I think we have a winner! The issues I've seen all seem to be resolved in this latest round. Thank you, Marc! For the record, my testing for this has been very rudimentary manual testing so I'm certainly not saying there aren't other problems that we haven't run into yet but I'm reasonably confident that, with this Tk fix applied, IDLE behavior with python.org Pythons should be similar on macOS 12 Monterey to macOS 11 Big Sur.

I'm going to merge this Tk patch into our macOS installer build scripts and plan to release it in 3.9.8 which is scheduled for next week. And I'm working with the rest of the release team on how best to provide this fix for 3.10 since 3.10.1 is not planned for another month. I'll also try to test with the Tk 8.6.12 branch soon.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Thu Oct 28 13:21:47 2021
From: report at bugs.python.org (Eryk Sun)
Date: Thu, 28 Oct 2021 17:21:47 +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: <1635441707.61.0.894467505391.issue30082@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

> is it feasible to just have one option that handles all cases?

I'm in favor of whatever has broad support and is least surprising for users. I like CREATE_NO_WINDOW, which is restricted to console applications. The alternative is hiding the window, like what we do with shell=True. But the new option would also hide the main window of many GUI apps, which may come as a surprise and is hardly ever desired behavior.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Thu Oct 28 13:23:48 2021
From: report at bugs.python.org (Jason R. Coombs)
Date: Thu, 28 Oct 2021 17:23:48 +0000
Subject: [issue45649] Add tarinfo.Path
In-Reply-To: <1635436761.88.0.225530702286.issue45649@roundup.psfhosted.org>
Message-ID: <1635441828.37.0.355140096071.issue45649@roundup.psfhosted.org>


Jason R. Coombs <jaraco at jaraco.com> added the comment:

I vaguely recall exploring this concept and finding that tarfiles don?t supply the requisite interface because they?re not random access. I?m only 10% confident in that recollection, so worth exploring.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45649>
_______________________________________

From report at bugs.python.org  Thu Oct 28 13:25:03 2021
From: report at bugs.python.org (Ned Deily)
Date: Thu, 28 Oct 2021 17:25: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: <1635441903.01.0.961713930814.issue44828@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
pull_requests: +27539
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29276

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Thu Oct 28 13:25:05 2021
From: report at bugs.python.org (Mark Shannon)
Date: Thu, 28 Oct 2021 17:25:05 +0000
Subject: [issue45522] Allow to build Python without freelists
In-Reply-To: <1634641564.68.0.977403045358.issue45522@roundup.psfhosted.org>
Message-ID: <1635441905.94.0.551051628897.issue45522@roundup.psfhosted.org>


Mark Shannon <mark at hotpy.org> added the comment:

I think we should revert this. It just makes working with freelists more cumbersome. Having more configure options just makes it more likely that we will fail to test some configuration.

If you want to disable freelists in your experiments, feel free to do so, but it doesn't need to be in main, IMO.

----------
nosy: +Mark.Shannon

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45522>
_______________________________________

From report at bugs.python.org  Thu Oct 28 13:27:32 2021
From: report at bugs.python.org (Marc Culler)
Date: Thu, 28 Oct 2021 17:27: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: <1635442052.95.0.311478141989.issue44828@roundup.psfhosted.org>


Marc Culler <marc.culler at gmail.com> added the comment:

That is great news!  I will now merge the changes into the Tk core-8-6-branch and core-8-6-12-rc branches.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Thu Oct 28 13:45:28 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 17:45:28 +0000
Subject: [issue45652] co_filename does not match __file__ for frozen stdlib
 modules
Message-ID: <1635443127.89.0.781576963083.issue45652@roundup.psfhosted.org>


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

Frozen modules currently have co_filename set to "<frozen NAME>".  It would be good to have it match __file__ instead.  This will require require also fixing any code objects in the module's co_consts (and so on).  It may make sense to take care of the while unmarshaling, but could be done (less efficiently) after the fact.

----------
components: Interpreter Core
messages: 405209
nosy: FFY00, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: co_filename does not match __file__ for frozen stdlib modules
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45652>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:08:11 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Thu, 28 Oct 2021 18:08:11 +0000
Subject: [issue45649] Add tarinfo.Path
In-Reply-To: <1635436761.88.0.225530702286.issue45649@roundup.psfhosted.org>
Message-ID: <1635444491.92.0.947131800867.issue45649@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

That is good to know. This isn't very high on my priority list, but I will try to explore when I have some time.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45649>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:11:52 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 18:11:52 +0000
Subject: [issue45653] Freeze the encodings module.
Message-ID: <1635444712.46.0.923300343963.issue45653@roundup.psfhosted.org>


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

Currently we freeze all the modules imported during runtime initialization, except for the encodings module.  It has a lot of submodules and this results in a lot of extra noise in builds.  We hadn't frozen it yet because we were still ironing out changes related to frozen modules and the extra noise was a pain.  We also waited because we weren't sure if we should freeze all the submodules or just the most likely ones to be used during startup.  In the case of the latter, we were also blocked on having __path__ set on the package.

At this point there are no blockers.  So we should freeze the encodings modules with either all submodules or the most commonly used subset.

----------
components: Build
messages: 405211
nosy: FFY00, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Freeze the encodings module.
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45653>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:13:50 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 18:13:50 +0000
Subject: [issue45654] Freeze the runpy module.
Message-ID: <1635444830.43.0.574749380857.issue45654@roundup.psfhosted.org>


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

Currently we are freezing the modules that are imported during startup.  However, if someone uses "python -m module" then the runtime imports the runpy module and uses it.  Given that this case is quite common, runpy and its dependencies should be frozen.

----------
components: Build
messages: 405212
nosy: FFY00, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Freeze the runpy module.
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45654>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:15:15 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 28 Oct 2021 18:15:15 +0000
Subject: [issue45653] Freeze the encodings module.
In-Reply-To: <1635444712.46.0.923300343963.issue45653@roundup.psfhosted.org>
Message-ID: <a30091f3-3d1f-6be0-63fd-044ccfc0cd7e@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

encodings is a package. I think you first have to check whether mixing
frozen and non-frozen submodules are even supported. I've never tried
having only part of a package frozen.

Freezing the whole package certainly works.

----------
nosy: +lemburg

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45653>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:19:11 2021
From: report at bugs.python.org (Joe Wells)
Date: Thu, 28 Oct 2021 18:19: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: <1635445151.02.0.621157025631.issue43656@roundup.psfhosted.org>


Joe Wells <bugs-python-org at jbw.link> added the comment:

1. As background, it is worth remembering that a major motivation for why FrameSummary.__init__ stringifies the local variable values in its parameter locals is to prevent the resulting data structure from keeping those values live.  This enables them to be garbage collected.

2. It has been suggested that TracebackException.__init__ or StackSummary.extract could be given a function parameter.  This could either be a new parameter or could involve using the existing capture_locals parameter with a non-bool.  The purpose of this suggestion is to allow customizing the use of repr to stringify local variable values.  If this suggestion is followed, it would be quite useful if this function parameter was given not just the local variable values, but also the name of the local variable and maybe also the stack frame it is in.  This would enable filtering out undesired variables.  For example, I would usually prefer to filter most of the variables from the __main__ module frame, because they are just noise that makes it hard to see the important details.  Some ability to filter would also help with the security issue that is discussed in issue 23597 that Irit pointed to.

3. I doubt that new students will be setting up calls to TracebackException or modifying sys.excepthook on their own.  Although a simple interface is clearly good, it might be more important to have an interface that maximizes the usefulness of the feature.

4. I no longer have the tracebacks my students were getting.  You can look at the traceback from the example in msg 404319 for a traceback.  While I was debugging this, I got much more complicated tracebacks because two of the classes in traceback.py also throw exceptions during their __init__ method that leave the not-yet-initialized object in a repr-will-raise-an-exception state.  Despite having decades of programming experience, it actually took me a long time before I realized that the exceptions I was debugging were junk exceptions due to attempts to call repr on not-yet-initialized objects.  I think figuring this out would be extremely challenging for my second-year undergraduate students.

5. If one of the calls to repr in FrameSummary.__init__ raises an exception, this prevents all the other local variable values from being inspected.  If it is desired to report local variable values that cause repr to raise an exception, then it would be good to collect all such exceptions, which requires handling each exception and then continuing to traverse the traceback stack.  Because of point 1 above, it might often be best to turn each such exception into a string.  To avoid infinite loops in the debugging/logging tools, it would often be best not to attempt to traverse the traceback stack of each of these extra exceptions.  If this argument is a good argument, this seems to mean that my most recent proposed fix is a good balance.

6. It is not clear if there is a reliable way to detect whether repr raises an exception due to an object's initialization having been interrupted, but all of the failures that I observed of this sort were for the variable name ?self?.  In one case, the repr failure was for a normal local variable of an __new__ method which was not a parameter of this method; the variable was named ?self? by convention, but this convention would be difficult to automatically verify.  In the two other cases, the repr failure was for a parameter named ?self? which was the first parameter of an __init__ method.  So it would help to give special treatment to the first parameter of __init__ methods, but this would not solve the problem for __new__ methods.

7. In some cases, it might be a bit complicated to ensure the object is always in a safe state for repr-ing during initialization.  This is because there may be many attributes that need to be modified and this is not generally done atomically.  One attribute could be designated to indicate that initialization is done, so that repr will be extra careful if that attribute does not have an expected value.  Given that this is only (so far) an issue for debuggers and traceback inspection tools, it is not clear how to motivate everyone who writes a __new__, __init__, or __repr__ method to do this safely.  Documentation can of course help.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:20:51 2021
From: report at bugs.python.org (Alex Waygood)
Date: Thu, 28 Oct 2021 18:20:51 +0000
Subject: [issue45655] List of PEPs at top of typing docs is too long to be
 readable
Message-ID: <1635445251.29.0.272820285555.issue45655@roundup.psfhosted.org>


New submission from Alex Waygood <Alex.Waygood at Gmail.com>:

The list of relevant PEPs at the top of the typing docs has become too long to be readable or helpful. It would be good if this information could be presented in a more structured way.

----------
assignee: docs at python
components: Documentation
messages: 405215
nosy: AlexWaygood, docs at python, gvanrossum, kj
priority: normal
severity: normal
status: open
title: List of PEPs at top of typing docs is too long to be readable
type: enhancement
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45655>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:22:20 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 18:22:20 +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: <1635445340.0.0.115044065067.issue44828@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27541
pull_request: https://github.com/python/cpython/pull/29278

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:22:14 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 18:22:14 +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: <1635445334.83.0.712899578037.issue44828@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 16.0 -> 17.0
pull_requests: +27540
pull_request: https://github.com/python/cpython/pull/29277

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:22:10 2021
From: report at bugs.python.org (Ned Deily)
Date: Thu, 28 Oct 2021 18:22: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: <1635445329.99.0.816257197538.issue44828@roundup.psfhosted.org>


Ned Deily <nad at python.org> added the comment:


New changeset be8318be05e1a874215fa75b8845ede74b2c69b6 by Ned Deily in branch 'main':
bpo-44828: Avoid tkinter file dialog failure on macOS 12 Monterey (GH-29276)
https://github.com/python/cpython/commit/be8318be05e1a874215fa75b8845ede74b2c69b6


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:22:25 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 18:22: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: <1635445345.14.0.880718584284.issue44828@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27542
pull_request: https://github.com/python/cpython/pull/29279

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:25:57 2021
From: report at bugs.python.org (Alex Waygood)
Date: Thu, 28 Oct 2021 18:25:57 +0000
Subject: [issue45655] List of PEPs at top of typing docs is too long to be
 readable
In-Reply-To: <1635445251.29.0.272820285555.issue45655@roundup.psfhosted.org>
Message-ID: <1635445557.86.0.630011386218.issue45655@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
keywords: +patch
pull_requests: +27543
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29280

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45655>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:27:12 2021
From: report at bugs.python.org (Samwyse)
Date: Thu, 28 Oct 2021 18:27:12 +0000
Subject: [issue45656] argparse bug: prefix_chars argument to
 add_argument_group doesn't really work
Message-ID: <1635445632.13.0.297943907791.issue45656@roundup.psfhosted.org>


New submission from Samwyse <samwyse at gmail.com>:

Using the prefix_chars argument to parser.add_argument_group causes usage information to print correctly, but the resulting parser doesn't recognize the options.  The included program reproduces the issue; it produces the following output on my system.

--- python version
3.6.8 (default, Sep 26 2019, 11:57:09)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
--- test using prefix_chars='-/' with ArgumentParser
--- show help info
usage: test-1 [-h] [-foo FOO] [/bar BAR]

optional arguments:
  -h, --help  show this help message and exit
  -foo FOO
  /bar BAR

--- try parsing something
Namespace(bar='b', foo='f')
--- test using prefix_chars='-/' with an argument group
--- show help info
usage: test-2 [-h] [-foo FOO] [/bar BAR]

optional arguments:
  -h, --help  show this help message and exit

other arguments:
  -foo FOO
  /bar BAR

--- try parsing something
usage: test-2 [-h] [-foo FOO] [/bar BAR]
test-2: error: unrecognized arguments: /bar b

----------
components: Library (Lib)
files: argparser-bug.py
messages: 405217
nosy: samwyse
priority: normal
severity: normal
status: open
title: argparse bug: prefix_chars argument to add_argument_group doesn't really work
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file50410/argparser-bug.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45656>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:27:45 2021
From: report at bugs.python.org (Ronald Pandolfi)
Date: Thu, 28 Oct 2021 18:27:45 +0000
Subject: [issue45657] Enum behavior when values are functions
Message-ID: <1635445665.36.0.256719462717.issue45657@roundup.psfhosted.org>


New submission from Ronald Pandolfi <ronpandolfi at gmail.com>:

Enum members assigned values that are functions don't remember those members. For example:

def my_func():
    ...
class Test(enum.Enum):
    a=1
    b=my_func
    
Test.__members__
Out[7]: mappingproxy({'a': <Test.a: 1>})
Test.b
Out[8]: <function __main__.my_func()>

Even though b doesn't show in __members__ it is still an attribute of the Enum.

----------
messages: 405218
nosy: ronpandolfi
priority: normal
severity: normal
status: open
title: Enum behavior when values are functions
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45657>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:37:14 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 18:37:14 +0000
Subject: [issue45658] Implement FrozenImporter.get_source()
In-Reply-To: <1635446209.12.0.0681665636182.issue45658@roundup.psfhosted.org>
Message-ID: <1635446234.23.0.0234908310497.issue45658@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

Note that once the get_source() implementation is done, the only missing method for importlib.abc.InspectLoader is source_to_code().  (See https://docs.python.org/3/library/importlib.html#importlib.abc.InspectLoader.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45658>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:36:49 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 18:36:49 +0000
Subject: [issue45658] Implement FrozenImporter.get_source()
Message-ID: <1635446209.12.0.0681665636182.issue45658@roundup.psfhosted.org>


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

FrozenImporter (in Lib/importlib/_bootstrap.py) has a get_source() method but it always returns None.  Now that __file__ is set on frozen (stdlib) modules, we can implement FrozenImporter.get_source() appropriately.

----------
components: Library (Lib)
messages: 405219
nosy: FFY00, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Implement FrozenImporter.get_source()
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45658>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:40:14 2021
From: report at bugs.python.org (Brandt Bucher)
Date: Thu, 28 Oct 2021 18:40:14 +0000
Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP
In-Reply-To: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org>
Message-ID: <1635446414.05.0.828407828447.issue45636@roundup.psfhosted.org>


Brandt Bucher <brandtbucher at gmail.com> added the comment:

Slower (29):
- unpack_sequence: 43.7 ns +- 0.9 ns -> 45.7 ns +- 1.1 ns: 1.04x slower
- float: 80.5 ms +- 0.9 ms -> 83.5 ms +- 1.3 ms: 1.04x slower
- regex_effbot: 3.15 ms +- 0.03 ms -> 3.26 ms +- 0.04 ms: 1.04x slower
- go: 165 ms +- 1 ms -> 171 ms +- 3 ms: 1.03x slower
- pickle_dict: 26.8 us +- 0.1 us -> 27.5 us +- 0.1 us: 1.03x slower
- scimark_monte_carlo: 77.5 ms +- 0.8 ms -> 79.3 ms +- 1.3 ms: 1.02x slower
- sqlalchemy_imperative: 18.6 ms +- 0.5 ms -> 18.9 ms +- 0.9 ms: 1.02x slower
- chaos: 76.7 ms +- 0.7 ms -> 78.1 ms +- 0.8 ms: 1.02x slower
- logging_format: 6.73 us +- 0.09 us -> 6.84 us +- 0.08 us: 1.02x slower
- richards: 56.9 ms +- 0.9 ms -> 57.7 ms +- 1.0 ms: 1.01x slower
- chameleon: 7.48 ms +- 0.10 ms -> 7.58 ms +- 0.12 ms: 1.01x slower
- json_loads: 25.4 us +- 0.2 us -> 25.7 us +- 0.2 us: 1.01x slower
- sympy_expand: 501 ms +- 5 ms -> 507 ms +- 4 ms: 1.01x slower
- logging_silent: 116 ns +- 3 ns -> 117 ns +- 2 ns: 1.01x slower
- django_template: 37.2 ms +- 0.5 ms -> 37.7 ms +- 0.4 ms: 1.01x slower
- regex_v8: 23.2 ms +- 0.1 ms -> 23.4 ms +- 0.3 ms: 1.01x slower
- regex_dna: 212 ms +- 1 ms -> 214 ms +- 1 ms: 1.01x slower
- xml_etree_process: 59.1 ms +- 0.6 ms -> 59.6 ms +- 0.6 ms: 1.01x slower
- xml_etree_generate: 80.4 ms +- 0.7 ms -> 81.2 ms +- 0.8 ms: 1.01x slower
- scimark_lu: 138 ms +- 3 ms -> 140 ms +- 3 ms: 1.01x slower
- logging_simple: 6.15 us +- 0.08 us -> 6.20 us +- 0.09 us: 1.01x slower
- regex_compile: 144 ms +- 2 ms -> 145 ms +- 1 ms: 1.01x slower
- spectral_norm: 107 ms +- 1 ms -> 108 ms +- 2 ms: 1.01x slower
- 2to3: 271 ms +- 1 ms -> 272 ms +- 1 ms: 1.00x slower
- sympy_integrate: 22.0 ms +- 0.2 ms -> 22.1 ms +- 0.1 ms: 1.00x slower
- sympy_str: 303 ms +- 4 ms -> 304 ms +- 3 ms: 1.00x slower
- dulwich_log: 67.6 ms +- 0.3 ms -> 67.8 ms +- 0.3 ms: 1.00x slower
- python_startup_no_site: 5.90 ms +- 0.00 ms -> 5.91 ms +- 0.01 ms: 1.00x slower
- python_startup: 8.51 ms +- 0.01 ms -> 8.52 ms +- 0.01 ms: 1.00x slower

Faster (13):
- pickle_list: 4.48 us +- 0.04 us -> 4.31 us +- 0.03 us: 1.04x faster
- scimark_fft: 355 ms +- 10 ms -> 348 ms +- 3 ms: 1.02x faster
- nqueens: 90.1 ms +- 0.7 ms -> 88.3 ms +- 0.8 ms: 1.02x faster
- xml_etree_iterparse: 107 ms +- 3 ms -> 105 ms +- 2 ms: 1.02x faster
- nbody: 115 ms +- 2 ms -> 113 ms +- 3 ms: 1.02x faster
- fannkuch: 427 ms +- 4 ms -> 420 ms +- 4 ms: 1.02x faster
- unpickle_list: 5.05 us +- 0.04 us -> 4.96 us +- 0.06 us: 1.02x faster
- telco: 6.38 ms +- 0.25 ms -> 6.29 ms +- 0.13 ms: 1.01x faster
- json_dumps: 12.6 ms +- 0.1 ms -> 12.5 ms +- 0.1 ms: 1.01x faster
- pyflate: 539 ms +- 9 ms -> 533 ms +- 3 ms: 1.01x faster
- crypto_pyaes: 87.5 ms +- 0.6 ms -> 86.6 ms +- 1.2 ms: 1.01x faster
- raytrace: 331 ms +- 2 ms -> 330 ms +- 2 ms: 1.00x faster
- mako: 11.9 ms +- 0.1 ms -> 11.9 ms +- 0.1 ms: 1.00x faster

Benchmark hidden because not significant (16): deltablue, hexiom, meteor_contest, pathlib, pickle, pickle_pure_python, pidigits, scimark_sor, scimark_sparse_mat_mult, sqlalchemy_declarative, sqlite_synth, sympy_sum, tornado_http, unpickle, unpickle_pure_python, xml_etree_parse

Geometric mean: 1.00x slower

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45636>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:42:40 2021
From: report at bugs.python.org (Alex Waygood)
Date: Thu, 28 Oct 2021 18:42:40 +0000
Subject: [issue45657] Enum behavior when values are functions
In-Reply-To: <1635445665.36.0.256719462717.issue45657@roundup.psfhosted.org>
Message-ID: <1635446560.68.0.555987502611.issue45657@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

It would be difficult to define methods in Enum classes if functions in the class namespace were automatically converted into members. You can get around this by wrapping your functions in `functools.partial` objects; see https://stackoverflow.com/questions/40338652/how-to-define-enum-values-that-are-functions.

----------
nosy: +AlexWaygood, ethan.furman

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45657>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:43:13 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 18:43:13 +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: <1635446593.76.0.651985833152.issue44828@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 54579087c69f95531cbe7a97401c67f104a3e52f by Miss Islington (bot) in branch '3.10':
bpo-44828: Avoid tkinter file dialog failure on macOS 12 Monterey (GH-29276)
https://github.com/python/cpython/commit/54579087c69f95531cbe7a97401c67f104a3e52f


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:48:05 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 18:48:05 +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: <1635446885.35.0.259985544877.issue44828@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 8e5e74e3049875e9d834fe4408263676fe21e890 by Miss Islington (bot) in branch '3.9':
bpo-44828: Avoid tkinter file dialog failure on macOS 12 Monterey (GH-29276)
https://github.com/python/cpython/commit/8e5e74e3049875e9d834fe4408263676fe21e890


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Thu Oct 28 14:52:00 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 18:52:00 +0000
Subject: [issue45659] Add FrozenImporter.get_filename().
Message-ID: <1635447120.3.0.343001717774.issue45659@roundup.psfhosted.org>


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

Now that __file__ is set on frozen (stdlib) modules, we can add an implementation for FrozenImporter.get_filename().  This would make FrozenImporter and implementation of ExecutionLoader. [1]

There is a caveat: in spec_from_loader() [2] we infer the presence of get_filename() to mean the loader is file-based, which FrozenImporter isn't. 
 In that case we call spec_from_file_location() [3], which should not be used for frozen modules.  Most importantly, spec.origin for frozen modules should remain "frozen", spec.cached should remain None, and spec.has_location should remain False.  That's because the module was imported frozen and not from a file (even though it originated in a file).


[1] https://docs.python.org/3/library/importlib.html#importlib.abc.ExecutionLoader
[2] in Lib/import/_bootstrap.py
[3] in Lib/import/_bootstrap_external.py

----------
components: Library (Lib)
messages: 405225
nosy: FFY00, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Add FrozenImporter.get_filename().
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45659>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:00:44 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 19:00:44 +0000
Subject: [issue45659] Add FrozenImporter.get_filename().
In-Reply-To: <1635447120.3.0.343001717774.issue45659@roundup.psfhosted.org>
Message-ID: <1635447644.66.0.982309157746.issue45659@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

Note that there isn't any intent currently to implement the FileLoader ABC [1], which would require having FrozenImporter instances, adding the "name" and "path" attributes to them, as well as the get_data() method.  The same goes for the SourceLoader ABC. [2]

Again, frozen modules don't have files but instead were only derived from files during the build process.  For frozen stdlib modules we happen to know where to find the corresponding source files.


[1] https://docs.python.org/3/library/importlib.html#importlib.abc.FileLoader
[2] https://docs.python.org/3/library/importlib.html#importlib.abc.SourceLoader

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45659>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:03:00 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 28 Oct 2021 19:03:00 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1635368292.6.0.657626546162.issue45548@roundup.psfhosted.org>
Message-ID: <a23632d1-e208-efa6-e59c-491fc83968d1@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 27.10.2021 22:58, Brett Cannon wrote:
> 
> Brett Cannon <brett at python.org> added the comment:
> 
>> Could Brett or you please add those notes back ? There's no other place
> where such details are documented.
> 
> It really depends on what "details" you're referring to.

I had already listed some of those details.

> Most of what I removed were things like "Module by <person>", or saying _json.c is for "json accelerator" which is obvious to me. Anything that seemed pertinent to compilation I left in.
> 
> So if there's something you specifically want to add back in that you think is important then please feel free to as I'm done editing the file for my purposes at the moment.

Will do.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:08:33 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 19:08:33 +0000
Subject: [issue21736] Add __file__ attribute to frozen modules
In-Reply-To: <1402589689.02.0.501075866976.issue21736@psf.upfronthosting.co.za>
Message-ID: <1635448113.14.0.99583474959.issue21736@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

I've opened the following issues related to frozen stdlib modules:

https://bugs.python.org/issue45652
https://bugs.python.org/issue45658
https://bugs.python.org/issue45659

Again, I'm leaving this issue open to deal with the broader question of frozen modules outside the stdlib, where the solution isn't so obvious.  The question of targeting the FileLoader (or SourceLoader) ABC should probably be handled separately.  (Note that bpo-45020 has some related discussion.)

----------
type:  -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21736>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:08:46 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 19:08:46 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635448126.72.0.943919954702.issue45618@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset f2407144347fafcd69c2ade41b5d9c3fb07b59ef by Ned Deily in branch '3.8':
[3.9] bpo-45618: Fix documentation build by pinning Docutils version to 0.17.1 (GH-29230) (GH-29241) (GH-29245)
https://github.com/python/cpython/commit/f2407144347fafcd69c2ade41b5d9c3fb07b59ef


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:10:19 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 19:10:19 +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: <1635448219.52.0.680250416513.issue44828@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset f19c1a115f782036edac306de0f3f9968c1e1fd6 by Miss Islington (bot) in branch '3.8':
bpo-44828: Avoid tkinter file dialog failure on macOS 12 Monterey (GH-29276) (GH-29279)
https://github.com/python/cpython/commit/f19c1a115f782036edac306de0f3f9968c1e1fd6


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:17:10 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 19:17:10 +0000
Subject: [issue45660] Freeze the argparse module.
Message-ID: <1635448630.65.0.970845991528.issue45660@roundup.psfhosted.org>


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

(See https://bugs.python.org/issue45020#msg402116.)

On Fri, Sep 17, 2021 at 7:56 PM Raymond Hettinger <report at bugs.python.org> wrote:
> It would be nice to freeze argparse.py and its dependencies.  For command-line tools, startup time is important.

This would include freezing the modules that argparse depends on, etc.

----------
components: Build
messages: 405231
nosy: FFY00, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Freeze the argparse module.
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45660>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:23:04 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 19:23:04 +0000
Subject: [issue28737] Document that tp_dealloc handler must call
 PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set
In-Reply-To: <1479487656.43.0.616591816842.issue28737@psf.upfronthosting.co.za>
Message-ID: <1635448984.84.0.517481913353.issue28737@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 9e0012116ac9e8d26bf19ef8741deeecf2b6f72b by Sam Gross in branch '3.10':
[3.10] bpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() (GH-29246) (GH-29249)
https://github.com/python/cpython/commit/9e0012116ac9e8d26bf19ef8741deeecf2b6f72b


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28737>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:23:23 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 19:23:23 +0000
Subject: [issue28737] Document that tp_dealloc handler must call
 PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set
In-Reply-To: <1479487656.43.0.616591816842.issue28737@psf.upfronthosting.co.za>
Message-ID: <1635449003.25.0.856446673012.issue28737@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 193504acf3bfb7cff1edf7f568c2405b857fa1f7 by Miss Islington (bot) in branch '3.9':
bpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() (GH-29246) (GH-29248)
https://github.com/python/cpython/commit/193504acf3bfb7cff1edf7f568c2405b857fa1f7


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28737>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:23:51 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 19:23:51 +0000
Subject: [issue28737] Document that tp_dealloc handler must call
 PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set
In-Reply-To: <1479487656.43.0.616591816842.issue28737@psf.upfronthosting.co.za>
Message-ID: <1635449031.74.0.818684696148.issue28737@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Sam! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28737>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:26:56 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 19:26:56 +0000
Subject: [issue45654] Freeze the runpy module.
In-Reply-To: <1635444830.43.0.574749380857.issue45654@roundup.psfhosted.org>
Message-ID: <1635449216.32.0.343398163742.issue45654@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

(See https://bugs.python.org/issue45020#msg402118.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45654>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:35:58 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 19:35:58 +0000
Subject: [issue45608] [sqlite3] some DB-API attributes are undocumented
In-Reply-To: <1635198000.59.0.313242486667.issue45608@roundup.psfhosted.org>
Message-ID: <1635449758.82.0.23218877455.issue45608@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +27544
pull_request: https://github.com/python/cpython/pull/29281

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45608>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:35:54 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 19:35:54 +0000
Subject: [issue45608] [sqlite3] some DB-API attributes are undocumented
In-Reply-To: <1635198000.59.0.313242486667.issue45608@roundup.psfhosted.org>
Message-ID: <1635449754.92.0.0904676405778.issue45608@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 88d8a1a340fb09c54d47f354f5fd7d4fbc5f0c78 by Erlend Egeberg Aasland in branch 'main':
bpo-45608: Document missing `sqlite3` DB-API attributes and methods (GH-29219)
https://github.com/python/cpython/commit/88d8a1a340fb09c54d47f354f5fd7d4fbc5f0c78


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45608>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:36:03 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 19:36:03 +0000
Subject: [issue45608] [sqlite3] some DB-API attributes are undocumented
In-Reply-To: <1635198000.59.0.313242486667.issue45608@roundup.psfhosted.org>
Message-ID: <1635449763.71.0.381147867438.issue45608@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27545
pull_request: https://github.com/python/cpython/pull/29282

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45608>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:38:22 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 19:38:22 +0000
Subject: [issue45604] multiprocessing.log_to_stderr missing documentation for
 parameter
In-Reply-To: <1635172489.58.0.649582586734.issue45604@roundup.psfhosted.org>
Message-ID: <1635449902.61.0.17363142009.issue45604@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +27546
pull_request: https://github.com/python/cpython/pull/29283

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45604>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:38:26 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 19:38:26 +0000
Subject: [issue45604] multiprocessing.log_to_stderr missing documentation for
 parameter
In-Reply-To: <1635172489.58.0.649582586734.issue45604@roundup.psfhosted.org>
Message-ID: <1635449906.98.0.629705549906.issue45604@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27547
pull_request: https://github.com/python/cpython/pull/29284

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45604>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:38:18 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 19:38:18 +0000
Subject: [issue45604] multiprocessing.log_to_stderr missing documentation for
 parameter
In-Reply-To: <1635172489.58.0.649582586734.issue45604@roundup.psfhosted.org>
Message-ID: <1635449898.14.0.835636487657.issue45604@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 1fb968c07a76fb2d1ec8c14a0026f1d15828f4a5 by Nikita Sobolev in branch 'main':
bpo-45604: add `level` argument to `multiprocessing.log_to_stderr` func (GH-29226)
https://github.com/python/cpython/commit/1fb968c07a76fb2d1ec8c14a0026f1d15828f4a5


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45604>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:39:14 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Thu, 28 Oct 2021 19:39:14 +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: <1635449954.63.0.216688269209.issue45651@roundup.psfhosted.org>


Change by Guido van Rossum <guido at python.org>:


----------
nosy: +gvanrossum

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45651>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:39:22 2021
From: report at bugs.python.org (Martin)
Date: Thu, 28 Oct 2021 19:39:22 +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: <1635449962.55.0.908214815191.issue43656@roundup.psfhosted.org>


Martin <martin.schroeder at nerdluecht.de> added the comment:

Once again a very good summary, thanks Joe!

> it would be quite useful if this function parameter was given not just the local variable values, but also the name of the local variable and maybe also the stack frame it is in

So this would be something like `format_locals(filename, lineno, name, locals) -> dict[str,str]` that could be used inside FrameSummary.__init__. I like that!

I wouldn't bother with detecting un-repr-able objects in Python itself, but if the above `format_locals` was implemented, you could easily prepare such a formatter for your students that hides `self` et al. and/or catch exceptions during `repr` to your liking.

What is needed to get an OK for such a change?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:39:40 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 19:39:40 +0000
Subject: [issue45661] [meta] Freeze commonly used stdlib modules.
Message-ID: <1635449980.31.0.181297451997.issue45661@roundup.psfhosted.org>


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

We're already freezing modules needed for bootstrapping the runtime, as well as the modules imported during startup. [1][2]  We're also planning on freezing argparse. [3]  There may be other modules (or files) worth freezing (assuming we don't just freeze the entire stdlib, which would have some potential downsides).

This issue is meant to cover the broader idea.  The work to actually freeze modules should be handled in separate issues.


[1] https://bugs.python.org/issue45020
[2] https://bugs.python.org/issue45654
[3] https://bugs.python.org/issue45660

----------
components: Build
messages: 405239
nosy: FFY00, eric.snow
priority: normal
severity: normal
status: open
title: [meta] Freeze commonly used stdlib modules.
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45661>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:44:19 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 19:44:19 +0000
Subject: [issue45661] [meta] Freeze commonly used stdlib modules.
In-Reply-To: <1635449980.31.0.181297451997.issue45661@roundup.psfhosted.org>
Message-ID: <1635450259.02.0.157072813596.issue45661@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

One to consider that isn't necessarily used that commonly is sysconfig.  However, that could also involve freezing the "sysconfigdata" file (without needing to expose it as a module).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45661>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:46:03 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 28 Oct 2021 19:46:03 +0000
Subject: [issue45662] Incorrect repr of InitVar of a type alias
Message-ID: <1635450363.22.0.969198768309.issue45662@roundup.psfhosted.org>


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

The repr of InitVar preserves type aliases from the typing module, but not builtin.

>>> import typing, dataclasses
>>> dataclasses.InitVar[typing.List[int]]
dataclasses.InitVar[typing.List[int]]
>>> dataclasses.InitVar[list[int]]
dataclasses.InitVar[list]

----------
components: Library (Lib)
messages: 405241
nosy: eric.smith, gvanrossum, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Incorrect repr of InitVar of a type alias
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45662>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:48:55 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 19:48:55 +0000
Subject: [issue45583] Documentation of int() in datamodel.rst is out of date
In-Reply-To: <1634949605.24.0.0641435404763.issue45583@roundup.psfhosted.org>
Message-ID: <1635450535.84.0.752452344934.issue45583@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27550
pull_request: https://github.com/python/cpython/pull/29287

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45583>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:48:46 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 19:48:46 +0000
Subject: [issue45583] Documentation of int() in datamodel.rst is out of date
In-Reply-To: <1634949605.24.0.0641435404763.issue45583@roundup.psfhosted.org>
Message-ID: <1635450526.79.0.755893974316.issue45583@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +27548
pull_request: https://github.com/python/cpython/pull/29285

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45583>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:48:51 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 19:48:51 +0000
Subject: [issue45583] Documentation of int() in datamodel.rst is out of date
In-Reply-To: <1634949605.24.0.0641435404763.issue45583@roundup.psfhosted.org>
Message-ID: <1635450531.18.0.914318880677.issue45583@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27549
pull_request: https://github.com/python/cpython/pull/29286

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45583>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:48:42 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 19:48:42 +0000
Subject: [issue45583] Documentation of int() in datamodel.rst is out of date
In-Reply-To: <1634949605.24.0.0641435404763.issue45583@roundup.psfhosted.org>
Message-ID: <1635450522.6.0.11374003389.issue45583@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset d9c1868c25ec6466e8d8ae21fe9315a8a03836ab by Arthur Milchior in branch 'main':
bpo-45583: Correct datamodel documentation of int() (GH-29182)
https://github.com/python/cpython/commit/d9c1868c25ec6466e8d8ae21fe9315a8a03836ab


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45583>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:52:01 2021
From: report at bugs.python.org (Raymond Xu)
Date: Thu, 28 Oct 2021 19:52:01 +0000
Subject: [issue35540] dataclasses.asdict breaks with defaultdict fields
In-Reply-To: <1545257204.19.0.788709270274.issue35540@psf.upfronthosting.co.za>
Message-ID: <1635450721.69.0.570232734771.issue35540@roundup.psfhosted.org>


Raymond Xu <raymond.y.xu at gmail.com> added the comment:

I am seeing this bug with 3.9.7

----------
nosy: +greenfish6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35540>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:52:39 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 19:52:39 +0000
Subject: [issue45020] Freeze all modules imported during startup.
In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org>
Message-ID: <1635450759.82.0.039702428271.issue45020@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

I consider this done.  There is some lingering follow-up work, for which I've created a number of issues:

* https://bugs.python.org/issue45396 - -X frozen_modules=off ignores custom frozen modules
* https://bugs.python.org/issue45395 - custom modules override frozen stdlib modules
* https://bugs.python.org/issue45651 - frozen_modules default not right on Windows
* https://bugs.python.org/issue45272 - "os.path" should be in the list of frozen modules
* https://bugs.python.org/issue45653 - freeze encodings
* https://bugs.python.org/issue45654 - freeze runpy
* https://bugs.python.org/issue45660 - freeze argparse
* https://bugs.python.org/issue45661 - freeze other stdlib modules
* https://bugs.python.org/issue45273 - os-specific modules frozen unnecessarily?
* https://bugs.python.org/issue45096 - update Tools/freeze
* https://bugs.python.org/issue45379 - improving frozen-related errors
* https://github.com/python/devguide/issues/756 - add devguide info about frozen modules

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:55:35 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 19:55:35 +0000
Subject: [issue45612] [doc] add sqlite3 module docstring
In-Reply-To: <1635235964.69.0.602737413779.issue45612@roundup.psfhosted.org>
Message-ID: <1635450935.99.0.621837518481.issue45612@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +27551
pull_request: https://github.com/python/cpython/pull/29288

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45612>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:55:54 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 19:55:54 +0000
Subject: [issue45655] List of PEPs at top of typing docs is too long to be
 readable
In-Reply-To: <1635445251.29.0.272820285555.issue45655@roundup.psfhosted.org>
Message-ID: <1635450954.03.0.934271859956.issue45655@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 03db1bbfd2d3f5a343c293b2f0e09a1e962df7ea by Alex Waygood in branch 'main':
bpo-45655: Add "relevant PEPs" section to ``typing`` documentation (GH-29280)
https://github.com/python/cpython/commit/03db1bbfd2d3f5a343c293b2f0e09a1e962df7ea


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45655>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:55:39 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 19:55:39 +0000
Subject: [issue45612] [doc] add sqlite3 module docstring
In-Reply-To: <1635235964.69.0.602737413779.issue45612@roundup.psfhosted.org>
Message-ID: <1635450939.8.0.648065736007.issue45612@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27552
pull_request: https://github.com/python/cpython/pull/29289

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45612>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:55:36 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 19:55:36 +0000
Subject: [issue45612] [doc] add sqlite3 module docstring
In-Reply-To: <1635235964.69.0.602737413779.issue45612@roundup.psfhosted.org>
Message-ID: <1635450936.85.0.417969364303.issue45612@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 4dd1e84789f0bd2da83ad06d23c569bf03713a50 by Erlend Egeberg Aasland in branch 'main':
bpo-45612: Add sqlite3 module docstring (GH-29224)
https://github.com/python/cpython/commit/4dd1e84789f0bd2da83ad06d23c569bf03713a50


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45612>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:55:58 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 19:55:58 +0000
Subject: [issue45655] List of PEPs at top of typing docs is too long to be
 readable
In-Reply-To: <1635445251.29.0.272820285555.issue45655@roundup.psfhosted.org>
Message-ID: <1635450958.5.0.00613007783382.issue45655@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +27553
pull_request: https://github.com/python/cpython/pull/29290

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45655>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:56:41 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 19:56:41 +0000
Subject: [issue45653] Freeze the encodings module.
In-Reply-To: <a30091f3-3d1f-6be0-63fd-044ccfc0cd7e@egenix.com>
Message-ID: <CALFfu7DDLYZ+XioZxRcp_wJQHhKDei-PhVbgm9PkDKjZEWoOKQ@mail.gmail.com>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

On Thu, Oct 28, 2021 at 12:15 PM Marc-Andre Lemburg
<report at bugs.python.org> wrote:
> encodings is a package. I think you first have to check whether mixing
> frozen and non-frozen submodules are even supported. I've never tried
> having only part of a package frozen.

It works as long as __path__ is set properly, which it is now.  FWIW,
I tested freezing only some of the submodules a while back and it
worked fine.  That was using a different branch that I never merged
but it should be fine with the different change that got merged.  Of
course, we'd need to verify that if we went that route.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45653>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:57:39 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 19:57:39 +0000
Subject: [issue45608] [sqlite3] some DB-API attributes are undocumented
In-Reply-To: <1635198000.59.0.313242486667.issue45608@roundup.psfhosted.org>
Message-ID: <1635451059.59.0.943092669549.issue45608@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 020aa06ec8b0f473a682f4ae74af5833035b054b by Miss Islington (bot) in branch '3.9':
bpo-45608: Document missing `sqlite3` DB-API attributes and methods (GH-29219) (GH-29282)
https://github.com/python/cpython/commit/020aa06ec8b0f473a682f4ae74af5833035b054b


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45608>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:57:19 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 19:57:19 +0000
Subject: [issue45608] [sqlite3] some DB-API attributes are undocumented
In-Reply-To: <1635198000.59.0.313242486667.issue45608@roundup.psfhosted.org>
Message-ID: <1635451039.14.0.67207524575.issue45608@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 1d88b2b0a15198843a43f34aba1abc65455d3ba7 by Miss Islington (bot) in branch '3.10':
bpo-45608: Document missing `sqlite3` DB-API attributes and methods (GH-29219) (GH-29281)
https://github.com/python/cpython/commit/1d88b2b0a15198843a43f34aba1abc65455d3ba7


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45608>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:57:58 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 19:57:58 +0000
Subject: [issue45608] [sqlite3] some DB-API attributes are undocumented
In-Reply-To: <1635198000.59.0.313242486667.issue45608@roundup.psfhosted.org>
Message-ID: <1635451078.58.0.152390225217.issue45608@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Erlend! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45608>
_______________________________________

From report at bugs.python.org  Thu Oct 28 15:58:28 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 19:58:28 +0000
Subject: [issue45604] multiprocessing.log_to_stderr missing documentation for
 parameter
In-Reply-To: <1635172489.58.0.649582586734.issue45604@roundup.psfhosted.org>
Message-ID: <1635451108.13.0.923461758074.issue45604@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset fb80aede6ab5d10297b787526657b1a6e20a706a by Miss Islington (bot) in branch '3.10':
bpo-45604: add `level` argument to `multiprocessing.log_to_stderr` func (GH-29226) (GH-29283)
https://github.com/python/cpython/commit/fb80aede6ab5d10297b787526657b1a6e20a706a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45604>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:01:31 2021
From: report at bugs.python.org (primexx)
Date: Thu, 28 Oct 2021 20:01:31 +0000
Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure
In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org>
Message-ID: <1635451291.53.0.121198500892.issue40452@roundup.psfhosted.org>


Change by primexx <primexx at gmail.com>:


----------
nosy: +primexx

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40452>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:01:22 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 28 Oct 2021 20:01:22 +0000
Subject: [issue45662] Incorrect repr of InitVar of a type alias
In-Reply-To: <1635450363.22.0.969198768309.issue45662@roundup.psfhosted.org>
Message-ID: <1635451282.74.0.895314860564.issue45662@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
keywords: +patch
pull_requests: +27554
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29291

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45662>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:01:46 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 20:01:46 +0000
Subject: [issue45624] test_graphlib.py depends on iteration order of sets
In-Reply-To: <1635332589.87.0.491015468348.issue45624@roundup.psfhosted.org>
Message-ID: <1635451306.03.0.631668930962.issue45624@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +27555
pull_request: https://github.com/python/cpython/pull/29292

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45624>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:01:41 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 20:01:41 +0000
Subject: [issue45624] test_graphlib.py depends on iteration order of sets
In-Reply-To: <1635332589.87.0.491015468348.issue45624@roundup.psfhosted.org>
Message-ID: <1635451301.96.0.886437587862.issue45624@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 7401694807fc6b5f7b35ff73c06f4bb852e02946 by Carl Friedrich Bolz-Tereick in branch 'main':
bpo-45624: make test_graphlib not depend on the iteration order of sets (GH-29233)
https://github.com/python/cpython/commit/7401694807fc6b5f7b35ff73c06f4bb852e02946


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45624>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:02:11 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 20:02:11 +0000
Subject: [issue45583] Documentation of int() in datamodel.rst is out of date
In-Reply-To: <1634949605.24.0.0641435404763.issue45583@roundup.psfhosted.org>
Message-ID: <1635451331.89.0.970502444848.issue45583@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 76658e5bdbdf57464f4b43f1625c02c2ba4222dd by Miss Islington (bot) in branch '3.8':
bpo-45583: Correct datamodel documentation of int() (GH-29182) (GH-29287)
https://github.com/python/cpython/commit/76658e5bdbdf57464f4b43f1625c02c2ba4222dd


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45583>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:02:46 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 20:02:46 +0000
Subject: [issue45624] test_graphlib.py depends on iteration order of sets
In-Reply-To: <1635332589.87.0.491015468348.issue45624@roundup.psfhosted.org>
Message-ID: <1635451366.7.0.299024903925.issue45624@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27556
pull_request: https://github.com/python/cpython/pull/29293

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45624>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:03:39 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 20:03:39 +0000
Subject: [issue45604] multiprocessing.log_to_stderr missing documentation for
 parameter
In-Reply-To: <1635172489.58.0.649582586734.issue45604@roundup.psfhosted.org>
Message-ID: <1635451419.02.0.872993759538.issue45604@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 01d11b1d62b869f77e024b3979dbc064e9019b7c by Miss Islington (bot) in branch '3.9':
bpo-45604: add `level` argument to `multiprocessing.log_to_stderr` func (GH-29226) (GH-29284)
https://github.com/python/cpython/commit/01d11b1d62b869f77e024b3979dbc064e9019b7c


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45604>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:04:10 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 20:04:10 +0000
Subject: [issue45604] multiprocessing.log_to_stderr missing documentation for
 parameter
In-Reply-To: <1635172489.58.0.649582586734.issue45604@roundup.psfhosted.org>
Message-ID: <1635451450.81.0.486947673283.issue45604@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Nikita! ? ? ?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45604>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:04:18 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 20:04:18 +0000
Subject: [issue45604] multiprocessing.log_to_stderr missing documentation for
 parameter
In-Reply-To: <1635172489.58.0.649582586734.issue45604@roundup.psfhosted.org>
Message-ID: <1635451458.71.0.607728537013.issue45604@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45604>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:10:31 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 28 Oct 2021 20:10:31 +0000
Subject: [issue45663] is_dataclass() does not work for dataclasses which are
 subclasses of types.GenericAlias
Message-ID: <1635451831.16.0.493312475993.issue45663@roundup.psfhosted.org>


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

>>> import dataclasses, types
>>> @dataclasses.dataclass
... class A(types.GenericAlias):
...     origin: type
...     args: type
... 
>>> dataclasses.is_dataclass(A)
True
>>> a = A(list, int)
>>> dataclasses.is_dataclass(type(a))
True
>>> dataclasses.is_dataclass(a)
False

----------
components: Library (Lib)
messages: 405256
nosy: eric.smith, gvanrossum, serhiy.storchaka
priority: normal
severity: normal
status: open
title: is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45663>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:14:25 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 28 Oct 2021 20:14:25 +0000
Subject: [issue45663] is_dataclass() does not work for dataclasses which are
 subclasses of types.GenericAlias
In-Reply-To: <1635451831.16.0.493312475993.issue45663@roundup.psfhosted.org>
Message-ID: <1635452065.82.0.755543705332.issue45663@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
keywords: +patch
pull_requests: +27557
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29294

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45663>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:17:14 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 20:17:14 +0000
Subject: [issue45583] Documentation of int() in datamodel.rst is out of date
In-Reply-To: <1634949605.24.0.0641435404763.issue45583@roundup.psfhosted.org>
Message-ID: <1635452234.34.0.731716296559.issue45583@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset fef54abf5fa3bf3d3cdeb2cba7a2921d204867c6 by Miss Islington (bot) in branch '3.10':
bpo-45583: Correct datamodel documentation of int() (GH-29182) (GH-29285)
https://github.com/python/cpython/commit/fef54abf5fa3bf3d3cdeb2cba7a2921d204867c6


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45583>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:17:24 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 20:17:24 +0000
Subject: [issue45583] Documentation of int() in datamodel.rst is out of date
In-Reply-To: <1634949605.24.0.0641435404763.issue45583@roundup.psfhosted.org>
Message-ID: <1635452244.97.0.354525247542.issue45583@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 3767e0d94351653a34ba6a6914e57c5c231012b0 by Miss Islington (bot) in branch '3.9':
bpo-45583: Correct datamodel documentation of int() (GH-29182) (GH-29286)
https://github.com/python/cpython/commit/3767e0d94351653a34ba6a6914e57c5c231012b0


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45583>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:17:48 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 20:17:48 +0000
Subject: [issue45583] Documentation of int() in datamodel.rst is out of date
In-Reply-To: <1634949605.24.0.0641435404763.issue45583@roundup.psfhosted.org>
Message-ID: <1635452268.54.0.215354525527.issue45583@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Arthur! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45583>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:20:39 2021
From: report at bugs.python.org (Ethan Furman)
Date: Thu, 28 Oct 2021 20:20:39 +0000
Subject: [issue45649] Add tarinfo.Path
In-Reply-To: <1635436761.88.0.225530702286.issue45649@roundup.psfhosted.org>
Message-ID: <1635452439.37.0.192401387988.issue45649@roundup.psfhosted.org>


Change by Ethan Furman <ethan at stoneleaf.us>:


----------
nosy: +ethan.furman

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45649>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:20:15 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 20:20:15 +0000
Subject: [issue45379] Improve errors related to frozen modules.
In-Reply-To: <1633449120.03.0.98563217148.issue45379@roundup.psfhosted.org>
Message-ID: <1635452415.11.0.542105330783.issue45379@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 233841ab782953510ad308dc6173072a6cc6a1cd by Filipe La?ns in branch 'main':
bpo-45379: add custom error string for FROZEN_DISABLED (GH-29190)
https://github.com/python/cpython/commit/233841ab782953510ad308dc6173072a6cc6a1cd


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45379>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:22:27 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 20:22:27 +0000
Subject: [issue45577] Make `test_zoneinfo.py` to check all pickle protocols
In-Reply-To: <1634920950.64.0.966445570701.issue45577@roundup.psfhosted.org>
Message-ID: <1635452547.98.0.336197080242.issue45577@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 66e6b3dcd3bbab06feeff2cbaf8aade7b6223d6c by Nikita Sobolev in branch 'main':
bpo-45577: test all pickle protocols in `test_zoneinfo` (GH-29167)
https://github.com/python/cpython/commit/66e6b3dcd3bbab06feeff2cbaf8aade7b6223d6c


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45577>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:23:02 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 20:23:02 +0000
Subject: [issue45577] Make `test_zoneinfo.py` to check all pickle protocols
In-Reply-To: <1634920950.64.0.966445570701.issue45577@roundup.psfhosted.org>
Message-ID: <1635452582.5.0.162929875483.issue45577@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27559
pull_request: https://github.com/python/cpython/pull/29296

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45577>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:22:58 2021
From: report at bugs.python.org (miss-islington)
Date: Thu, 28 Oct 2021 20:22:58 +0000
Subject: [issue45577] Make `test_zoneinfo.py` to check all pickle protocols
In-Reply-To: <1634920950.64.0.966445570701.issue45577@roundup.psfhosted.org>
Message-ID: <1635452578.42.0.903892164154.issue45577@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +27558
pull_request: https://github.com/python/cpython/pull/29295

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45577>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:23:09 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 20:23:09 +0000
Subject: [issue45396] Custom frozen modules get ignored.
In-Reply-To: <1633551734.9.0.785349509784.issue45396@roundup.psfhosted.org>
Message-ID: <1635452589.83.0.119306987013.issue45396@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
pull_requests: +27560
pull_request: https://github.com/python/cpython/pull/28778

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45396>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:25:01 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 20:25:01 +0000
Subject: [issue45612] [doc] add sqlite3 module docstring
In-Reply-To: <1635235964.69.0.602737413779.issue45612@roundup.psfhosted.org>
Message-ID: <1635452701.52.0.94218784729.issue45612@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 823b3e39ae12884d5aa3c98341a41b2d6f19d329 by Miss Islington (bot) in branch '3.10':
bpo-45612: Add sqlite3 module docstring (GH-29224) (GH-29288)
https://github.com/python/cpython/commit/823b3e39ae12884d5aa3c98341a41b2d6f19d329


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45612>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:25:41 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 20:25:41 +0000
Subject: [issue45612] [doc] add sqlite3 module docstring
In-Reply-To: <1635235964.69.0.602737413779.issue45612@roundup.psfhosted.org>
Message-ID: <1635452741.8.0.257475725807.issue45612@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset d6623c3ddb9a0e5ffed81253bd40f75c3c662f1a by Miss Islington (bot) in branch '3.9':
bpo-45612: Add sqlite3 module docstring (GH-29224) (GH-29289)
https://github.com/python/cpython/commit/d6623c3ddb9a0e5ffed81253bd40f75c3c662f1a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45612>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:25:57 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 20:25:57 +0000
Subject: [issue45612] [doc] add sqlite3 module docstring
In-Reply-To: <1635235964.69.0.602737413779.issue45612@roundup.psfhosted.org>
Message-ID: <1635452757.5.0.155743443541.issue45612@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Erlend! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45612>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:38:27 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 28 Oct 2021 20:38:27 +0000
Subject: [issue45664] resolve_bases() and new_class() do not work with type
 alias of a built-in type
Message-ID: <1635453507.8.0.842225708276.issue45664@roundup.psfhosted.org>


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

resolve_bases() returns incorrect result:

>>> import types
>>> types.resolve_bases((list[int],))
(list[int],)

Expected (list,).

new_class() fails:

>>> types.new_class('L', (list[int],), {})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/serhiy/py/cpython/Lib/types.py", line 77, in new_class
    return meta(name, resolved_bases, ns, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: GenericAlias expected 2 arguments, got 3

Both work well with typing.List[int].

----------
components: Library (Lib)
messages: 405265
nosy: gvanrossum, kj, serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: resolve_bases() and new_class() do not work with type alias of a built-in type
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45664>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:40:35 2021
From: report at bugs.python.org (Alex Waygood)
Date: Thu, 28 Oct 2021 20:40:35 +0000
Subject: [issue45655] List of PEPs at top of typing docs is too long to be
 readable
In-Reply-To: <1635445251.29.0.272820285555.issue45655@roundup.psfhosted.org>
Message-ID: <1635453635.04.0.567741503153.issue45655@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
pull_requests: +27561
pull_request: https://github.com/python/cpython/pull/29297

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45655>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:43:09 2021
From: report at bugs.python.org (Alex Waygood)
Date: Thu, 28 Oct 2021 20:43:09 +0000
Subject: [issue45655] List of PEPs at top of typing docs is too long to be
 readable
In-Reply-To: <1635445251.29.0.272820285555.issue45655@roundup.psfhosted.org>
Message-ID: <1635453789.01.0.877324284401.issue45655@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
versions: +Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45655>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:43:16 2021
From: report at bugs.python.org (Ronald Pandolfi)
Date: Thu, 28 Oct 2021 20:43:16 +0000
Subject: [issue45657] Enum behavior when values are functions
In-Reply-To: <1635445665.36.0.256719462717.issue45657@roundup.psfhosted.org>
Message-ID: <1635453796.5.0.782088408978.issue45657@roundup.psfhosted.org>


Ronald Pandolfi <ronpandolfi at gmail.com> added the comment:

Ok, yeah that works. I would have thought that __members__ could be able to differentiate between bound methods and external functions, but that's probably asking too much.

Fair enough! This works so I'm happy. Closing, "not a bug"...

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45657>
_______________________________________

From report at bugs.python.org  Thu Oct 28 16:44:17 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Thu, 28 Oct 2021 20:44:17 +0000
Subject: [issue45664] resolve_bases() and new_class() do not work with type
 alias of a built-in type
In-Reply-To: <1635453507.8.0.842225708276.issue45664@roundup.psfhosted.org>
Message-ID: <1635453857.21.0.651035558891.issue45664@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
keywords: +patch
pull_requests: +27562
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29298

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45664>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:00:59 2021
From: report at bugs.python.org (Martin)
Date: Thu, 28 Oct 2021 21:00: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: <1635454859.8.0.286524521671.issue43656@roundup.psfhosted.org>


Change by Martin <martin.schroeder at nerdluecht.de>:


----------
pull_requests: +27563
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/29299

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:03:21 2021
From: report at bugs.python.org (Steve Dower)
Date: Thu, 28 Oct 2021 21:03:21 +0000
Subject: [issue45623] static build is broken
In-Reply-To: <1635330632.5.0.689915843766.issue45623@roundup.psfhosted.org>
Message-ID: <1635455001.05.0.370687449092.issue45623@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

winver is static data, so no reason we can't define it all the time.

Unassigning myself - if anyone else would like to work on this, feel free.

----------
assignee: steve.dower -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45623>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:04:42 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 21:04:42 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <1633551663.5.0.531821025802.issue45395@roundup.psfhosted.org>
Message-ID: <1635455082.08.0.524167584621.issue45395@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:


New changeset 074fa5750640a067d9894c69378a00ceecc3b948 by Eric Snow in branch 'main':
bpo-45395: Make custom frozen modules additions instead of replacements. (gh-28778)
https://github.com/python/cpython/commit/074fa5750640a067d9894c69378a00ceecc3b948


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:07:03 2021
From: report at bugs.python.org (Steve Dower)
Date: Thu, 28 Oct 2021 21:07:03 +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: <1635455223.16.0.896836819685.issue30082@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

I'd rather only have one force_hide option that does its best to hide everything.

Yes, it's probably unintuitive for GUI apps, it might even be maliciously misused, but it does have occasional legitimate uses. And besides, an app can easily ignore SW_HIDE if it wants.

Bear in mind that the test suite should (mostly) operate without ctypes. So if you use ctypes to verify the test, make it a separate test that skips if ctypes cannot be imported, and have a test that runs it without verifying the window is actually hidden. That way we always at least _run_ the code, even if we only (usually) verify that it's actually hiding the window.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:09:34 2021
From: report at bugs.python.org (Steve Dower)
Date: Thu, 28 Oct 2021 21:09:34 +0000
Subject: [issue45645] Deep recursion terminates script execution with no error
 (Windows, Python 3.9)
In-Reply-To: <1635430372.32.0.809866843445.issue45645@roundup.psfhosted.org>
Message-ID: <1635455374.06.0.862525248938.issue45645@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

This is almost certainly because of how Windows handles stack overflow exceptions, and the fact that there's no way for us to detect it reliably.

There's some work going on to reduce the C stack depth when calling heavily nested Python code (see issue45256), but there's nothing else we can really do I'm afraid.

I'm marking *this* issue as wontfix, but hopefully we can make some improvement on this general issue through other issues. Thanks for reporting it!

----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45645>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:12:31 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 21:12:31 +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: <1635455551.94.0.648838200613.issue45506@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
pull_requests: +27564
pull_request: https://github.com/python/cpython/pull/29300

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45506>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:13:05 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Thu, 28 Oct 2021 21:13:05 +0000
Subject: [issue45484] test_pickle segfault on s390x RHEL7 LTO 3.x
In-Reply-To: <1634304423.18.0.10367404371.issue45484@roundup.psfhosted.org>
Message-ID: <1635455585.33.0.226140386824.issue45484@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

Hopefully this was fixed by https://github.com/python/cpython/pull/29258

----------
nosy: +Dennis Sweeney

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45484>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:14:45 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 21:14:45 +0000
Subject: [issue45624] test_graphlib.py depends on iteration order of sets
In-Reply-To: <1635332589.87.0.491015468348.issue45624@roundup.psfhosted.org>
Message-ID: <1635455685.09.0.577245279617.issue45624@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 67a1abb6aab3b3ce40eb3fdc0af73179ab436a3a by Miss Islington (bot) in branch '3.9':
bpo-45624: make test_graphlib not depend on the iteration order of sets (GH-29233) (GH-29292)
https://github.com/python/cpython/commit/67a1abb6aab3b3ce40eb3fdc0af73179ab436a3a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45624>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:15:05 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 21:15:05 +0000
Subject: [issue45624] test_graphlib.py depends on iteration order of sets
In-Reply-To: <1635332589.87.0.491015468348.issue45624@roundup.psfhosted.org>
Message-ID: <1635455705.19.0.195594022484.issue45624@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset eccb753ae6e1459dc697d5408e1082fff4f6d8f7 by Miss Islington (bot) in branch '3.10':
bpo-45624: make test_graphlib not depend on the iteration order of sets (GH-29233) (GH-29293)
https://github.com/python/cpython/commit/eccb753ae6e1459dc697d5408e1082fff4f6d8f7


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45624>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:15:39 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 21:15:39 +0000
Subject: [issue45624] test_graphlib.py depends on iteration order of sets
In-Reply-To: <1635332589.87.0.491015468348.issue45624@roundup.psfhosted.org>
Message-ID: <1635455739.19.0.607919448263.issue45624@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Carl Friedrich! ? ? ?

----------
components: +Tests
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45624>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:17:32 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 21:17:32 +0000
Subject: [issue45655] List of PEPs at top of typing docs is too long to be
 readable
In-Reply-To: <1635445251.29.0.272820285555.issue45655@roundup.psfhosted.org>
Message-ID: <1635455852.51.0.591537758673.issue45655@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 8813a987b1df78b5eaddb085e514dfa5af5c8634 by Alex Waygood in branch '3.9':
[3.9] bpo-45655: Add "relevant PEPs" section to typing documentation (GH-29297)
https://github.com/python/cpython/commit/8813a987b1df78b5eaddb085e514dfa5af5c8634


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45655>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:23:53 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Thu, 28 Oct 2021 21:23:53 +0000
Subject: [issue45443] 'ThreadPoolExecutor' object has no attribute 'map'
In-Reply-To: <1634035739.42.0.184025452389.issue45443@roundup.psfhosted.org>
Message-ID: <1635456233.42.0.926055534492.issue45443@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

It's been a couple of weeks, so I'm closing this. Feel free to re-open if you figure out that this is a bug that you can reliably reproduce on a fresh install of cpython.

----------
resolution:  -> not a bug
stage:  -> resolved
status: pending -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45443>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:25:51 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 21:25:51 +0000
Subject: [issue45396] Custom frozen modules get ignored.
In-Reply-To: <1633551734.9.0.785349509784.issue45396@roundup.psfhosted.org>
Message-ID: <1635456351.8.0.38131660857.issue45396@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
pull_requests: +27565
pull_request: https://github.com/python/cpython/pull/29301

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45396>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:30:27 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 21:30:27 +0000
Subject: [issue45396] Custom frozen modules get ignored.
In-Reply-To: <1633551734.9.0.785349509784.issue45396@roundup.psfhosted.org>
Message-ID: <1635456627.63.0.845748163063.issue45396@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

The behavior has been addressed in the fix for bpo-45395.  However, I'd like to change the name of the -X option from "frozen_modules" to "frozen_stdlib", to avoid any confusion in the future.  After that this issue is done.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45396>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:34:11 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 21:34:11 +0000
Subject: [issue45395] Frozen stdlib modules are discarded if custom frozen
 modules added.
In-Reply-To: <1633551663.5.0.531821025802.issue45395@roundup.psfhosted.org>
Message-ID: <1635456851.62.0.0960885193818.issue45395@roundup.psfhosted.org>


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

This is done now.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45395>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:34:52 2021
From: report at bugs.python.org (Eric Snow)
Date: Thu, 28 Oct 2021 21:34:52 +0000
Subject: [issue45396] Custom frozen modules get ignored.
In-Reply-To: <1633551734.9.0.785349509784.issue45396@roundup.psfhosted.org>
Message-ID: <1635456892.39.0.899816814357.issue45396@roundup.psfhosted.org>


Change by Eric Snow <ericsnowcurrently at gmail.com>:


----------
resolution: fixed -> 
stage: resolved -> patch review
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45396>
_______________________________________

From report at bugs.python.org  Thu Oct 28 17:59:19 2021
From: report at bugs.python.org (PABLO LOBATO DE LA CRUZ)
Date: Thu, 28 Oct 2021 21:59:19 +0000
Subject: [issue45645] Deep recursion terminates script execution with no error
 (Windows, Python 3.9)
In-Reply-To: <1635455374.06.0.862525248938.issue45645@roundup.psfhosted.org>
Message-ID: <CAJjqmk0-EsayrnJ3Wg00cwwoXuDkVwcMHEToMVeAo7X_phzJYw@mail.gmail.com>


PABLO LOBATO DE LA CRUZ <pablolob at ucm.es> added the comment:

I see thanks for answering so quickly. But why does it happen only on
Windows?

El jue, 28 oct 2021 a las 23:09, Steve Dower (<report at bugs.python.org>)
escribi?:

>
> Steve Dower <steve.dower at python.org> added the comment:
>
> This is almost certainly because of how Windows handles stack overflow
> exceptions, and the fact that there's no way for us to detect it reliably.
>
> There's some work going on to reduce the C stack depth when calling
> heavily nested Python code (see issue45256), but there's nothing else we
> can really do I'm afraid.
>
> I'm marking *this* issue as wontfix, but hopefully we can make some
> improvement on this general issue through other issues. Thanks for
> reporting it!
>
> ----------
> resolution:  -> wont fix
> stage:  -> resolved
> status: open -> closed
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue45645>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45645>
_______________________________________

From report at bugs.python.org  Thu Oct 28 18:00:42 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 22:00:42 +0000
Subject: [issue45577] Make `test_zoneinfo.py` to check all pickle protocols
In-Reply-To: <1634920950.64.0.966445570701.issue45577@roundup.psfhosted.org>
Message-ID: <1635458442.01.0.410241340049.issue45577@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset dd674ca96f2150fb3f7b4086ef7ec0022c4e2058 by Miss Islington (bot) in branch '3.9':
bpo-45577: test all pickle protocols in `test_zoneinfo` (GH-29167) (GH-29295)
https://github.com/python/cpython/commit/dd674ca96f2150fb3f7b4086ef7ec0022c4e2058


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45577>
_______________________________________

From report at bugs.python.org  Thu Oct 28 18:00:53 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Thu, 28 Oct 2021 22:00:53 +0000
Subject: [issue45577] Make `test_zoneinfo.py` to check all pickle protocols
In-Reply-To: <1634920950.64.0.966445570701.issue45577@roundup.psfhosted.org>
Message-ID: <1635458453.1.0.662538925894.issue45577@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 7203ecd332eca3a44a3f1c8bdadd76a08c5568a1 by Miss Islington (bot) in branch '3.10':
bpo-45577: test all pickle protocols in `test_zoneinfo` (GH-29167) (GH-29296)
https://github.com/python/cpython/commit/7203ecd332eca3a44a3f1c8bdadd76a08c5568a1


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45577>
_______________________________________

From report at bugs.python.org  Thu Oct 28 18:27:04 2021
From: report at bugs.python.org (Alex Waygood)
Date: Thu, 28 Oct 2021 22:27:04 +0000
Subject: [issue45655] List of PEPs at top of typing docs is too long to be
 readable
In-Reply-To: <1635445251.29.0.272820285555.issue45655@roundup.psfhosted.org>
Message-ID: <1635460024.59.0.117906701557.issue45655@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
pull_requests: +27566
pull_request: https://github.com/python/cpython/pull/29302

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45655>
_______________________________________

From report at bugs.python.org  Thu Oct 28 18:27:13 2021
From: report at bugs.python.org (Alex Waygood)
Date: Thu, 28 Oct 2021 22:27:13 +0000
Subject: [issue45655] List of PEPs at top of typing docs is too long to be
 readable
In-Reply-To: <1635445251.29.0.272820285555.issue45655@roundup.psfhosted.org>
Message-ID: <1635460033.77.0.786250488811.issue45655@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
pull_requests: +27566, 27567
pull_request: https://github.com/python/cpython/pull/29302

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45655>
_______________________________________

From report at bugs.python.org  Thu Oct 28 18:27:17 2021
From: report at bugs.python.org (Alex Waygood)
Date: Thu, 28 Oct 2021 22:27:17 +0000
Subject: [issue45655] List of PEPs at top of typing docs is too long to be
 readable
In-Reply-To: <1635445251.29.0.272820285555.issue45655@roundup.psfhosted.org>
Message-ID: <1635460037.0.0.810519070319.issue45655@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
pull_requests: +27566, 27567, 27568
pull_request: https://github.com/python/cpython/pull/29302

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45655>
_______________________________________

From report at bugs.python.org  Thu Oct 28 18:28:25 2021
From: report at bugs.python.org (Steve Dower)
Date: Thu, 28 Oct 2021 22:28:25 +0000
Subject: [issue45645] Deep recursion terminates script execution with no error
 (Windows, Python 3.9)
In-Reply-To: <CAJjqmk0-EsayrnJ3Wg00cwwoXuDkVwcMHEToMVeAo7X_phzJYw@mail.gmail.com>
Message-ID: <837925ff-b333-5388-5fba-c103dde6659e@python.org>


Steve Dower <steve.dower at python.org> added the comment:

> But why does it happen only on Windows?

Because it's the operating system that is terminating the process :) 
Other operating systems behave differently when you exceed the stack, 
and may also allocate different amounts of stack space, making it less 
likely that you hit it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45645>
_______________________________________

From report at bugs.python.org  Thu Oct 28 18:36:04 2021
From: report at bugs.python.org (Guido van Rossum)
Date: Thu, 28 Oct 2021 22:36:04 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635460564.14.0.562967800895.issue45438@roundup.psfhosted.org>


Guido van Rossum <guido at python.org> added the comment:

OK, OK, I see your point. I'm curious what ?ukasz thinks.

----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Thu Oct 28 18:37:10 2021
From: report at bugs.python.org (Daniele Varrazzo)
Date: Thu, 28 Oct 2021 22:37:10 +0000
Subject: [issue45347] datetime subject to rounding?
In-Reply-To: <1633194102.6.0.241729336774.issue45347@roundup.psfhosted.org>
Message-ID: <1635460630.92.0.623994671699.issue45347@roundup.psfhosted.org>


Daniele Varrazzo <daniele.varrazzo at gmail.com> added the comment:

Considering that I have found another pair of dates failing equality, and they are too on the last Sunday of October, the hypothesis of rounding in timezone code starts to look likely....

Python 3.7.9 (default, Jan 12 2021, 17:26:22) 
[GCC 8.3.0] on linux

>>> import datetime, backports.zoneinfo
>>> d1 = datetime.datetime(2255, 10, 28, 7, 31, 21, 393428, tzinfo=datetime.timezone(datetime.timedelta(seconds=27060)))
>>> d2 = datetime.datetime(2255, 10, 28, 2, 0, 21, 393428, tzinfo=backports.zoneinfo.ZoneInfo(key='Europe/Rome'))
>>> d1 - d2
datetime.timedelta(0)
>>> d1 == d2
False

Added Python 3.7 to the affected list.

----------
versions: +Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45347>
_______________________________________

From report at bugs.python.org  Thu Oct 28 23:32:22 2021
From: report at bugs.python.org (Chris Wesseling)
Date: Fri, 29 Oct 2021 03:32:22 +0000
Subject: [issue45664] resolve_bases() and new_class() do not work with type
 alias of a built-in type
In-Reply-To: <1635453507.8.0.842225708276.issue45664@roundup.psfhosted.org>
Message-ID: <1635478342.08.0.339669706716.issue45664@roundup.psfhosted.org>


Change by Chris Wesseling <chris.wesseling at protonmail.com>:


----------
nosy: +CharString
nosy_count: 4.0 -> 5.0
pull_requests: +27569
pull_request: https://github.com/python/cpython/pull/29273

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45664>
_______________________________________

From report at bugs.python.org  Thu Oct 28 23:32:22 2021
From: report at bugs.python.org (Chris Wesseling)
Date: Fri, 29 Oct 2021 03:32:22 +0000
Subject: [issue45664] resolve_bases() and new_class() do not work with type
 alias of a built-in type
In-Reply-To: <1635453507.8.0.842225708276.issue45664@roundup.psfhosted.org>
Message-ID: <1635478342.21.0.589060191431.issue45664@roundup.psfhosted.org>


Change by Chris Wesseling <chris.wesseling at protonmail.com>:


----------
nosy: +CharString, CharString
nosy_count: 4.0 -> 5.0
pull_requests: +27569, 27570
pull_request: https://github.com/python/cpython/pull/29273

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45664>
_______________________________________

From report at bugs.python.org  Fri Oct 29 00:26:52 2021
From: report at bugs.python.org (Arthur Milchior)
Date: Fri, 29 Oct 2021 04:26:52 +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: <1635481612.64.0.753795339962.issue45646@roundup.psfhosted.org>


Change by Arthur Milchior <arthur at milchior.fr>:


----------
keywords: +patch
pull_requests: +27571
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29303

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45646>
_______________________________________

From report at bugs.python.org  Fri Oct 29 01:47:53 2021
From: report at bugs.python.org (Eryk Sun)
Date: Fri, 29 Oct 2021 05:47:53 +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: <1635486473.91.0.404346556186.issue30082@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

If only force_hide is implemented, based on `wShowWindow=SW_HIDE`, please ensure that it's clearly documented that this option hides the main window (i.e. first top-level window) of any application that doesn't bypass the default behavior of the window manager.

This means a script can't simply use `force_hide=True` universally when running arbitrary commands, since hiding the main window of a GUI app is probably undesired behavior. If it's unknown in advance whether an executable is a console or GUI app, it can be determined via SHGetFileInfoW(). For example:

    import ctypes
    shell32 = ctypes.WinDLL('shell32', use_last_error=True)
    SHGFI_EXETYPE = 0x2000

    def is_gui_exe(path):
        result = shell32.SHGetFileInfoW(path, 0, None, 0, SHGFI_EXETYPE)
        # the high word is non-zero for a GUI app
        return (result >> 16) > 0

    >>> is_gui_exe(r'C:\Windows\pyw.exe')
    True
    >>> is_gui_exe(r'C:\Windows\py.exe')
    False

Regarding the effect of wShowWindow:

If the STARTUPINFO record defines wShowWindow, the value gets used as the normal show command for the first top-level window that's shown in the process. In particular, it overrides the first use (and only the first use) of the commands SW_SHOW, SW_SHOWNORMAL, and SW_SHOWDEFAULT (yes, only the first use of the latter; the documentation is wrong). This affects showing the first top-level window regardless of whether it's explicit via ShowWindow() or implicit via the WS_VISIBLE window style. For the latter, the implicit command is SW_SHOW, which one can override in the CreateWindowW() call by passing x=CW_USEDEFAULT and y as the show command to use. 

To completely ignore the STARTUPINFO wShowWindow value for the main window, an application can use an initial show command that wShowWindow doesn't override, such as SW_HIDE, SW_RESTORE (behaves like SW_SHOWNORMAL on first use), SW_MINIMIZE, or SW_MAXIMIZE. For example, for the first command use ShowWindow(hwnd, SW_HIDE). Subsequently calling ShowWindow(hwnd, SW_SHOWNORMAL) will show the window normally (i.e. active and restored) instead of using the STARTUPINFO wShowWindow command.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Fri Oct 29 01:53:38 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 29 Oct 2021 05:53:38 +0000
Subject: [issue45604] multiprocessing.log_to_stderr missing documentation for
 parameter
In-Reply-To: <1635451459.21.0.307333137176.issue45604@roundup.psfhosted.org>
Message-ID: <CAO_bL1xiHGd8bY1sJypP+ppoj=NNnw-M8DUpS5Katw_MADY9Ng@mail.gmail.com>


Nikita Sobolev <mail at sobolevn.me> added the comment:

Thanks, ?ukasz!

??, 28 ???. 2021 ?. ? 23:04, ?ukasz Langa <report at bugs.python.org>:

>
> Change by ?ukasz Langa <lukasz at langa.pl>:
>
>
> ----------
> resolution:  -> fixed
> stage: patch review -> resolved
> status: open -> closed
> versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue45604>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45604>
_______________________________________

From report at bugs.python.org  Fri Oct 29 02:27:23 2021
From: report at bugs.python.org (Martin)
Date: Fri, 29 Oct 2021 06:27:23 +0000
Subject: [issue23597] Allow easy display of local variables in log messages?
In-Reply-To: <1425607966.26.0.932937253201.issue23597@psf.upfronthosting.co.za>
Message-ID: <1635488843.48.0.08043499532.issue23597@roundup.psfhosted.org>


Martin <martin.schroeder at nerdluecht.de> added the comment:

In this pull request[1] I introduced a `format_locals` which can be provided to customize the serialization of the local variables of each frame. This could be used to filter out variables with certain names, for example. In this context, you could use a certain naming convention for variables with sensitive information and filter them out:

def _format_locals(filename, lineno, name, locals):
    return {k: repr(v) for k,v in locals.items() if not k.endsswith("_sensitive")}

traceback.TracebackException.from_exception(e, capture_locals=True, format_locals=format_locals).format()

(This should be exactly what Robert was suggesting.)


[1] https://github.com/python/cpython/pull/29299

----------
keywords: +patch
message_count: 3.0 -> 4.0
nosy: +moi90
nosy_count: 4.0 -> 5.0
pull_requests: +27572
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29299

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23597>
_______________________________________

From report at bugs.python.org  Fri Oct 29 02:33:40 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Fri, 29 Oct 2021 06:33:40 +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: <1635489220.51.0.302741469188.issue45646@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

Hi Arthur,

I agree that the line about "name ::= othername" could be more helpful.

I think an affirmative example would be better than a warning against depending on variable names, because the top of the page mentions that BNF is being used and IMHO the variable names are consistent with how BNF is typically used, so negative/warning language might be more confusing. I'm also not sure a note saying "read the documentation" in the documentation will help people read the documentation ;)

Maybe an example could be something like:

---------
In this and the following chapters, extended BNF notation will be used to describe syntax (but not tokenization/lexical analysis). Extended BNF uses syntax rules like the following:

    a_expr ::=  m_expr | a_expr "+" m_expr | a_expr "-" m_expr

This rule indicates that an a_expr ("a" is for addition, but subtraction has the same precedence) is one of the following:

    * Just an m_expr (the "m" is for multiplication-like operations)
    * A smaller a_expr, followed by a "+" sign, followed by an m_expr
    * A smaller a_expr, followed by a "-" sign, followed by an m_expr

For concreteness, given that `x * y`, `x / y`, `a[i]` and `foo.bar` are instances of `m_expr`, the rule implies that `x * y`, `x / y + a[i]`, and (recursively) `foo.bar + x * y - a[i]` are all instances of `a_expr`.

---------------

Maybe there could be a link to a more-detailed BNF tutorial/reference.

----------
nosy: +Dennis Sweeney

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45646>
_______________________________________

From report at bugs.python.org  Fri Oct 29 04:12:29 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Fri, 29 Oct 2021 08:12:29 +0000
Subject: [issue10572] Move test sub-packages to Lib/test
In-Reply-To: <1290991979.58.0.262973706564.issue10572@psf.upfronthosting.co.za>
Message-ID: <1635495149.98.0.317993123355.issue10572@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
pull_requests: +27573
pull_request: https://github.com/python/cpython/pull/29304

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue10572>
_______________________________________

From report at bugs.python.org  Fri Oct 29 04:20:26 2021
From: report at bugs.python.org (Tim Golden)
Date: Fri, 29 Oct 2021 08:20:26 +0000
Subject: [issue45621] Small fixes to mmap
In-Reply-To: <1635320247.38.0.208723521187.issue45621@roundup.psfhosted.org>
Message-ID: <1635495626.0.0.0141530907379.issue45621@roundup.psfhosted.org>


Tim Golden <mail at timgolden.me.uk> added the comment:


New changeset 7bddd96982072d04bd6314da1ee7f40b7f875f00 by Tim Golden in branch 'main':
bpo-45621: Small changes to mmap (GH-29247)
https://github.com/python/cpython/commit/7bddd96982072d04bd6314da1ee7f40b7f875f00


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45621>
_______________________________________

From report at bugs.python.org  Fri Oct 29 04:25:02 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 29 Oct 2021 08:25:02 +0000
Subject: [issue45664] resolve_bases() and new_class() do not work with type
 alias of a built-in type
In-Reply-To: <1635453507.8.0.842225708276.issue45664@roundup.psfhosted.org>
Message-ID: <1635495902.25.0.355804054278.issue45664@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests:  -27569

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45664>
_______________________________________

From report at bugs.python.org  Fri Oct 29 04:25:09 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 29 Oct 2021 08:25:09 +0000
Subject: [issue45664] resolve_bases() and new_class() do not work with type
 alias of a built-in type
In-Reply-To: <1635453507.8.0.842225708276.issue45664@roundup.psfhosted.org>
Message-ID: <1635495909.7.0.0687812654156.issue45664@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests:  -27570

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45664>
_______________________________________

From report at bugs.python.org  Fri Oct 29 04:27:44 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 29 Oct 2021 08:27:44 +0000
Subject: [issue45665] Problems caused by isinstance(list[int]) returning True
Message-ID: <1635496063.98.0.5366836652.issue45665@roundup.psfhosted.org>


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

This is a meta-issue for problems caused by isinstance(list[int]) returning True.

See also discussion in issue45438.

----------
components: Library (Lib)
messages: 405290
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Problems caused by isinstance(list[int]) returning True
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45665>
_______________________________________

From report at bugs.python.org  Fri Oct 29 04:41:23 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 29 Oct 2021 08:41:23 +0000
Subject: [issue45665] Problems caused by isinstance(list[int]) returning True
In-Reply-To: <1635496063.98.0.5366836652.issue45665@roundup.psfhosted.org>
Message-ID: <1635496883.97.0.0425053445478.issue45665@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

isinstance(x, type) returns True for instances of types.GenericAlias (like list[int]). While it may help in some cases related to typing, in many unrelated cases it causes problems if the value which is not a type passes checks for types.

Also, isinstance(x, type) been not equal to issubclass(type(x), type) can cause other problems. No matter what the result should be, it should be consistent.

There are many occurrences of isinstance(..., type) in the code.

$ find Lib -name '*.py' \! -path '*/test*' -exec egrep 'isinstance.*,
type\)' '{}' + | wc -l
55

And all of them can potentially be broken if pass a types.GenericAlias instance. Many of them are safe, but every case should be analyzed.

----------
dependencies: +Incorrect repr of InitVar of a type alias, help(list[int]) fails, inspect not capturing type annotations created by __class_getitem__, is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias, resolve_bases() and new_class() do not work with type alias of a built-in type
nosy: +gvanrossum, kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45665>
_______________________________________

From report at bugs.python.org  Fri Oct 29 04:43:15 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 29 Oct 2021 08:43:15 +0000
Subject: [issue45438] inspect not capturing type annotations created by
 __class_getitem__
In-Reply-To: <1633989954.57.0.417241455875.issue45438@roundup.psfhosted.org>
Message-ID: <1635496995.01.0.0247751272208.issue45438@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I have opened separate issues for different cases and a meta-issue45665 for general discussion.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> behavior
versions: +Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45438>
_______________________________________

From report at bugs.python.org  Fri Oct 29 04:49:12 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 29 Oct 2021 08:49:12 +0000
Subject: [issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the
 size of the code unit
In-Reply-To: <1633280444.05.0.146974944058.issue45355@roundup.psfhosted.org>
Message-ID: <1635497352.91.0.576729389225.issue45355@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45355>
_______________________________________

From report at bugs.python.org  Fri Oct 29 04:59:48 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 29 Oct 2021 08:59:48 +0000
Subject: [issue45502] Fix test_shelve and make it discoverable
In-Reply-To: <1634465757.41.0.209752823951.issue45502@roundup.psfhosted.org>
Message-ID: <1635497988.41.0.456058686404.issue45502@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27574
pull_request: https://github.com/python/cpython/pull/29305

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45502>
_______________________________________

From report at bugs.python.org  Fri Oct 29 05:00:25 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 29 Oct 2021 09:00:25 +0000
Subject: [issue45522] Allow to build Python without freelists
In-Reply-To: <1634641564.68.0.977403045358.issue45522@roundup.psfhosted.org>
Message-ID: <1635498025.18.0.518661432302.issue45522@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:

Which part of the patch is causing you extra work? Would you be fine if I only remove the configure option and leave the fixes for zero-length freelists (#define PyList_MAXFREELIST 0) in?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45522>
_______________________________________

From report at bugs.python.org  Fri Oct 29 05:03:47 2021
From: report at bugs.python.org (PABLO LOBATO DE LA CRUZ)
Date: Fri, 29 Oct 2021 09:03:47 +0000
Subject: [issue45645] Deep recursion terminates script execution with no error
 (Windows, Python 3.9)
In-Reply-To: <837925ff-b333-5388-5fba-c103dde6659e@python.org>
Message-ID: <CAJjqmk1WyFOm8nj0ymgUAxTJ240gXw6EyZH32uqZLBez+dpe6w@mail.gmail.com>


PABLO LOBATO DE LA CRUZ <pablolob at ucm.es> added the comment:

I see. Thank you very much Steve :)

El vie, 29 oct 2021 a las 0:29, Steve Dower (<report at bugs.python.org>)
escribi?:

>
> Steve Dower <steve.dower at python.org> added the comment:
>
> > But why does it happen only on Windows?
>
> Because it's the operating system that is terminating the process :)
> Other operating systems behave differently when you exceed the stack,
> and may also allocate different amounts of stack space, making it less
> likely that you hit it.
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue45645>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45645>
_______________________________________

From report at bugs.python.org  Fri Oct 29 05:11:28 2021
From: report at bugs.python.org (Tim Golden)
Date: Fri, 29 Oct 2021 09:11:28 +0000
Subject: [issue45621] Small fixes to mmap
In-Reply-To: <1635320247.38.0.208723521187.issue45621@roundup.psfhosted.org>
Message-ID: <1635498688.71.0.932501488247.issue45621@roundup.psfhosted.org>


Change by Tim Golden <mail at timgolden.me.uk>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45621>
_______________________________________

From report at bugs.python.org  Fri Oct 29 05:40:27 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 29 Oct 2021 09:40:27 +0000
Subject: [issue45502] Fix test_shelve and make it discoverable
In-Reply-To: <1634465757.41.0.209752823951.issue45502@roundup.psfhosted.org>
Message-ID: <1635500427.1.0.195632308435.issue45502@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 6b867022d926be9fcc6f8038fb1093ba8c348ca5 by Serhiy Storchaka in branch '3.10':
[3.10] bpo-45502: Fix test_shelve (GH-29003) (GH-29305)
https://github.com/python/cpython/commit/6b867022d926be9fcc6f8038fb1093ba8c348ca5


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45502>
_______________________________________

From report at bugs.python.org  Fri Oct 29 05:45:53 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 29 Oct 2021 09:45:53 +0000
Subject: [issue45502] Fix test_shelve and make it discoverable
In-Reply-To: <1634465757.41.0.209752823951.issue45502@roundup.psfhosted.org>
Message-ID: <1635500753.32.0.0824420055616.issue45502@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27575
pull_request: https://github.com/python/cpython/pull/29306

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45502>
_______________________________________

From report at bugs.python.org  Fri Oct 29 05:46:48 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 29 Oct 2021 09:46:48 +0000
Subject: [issue45666] Warning: "'swprintf' : format string '%s' requires an
 argument of type 'unsigned short *',
 but variadic argument 1 has type 'const char *'"
Message-ID: <1635500808.24.0.905348748425.issue45666@roundup.psfhosted.org>


New submission from Nikita Sobolev <mail at sobolevn.me>:

Right now GitHub emmits this warning:

```
GitHub Actions / Windows (x64)

Programs/_testembed.c#L1735

'swprintf' : format string '%s' requires an argument of type 'unsigned short *', but variadic argument 1 has type 'const char *' [D:\a\cpython\cpython\PCbuild\_testembed.vcxproj]

```

Example: https://github.com/python/cpython/pull/29272/files#file-programs-_testembed-c-L1735

Source: https://github.com/python/cpython/blob/7bddd96982072d04bd6314da1ee7f40b7f875f00/Programs/_testembed.c#L1736

I will send a PR with the fix.

----------
components: Library (Lib)
messages: 405296
nosy: sobolevn
priority: normal
severity: normal
status: open
title: Warning: "'swprintf' : format string '%s' requires an argument of type 'unsigned short *', but variadic argument 1 has type 'const char *'"
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45666>
_______________________________________

From report at bugs.python.org  Fri Oct 29 05:54:08 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 29 Oct 2021 09:54:08 +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: <1635501248.19.0.151377985503.issue45666@roundup.psfhosted.org>


Change by Nikita Sobolev <mail at sobolevn.me>:


----------
components: +Build -Library (Lib)

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45666>
_______________________________________

From report at bugs.python.org  Fri Oct 29 05:56:09 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 29 Oct 2021 09:56:09 +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: <1635501369.33.0.963699893236.issue45666@roundup.psfhosted.org>


Change by Nikita Sobolev <mail at sobolevn.me>:


----------
keywords: +patch
pull_requests: +27576
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29307

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45666>
_______________________________________

From report at bugs.python.org  Fri Oct 29 06:00:06 2021
From: report at bugs.python.org (Julien Palard)
Date: Fri, 29 Oct 2021 10:00:06 +0000
Subject: [issue45667] Better error message on failing to create a venv due to
 failing ensurepip
Message-ID: <1635501606.61.0.0312062282004.issue45667@roundup.psfhosted.org>


New submission from Julien Palard <julien+python at palard.fr>:

Currently if ensurepip fails for a reason or another, for example if a wrong module gets imported:

$ touch http.py
$ python3.10 -m venv .venv
Error: Command '['/tmp/.venv/bin/python3.10', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

the error is not helpfull. Maybe venv should just dump the stderr from ensurepip so we can learn a bit more about it (it's ??understandable?? in ensurepip traceback that it's in relation with http.py, in the given example.)

----------
messages: 405297
nosy: mdk
priority: normal
severity: normal
status: open
title: Better error message on failing to create a venv due to failing ensurepip

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45667>
_______________________________________

From report at bugs.python.org  Fri Oct 29 06:06:37 2021
From: report at bugs.python.org (swgmma)
Date: Fri, 29 Oct 2021 10:06:37 +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: <1635501997.31.0.739994812361.issue30082@roundup.psfhosted.org>


swgmma <jason.nader at protonmail.com> added the comment:

What if we change `force_hide` from True/False to something like "off" | "console" | "all" (defaulting to "off")?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Fri Oct 29 06:13:52 2021
From: report at bugs.python.org (Ken Jin)
Date: Fri, 29 Oct 2021 10:13:52 +0000
Subject: [issue45655] List of PEPs at top of typing docs is too long to be
 readable
In-Reply-To: <1635445251.29.0.272820285555.issue45655@roundup.psfhosted.org>
Message-ID: <1635502432.3.0.774998212592.issue45655@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:

Argh, I merged GH-29302, but messed up the commit title since I'm on mobile. Sorry.

Currently it says:
[3.10] bo-45655: Add "relevant PEPs" section to typing documentation (GH-29302)

It should be:

[3.10] bpo-45655: Add "relevant PEPs" section to typing documentation 
(GH-29280) (GH-29302)

I don't think it's big enough of a deal to revert and re-commit. So we're done here. Thanks for your improvements Alex.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45655>
_______________________________________

From report at bugs.python.org  Fri Oct 29 06:18:38 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 29 Oct 2021 10:18:38 +0000
Subject: [issue45502] Fix test_shelve and make it discoverable
In-Reply-To: <1634465757.41.0.209752823951.issue45502@roundup.psfhosted.org>
Message-ID: <1635502718.73.0.540438171904.issue45502@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset a043706f907e82ee6a562005991ff0b896a4e64d by Serhiy Storchaka in branch '3.9':
[3.9] [3.10] bpo-45502: Fix test_shelve (GH-29003) (GH-29305) (GH-29306)
https://github.com/python/cpython/commit/a043706f907e82ee6a562005991ff0b896a4e64d


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45502>
_______________________________________

From report at bugs.python.org  Fri Oct 29 06:19:07 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 29 Oct 2021 10:19:07 +0000
Subject: [issue45502] Fix test_shelve and make it discoverable
In-Reply-To: <1634465757.41.0.209752823951.issue45502@roundup.psfhosted.org>
Message-ID: <1635502747.77.0.454116871555.issue45502@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45502>
_______________________________________

From report at bugs.python.org  Fri Oct 29 06:19:36 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 29 Oct 2021 10:19:36 +0000
Subject: [issue45665] Problems caused by isinstance(list[int],
 type) returning True
In-Reply-To: <1635496063.98.0.5366836652.issue45665@roundup.psfhosted.org>
Message-ID: <1635502776.12.0.71284271263.issue45665@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
title: Problems caused by isinstance(list[int]) returning True -> Problems caused by isinstance(list[int], type) returning True

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45665>
_______________________________________

From report at bugs.python.org  Fri Oct 29 06:20:22 2021
From: report at bugs.python.org (Alex Waygood)
Date: Fri, 29 Oct 2021 10:20:22 +0000
Subject: [issue45655] List of PEPs at top of typing docs is too long to be
 readable
In-Reply-To: <1635445251.29.0.272820285555.issue45655@roundup.psfhosted.org>
Message-ID: <1635502822.26.0.154719029607.issue45655@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

Thanks, ?ukasz and Ken, for reviewing and merging!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45655>
_______________________________________

From report at bugs.python.org  Fri Oct 29 07:01:00 2021
From: report at bugs.python.org (Chris Wesseling)
Date: Fri, 29 Oct 2021 11:01:00 +0000
Subject: [issue45664] resolve_bases() and new_class() do not work with type
 alias of a built-in type
In-Reply-To: <1635453507.8.0.842225708276.issue45664@roundup.psfhosted.org>
Message-ID: <1635505260.63.0.699477122342.issue45664@roundup.psfhosted.org>


Change by Chris Wesseling <chris.wesseling at protonmail.com>:


----------
pull_requests: +27577
pull_request: https://github.com/python/cpython/pull/29273

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45664>
_______________________________________

From report at bugs.python.org  Fri Oct 29 07:12:27 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 29 Oct 2021 11:12:27 +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: <1635505947.88.0.363934483505.issue30082@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

There's nothing gained by complicating this API with more options.

Document it as "Passing *force_hide* as True attempts to start the application without creating or showing any windows. Some applications may ignore this request, and applications that are hidden often cannot be used or exited by users."

We don't have to specify all the nuances here, especially since we may come up with a more reliable way to do this in the future. Specifying too much detail in the documentation will prevent us from improving it without breaking stuff.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Fri Oct 29 08:26:45 2021
From: report at bugs.python.org (Vinay Sajip)
Date: Fri, 29 Oct 2021 12:26:45 +0000
Subject: [issue45628] TimedRotatingFileHandler backupCount not working
In-Reply-To: <1635348193.15.0.970239577461.issue45628@roundup.psfhosted.org>
Message-ID: <1635510405.81.0.501745128738.issue45628@roundup.psfhosted.org>


Change by Vinay Sajip <vinay_sajip at yahoo.co.uk>:


----------
keywords: +patch
pull_requests: +27578
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29310

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45628>
_______________________________________

From report at bugs.python.org  Fri Oct 29 09:20:50 2021
From: report at bugs.python.org (Marko Tuononen)
Date: Fri, 29 Oct 2021 13:20:50 +0000
Subject: [issue44899] tarfile: add support for creating an archive of
 potentially changing files
In-Reply-To: <1628768592.88.0.0306570478346.issue44899@roundup.psfhosted.org>
Message-ID: <1635513650.56.0.160625387208.issue44899@roundup.psfhosted.org>


Marko Tuononen <marko.tuononen at gmail.com> added the comment:

Please find attached an example how to reproduce the problem in question.

$ python3 -m unittest tarfile_ut.py
E
======================================================================
ERROR: test_stat (tarfile_ut.TestClass)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.6/unittest/mock.py", line 1183, in patched
    return func(*args, **keywargs)
  File "/var/work/mtuonone/tarfile_ut.py", line 39, in test_stat
    tar.add(TEMP_FILENAME)
  File "/usr/lib64/python3.6/tarfile.py", line 1952, in add
    self.addfile(tarinfo, f)
  File "/usr/lib64/python3.6/tarfile.py", line 1980, in addfile
    copyfileobj(fileobj, self.fileobj, tarinfo.size, bufsize=bufsize)
  File "/usr/lib64/python3.6/tarfile.py", line 257, in copyfileobj
    raise exception("unexpected end of data")
OSError: unexpected end of data

----------------------------------------------------------------------
Ran 1 test in 0.006s

FAILED (errors=1)
$

----------
Added file: https://bugs.python.org/file50411/tarfile_ut.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44899>
_______________________________________

From report at bugs.python.org  Fri Oct 29 09:40:48 2021
From: report at bugs.python.org (Vinay Sajip)
Date: Fri, 29 Oct 2021 13:40:48 +0000
Subject: [issue45628] TimedRotatingFileHandler backupCount not working
In-Reply-To: <1635348193.15.0.970239577461.issue45628@roundup.psfhosted.org>
Message-ID: <1635514848.82.0.215574378452.issue45628@roundup.psfhosted.org>


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:


New changeset 8a77f59de51f1fd6062f0fefe73ee3059d714144 by Vinay Sajip in branch 'main':
bpo-45628: Check all parts of the suffix for an extension match. (GH-29310)
https://github.com/python/cpython/commit/8a77f59de51f1fd6062f0fefe73ee3059d714144


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45628>
_______________________________________

From report at bugs.python.org  Fri Oct 29 09:43:37 2021
From: report at bugs.python.org (Marko Tuononen)
Date: Fri, 29 Oct 2021 13:43:37 +0000
Subject: [issue44899] tarfile: add support for creating an archive of
 potentially changing files
In-Reply-To: <1628768592.88.0.0306570478346.issue44899@roundup.psfhosted.org>
Message-ID: <1635515017.44.0.837813850428.issue44899@roundup.psfhosted.org>


Change by Marko Tuononen <marko.tuononen at gmail.com>:


Added file: https://bugs.python.org/file50412/tarfile_ut.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44899>
_______________________________________

From report at bugs.python.org  Fri Oct 29 09:44:06 2021
From: report at bugs.python.org (Marko Tuononen)
Date: Fri, 29 Oct 2021 13:44:06 +0000
Subject: [issue44899] tarfile: add support for creating an archive of
 potentially changing files
In-Reply-To: <1628768592.88.0.0306570478346.issue44899@roundup.psfhosted.org>
Message-ID: <1635515046.59.0.186839543454.issue44899@roundup.psfhosted.org>


Change by Marko Tuononen <marko.tuononen at gmail.com>:


Removed file: https://bugs.python.org/file50411/tarfile_ut.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44899>
_______________________________________

From report at bugs.python.org  Fri Oct 29 09:49:38 2021
From: report at bugs.python.org (Ken Jin)
Date: Fri, 29 Oct 2021 13:49:38 +0000
Subject: [issue45664] resolve_bases() and new_class() do not work with type
 alias of a built-in type
In-Reply-To: <1635453507.8.0.842225708276.issue45664@roundup.psfhosted.org>
Message-ID: <1635515378.03.0.278046781131.issue45664@roundup.psfhosted.org>


Change by Ken Jin <kenjin4096 at gmail.com>:


----------
pull_requests:  -27577

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45664>
_______________________________________

From report at bugs.python.org  Fri Oct 29 09:52:25 2021
From: report at bugs.python.org (Alex Waygood)
Date: Fri, 29 Oct 2021 13:52:25 +0000
Subject: [issue45655] List of PEPs at top of typing docs is too long to be
 readable
In-Reply-To: <1635445251.29.0.272820285555.issue45655@roundup.psfhosted.org>
Message-ID: <1635515545.75.0.590117656376.issue45655@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
pull_requests: +27579
pull_request: https://github.com/python/cpython/pull/29309

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45655>
_______________________________________

From report at bugs.python.org  Fri Oct 29 09:56:41 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 29 Oct 2021 13:56:41 +0000
Subject: [issue45655] List of PEPs at top of typing docs is too long to be
 readable
In-Reply-To: <1635445251.29.0.272820285555.issue45655@roundup.psfhosted.org>
Message-ID: <1635515801.0.0.420403536141.issue45655@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27580
pull_request: https://github.com/python/cpython/pull/29312

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45655>
_______________________________________

From report at bugs.python.org  Fri Oct 29 09:56:31 2021
From: report at bugs.python.org (Ken Jin)
Date: Fri, 29 Oct 2021 13:56:31 +0000
Subject: [issue45655] List of PEPs at top of typing docs is too long to be
 readable
In-Reply-To: <1635445251.29.0.272820285555.issue45655@roundup.psfhosted.org>
Message-ID: <1635515791.02.0.133375398318.issue45655@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:


New changeset d9575218d7ab3d85b15ce3d4779660b9b724d343 by Alex Waygood in branch 'main':
bpo-45655: Add ref to union type expressions at top of typing docs (GH-29309)
https://github.com/python/cpython/commit/d9575218d7ab3d85b15ce3d4779660b9b724d343


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45655>
_______________________________________

From report at bugs.python.org  Fri Oct 29 10:03:27 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 29 Oct 2021 14:03:27 +0000
Subject: [issue45628] TimedRotatingFileHandler backupCount not working
In-Reply-To: <1635348193.15.0.970239577461.issue45628@roundup.psfhosted.org>
Message-ID: <1635516207.62.0.922129630274.issue45628@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +27581
pull_request: https://github.com/python/cpython/pull/29313

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45628>
_______________________________________

From report at bugs.python.org  Fri Oct 29 10:03:32 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 29 Oct 2021 14:03:32 +0000
Subject: [issue45628] TimedRotatingFileHandler backupCount not working
In-Reply-To: <1635348193.15.0.970239577461.issue45628@roundup.psfhosted.org>
Message-ID: <1635516212.28.0.0365015852617.issue45628@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27582
pull_request: https://github.com/python/cpython/pull/29314

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45628>
_______________________________________

From report at bugs.python.org  Fri Oct 29 10:11:57 2021
From: report at bugs.python.org (Alex Waygood)
Date: Fri, 29 Oct 2021 14:11:57 +0000
Subject: [issue42280] The list of standard generic collections is incomplete
In-Reply-To: <1604688598.04.0.446732481114.issue42280@roundup.psfhosted.org>
Message-ID: <1635516717.48.0.149681016526.issue42280@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
nosy: +AlexWaygood
nosy_count: 5.0 -> 6.0
pull_requests: +27583
pull_request: https://github.com/python/cpython/pull/29308

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42280>
_______________________________________

From report at bugs.python.org  Fri Oct 29 10:16:27 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 29 Oct 2021 14:16:27 +0000
Subject: [issue45655] List of PEPs at top of typing docs is too long to be
 readable
In-Reply-To: <1635445251.29.0.272820285555.issue45655@roundup.psfhosted.org>
Message-ID: <1635516987.33.0.902710850725.issue45655@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 6742b0dfb61ebdb92a1ff633ec071734b5d39981 by Miss Islington (bot) in branch '3.10':
bpo-45655: Add ref to union type expressions at top of typing docs (GH-29309)
https://github.com/python/cpython/commit/6742b0dfb61ebdb92a1ff633ec071734b5d39981


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45655>
_______________________________________

From report at bugs.python.org  Fri Oct 29 10:25:28 2021
From: report at bugs.python.org (Eryk Sun)
Date: Fri, 29 Oct 2021 14:25:28 +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: <1635517528.44.0.760216916084.issue30082@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

> There's nothing gained by complicating this API with more options.

Yes, both options is too much. I suggested force_hide_console as an alternative to force_hide, not for both to be implemented. It would be the same as CreateNoWindow in .NET ProcessStartInfo [1], but ProcessStartInfo also has WindowStyle, and one or the other is ignored depending on the value of UseShellExecute. I see a lot of confusion online regarding these .NET ProcessStartInfo properties, which is something I'd like to avoid.

A benefit of force_hide based on wShowWindow=SW_HIDE is feature parity with ShellExecuteExW(), if subprocess ever supports the shell API. ShellExecuteExW() does not support CREATE_NO_WINDOW, but it supports a show-window command and CREATE_NEW_CONSOLE (i.e. the inverse of SEE_MASK_NO_CONSOLE).

---
[1] https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.processstartinfo?view=net-5.0

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Fri Oct 29 10:37:29 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 29 Oct 2021 14:37:29 +0000
Subject: [issue45668] Some PGO tests are failing when building with
 --enable-optimizations --disable-test-modules
Message-ID: <1635518249.11.0.537805942695.issue45668@roundup.psfhosted.org>


New submission from Christian Heimes <lists at cheimes.de>:

Some PGO tests are failing when Python is build with options ./configure --disable-test-modules --enable-optimizations . Test failures are caused by missing _testcapi module.

./python -m test --pgo --timeout=1200 || true
test test_array failed
test test_bytes failed
test test_cmath failed
test test_codecs failed
0:00:23 load avg: 1.98 [13/44] test_datetime
Failed to call load_tests:
...
ModuleNotFoundError: No module named '_testcapi'
test test_embed failed
test test_float failed
test test_itertools failed
test test_ordered_dict failed
test test_pickle failed
test test_struct failed
test test_unicode failed
test test_xml_etree_c failed
test_xml_etree_c failed (3 errors)

----------
components: Build, Tests
messages: 405308
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: Some PGO tests are failing when building with --enable-optimizations --disable-test-modules
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45668>
_______________________________________

From report at bugs.python.org  Fri Oct 29 11:14:03 2021
From: report at bugs.python.org (swgmma)
Date: Fri, 29 Oct 2021 15:14:03 +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: <1635520443.01.0.298909186991.issue30082@roundup.psfhosted.org>


swgmma <jason.nader at protonmail.com> added the comment:

Thanks all for the guidance. Have gone back to the original `force_hide` with the suggested documentation.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Fri Oct 29 11:21:39 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 29 Oct 2021 15:21:39 +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: <1635520899.96.0.260632636193.issue45668@roundup.psfhosted.org>


Change by Christian Heimes <lists at cheimes.de>:


----------
keywords: +patch
pull_requests: +27584
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29315

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45668>
_______________________________________

From report at bugs.python.org  Fri Oct 29 11:24:49 2021
From: report at bugs.python.org (Vinay Sajip)
Date: Fri, 29 Oct 2021 15:24:49 +0000
Subject: [issue45628] TimedRotatingFileHandler backupCount not working
In-Reply-To: <1635348193.15.0.970239577461.issue45628@roundup.psfhosted.org>
Message-ID: <1635521089.14.0.831495335524.issue45628@roundup.psfhosted.org>


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:


New changeset 317e0c99e3804310f4bee23e497d9d84b717d7f7 by Miss Islington (bot) in branch '3.9':
[3.9] bpo-45628: Check all parts of the suffix for an extension match. (GH-29310) (GH-29313)
https://github.com/python/cpython/commit/317e0c99e3804310f4bee23e497d9d84b717d7f7


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45628>
_______________________________________

From report at bugs.python.org  Fri Oct 29 11:25:35 2021
From: report at bugs.python.org (Vinay Sajip)
Date: Fri, 29 Oct 2021 15:25:35 +0000
Subject: [issue45628] TimedRotatingFileHandler backupCount not working
In-Reply-To: <1635348193.15.0.970239577461.issue45628@roundup.psfhosted.org>
Message-ID: <1635521135.97.0.165041771758.issue45628@roundup.psfhosted.org>


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:


New changeset 191a93905a84f272b2232701dc5dcc69987330f5 by Miss Islington (bot) in branch '3.10':
[3.10] bpo-45628: Check all parts of the suffix for an extension match. (GH-29310) (GH-29314)
https://github.com/python/cpython/commit/191a93905a84f272b2232701dc5dcc69987330f5


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45628>
_______________________________________

From report at bugs.python.org  Fri Oct 29 11:27:27 2021
From: report at bugs.python.org (Vinay Sajip)
Date: Fri, 29 Oct 2021 15:27:27 +0000
Subject: [issue45628] TimedRotatingFileHandler backupCount not working
In-Reply-To: <1635348193.15.0.970239577461.issue45628@roundup.psfhosted.org>
Message-ID: <1635521247.36.0.760384158063.issue45628@roundup.psfhosted.org>


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

N.B. I was able to reproduce this on recent 3.9 versions as well.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45628>
_______________________________________

From report at bugs.python.org  Fri Oct 29 11:35:54 2021
From: report at bugs.python.org (Alex Waygood)
Date: Fri, 29 Oct 2021 15:35:54 +0000
Subject: [issue45535] Enum's dir() does not contain inherited members
In-Reply-To: <1634726106.14.0.525814954361.issue45535@roundup.psfhosted.org>
Message-ID: <1635521754.39.0.0649069006379.issue45535@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
keywords: +patch
pull_requests: +27585
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29316

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45535>
_______________________________________

From report at bugs.python.org  Fri Oct 29 11:44:21 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 29 Oct 2021 15:44:21 +0000
Subject: [issue45535] Enum's dir() does not contain inherited members
In-Reply-To: <1634726106.14.0.525814954361.issue45535@roundup.psfhosted.org>
Message-ID: <1635522261.69.0.897958194818.issue45535@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

PR 29316 looks complicated.

First of all, why do Enum needs a custom __dir__? What is wrong with the default implementation?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45535>
_______________________________________

From report at bugs.python.org  Fri Oct 29 11:50:05 2021
From: report at bugs.python.org (Christian Heimes)
Date: Fri, 29 Oct 2021 15:50:05 +0000
Subject: [issue45548] Update Modules/Setup
In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org>
Message-ID: <1635522605.97.0.336500029911.issue45548@roundup.psfhosted.org>


Christian Heimes <lists at cheimes.de> added the comment:


New changeset f0150ac94a85c863ec1dcb58b9e33ed7ce465ec8 by Christian Heimes in branch 'main':
bpo-45548: Some test modules must be built as shared libs (GH-29268)
https://github.com/python/cpython/commit/f0150ac94a85c863ec1dcb58b9e33ed7ce465ec8


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45548>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:11:03 2021
From: report at bugs.python.org (Paolo Melchiorre)
Date: Fri, 29 Oct 2021 16:11:03 +0000
Subject: [issue45669] An 'ascii_alphanumerics' variable is missing in the
 'strings' lib
Message-ID: <1635523863.84.0.534508316323.issue45669@roundup.psfhosted.org>


New submission from Paolo Melchiorre <paolo at melchiorre.org>:

It is very common to construct a variable containing alphanumeric values as a basis for generating random strings, especially in the web environment as a slug to be used in URLs:

>>> import string
>>> ascii_alphanumerics = string.ascii_letters + string.digits
>>> ascii_alphanumerics
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'


I suggest inserting a variable for just this purpose directly into Python's "string" module:

>>> import string
>>> string.ascii_alphanumerics
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'

----------
components: Library (Lib)
messages: 405315
nosy: pauloxnet
priority: normal
severity: normal
status: open
title: An 'ascii_alphanumerics' variable is missing in the 'strings' lib
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45669>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:12:39 2021
From: report at bugs.python.org (Sam James)
Date: Fri, 29 Oct 2021 16:12:39 +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: <1635523959.08.0.520658576562.issue45668@roundup.psfhosted.org>


Change by Sam James <sam at cmpct.info>:


----------
nosy: +thesamesam

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45668>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:12:43 2021
From: report at bugs.python.org (Sam James)
Date: Fri, 29 Oct 2021 16:12:43 +0000
Subject: [issue45484] test_pickle segfault on s390x RHEL7 LTO 3.x
In-Reply-To: <1634304423.18.0.10367404371.issue45484@roundup.psfhosted.org>
Message-ID: <1635523963.61.0.202795255651.issue45484@roundup.psfhosted.org>


Change by Sam James <sam at cmpct.info>:


----------
nosy: +thesamesam

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45484>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:12:51 2021
From: report at bugs.python.org (Sam James)
Date: Fri, 29 Oct 2021 16:12:51 +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: <1635523971.95.0.816872143342.issue44828@roundup.psfhosted.org>


Change by Sam James <sam at cmpct.info>:


----------
nosy: +thesamesam

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44828>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:13:01 2021
From: report at bugs.python.org (Sam James)
Date: Fri, 29 Oct 2021 16:13:01 +0000
Subject: [issue44525] Implement CALL_FUNCTION adaptive interpreter
 optimizations
In-Reply-To: <1624890138.2.0.824780513801.issue44525@roundup.psfhosted.org>
Message-ID: <1635523981.07.0.203813770799.issue44525@roundup.psfhosted.org>


Change by Sam James <sam at cmpct.info>:


----------
nosy: +thesamesam

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44525>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:12:56 2021
From: report at bugs.python.org (Sam James)
Date: Fri, 29 Oct 2021 16:12:56 +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: <1635523976.46.0.859963393658.issue45256@roundup.psfhosted.org>


Change by Sam James <sam at cmpct.info>:


----------
nosy: +thesamesam

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45256>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:13:07 2021
From: report at bugs.python.org (Sam James)
Date: Fri, 29 Oct 2021 16:13:07 +0000
Subject: [issue45643] SIGSTKFLT is missing from the signals module on Linux
In-Reply-To: <1635417063.88.0.746261778756.issue45643@roundup.psfhosted.org>
Message-ID: <1635523987.5.0.809965493896.issue45643@roundup.psfhosted.org>


Change by Sam James <sam at cmpct.info>:


----------
nosy: +thesamesam

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45643>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:13:11 2021
From: report at bugs.python.org (Sam James)
Date: Fri, 29 Oct 2021 16:13:11 +0000
Subject: [issue45350] configure incorrectly ignores pkg-config information for
 libffi and Tcl/Tk in 3.10
In-Reply-To: <1633234434.7.0.199943482554.issue45350@roundup.psfhosted.org>
Message-ID: <1635523991.88.0.467846317282.issue45350@roundup.psfhosted.org>


Change by Sam James <sam at cmpct.info>:


----------
nosy: +thesamesam

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45350>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:13:20 2021
From: report at bugs.python.org (Sam James)
Date: Fri, 29 Oct 2021 16:13:20 +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: <1635524000.0.0.609972973371.issue45598@roundup.psfhosted.org>


Change by Sam James <sam at cmpct.info>:


----------
nosy: +thesamesam

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45598>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:13:24 2021
From: report at bugs.python.org (Sam James)
Date: Fri, 29 Oct 2021 16:13:24 +0000
Subject: [issue14527] How to link with a non-system libffi?
In-Reply-To: <1333851935.11.0.629390980004.issue14527@psf.upfronthosting.co.za>
Message-ID: <1635524004.31.0.225994723509.issue14527@roundup.psfhosted.org>


Change by Sam James <sam at cmpct.info>:


----------
nosy: +thesamesam

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue14527>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:24:10 2021
From: report at bugs.python.org (Paolo Melchiorre)
Date: Fri, 29 Oct 2021 16:24:10 +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: <1635524650.86.0.259330325559.issue45669@roundup.psfhosted.org>


Change by Paolo Melchiorre <paolo at melchiorre.org>:


----------
keywords: +patch
pull_requests: +27586
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29317

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45669>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:31:36 2021
From: report at bugs.python.org (Vinay Sajip)
Date: Fri, 29 Oct 2021 16:31:36 +0000
Subject: [issue45628] TimedRotatingFileHandler backupCount not working
In-Reply-To: <1635348193.15.0.970239577461.issue45628@roundup.psfhosted.org>
Message-ID: <1635525096.55.0.89620126073.issue45628@roundup.psfhosted.org>


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

It's possible this crept in during the fix for bpo-44753.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45628>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:36:50 2021
From: report at bugs.python.org (Joshua Bronson)
Date: Fri, 29 Oct 2021 16:36:50 +0000
Subject: [issue45670] New .mapping attribute is broken for some existing uses
 of dict views
Message-ID: <1635525410.44.0.846161043783.issue45670@roundup.psfhosted.org>


New submission from Joshua Bronson <jabronson at gmail.com>:

As of bpo-40890 (released in Python 3.10), dict views now provide a public .mapping attribute, intended to allow users to recover a mappingproxy pointing to the original mapping.

However, this new attribute can actually point to the wrong mapping for some existing uses of dict views. And since the .mapping attribute is read-only, these existing uses have no way to set it to the correct value.

My bidict library (see https://github.com/jab/bidict) provides an example of this.

A bidict implements a bidirectional mapping by building on top of two dicts (i.e. regular old one-directional mappings) internally -- one for the forward direction, and one for the inverse. When you call e.g. keys() or values() on a bidict, you get back a dict_keys view from one of the backing dicts, because this is a much more optimized implementation of these views than collections.abc.KeysView would be:

>>> import bidict
>>> b = bidict.bidict(one=1, two=2)
>>> b
bidict({'one': 1, 'two': 2})
>>> b.keys()
dict_keys(['one', 'two'])
>>> b.values()
dict_keys([1, 2])


However, now that these built-in dict_keys objects provide a .mapping attribute in Python 3.10, it points to one of the internal, backing dicts in this case, which is an implementation detail, rather than to the bidict instance:

>>> b.keys().mapping  # wrong
mappingproxy({'one': 1, 'two': 2})
>>> b.values().mapping  # wrong
mappingproxy({1: 'one', 2: 'two'})


Instead of the above, you should get:

>>> b.keys().mapping  # corrected:
mappingproxy(bidict({'one': 1, 'two': 2}))
>>> b.values().mapping  # corrected:
mappingproxy(bidict({'one': 1, 'two': 2}))


Since the .mapping attribute is read-only, there's no way for bidict to both keep exposing the optimized dict_keys implementations, which up till now have been perfectly correct, while now exposing a correct .mapping attribute for users of Python 3.10+.

(Other bidict types demonstrate this problem more by exposing even more obviously-unintended implementation details via this new .mapping attribute:

>>> f = bidict.FrozenOrderedBidict(b)
>>> f
FrozenOrderedBidict([('one', 1), ('two', 2)])
>>> f.keys().mapping  # ouch
mappingproxy({'one': _Node(prv=..., self=..., nxt=...), 'two': _Node(prv=..., self=..., nxt=...)})

Those internal _Node objects were never meant to be exposed to consumers, they're an implementation detail.)


It looks like cases like this were not considered when discussing bpo-40890, and if they had been, I wonder if the implementation would have been accepted as-is.

Here are some potential directions for how to improve things for the future:

1. Expose a way for dict view users like bidict to continue to use optimized dict view implementations while opting out of the new .mapping attribute

2. Make the .mapping attribute no longer read-only, so libraries like bidict can set it correctly before exposing it to users

3. Merely update the documentation in https://docs.python.org/3/library/stdtypes.html#:~:text=dictview.mapping,in%20version%203.10. to mention that, because the .mapping attribute is read-only, it may not point to the original, intended mapping, but rather some internal mapping that the user was not intended to be exposed to.


Looking forward to hearing your thoughts, and thanks for your consideration.

----------
components: Interpreter Core
messages: 405317
nosy: jab, rhettinger
priority: normal
severity: normal
status: open
title: New .mapping attribute is broken for some existing uses of dict views
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45670>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:48:16 2021
From: report at bugs.python.org (lilydjwg)
Date: Fri, 29 Oct 2021 16:48:16 +0000
Subject: [issue45671] str(CancelledError()) is empty
Message-ID: <1635526096.46.0.894887931952.issue45671@roundup.psfhosted.org>


New submission from lilydjwg <lilydjwg at gmail.com>:

When I try to print an asyncio.CancelledError object, I do not see it and I thought something went wrong.

CancelledError inherits from BaseException and all BaseException subclasses (e.g. SystemExit, KeyboardInterrupted) seem to return empty strings for str(e). While I never tried to print SystemExit or KeyboardInterrupted, I did try to print an CancelledError. It doesn't have a lot information but all other exceptions I tried to print return something so I expect CancelledError to be the same.

I know repr(e). I was just lazy and I expect Python to not be confusing even I'm lazy.

----------
components: asyncio
messages: 405318
nosy: asvetlov, lilydjwg, yselivanov
priority: normal
severity: normal
status: open
title: str(CancelledError()) is empty
type: enhancement
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45671>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:52:34 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 29 Oct 2021 16:52:34 +0000
Subject: [issue45672] Mutation tests results of typing.py
Message-ID: <1635526354.62.0.519981897591.issue45672@roundup.psfhosted.org>


New submission from Nikita Sobolev <mail at sobolevn.me>:

I've decided to test `typing.py` with `cosmic-ray` mutation testing framework. It identified 3 potential problems.

Config:

```
[cosmic-ray]
module-path = "Lib/typing.py"
timeout = 15.0
excluded-modules = []
test-command = "./python.exe -m test -v test_typing --failfast"

[cosmic-ray.distributor]
name = "local"
```

Repro steps:
0. pip install cosmic-ray
1. Copy config above as `typing.toml`
2. cosmic-ray init typing.toml typing.sqlite
3. cosmic-ray exec tutorial.toml tutorial.sqlite 

Survived mutants:

1. ```
--- mutation diff ---
--- aLib/typing.py
+++ bLib/typing.py
@@ -1103,7 +1103,7 @@
             if Protocol in bases:
                 return ()
             i = bases.index(self)
-            for b in bases[i+1:]:
+            for b in bases[i*1:]:
                 if isinstance(b, _BaseGenericAlias) and b is not self:
                     return ()
         return (self.__origin__,)
```

2. ```
--- mutation diff ---
--- aLib/typing.py
+++ bLib/typing.py
@@ -1103,7 +1103,7 @@
             if Protocol in bases:
                 return ()
             i = bases.index(self)
-            for b in bases[i+1:]:
+            for b in bases[i//1:]:
                 if isinstance(b, _BaseGenericAlias) and b is not self:
                     return ()
         return (self.__origin__,)
```

3. ```
--- mutation diff ---
--- aLib/typing.py
+++ bLib/typing.py
@@ -1103,7 +1103,7 @@
             if Protocol in bases:
                 return ()
             i = bases.index(self)
-            for b in bases[i+1:]:
+            for b in bases[i**1:]:
                 if isinstance(b, _BaseGenericAlias) and b is not self:
                     return ()
         return (self.__origin__,)
```

I've attached the full report to this issue if it is interesting to anyone: https://gist.github.com/sobolevn/79f1729dcf0b8c4b2a9bcee67027673a

----------
components: Tests
messages: 405319
nosy: sobolevn
priority: normal
severity: normal
status: open
title: Mutation tests results of typing.py
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45672>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:55:08 2021
From: report at bugs.python.org (Ethan Furman)
Date: Fri, 29 Oct 2021 16:55:08 +0000
Subject: [issue45535] Enum's dir() does not contain inherited members
In-Reply-To: <1634726106.14.0.525814954361.issue45535@roundup.psfhosted.org>
Message-ID: <1635526508.35.0.478118760726.issue45535@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:

Enums have had a custom dir() from the beginning, partly because they are not standard objects and do not follow standard rules.

The question posed by this issue is whether Enums with mixed-in data types should show the inherited methods, and if yes, should it also show inherited `__dunders__`.

I'm inclined to say yes for the normal inherited methods, I'm not sure about inherited `__dunders__`.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45535>
_______________________________________

From report at bugs.python.org  Fri Oct 29 12:55:10 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Fri, 29 Oct 2021 16:55:10 +0000
Subject: [issue45672] Mutation tests results of typing.py
In-Reply-To: <1635526354.62.0.519981897591.issue45672@roundup.psfhosted.org>
Message-ID: <1635526510.26.0.504645733794.issue45672@roundup.psfhosted.org>


Nikita Sobolev <mail at sobolevn.me> added the comment:

I can send a PR to have 100% mutation coverage for `typing.py`.
I think that a single test can do that.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45672>
_______________________________________

From report at bugs.python.org  Fri Oct 29 13:06:05 2021
From: report at bugs.python.org (Paolo Benvenuto)
Date: Fri, 29 Oct 2021 17:06:05 +0000
Subject: [issue45673] argparse error with option with optional value
Message-ID: <1635527165.05.0.842141756958.issue45673@roundup.psfhosted.org>


New submission from Paolo Benvenuto <paolobenve at gmail.com>:

I'm using argparse with this code:

parser = argparse.ArgumentParser(
    description='Scan a media tree in order to generate cache files suitable for showing a beautiful web gallery',
  )
  parser.add_argument(
    "config_file_or_album_path",
    help="the config file, if it's the only positional argument, or the album path, if two positional arguments are supplied"
  )
  parser.add_argument(
    "cache_path",
    nargs="?",
    default="",
    help="the cache path, if two positional arguments are supplied; otherwise, nothing"
  )
  parser.add_argument(
    "-s",
    "--periodic-save",
    nargs="?",
    type=int,
    const=5,
    default=0,
    dest="periodic_save",
    metavar="MINUTES",
    help="runs the scanner in a more robust way, saving json files every X minutes, where X is the value given, or 5 if no value is given; 0 means non autosaving"
  )
  parser.add_argument(
    "-j",
    "--recreate-json-files",
    action='store_true',
    dest="recreate_json_files",
    help="completely recreate the json files cache"
  )
  parser.add_argument(
    "-r",
    "--recreate-reduced-photos",
    action='store_true',
    dest="recreate_reduced_photos",
    help="completely recreate reduced photo cache files"
  )
  parser.add_argument(
    "-t",
    "--recreate-thumbnails",
    action='store_true',
    dest="recreate_thumbnails",
    help="completely recreate thumbnail cache files"
  )
  parser.add_argument(
    "-v",
    "--recreate-transcoded-videos",
    action='store_true',
    dest="recreate_transcoded_videos",
    help="completely recreate transcoded video cache files"
  )
  parser.add_argument(
    "-a",
    "--recreate-all",
    action='store_true',
    dest="recreate_all",
    help="completely recreate the cache: json files, reduced photos, thumbnails and transcoded videos; same as -jrtv"
  )
  parser.add_argument("--version", action="version", version='%(prog)s v5.3.10')
  args = parser.parse_args()

Running the app without parameter gives me:

$ myapp
usage: scanner [-h] [-s [MINUTES]] [-j] [-r] [-t] [-v] [-a] [--version] config_file_or_album_path [cache_path]
myapp: error: the following arguments are required: config_file_or_album_path

(the last line doesn't matter here, a required parameter is missing).

The -s option is optional and has an optional value, but:

$ myapp -s myfile
usage: scanner [-h] [-s [MINUTES]] [-j] [-r] [-t] [-v] [-a] [--version] config_file_or_album_path [cache_path]
scanner: error: argument -s/--periodic-save: invalid int value: '/my/file'

I'm expecting that, since there is a mandatory positional argument, myfile is interpreted as such, and only after that, -s is recognized as the optional argument without value.

----------
components: Library (Lib)
messages: 405322
nosy: paolobenve
priority: normal
severity: normal
status: open
title: argparse error with option with optional value
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45673>
_______________________________________

From report at bugs.python.org  Fri Oct 29 13:06:55 2021
From: report at bugs.python.org (Alex Waygood)
Date: Fri, 29 Oct 2021 17:06:55 +0000
Subject: [issue45535] Enum's dir() does not contain inherited members
In-Reply-To: <1634726106.14.0.525814954361.issue45535@roundup.psfhosted.org>
Message-ID: <1635527215.87.0.397894981659.issue45535@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

I would argue it's quite important for `IntEnum` to have the dunder methods inherited from `int` show up in `help()`. Dunder methods indicate that an object has certain behaviours, so it's important for a user to be able to verify that an `IntEnum` member has similar behaviours to an `int` instance. `IntEnum` is advertised in the documentation as something that can be used everywhere where an integer is expected; it's surprising when the output from `help()` is hugely abbreviated for `IntEnum` relative to `int`.

But, I agree that my first draft of this PR is more complex than I'd like it to be.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45535>
_______________________________________

From report at bugs.python.org  Fri Oct 29 13:16:41 2021
From: report at bugs.python.org (Andrew Svetlov)
Date: Fri, 29 Oct 2021 17:16:41 +0000
Subject: [issue45671] str(CancelledError()) is empty
In-Reply-To: <1635526096.46.0.894887931952.issue45671@roundup.psfhosted.org>
Message-ID: <1635527801.41.0.0236295964536.issue45671@roundup.psfhosted.org>


Andrew Svetlov <andrew.svetlov at gmail.com> added the comment:

I don't think that we need to change something with the current behavior.

It exists for years; very many Python exceptions return an empty string on `str(exc)` but return something useful on `repr(exc)`.

If you arguing to change the behavior -- all such exceptions should be changed, not CancelledError only.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45671>
_______________________________________

From report at bugs.python.org  Fri Oct 29 13:21:23 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 29 Oct 2021 17:21:23 +0000
Subject: [issue45562] python -d creates lots of tokenizer messages
In-Reply-To: <1634853255.49.0.658081837548.issue45562@roundup.psfhosted.org>
Message-ID: <1635528083.72.0.920460335362.issue45562@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset d8ca47c943c4ad396a9c70aff35bbbf4b1868876 by Miss Islington (bot) in branch '3.10':
bpo-45562: Ensure all tokenizer debug messages are printed to stderr (GH-29270)
https://github.com/python/cpython/commit/d8ca47c943c4ad396a9c70aff35bbbf4b1868876


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45562>
_______________________________________

From report at bugs.python.org  Fri Oct 29 14:21:35 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 29 Oct 2021 18:21:35 +0000
Subject: [issue45671] str(CancelledError()) is empty
In-Reply-To: <1635526096.46.0.894887931952.issue45671@roundup.psfhosted.org>
Message-ID: <1635531695.89.0.937774244213.issue45671@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Concur with Andrew.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45671>
_______________________________________

From report at bugs.python.org  Fri Oct 29 14:35:49 2021
From: report at bugs.python.org (Tristan)
Date: Fri, 29 Oct 2021 18:35:49 +0000
Subject: [issue45674] From Python 3.7,
 sre_parse.parse() do not create SubPattern instances that can be used
 to back reproduce original expression if containing non-capturing groups
Message-ID: <1635532549.63.0.469467756484.issue45674@roundup.psfhosted.org>


New submission from Tristan <trislatr at gmail.com>:

>From Python 3.7, sre_parse.parse() do not create SubPattern instances that can be used to back reproduce original expression if containing non-capturing groups. 

In Python 3.6: 

>>> import sre_parse
>>> sre_parse.parse("(?:foo (?:bar) | (?:baz))").dump()
SUBPATTERN None 0 0
  BRANCH
    LITERAL 102
    LITERAL 111
    LITERAL 111
    LITERAL 32
    SUBPATTERN None 0 0
      LITERAL 98
      LITERAL 97
      LITERAL 114
    LITERAL 32
  OR
    LITERAL 32
    SUBPATTERN None 0 0
      LITERAL 98
      LITERAL 97
      LITERAL 122


In Python 3.7 and beyond: 

>>> import sre_parse
>>> sre_parse.parse("(?:foo (?:bar) | (?:baz))").dump()
BRANCH
  LITERAL 102
  LITERAL 111
  LITERAL 111
  LITERAL 32
  LITERAL 98
  LITERAL 97
  LITERAL 114
  LITERAL 32
OR
  LITERAL 32
  LITERAL 98
  LITERAL 97
  LITERAL 122

This behaviour is making it impossible to write a correct colorizer for regular expressions using the sre_parse module from Python 3.7. I'm not a regex expert, so I cannot say wether this change has any effect on the matching itself, but if I trust regex101, it will add a capturing group in the place of the non-capturing group.

----------
components: Regular Expressions
messages: 405327
nosy: ezio.melotti, mrabarnett, tristanlatr
priority: normal
severity: normal
status: open
title: From Python 3.7, sre_parse.parse() do not create SubPattern instances that can be used to back reproduce original expression if containing non-capturing groups
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45674>
_______________________________________

From report at bugs.python.org  Fri Oct 29 14:40:27 2021
From: report at bugs.python.org (Dmitry Smirnov)
Date: Fri, 29 Oct 2021 18:40: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: <1635532827.35.0.39378524641.issue45633@roundup.psfhosted.org>


Change by Dmitry Smirnov <dmitrysmirnov931 at gmail.com>:


----------
keywords: +patch
nosy: +dmitrysmirnov931
nosy_count: 2.0 -> 3.0
pull_requests: +27588
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29318

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45633>
_______________________________________

From report at bugs.python.org  Fri Oct 29 14:41:17 2021
From: report at bugs.python.org (Larry Hastings)
Date: Fri, 29 Oct 2021 18:41:17 +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: <1635532877.4.0.54748783591.issue45319@roundup.psfhosted.org>


Larry Hastings <larry at hastings.org> added the comment:

I finally have some bandwidth to look at this--sorry for being a bit slow.

I wasn't able to reproduce, because the patch didn't apply cleanly.  I downloaded the patch ( https://patch-diff.githubusercontent.com/raw/GrahamDumpleton/wrapt/pull/187.patch ) and ran against current wrapt main, and about 50% of the "hunks" failed to apply.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45319>
_______________________________________

From report at bugs.python.org  Fri Oct 29 14:50:43 2021
From: report at bugs.python.org (Alex Waygood)
Date: Fri, 29 Oct 2021 18:50:43 +0000
Subject: [issue45674] From Python 3.7,
 sre_parse.parse() do not create SubPattern instances that can be used
 to back reproduce original expression if containing non-capturing groups
In-Reply-To: <1635532549.63.0.469467756484.issue45674@roundup.psfhosted.org>
Message-ID: <1635533443.09.0.16477697177.issue45674@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

Bugfixes are only being applied for Python >=3.9, but I've reproduced this output on 3.11

----------
nosy: +AlexWaygood
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45674>
_______________________________________

From report at bugs.python.org  Fri Oct 29 15:22:28 2021
From: report at bugs.python.org (Nir Friedman)
Date: Fri, 29 Oct 2021 19:22:28 +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: <1635535348.02.0.60875743204.issue45250@roundup.psfhosted.org>


Nir Friedman <quicknir at gmail.com> added the comment:

Wouldn't a nicer resolution for this be to change `iter` (which effectively defines what is "iterable"), so that if `iter` does not find the `__iter__` or sequence protocol, it then looks for the iterator protocol (`__next__`), and if it finds that, return the argument?

In that way, all iterators would automatically get the sane implementation of `__iter__` by default, and we could say that in the "runtime", all iterators are iterable, matching the types. And people wouldn't need to implement `__iter__` any more on their iterators i.e. the recommendation could simply be dropped).

----------
nosy: +quicknir

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45250>
_______________________________________

From report at bugs.python.org  Fri Oct 29 15:26:00 2021
From: report at bugs.python.org (Matt Wozniski)
Date: Fri, 29 Oct 2021 19:26:00 +0000
Subject: [issue45675] pkgutil.get_data() doesn't add subpackages to namespaces
 when importing
Message-ID: <1635535560.24.0.0921518602941.issue45675@roundup.psfhosted.org>


New submission from Matt Wozniski <godlygeek at gmail.com>:

If a module hasn't yet been imported, `pkgutil.get_data(pkg_name, data_file)` will import it, but when it does, it doesn't add the submodule to its parent package when the parent package is a PEP 420 implicit namespace package.

```
$ mkdir -p namespace/package
$ touch namespace/package/__init__.py
$ echo data >namespace/package/data_file
$ python3.10 -c 'import namespace.package, pkgutil; print(pkgutil.get_data("namespace.package", "data_file")); import namespace; print(namespace.package)'
b'data\n'
<module 'namespace.package' from '/tmp/namespace/package/__init__.py'>
$ python3.10 -c 'import pkgutil; print(pkgutil.get_data("namespace.package", "data_file")); import namespace.package; import namespace; print(namespace.package)'
b'data\n'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'namespace' has no attribute 'package'
$
```

In this reproducer, we've got an implicit namespace package called "namespace" and a regular package inside it called "namespace.package". The regular package has a data file called "data_file".

If we import the regular package and then call pkgutil.get_data() to access the data file, it successfully retrieves the data file, and the module object for the namespace package winds up with an attribute referencing the module object for the regular package.

If we call pkgutil.get_data() to access the data file before importing the regular package, it successfully retrieves the data file, but the module object for the namespace package doesn't have an attribute referencing the module object for the regular package, even if we later do a normal import for the regular package.

It looks like pkgutil is importing the module when it hasn't already been imported (which I would expect) and adding it and any parent packages to sys.modules (which I would also expect), but then not adding submodules as attributes to their parent modules like `import` would (which seems like a bug).

----------
components: Library (Lib)
messages: 405331
nosy: godlygeek, pablogsal
priority: normal
severity: normal
status: open
title: pkgutil.get_data() doesn't add subpackages to namespaces when importing
type: behavior
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45675>
_______________________________________

From report at bugs.python.org  Fri Oct 29 15:42:44 2021
From: report at bugs.python.org (Matt Wozniski)
Date: Fri, 29 Oct 2021 19:42:44 +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: <1635536564.89.0.652346160433.issue45675@roundup.psfhosted.org>


Matt Wozniski <godlygeek at gmail.com> added the comment:

The original case where I encountered this was with a namespace package, but the behavior appears to be the same for a subpackage of a regular package.

----------
title: pkgutil.get_data() doesn't add subpackages to namespaces when importing -> pkgutil.get_data() doesn't add subpackages to parent packages when importing

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45675>
_______________________________________

From report at bugs.python.org  Fri Oct 29 15:47:03 2021
From: report at bugs.python.org (Ethan Furman)
Date: Fri, 29 Oct 2021 19:47:03 +0000
Subject: [issue45676] Enum: improve generics support
Message-ID: <1635536823.79.0.358322151332.issue45676@roundup.psfhosted.org>


Change by Ethan Furman <ethan at stoneleaf.us>:


----------
assignee: ethan.furman
nosy: ethan.furman
priority: normal
severity: normal
status: open
title: Enum: improve generics support
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45676>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:12:22 2021
From: report at bugs.python.org (Eryk Sun)
Date: Fri, 29 Oct 2021 20:12:22 +0000
Subject: [issue45645] Deep recursion terminates script execution with no error
 (Windows, Python 3.9)
In-Reply-To: <1635430372.32.0.809866843445.issue45645@roundup.psfhosted.org>
Message-ID: <1635538342.22.0.758528594619.issue45645@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

In theory, a crash could be prevented in most cases by setting a larger stack guarantee (i.e. region of guard pages) via SetThreadStackGuarantee() [1] and using a vectored exception handler [2]. The exception handler can set a flag in the thread state that indicates stack-overflow recovery is in progress and then return EXCEPTION_CONTINUE_EXECUTION. The guaranteed stack space will be available, but there are no guard pages, so another stack overflow in this context will crash with an access violation. The stack guarantee should be large enough to raise and unwind a RecursionError. As the stack unwinds, if the recovery flag is still set, try calling _resetstkoflw() [3] to restore the guard region. If it succeeds, clear the flag in the thread state.

For giggles, here's a toy example using ctypes:

    import ctypes
    import sys

    kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)
    ucrt = ctypes.CDLL('ucrtbase', use_errno=True)

    EXCEPTION_CONTINUE_EXECUTION = 0xFFFFFFFF

    stack_overflow = False

    @ctypes.WINFUNCTYPE(ctypes.c_long, ctypes.c_void_p)
    def handler(p):
        global stack_overflow
        stack_overflow = True
        return EXCEPTION_CONTINUE_EXECUTION

    kernel32.AddVectoredExceptionHandler(1, handler)

    def recursive():
        if stack_overflow:
            raise RecursionError
        recursive()

    # Normally the stack has 2 or 3 guard pages, which is actually
    # enough to recover in this example, but let's increase it to
    # 9 pages (8 plus an extra that the memory manager adds). You
    # can inspect this with Sysinternals VMMap.
    size = ctypes.c_ulong(8 * 4096)
    kernel32.SetThreadStackGuarantee(ctypes.byref(size))

    sys.setrecursionlimit(1000000)

    for n in range(5):
        try:
            recursive()
        except RecursionError:
            if stack_overflow and ucrt._resetstkoflw():
                stack_overflow = False
                print("recovered from stack overflow:", n)

---
[1] https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-setthreadstackguarantee
[2] https://docs.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-addvectoredexceptionhandler
[3] https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/resetstkoflw?view=msvc-160

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45645>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:17:34 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 29 Oct 2021 20:17:34 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1635538654.75.0.811979822262.issue45335@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +27589
pull_request: https://github.com/python/cpython/pull/29319

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:17:30 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 29 Oct 2021 20:17:30 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1635538650.72.0.468159851013.issue45335@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 3877fc02f7a8801ba5ce0e94b6075b3fdd9778d0 by Ian Fisher in branch 'main':
bpo-45335: Add note to `sqlite3` docs about "timestamp" converter (GH-29200)
https://github.com/python/cpython/commit/3877fc02f7a8801ba5ce0e94b6075b3fdd9778d0


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:17:38 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 29 Oct 2021 20:17:38 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1635538658.99.0.0779953700864.issue45335@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27590
pull_request: https://github.com/python/cpython/pull/29320

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:18:49 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 29 Oct 2021 20:18:49 +0000
Subject: [issue45600] First sentence in docs for os.environ
In-Reply-To: <1635088267.89.0.720866018266.issue45600@roundup.psfhosted.org>
Message-ID: <1635538729.66.0.078715916269.issue45600@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset b17cfd150f4dc2816975d304a71110a2d445eaf0 by andrei kulakov in branch 'main':
bpo-45600: Enhanced / clarified the docs for os.environ and os.environb (GH-29204)
https://github.com/python/cpython/commit/b17cfd150f4dc2816975d304a71110a2d445eaf0


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45600>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:19:44 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 29 Oct 2021 20:19:44 +0000
Subject: [issue45600] First sentence in docs for os.environ
In-Reply-To: <1635088267.89.0.720866018266.issue45600@roundup.psfhosted.org>
Message-ID: <1635538784.3.0.897124000664.issue45600@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27592
pull_request: https://github.com/python/cpython/pull/29322

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45600>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:19:40 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 29 Oct 2021 20:19:40 +0000
Subject: [issue45600] First sentence in docs for os.environ
In-Reply-To: <1635088267.89.0.720866018266.issue45600@roundup.psfhosted.org>
Message-ID: <1635538780.12.0.425577101511.issue45600@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +27591
pull_request: https://github.com/python/cpython/pull/29321

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45600>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:22:06 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 29 Oct 2021 20:22:06 +0000
Subject: [issue45581] [sqlite3] raise MemoryError if sqlite3_open_v2() returns
 SQLITE_NOMEM
In-Reply-To: <1634931771.8.0.677146859676.issue45581@roundup.psfhosted.org>
Message-ID: <1635538926.52.0.297418401809.issue45581@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset e2e62b3808691e15fa44b883270023e42dcad958 by Erlend Egeberg Aasland in branch 'main':
bpo-45581: Raise `MemoryError` in `sqlite3.connect` if SQLite signals memory error (GH-29171)
https://github.com/python/cpython/commit/e2e62b3808691e15fa44b883270023e42dcad958


----------
nosy: +lukasz.langa

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45581>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:32:20 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 29 Oct 2021 20:32:20 +0000
Subject: [issue45581] [sqlite3] raise MemoryError if sqlite3_open_v2() returns
 SQLITE_NOMEM
In-Reply-To: <1634931771.8.0.677146859676.issue45581@roundup.psfhosted.org>
Message-ID: <1635539540.59.0.372521534865.issue45581@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
pull_requests: +27593
pull_request: https://github.com/python/cpython/pull/29323

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45581>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:33:57 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 29 Oct 2021 20:33:57 +0000
Subject: [issue45581] [sqlite3] raise MemoryError if sqlite3_open_v2() returns
 SQLITE_NOMEM
In-Reply-To: <1634931771.8.0.677146859676.issue45581@roundup.psfhosted.org>
Message-ID: <1635539637.29.0.821252071979.issue45581@roundup.psfhosted.org>


Change by ?ukasz Langa <lukasz at langa.pl>:


----------
pull_requests: +27594
pull_request: https://github.com/python/cpython/pull/29324

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45581>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:34:49 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 29 Oct 2021 20:34:49 +0000
Subject: [issue45577] Make `test_zoneinfo.py` to check all pickle protocols
In-Reply-To: <1634920950.64.0.966445570701.issue45577@roundup.psfhosted.org>
Message-ID: <1635539689.4.0.717119492364.issue45577@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Nikita! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45577>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:41:53 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 29 Oct 2021 20:41:53 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1635540113.72.0.901104227449.issue45335@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 8ea665c730cd86a321c558c012bef84f454efa4f by Miss Islington (bot) in branch '3.10':
bpo-45335: Add note to `sqlite3` docs about "timestamp" converter (GH-29200) (GH-29319)
https://github.com/python/cpython/commit/8ea665c730cd86a321c558c012bef84f454efa4f


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:42:47 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 29 Oct 2021 20:42:47 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1635540167.01.0.0558875318756.issue45335@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset e1560313d4d9bff8eba0f851ef325f7ee19f7ba9 by Miss Islington (bot) in branch '3.9':
bpo-45335: Add note to `sqlite3` docs about "timestamp" converter (GH-29200) (GH-29320)
https://github.com/python/cpython/commit/e1560313d4d9bff8eba0f851ef325f7ee19f7ba9


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:45:13 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 29 Oct 2021 20:45:13 +0000
Subject: [issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset
In-Reply-To: <1633030648.15.0.389354245942.issue45335@roundup.psfhosted.org>
Message-ID: <1635540313.37.0.437660207135.issue45335@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Based on the decision from Discourse, the current behavior has only been documented and the actual issue is "wontfix".

Thanks for pursuing this, Ian! ? ? ?

----------
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45335>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:45:41 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 29 Oct 2021 20:45:41 +0000
Subject: [issue45600] First sentence in docs for os.environ
In-Reply-To: <1635088267.89.0.720866018266.issue45600@roundup.psfhosted.org>
Message-ID: <1635540341.58.0.87809025896.issue45600@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 0538351fcaa320e62cb4ef92ec629b7e24a73e9c by Miss Islington (bot) in branch '3.10':
bpo-45600: Enhanced / clarified the docs for os.environ and os.environb (GH-29204) (GH-29322)
https://github.com/python/cpython/commit/0538351fcaa320e62cb4ef92ec629b7e24a73e9c


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45600>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:53:09 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 29 Oct 2021 20:53:09 +0000
Subject: [issue45600] First sentence in docs for os.environ
In-Reply-To: <1635088267.89.0.720866018266.issue45600@roundup.psfhosted.org>
Message-ID: <1635540789.47.0.412138348046.issue45600@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 3ec1124de289496efabc43a02cc88b3c59e1e238 by Miss Islington (bot) in branch '3.9':
bpo-45600: Enhanced / clarified the docs for os.environ and os.environb (GH-29204) (GH-29321)
https://github.com/python/cpython/commit/3ec1124de289496efabc43a02cc88b3c59e1e238


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45600>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:53:34 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 29 Oct 2021 20:53:34 +0000
Subject: [issue45600] First sentence in docs for os.environ
In-Reply-To: <1635088267.89.0.720866018266.issue45600@roundup.psfhosted.org>
Message-ID: <1635540814.52.0.611709460688.issue45600@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Andrei! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45600>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:54:11 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 29 Oct 2021 20:54:11 +0000
Subject: [issue45581] [sqlite3] raise MemoryError if sqlite3_open_v2() returns
 SQLITE_NOMEM
In-Reply-To: <1634931771.8.0.677146859676.issue45581@roundup.psfhosted.org>
Message-ID: <1635540851.7.0.182976853494.issue45581@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset 7e2c0a18b41cb906a354776e6ca52af81e39820f by ?ukasz Langa in branch '3.10':
[3.10] bpo-45581: Raise `MemoryError` in `sqlite3.connect` if SQLite signals memory error (GH-29171) (GH-29323)
https://github.com/python/cpython/commit/7e2c0a18b41cb906a354776e6ca52af81e39820f


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45581>
_______________________________________

From report at bugs.python.org  Fri Oct 29 16:55:22 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 29 Oct 2021 20:55:22 +0000
Subject: [issue45379] Improve errors related to frozen modules.
In-Reply-To: <1633449120.03.0.98563217148.issue45379@roundup.psfhosted.org>
Message-ID: <1635540922.62.0.845650633935.issue45379@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset c2d0ba722a7b3839685af968cf0c304a24cdf525 by Filipe La?ns in branch 'main':
bpo-45379: clarify FROZEN_EXCLUDED and FROZEN_INVALID documentation (GH-29189)
https://github.com/python/cpython/commit/c2d0ba722a7b3839685af968cf0c304a24cdf525


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45379>
_______________________________________

From report at bugs.python.org  Fri Oct 29 17:02:29 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 29 Oct 2021 21:02:29 +0000
Subject: [issue45581] [sqlite3] raise MemoryError if sqlite3_open_v2() returns
 SQLITE_NOMEM
In-Reply-To: <1634931771.8.0.677146859676.issue45581@roundup.psfhosted.org>
Message-ID: <1635541349.19.0.641925401921.issue45581@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:


New changeset ed807bf333cdc78b92c9861600acf1a435c52193 by ?ukasz Langa in branch '3.9':
[3.9] bpo-45581: Raise `MemoryError` in `sqlite3.connect` if SQLite signals memory error (GH-29171) (GH-29324)
https://github.com/python/cpython/commit/ed807bf333cdc78b92c9861600acf1a435c52193


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45581>
_______________________________________

From report at bugs.python.org  Fri Oct 29 17:03:05 2021
From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=)
Date: Fri, 29 Oct 2021 21:03:05 +0000
Subject: [issue45581] [sqlite3] raise MemoryError if sqlite3_open_v2() returns
 SQLITE_NOMEM
In-Reply-To: <1634931771.8.0.677146859676.issue45581@roundup.psfhosted.org>
Message-ID: <1635541385.29.0.993345642239.issue45581@roundup.psfhosted.org>


?ukasz Langa <lukasz at langa.pl> added the comment:

Thanks, Erlend! ? ? ?

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> crash

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45581>
_______________________________________

From report at bugs.python.org  Fri Oct 29 17:27:28 2021
From: report at bugs.python.org (Steve Dower)
Date: Fri, 29 Oct 2021 21:27:28 +0000
Subject: [issue45582] Rewrite getpath.c in Python
In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org>
Message-ID: <1635542848.35.0.0940263045635.issue45582@roundup.psfhosted.org>


Steve Dower <steve.dower at python.org> added the comment:

So I think I've found my first completely unavoidable API break: PyConfig_Read(config) has to work before initialisation, but is also supposed to fill out all the fields (including the search path). But because we need at least an interpreter state, we now can't calculate everything.

The only test that seems to be affected here is test_embed.test_init_read_set(), which does a PyConfig_Read() and then inserts new paths into module_search_paths before initialising. With that one skipped, I think everything else can be handled.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45582>
_______________________________________

From report at bugs.python.org  Fri Oct 29 17:55:04 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Fri, 29 Oct 2021 21:55:04 +0000
Subject: [issue45677] [doc] improve sqlite3 docs
Message-ID: <1635544504.5.0.82834028892.issue45677@roundup.psfhosted.org>


New submission from Erlend E. Aasland <erlend.aasland at innova.no>:

The sqlite3 docs could need a little makeover. Here's some things that could be improved:

- avoid addressing the reader as "you"
- avoid using affirmative tone
- establish a "Security Considerations" or "Common Mistakes" section, instead of littering the docs with warnings


See also:
- https://devguide.python.org/documenting/#style-guide

----------
assignee: docs at python
components: Documentation
messages: 405349
nosy: docs at python, erlendaasland
priority: normal
severity: normal
status: open
title: [doc] improve sqlite3 docs
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45677>
_______________________________________

From report at bugs.python.org  Fri Oct 29 18:00:32 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Fri, 29 Oct 2021 22:00:32 +0000
Subject: [issue45677] [doc] improve sqlite3 docs
In-Reply-To: <1635544504.5.0.82834028892.issue45677@roundup.psfhosted.org>
Message-ID: <1635544832.8.0.606902125635.issue45677@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
keywords: +patch
pull_requests: +27595
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29326

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45677>
_______________________________________

From report at bugs.python.org  Fri Oct 29 18:06:23 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 29 Oct 2021 22:06:23 +0000
Subject: [issue45674] From Python 3.7,
 sre_parse.parse() do not create SubPattern instances that can be used
 to back reproduce original expression if containing non-capturing groups
In-Reply-To: <1635532549.63.0.469467756484.issue45674@roundup.psfhosted.org>
Message-ID: <1635545183.82.0.0328593064539.issue45674@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

sre_parse.parse() is an internal function and this behaviour is an implementation detail.

This change enabled some optimizations which did not work with non-capturing groups before. It did not affect the matching itself.

----------
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45674>
_______________________________________

From report at bugs.python.org  Fri Oct 29 18:08:22 2021
From: report at bugs.python.org (miss-islington)
Date: Fri, 29 Oct 2021 22:08:22 +0000
Subject: [issue10572] Move test sub-packages to Lib/test
In-Reply-To: <1290991979.58.0.262973706564.issue10572@psf.upfronthosting.co.za>
Message-ID: <1635545302.9.0.806528822987.issue10572@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 62bf263a775f4444d8b5d5841cc09be3bd53e933 by Erlend Egeberg Aasland in branch 'main':
bpo-10572: Move `sqlite3` tests to `Lib/test` (GH-29304)
https://github.com/python/cpython/commit/62bf263a775f4444d8b5d5841cc09be3bd53e933


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue10572>
_______________________________________

From report at bugs.python.org  Fri Oct 29 18:13:54 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Fri, 29 Oct 2021 22:13:54 +0000
Subject: [issue10572] Move test sub-packages to Lib/test
In-Reply-To: <1290991979.58.0.262973706564.issue10572@psf.upfronthosting.co.za>
Message-ID: <1635545634.93.0.880393309121.issue10572@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
pull_requests: +27596
pull_request: https://github.com/python/cpython/pull/29327

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue10572>
_______________________________________

From report at bugs.python.org  Fri Oct 29 18:39:33 2021
From: report at bugs.python.org (Steven D'Aprano)
Date: Fri, 29 Oct 2021 22:39:33 +0000
Subject: [issue45677] [doc] improve sqlite3 docs
In-Reply-To: <1635544504.5.0.82834028892.issue45677@roundup.psfhosted.org>
Message-ID: <1635547173.08.0.017488286733.issue45677@roundup.psfhosted.org>


Steven D'Aprano <steve+python at pearwood.info> added the comment:

What is wrong with addressing the reader as "you"?

Avoiding an affirmative tone goes directly against the style-guide you linked to, which recommends an affirmative (positive) tone:

"The documentation focuses on affirmatively stating what the language does..."

The alternative would be to take a negative tone, focusing on what the library doesn't do.

----------
nosy: +steven.daprano

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45677>
_______________________________________

From report at bugs.python.org  Fri Oct 29 18:58:28 2021
From: report at bugs.python.org (Batuhan Taskaya)
Date: Fri, 29 Oct 2021 22:58: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: <1635548308.24.0.996077648327.issue45669@roundup.psfhosted.org>


Batuhan Taskaya <isidentical at gmail.com> added the comment:

I've found 81 occurrences of this pattern among 52 projects on a dataset of top PyPI packages (~3.5K). So I'd say +1 on including this.

----------
nosy: +BTaskaya

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45669>
_______________________________________

From report at bugs.python.org  Fri Oct 29 22:52:18 2021
From: report at bugs.python.org (Ezio Melotti)
Date: Sat, 30 Oct 2021 02:52:18 +0000
Subject: [issue2771] Test issue
In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za>
Message-ID: <1635562338.75.0.248611128028.issue2771@roundup.psfhosted.org>


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

Testing GitHub mentions, please ignore: @serhiy-storchaka

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2771>
_______________________________________

From report at bugs.python.org  Fri Oct 29 23:19:04 2021
From: report at bugs.python.org (lilydjwg)
Date: Sat, 30 Oct 2021 03:19:04 +0000
Subject: [issue45671] str(CancelledError()) is empty
In-Reply-To: <1635526096.46.0.894887931952.issue45671@roundup.psfhosted.org>
Message-ID: <1635563944.95.0.402014024211.issue45671@roundup.psfhosted.org>


lilydjwg <lilydjwg at gmail.com> added the comment:

Oh, I find that many exceptions return an empty string when created without any arguments, but most raised ones do have a descriptive error message.

Yes, if it's going to change, we'd change all of them. But now I doubt if it's worth the effort... What if we change so that if the exception were going to return an empty string, it returns the class name instead?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45671>
_______________________________________

From report at bugs.python.org  Fri Oct 29 23:30:35 2021
From: report at bugs.python.org (wyz23x2)
Date: Sat, 30 Oct 2021 03:30:35 +0000
Subject: [issue45420] Python 3.10 final installation failure
In-Reply-To: <1633828108.74.0.92443333438.issue45420@roundup.psfhosted.org>
Message-ID: <1635564635.92.0.686055125654.issue45420@roundup.psfhosted.org>


wyz23x2 <wyz23x2 at 163.com> added the comment:

I upgraded to Windows 11 _and_ deleted all Python 3.10 related installations in regedit. Still doesn't work :(

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45420>
_______________________________________

From report at bugs.python.org  Fri Oct 29 23:33:38 2021
From: report at bugs.python.org (wyz23x2)
Date: Sat, 30 Oct 2021 03:33:38 +0000
Subject: [issue45420] Python 3.10 final installation failure
In-Reply-To: <1633828108.74.0.92443333438.issue45420@roundup.psfhosted.org>
Message-ID: <1635564818.63.0.231122617855.issue45420@roundup.psfhosted.org>


wyz23x2 <wyz23x2 at 163.com> added the comment:

BTW, how does the installer detect whether if another version is installed?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45420>
_______________________________________

From report at bugs.python.org  Sat Oct 30 00:39:15 2021
From: report at bugs.python.org (Dennis Sweeney)
Date: Sat, 30 Oct 2021 04:39:15 +0000
Subject: [issue45484] test_pickle segfault on s390x RHEL7 LTO 3.x
In-Reply-To: <1634304423.18.0.10367404371.issue45484@roundup.psfhosted.org>
Message-ID: <1635568755.24.0.332792554104.issue45484@roundup.psfhosted.org>


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

Looks like the pickletester bug hasn't happened since the fix, so I'll go ahead and close this.

----------
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45484>
_______________________________________

From report at bugs.python.org  Sat Oct 30 00:55:27 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 30 Oct 2021 04:55:27 +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: <1635569727.67.0.143900039604.issue45669@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

+1 to me also

----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45669>
_______________________________________

From report at bugs.python.org  Sat Oct 30 00:58:23 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 30 Oct 2021 04:58:23 +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: <1635569903.11.0.317916415176.issue45669@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

I always need to write trivial code to generate fixed-length random strings with ascii_alphanumerics.
It will solve similar usages and help a lot of packages.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45669>
_______________________________________

From report at bugs.python.org  Sat Oct 30 03:31:40 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 30 Oct 2021 07:31:40 +0000
Subject: [issue45671] str(CancelledError()) is empty
In-Reply-To: <1635526096.46.0.894887931952.issue45671@roundup.psfhosted.org>
Message-ID: <1635579100.32.0.986068460153.issue45671@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Then you would get

>>> raise asyncio.CancelledError
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
asyncio.exceptions.CancelledError: CancelledError

instead of

>>> raise asyncio.CancelledError
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
asyncio.exceptions.CancelledError

Many existing code include both of exception name and message in the report about exception. Repeating the exception name as exception message will cause confusing.

You should follow common practice and print not just an exception object, but its name or repr. It will help in other cases, when the exception has non-empty message, but you do not know its type.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45671>
_______________________________________

From report at bugs.python.org  Sat Oct 30 04:04:33 2021
From: report at bugs.python.org (Eryk Sun)
Date: Sat, 30 Oct 2021 08:04:33 +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: <1635581073.37.0.192079114926.issue30082@roundup.psfhosted.org>


Eryk Sun <eryksun at gmail.com> added the comment:

Here's an example test that calls WinAPI GetConsoleWindow() and IsWindowVisble() in a child process.

    if mswindows:
        try:
            import ctypes
        except ImportError:
            ctypes = None

    # added in Win32ProcessTestCase
    def test_force_hide(self):
        if ctypes:
            script = textwrap.dedent(r'''
                import sys, ctypes
                GetConsoleWindow = ctypes.WinDLL('kernel32').GetConsoleWindow
                IsWindowVisible = ctypes.WinDLL('user32').IsWindowVisible
                sys.exit(IsWindowVisible(GetConsoleWindow()))
            ''')
        else:
            script = 'import sys; sys.exit(0)'
        rc = subprocess.call([sys.executable, '-c', script], force_hide=True)
        self.assertEqual(rc, 0)

This test will work reliably even if the user has Windows Terminal set as the default terminal (available with recent builds of Windows and Windows Terminal Preview). The proxy does not hand off to Windows Terminal if the STARTUPINFO wShowWindow is SW_HIDE or SW_SHOWMINIMIZED, or if the process is created with the CREATE_NO_WINDOW flag. In these cases, it just creates a system conhost.exe session.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30082>
_______________________________________

From report at bugs.python.org  Sat Oct 30 04:38:22 2021
From: report at bugs.python.org (lilydjwg)
Date: Sat, 30 Oct 2021 08:38:22 +0000
Subject: [issue45671] str(CancelledError()) is empty
In-Reply-To: <1635526096.46.0.894887931952.issue45671@roundup.psfhosted.org>
Message-ID: <1635583102.66.0.141337392994.issue45671@roundup.psfhosted.org>


lilydjwg <lilydjwg at gmail.com> added the comment:

OK, I see.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45671>
_______________________________________

From report at bugs.python.org  Sat Oct 30 06:12:14 2021
From: report at bugs.python.org (Stijn Hoop)
Date: Sat, 30 Oct 2021 10:12:14 +0000
Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely
 DNS-based setups
In-Reply-To: <1634936606.73.0.965213260693.issue5004@roundup.psfhosted.org>
Message-ID: <20211030121209.67bff3fe@tangaloor.trusted.kzp.home.arpa>


Stijn Hoop <stijn at sandcat.nl> added the comment:

I hereby put my patch in the public domain and/or under any desired
copyright license as required by the Python project to accept it.

Regards,

Stijn Hoop

On Fri, 22 Oct 2021 21:03:26 +0000
Richard van den Berg <report at bugs.python.org> wrote:

> Richard van den Berg <richard.security.consultant at gmail.com> added
> the comment:
> 
> In that case Stijn Hope should create the PR since he wrote the
> patch. Anyone else could get in trouble for using his code without
> proper permission.
> 
> ----------
> 
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue5004>
> _______________________________________

----------
nosy: +shoop

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue5004>
_______________________________________

From report at bugs.python.org  Sat Oct 30 08:09:23 2021
From: report at bugs.python.org (Skip Montanaro)
Date: Sat, 30 Oct 2021 12:09:23 +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: <1635595763.79.0.672160119455.issue45669@roundup.psfhosted.org>


Skip Montanaro <skip.montanaro at gmail.com> added the comment:

I'll be the wet blanket here and say -1. This doesn't seem at all necessary. 81 occurrences in ~3.5k PyPI packages? That's a hardly overwhelming endorsement. To top it off, since this can't be backported to 3.10 and earlier, it creates a needless (trivial) difference. Package authors who would like to use this but support earlier versions of Py3 will need to do something like this:

try:
    from string import ascii_alphanumerics
except ImportError:
    ascii_alphanumerics = string.ascii_letters + string.digits

They get no benefit from the addition. In fact, their code gets marginally harder to read.

----------
nosy: +skip.montanaro

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45669>
_______________________________________

From report at bugs.python.org  Sat Oct 30 08:10:31 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sat, 30 Oct 2021 12:10:31 +0000
Subject: [issue45678] `functools.singledispatchmethod` is missing tests
Message-ID: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org>


New submission from Alex Waygood <Alex.Waygood at Gmail.com>:

`test_functools` includes a test to check that `functools.singledispatch` correctly wraps the attributes of the target function. However, there is no equivalent test for `functools.singledispatchmethod`. There should be, as this is done separately in the `__get__` method of `functools.singledispatchmethod`; it is a different mechanism to `functools.singledispatch`.

Additionally, `test_abstractmethod_register` tests that the return value of `singledispatchmethod.__get__` wraps the target function's `__isabstractmethod__` attribute. However, the `__isabstractmethod__` property of the `singledispatchmethod` class is untested.

----------
components: Library (Lib)
messages: 405366
nosy: AlexWaygood, lukasz.langa, rhettinger
priority: normal
severity: normal
status: open
title: `functools.singledispatchmethod` is missing tests
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45678>
_______________________________________

From report at bugs.python.org  Sat Oct 30 08:16:05 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sat, 30 Oct 2021 12:16:05 +0000
Subject: [issue45678] `functools.singledispatchmethod` is missing tests
In-Reply-To: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org>
Message-ID: <1635596165.96.0.466464624413.issue45678@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
keywords: +patch
pull_requests: +27597
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29328

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45678>
_______________________________________

From report at bugs.python.org  Sat Oct 30 08:17:03 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sat, 30 Oct 2021 12:17:03 +0000
Subject: [issue45678] `functools.singledispatchmethod` is missing tests
In-Reply-To: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org>
Message-ID: <1635596223.22.0.265720006936.issue45678@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
components: +Tests -Library (Lib)

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45678>
_______________________________________

From report at bugs.python.org  Sat Oct 30 08:30:39 2021
From: report at bugs.python.org (Matej Cepl)
Date: Sat, 30 Oct 2021 12:30:39 +0000
Subject: [issue45097] "The loop argument is deprecated" reported when user
 code does not use it
In-Reply-To: <1630723286.0.0.706652277145.issue45097@roundup.psfhosted.org>
Message-ID: <1635597039.36.0.049343976626.issue45097@roundup.psfhosted.org>


Change by Matej Cepl <mcepl at cepl.eu>:


----------
nosy: +mcepl

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45097>
_______________________________________

From report at bugs.python.org  Sat Oct 30 08:33:10 2021
From: report at bugs.python.org (=?utf-8?q?Niklas_Hamb=C3=BCchen?=)
Date: Sat, 30 Oct 2021 12:33:10 +0000
Subject: [issue32453] shutil.rmtree can have O(n^2) performance on large dirs
In-Reply-To: <1514610909.88.0.213398074469.issue32453@psf.upfronthosting.co.za>
Message-ID: <1635597190.8.0.486048283557.issue32453@roundup.psfhosted.org>


Niklas Hamb?chen <nh2 at deditus.de> added the comment:

A small update / summary so far:

>From here this developed into coreutils discussion:

    #29921 O(n^2) performance of rm -r
    https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29921

and finally a `linux-fsdevel` discussion:

    O(n^2) deletion performance
    https://lore.kernel.org/linux-fsdevel/5ca3808d-4eea-afec-75a6-2cc41f44b868 at nh2.me/t/#u

Dave Chinner (xfs dev) suggests that on XFS there is no quadratic behaviour once  the problem is bound by seek-time of the spinning disk.

Somebody should try to confirm that it becomes linear in even larger tests, e.g. way larger than 21 minutes deletion time.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32453>
_______________________________________

From report at bugs.python.org  Sat Oct 30 08:40:01 2021
From: report at bugs.python.org (Chih-Hsuan Yen)
Date: Sat, 30 Oct 2021 12:40:01 +0000
Subject: [issue45097] "The loop argument is deprecated" reported when user
 code does not use it
In-Reply-To: <1630723286.0.0.706652277145.issue45097@roundup.psfhosted.org>
Message-ID: <1635597601.47.0.41273802261.issue45097@roundup.psfhosted.org>


Change by Chih-Hsuan Yen <yan12125+foss at gmail.com>:


----------
nosy:  -yan12125

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45097>
_______________________________________

From report at bugs.python.org  Sat Oct 30 09:22:43 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sat, 30 Oct 2021 13:22:43 +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: <1635600163.73.0.755892149406.issue45669@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:

@skip.montanaro

I agree with your concern, if authors want to use this constant,
they need to use the mentioned workaround to import it.
But we already have cases that add such constants if we considered them as useful constants.

So I think that the main concern of this issue is that how it will be useful.
In my case, if I should write the utility to generate random tokens for authentication in python, I always write a single trivial code to use ascii_alphanumerics, that's why I thought that this constant can be useful.
FYI We already have the same use case in official documentation[1] also.

But if other core devs also thought that this is not that commonly well-used case, I will change my mind to -1 since we can not support all ASCII variations(e.g ascii_number_special) and I agree with that point.

[1] https://docs.python.org/3/library/secrets.html#recipes-and-best-practices

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45669>
_______________________________________

From report at bugs.python.org  Sat Oct 30 09:49:29 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 30 Oct 2021 13:49:29 +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: <1635601769.02.0.573900375469.issue45669@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I was also against this feature. My reasons:

1. There will be not much benefit. ascii_alphanumerics is too long, so there is no much saving of typing. There is larger chance of typo. You will be not able to use it for several years, until support of Python 3.10 be dropped, without making the code uglier.

2. What exactly should it include? In virtually all use cases in the stdlib and tests (except two tests) you need a set which contains ascii_letters, digits, and some other characters (usually "_", but sometimes more). Should "_" be included in ascii_alphanumerics? Whatever we choose, it will be less explicit than ascii_letters + digits and people will need to look in the documentations or make errors. And every reader of the code would have doubts.

Lib/http/cookies.py:162:_LegalChars = string.ascii_letters + string.digits + "!#$%&'*+-.^_`|~:"
Lib/crypt.py:19:_saltchars = _string.ascii_letters + _string.digits + './'
Lib/email/_encoded_words.py:75:    safe = b'-!*+/' + ascii_letters.encode('ascii') + digits.encode('ascii')
Lib/email/quoprimime.py:60:for c in b'-!*+/' + ascii_letters.encode('ascii') + digits.encode('ascii'):
Lib/cmd.py:50:IDENTCHARS = string.ascii_letters + string.digits + '_'
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 + "_"
Lib/test/test_re.py:1011:    LITERAL_CHARS = string.ascii_letters + string.digits + '!"%\',/:;<=>@_`'
Lib/test/test_email/test__header_value_parser.py:50:    rfc_atext_chars = (string.ascii_letters + string.digits +
Lib/test/test_importlib/test_util.py:654:        valid_characters = string.ascii_letters + string.digits
Lib/test/test_secrets.py:115:        legal = string.ascii_letters + string.digits + '-_'
Lib/test/string_tests.py:1219:        s = string.ascii_letters + string.digits
Lib/test/test_shlex.py:328:        safeunquoted = string.ascii_letters + string.digits + '@%_-+=:,./'
Lib/ntpath.py:359:        varchars = bytes(string.ascii_letters + string.digits + '_-', 'ascii')
Lib/ntpath.py:370:        varchars = string.ascii_letters + string.digits + '_-'
Lib/msilib/__init__.py:177:    identifier_chars = string.ascii_letters + string.digits + "._"
Tools/scripts/texi2html.py:1975:goodchars = string.ascii_letters + string.digits + '!@-=+.'

But if other core developers support it, it is okay to me.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45669>
_______________________________________

From report at bugs.python.org  Sat Oct 30 10:34:04 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 30 Oct 2021 14:34:04 +0000
Subject: [issue45272] 'os.path' should not be a frozen module
In-Reply-To: <1632414295.46.0.740648553614.issue45272@roundup.psfhosted.org>
Message-ID: <1635604444.77.0.169227718918.issue45272@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
keywords: +patch
pull_requests: +27598
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29329

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45272>
_______________________________________

From report at bugs.python.org  Sat Oct 30 11:33:01 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Sat, 30 Oct 2021 15:33:01 +0000
Subject: [issue45578] Missing tests for the dis module
In-Reply-To: <1634926558.7.0.911953252083.issue45578@roundup.psfhosted.org>
Message-ID: <1635607981.22.0.346358633152.issue45578@roundup.psfhosted.org>


Nikita Sobolev <mail at sobolevn.me> added the comment:

I would like to work on it! :)

Going to send a PR today.

----------
nosy: +sobolevn

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45578>
_______________________________________

From report at bugs.python.org  Sat Oct 30 11:33:26 2021
From: report at bugs.python.org (Van Burgerberg)
Date: Sat, 30 Oct 2021 15:33:26 +0000
Subject: [issue45679] typing.Literal[True] is implicitly converted to
 typing.Literal[1]
Message-ID: <1635608006.78.0.966278676499.issue45679@roundup.psfhosted.org>


New submission from Van Burgerberg <vanburgerberg at yandex.ru>:

When you create `Literal[1]` annotation and then create `Literal[True]` annotation, in the second case you will actually get `Literal[1]` instead. This is happening because `typing` performs caching of the outcome of parameterizing generics and `hash(True)` is equal to `hash(1)`. I think this behavior is incorrect and may lead to unexpected results.

Why is this inaccuracy important?
Consider the following example:

```python
from typing import Literal

SomeUsefulAlias = Literal[1, "abc"]

def func(arg: Literal[True, "abc"]):
    if arg is not True:
        arg.capitalize()
```

If we look at `func.__annotations__["arg"]`, we will see `Literal[1, 'abc']`. According to the new annotation, we can pass the value `1` to `func`, and this will lead to an attribute error, as you've already understood. Thus, proper runtime type checking cannot be performed.

----------
components: Library (Lib)
messages: 405371
nosy: vanburgerberg
priority: normal
severity: normal
status: open
title: typing.Literal[True] is implicitly converted to typing.Literal[1]
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45679>
_______________________________________

From report at bugs.python.org  Sat Oct 30 11:54:14 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 30 Oct 2021 15:54:14 +0000
Subject: [issue45653] Freeze the encodings module.
In-Reply-To: <1635444712.46.0.923300343963.issue45653@roundup.psfhosted.org>
Message-ID: <1635609254.04.0.520679502488.issue45653@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

I just tested partially freezing the package, and it seems to working fine :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45653>
_______________________________________

From report at bugs.python.org  Sat Oct 30 11:54:48 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sat, 30 Oct 2021 15:54:48 +0000
Subject: [issue45653] Freeze the encodings module.
In-Reply-To: <1635444712.46.0.923300343963.issue45653@roundup.psfhosted.org>
Message-ID: <1635609288.17.0.405783758856.issue45653@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
keywords: +patch
pull_requests: +27599
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29331

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45653>
_______________________________________

From report at bugs.python.org  Sat Oct 30 12:01:48 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Sat, 30 Oct 2021 16:01:48 +0000
Subject: [issue45578] Missing tests for the dis module
In-Reply-To: <1634926558.7.0.911953252083.issue45578@roundup.psfhosted.org>
Message-ID: <1635609708.29.0.792290427995.issue45578@roundup.psfhosted.org>


Change by Nikita Sobolev <mail at sobolevn.me>:


----------
keywords: +patch
pull_requests: +27600
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29332

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45578>
_______________________________________

From report at bugs.python.org  Sat Oct 30 12:41:09 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Sat, 30 Oct 2021 16:41:09 +0000
Subject: [issue45578] Missing tests for the dis module
In-Reply-To: <1634926558.7.0.911953252083.issue45578@roundup.psfhosted.org>
Message-ID: <1635612069.6.0.597418891801.issue45578@roundup.psfhosted.org>


Nikita Sobolev <mail at sobolevn.me> added the comment:

Looks like `findlabels` is documented: https://docs.python.org/3/library/dis.html#dis.findlabels

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45578>
_______________________________________

From report at bugs.python.org  Sat Oct 30 12:51:18 2021
From: report at bugs.python.org (Joannah Nanjekye)
Date: Sat, 30 Oct 2021 16:51:18 +0000
Subject: [issue45578] Missing tests for the dis module
In-Reply-To: <1634926558.7.0.911953252083.issue45578@roundup.psfhosted.org>
Message-ID: <1635612678.13.0.14174753914.issue45578@roundup.psfhosted.org>


Joannah Nanjekye <nanjekyejoannah at gmail.com> added the comment:

Yes, it is that's why I added the clarity "It looks like it *is* actually" above

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45578>
_______________________________________

From report at bugs.python.org  Sat Oct 30 12:54:44 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Sat, 30 Oct 2021 16:54:44 +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: <1635612884.78.0.166377947562.issue45679@roundup.psfhosted.org>


Nikita Sobolev <mail at sobolevn.me> added the comment:

This happens to all `lru_cache` calls, where we deal with container types.

Example:

```
from functools import lru_cache

@lru_cache(typed=True)
def test(arg):
    return str(arg)

print(test((1, 'a')))  # (1, 'a')
print(test((True, 'a')))  # (1, 'a')
```

Moveover, this behavior is not tested in `test_functools`: https://github.com/python/cpython/blame/aae18a17401dc36917c0f64f971d60ab1a5b477e/Lib/test/test_functools.py#L1482-L1496

Original issue: https://bugs.python.org/issue13227
Original commit: https://github.com/python/cpython/commit/cd9fdfd652cdaca959b1c5d4cddf60d90a331b47

----------
nosy: +gvanrossum, kj, rhettinger, sobolevn

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45679>
_______________________________________

From report at bugs.python.org  Sat Oct 30 12:59:20 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Sat, 30 Oct 2021 16:59:20 +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: <1635613160.9.0.373671075511.issue45679@roundup.psfhosted.org>


Nikita Sobolev <mail at sobolevn.me> added the comment:

I see several ways of solving this:
1. Make `lru_cache(typed=True)` to look into iterable internals. This might be slow. And very slow for large iterables. Maybe even infinite for infinite ones
2. Adapt `Literal` / possibly other types to be treated differently. Because, most of the time, `Literal` take a small amount of args

I am going to send a PR with the second option.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45679>
_______________________________________

From report at bugs.python.org  Sat Oct 30 13:23:16 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 30 Oct 2021 17:23:16 +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: <1635614596.29.0.846970170317.issue45679@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I agree. lru_cache(typed=True) itself should not look into iterable internals. It would be not only slow, but a change of semantic.

The simplest way to solve this issue is to remove caching of __getitem__(). The more sophisticated way is to move caching to lower level and apply it to a function with a var-positional parameter.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45679>
_______________________________________

From report at bugs.python.org  Sat Oct 30 13:29:04 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Sat, 30 Oct 2021 17:29:04 +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: <1635614944.14.0.0164951477363.issue45679@roundup.psfhosted.org>


Change by Nikita Sobolev <mail at sobolevn.me>:


----------
keywords: +patch
pull_requests: +27601
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29333

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45679>
_______________________________________

From report at bugs.python.org  Sat Oct 30 13:51:49 2021
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Sat, 30 Oct 2021 17:51:49 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
In-Reply-To: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>
Message-ID: <1635616309.21.0.884414788703.issue45588@roundup.psfhosted.org>


?ric Araujo <merwok at netwok.org> added the comment:

The feature proposed here is not clear to me.

Is it about caching the method object on the instance to optimize the creation of the bound method, as the name suggests?  Or is it about caching the result of calling the method, which is consistent with the references to lru_cache and cachedproperty?

----------
nosy: +eric.araujo

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Sat Oct 30 13:54:02 2021
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Sat, 30 Oct 2021 17:54:02 +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: <1635616442.62.0.113604256861.issue45598@roundup.psfhosted.org>


?ric Araujo <merwok at netwok.org> added the comment:

We could look in distro patch trackers to see they patch CPython?s setup.py to evaluate the impact of removing this function.

----------
nosy: +eric.araujo

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45598>
_______________________________________

From report at bugs.python.org  Sat Oct 30 13:56:27 2021
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Sat, 30 Oct 2021 17:56:27 +0000
Subject: [issue45610] Cookies with longer paths are listed before cookies with
 shorter paths.
In-Reply-To: <1635215361.47.0.617081190698.issue45610@roundup.psfhosted.org>
Message-ID: <1635616587.21.0.273532367617.issue45610@roundup.psfhosted.org>


?ric Araujo <merwok at netwok.org> added the comment:

I don?t know that longer is the right think to look at here, but rather more specific.  Unless I?m mistaken, a cookie for test.com is not read on demo.test.com; it would need to be for .test.com to be read (and in that case the specificity rules in the spec should be followed).

----------
nosy: +eric.araujo

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45610>
_______________________________________

From report at bugs.python.org  Sat Oct 30 13:58:24 2021
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Sat, 30 Oct 2021 17:58:24 +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: <1635616704.85.0.670464155447.issue45617@roundup.psfhosted.org>


?ric Araujo <merwok at netwok.org> added the comment:

> '\r' support is implicitly documented under the sys.stdin section[0]:
> "These streams are regular text files like those returned by the open() function"

I read that to mean that the streams are file-like objects (or TextIOWrappers) without using that term, not to mean that they behave 100% similarly.

----------
nosy: +eric.araujo

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45617>
_______________________________________

From report at bugs.python.org  Sat Oct 30 14:00:00 2021
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Sat, 30 Oct 2021 18:00:00 +0000
Subject: [issue45625] Add support for top-level await
In-Reply-To: <1635334685.92.0.999778106074.issue45625@roundup.psfhosted.org>
Message-ID: <1635616800.52.0.107000197715.issue45625@roundup.psfhosted.org>


?ric Araujo <merwok at netwok.org> added the comment:

Do you know about using "python -m asyncio" instead of "python"?

----------
nosy: +eric.araujo

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45625>
_______________________________________

From report at bugs.python.org  Sat Oct 30 14:00:11 2021
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Sat, 30 Oct 2021 18:00:11 +0000
Subject: [issue45653] Freeze the encodings module.
In-Reply-To: <1635609254.04.0.520679502488.issue45653@roundup.psfhosted.org>
Message-ID: <21400eb9-7868-b7a3-a07d-e15dbd00a856@egenix.com>


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 30.10.2021 17:54, Filipe La?ns wrote:
> 
> I just tested partially freezing the package, and it seems to working fine :)
FWIW: I think it's best not bother and simply freeze the whole thing.

It's mostly char mappings which compress well and there's a benefit
in sharing these using mmap (which the OS does for you with static
C data).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45653>
_______________________________________

From report at bugs.python.org  Sat Oct 30 14:17:58 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sat, 30 Oct 2021 18:17:58 +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: <1635617878.04.0.506621811832.issue45679@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27602
pull_request: https://github.com/python/cpython/pull/29334

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45679>
_______________________________________

From report at bugs.python.org  Sat Oct 30 16:21:29 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sat, 30 Oct 2021 20:21:29 +0000
Subject: [issue45680] Documentation on `GenericAlias` objects could be improved
Message-ID: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org>


New submission from Alex Waygood <Alex.Waygood at Gmail.com>:

The documentation on `GenericAlias` objects implies at multiple points that only container classes can implement `__class_getitem__`, and goes into very little detail about what it means for a non-container class to be parameterized.

----------
assignee: docs at python
components: Documentation
messages: 405384
nosy: AlexWaygood, docs at python, gvanrossum, kj, lukasz.langa
priority: normal
severity: normal
status: open
title: Documentation on `GenericAlias` objects could be improved
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45680>
_______________________________________

From report at bugs.python.org  Sat Oct 30 16:44:41 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sat, 30 Oct 2021 20:44:41 +0000
Subject: [issue45680] Documentation on `GenericAlias` objects could be improved
In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org>
Message-ID: <1635626681.75.0.194846654233.issue45680@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
keywords: +patch
pull_requests: +27603
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29335

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45680>
_______________________________________

From report at bugs.python.org  Sat Oct 30 16:46:54 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sat, 30 Oct 2021 20:46:54 +0000
Subject: [issue45680] Documentation on `GenericAlias` objects could be improved
In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org>
Message-ID: <1635626814.48.0.768601418258.issue45680@roundup.psfhosted.org>


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

This issue is related, but distinct, to previous issue https://bugs.python.org/issue42280.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45680>
_______________________________________

From report at bugs.python.org  Sat Oct 30 17:23:57 2021
From: report at bugs.python.org (Jonathan Bell)
Date: Sat, 30 Oct 2021 21:23:57 +0000
Subject: [issue2628] ftplib Persistent data connection
In-Reply-To: <1208130611.58.0.0933193390026.issue2628@psf.upfronthosting.co.za>
Message-ID: <1635629037.35.0.302469537042.issue2628@roundup.psfhosted.org>


Jonathan Bell <bellvis at gmail.com> added the comment:

The CLA is signed, and I'm again able to work on this.

I was able to update this locally for Python 3 with a minimal test case. What specifically were you looking for?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2628>
_______________________________________

From report at bugs.python.org  Sat Oct 30 17:47:34 2021
From: report at bugs.python.org (Fred)
Date: Sat, 30 Oct 2021 21:47:34 +0000
Subject: [issue45625] Add support for top-level await
In-Reply-To: <1635334685.92.0.999778106074.issue45625@roundup.psfhosted.org>
Message-ID: <1635630454.04.0.618809763907.issue45625@roundup.psfhosted.org>


Fred <eldmannen at gmail.com> added the comment:

No, I was not aware of that.

After I started Python by running "python3 -m asyncio" then it behaved as I expected it should behave by default.

But this seems to work only in the REPL. I would like to write Python scripts stored in files where I can easily await at the top level as in the example in my first post.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45625>
_______________________________________

From report at bugs.python.org  Sat Oct 30 18:01:31 2021
From: report at bugs.python.org (Ethan Furman)
Date: Sat, 30 Oct 2021 22:01:31 +0000
Subject: [issue2628] ftplib Persistent data connection
In-Reply-To: <1208130611.58.0.0933193390026.issue2628@psf.upfronthosting.co.za>
Message-ID: <1635631291.15.0.671879245925.issue2628@roundup.psfhosted.org>


Ethan Furman <ethan at stoneleaf.us> added the comment:

If you're familiar with git and GitHub, can you create a PR?  Otherwise, an updated patch here and we'll work on getting it merged.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2628>
_______________________________________

From report at bugs.python.org  Sat Oct 30 18:09:27 2021
From: report at bugs.python.org (Paolo Melchiorre)
Date: Sat, 30 Oct 2021 22:09:27 +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: <1635631767.09.0.536719433323.issue45669@roundup.psfhosted.org>


Paolo Melchiorre <paolo at melchiorre.org> added the comment:

Thank you all for the feedback, also I have been using python for years and contributing to other python-based projects it is my first PR to Cpython and I don't know if my contribution to the discussion is foreseen.

It seems to me that adding this constant does not cause any damage in fact it is an easy victory. However, I try to clarify some doubts raised.

I proposed this new variable to simplify the code in a use case that occurs very often, not so much to save some characters.

I think every single new variable, constant and function needed a waiting period before being used in packages that support different versions of python (ex: f-string in Python 3.6) but can be used in the code of projects that use the latest version of python or in the python code itself.

The definition of the alphanumeric constant in the standard libraries I believe can help to have a clearly defined common variable[1], which could be used as a basis for alphabets containing additional symbols (ex: _- =)

[1] https://en.wikipedia.org/wiki/Alphanumeric

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45669>
_______________________________________

From report at bugs.python.org  Sat Oct 30 19:59:34 2021
From: report at bugs.python.org (Jonathan Bell)
Date: Sat, 30 Oct 2021 23:59:34 +0000
Subject: [issue2628] ftplib Persistent data connection
In-Reply-To: <1208130611.58.0.0933193390026.issue2628@psf.upfronthosting.co.za>
Message-ID: <1635638374.33.0.865810165123.issue2628@roundup.psfhosted.org>


Change by Jonathan Bell <bellvis at gmail.com>:


----------
pull_requests: +27604
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/29337

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2628>
_______________________________________

From report at bugs.python.org  Sat Oct 30 20:43:10 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sun, 31 Oct 2021 00:43:10 +0000
Subject: [issue45653] Freeze the encodings module.
In-Reply-To: <1635444712.46.0.923300343963.issue45653@roundup.psfhosted.org>
Message-ID: <1635640990.8.0.331351196207.issue45653@roundup.psfhosted.org>


Filipe La?ns <lains at riseup.net> added the comment:

I have already opened up the PR, but I can change if desired.

----------
stage: patch review -> needs patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45653>
_______________________________________

From report at bugs.python.org  Sat Oct 30 20:43:55 2021
From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=)
Date: Sun, 31 Oct 2021 00:43:55 +0000
Subject: [issue45653] Freeze the encodings module.
In-Reply-To: <1635444712.46.0.923300343963.issue45653@roundup.psfhosted.org>
Message-ID: <1635641035.86.0.684369887811.issue45653@roundup.psfhosted.org>


Change by Filipe La?ns <lains at riseup.net>:


----------
stage: needs patch -> patch review

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45653>
_______________________________________

From report at bugs.python.org  Sat Oct 30 22:14:02 2021
From: report at bugs.python.org (Ken Jin)
Date: Sun, 31 Oct 2021 02:14:02 +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: <1635646442.59.0.409844562183.issue45666@roundup.psfhosted.org>


Ken Jin <kenjin4096 at gmail.com> added the comment:


New changeset aad48062ef8f983fbb95f9dc0c3c3cef9c89df02 by Nikita Sobolev in branch 'main':
bpo-45666: fixes warning with `swprintf` and `%s` (GH-29307)
https://github.com/python/cpython/commit/aad48062ef8f983fbb95f9dc0c3c3cef9c89df02


----------
nosy: +kj

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45666>
_______________________________________

From report at bugs.python.org  Sun Oct 31 00:32:10 2021
From: report at bugs.python.org (Dev Kumar)
Date: Sun, 31 Oct 2021 04:32: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: <1635654730.33.0.0703044809265.issue45641@roundup.psfhosted.org>


Dev Kumar <devesh.dk373 at gmail.com> added the comment:

What happened?
when is the new version is coming for tackling this problem?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45641>
_______________________________________

From report at bugs.python.org  Sun Oct 31 04:00:30 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Sun, 31 Oct 2021 08:00:30 +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: <1635667230.93.0.144240415865.issue45679@roundup.psfhosted.org>


Change by Nikita Sobolev <mail at sobolevn.me>:


----------
pull_requests: +27605
pull_request: https://github.com/python/cpython/pull/29339

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45679>
_______________________________________

From report at bugs.python.org  Sun Oct 31 04:14:35 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 31 Oct 2021 08:14:35 +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: <1635668075.34.0.466041319831.issue45666@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

>From the man page:

       S      (Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.)  Synonym for ls.  Don't use.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45666>
_______________________________________

From report at bugs.python.org  Sun Oct 31 04:22:26 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 31 Oct 2021 08:22:26 +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: <1635668546.6.0.595030429746.issue45679@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +27606
pull_request: https://github.com/python/cpython/pull/29340

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45679>
_______________________________________

From report at bugs.python.org  Sun Oct 31 04:22:20 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 31 Oct 2021 08:22:20 +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: <1635668540.68.0.468239721768.issue45679@roundup.psfhosted.org>


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:


New changeset 634984d7dbdd91e0a51a793eed4d870e139ae1e0 by Serhiy Storchaka in branch 'main':
bpo-45679: Fix caching of multi-value typing.Literal (GH-29334)
https://github.com/python/cpython/commit/634984d7dbdd91e0a51a793eed4d870e139ae1e0


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45679>
_______________________________________

From report at bugs.python.org  Sun Oct 31 04:41:44 2021
From: report at bugs.python.org (Serhiy Storchaka)
Date: Sun, 31 Oct 2021 08:41:44 +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: <1635669704.51.0.0120135159362.issue45679@roundup.psfhosted.org>


Change by Serhiy Storchaka <storchaka+cpython at gmail.com>:


----------
pull_requests: +27607
pull_request: https://github.com/python/cpython/pull/29342

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45679>
_______________________________________

From report at bugs.python.org  Sun Oct 31 04:43:44 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 31 Oct 2021 08:43:44 +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: <1635669824.65.0.99081441988.issue45679@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 3997f3ce8ab15269fc800062f75411865dbc0d55 by Miss Islington (bot) in branch '3.10':
bpo-45679: Fix caching of multi-value typing.Literal (GH-29334)
https://github.com/python/cpython/commit/3997f3ce8ab15269fc800062f75411865dbc0d55


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45679>
_______________________________________

From report at bugs.python.org  Sun Oct 31 04:46:11 2021
From: report at bugs.python.org (Nikita Sobolev)
Date: Sun, 31 Oct 2021 08:46:11 +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: <1635669971.46.0.976579575447.issue45666@roundup.psfhosted.org>


Change by Nikita Sobolev <mail at sobolevn.me>:


----------
pull_requests: +27608
pull_request: https://github.com/python/cpython/pull/29341

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45666>
_______________________________________

From report at bugs.python.org  Sun Oct 31 06:01:32 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sun, 31 Oct 2021 10:01:32 +0000
Subject: [issue45634] [sqlite3] don't combine error checks when adding integer
 constants
In-Reply-To: <1635368576.72.0.458292729425.issue45634@roundup.psfhosted.org>
Message-ID: <1635674492.53.0.277756901008.issue45634@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset 39b4d5938ce781af41f8c9da72dee46095a78642 by Erlend Egeberg Aasland in branch 'main':
bpo-45634: Don't combine error checks when adding `sqlite3` int constants (GH-29251)
https://github.com/python/cpython/commit/39b4d5938ce781af41f8c9da72dee46095a78642


----------
nosy: +corona10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45634>
_______________________________________

From report at bugs.python.org  Sun Oct 31 06:35:14 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Sun, 31 Oct 2021 10:35:14 +0000
Subject: [issue45634] [sqlite3] don't combine error checks when adding integer
 constants
In-Reply-To: <1635368576.72.0.458292729425.issue45634@roundup.psfhosted.org>
Message-ID: <1635676514.75.0.298666576428.issue45634@roundup.psfhosted.org>


Change by Erlend E. Aasland <erlend.aasland at innova.no>:


----------
pull_requests: +27609
pull_request: https://github.com/python/cpython/pull/29343

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45634>
_______________________________________

From report at bugs.python.org  Sun Oct 31 06:43:37 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Sun, 31 Oct 2021 10:43:37 +0000
Subject: [issue45677] [doc] improve sqlite3 docs
In-Reply-To: <1635544504.5.0.82834028892.issue45677@roundup.psfhosted.org>
Message-ID: <1635677017.39.0.276571271187.issue45677@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

> What is wrong with addressing the reader as "you"?

I remember this was discussed on python-dev last year (?). IIRC, the majority was in favour of changing the documentation to avoid addressing the reader personally. Let us ask the Documentation Workgroup over at Discourse. I'll create a topic.

> Avoiding an affirmative tone goes directly against the style-guide you linked to, which recommends an affirmative (positive) tone:

Sorry, that was a language glitch; I'm not a native english speaker :) _Use_ an affirmative tone is of course correct.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45677>
_______________________________________

From report at bugs.python.org  Sun Oct 31 06:46:03 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Sun, 31 Oct 2021 10:46:03 +0000
Subject: [issue45677] [doc] improve sqlite3 docs
In-Reply-To: <1635544504.5.0.82834028892.issue45677@roundup.psfhosted.org>
Message-ID: <1635677163.76.0.076757582062.issue45677@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

(Nosying Mariatta and Carol from the CPython DWG)

----------
nosy: +Mariatta, willingc

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45677>
_______________________________________

From report at bugs.python.org  Sun Oct 31 07:16:29 2021
From: report at bugs.python.org (mike mcleod)
Date: Sun, 31 Oct 2021 11:16: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: <1635678989.46.0.47099094229.issue10483@roundup.psfhosted.org>


mike mcleod <mikecmcleod at gmail.com> added the comment:

Hi,
I would like to help on this issue.
Let me know what can be done?

----------
nosy: +mikecmcleod

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue10483>
_______________________________________

From report at bugs.python.org  Sun Oct 31 07:22:30 2021
From: report at bugs.python.org (Dong-hee Na)
Date: Sun, 31 Oct 2021 11:22:30 +0000
Subject: [issue45634] [sqlite3] don't combine error checks when adding integer
 constants
In-Reply-To: <1635368576.72.0.458292729425.issue45634@roundup.psfhosted.org>
Message-ID: <1635679350.0.0.215853709862.issue45634@roundup.psfhosted.org>


Dong-hee Na <donghee.na at python.org> added the comment:


New changeset ed91f959b032951620f32bcd93ff27223699a86a by Erlend Egeberg Aasland in branch '3.10':
[3.10] bpo-45634: Don't combine error checks when adding `sqlite3` int constants (GH-29251). (GH-29343)
https://github.com/python/cpython/commit/ed91f959b032951620f32bcd93ff27223699a86a


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45634>
_______________________________________

From report at bugs.python.org  Sun Oct 31 08:12:02 2021
From: report at bugs.python.org (Gabe)
Date: Sun, 31 Oct 2021 12:12:02 +0000
Subject: [issue45681] tkinter breaks on high resolution screen after ctypes
 SetProcessDPIAware()
Message-ID: <1635682322.33.0.130393544113.issue45681@roundup.psfhosted.org>


New submission from Gabe <gabe.millikan at gmail.com>:

In the following code: 
```py
import tkinter as tk
from tkinter import ttk

import ctypes
ctypes.windll.user32.SetProcessDPIAware()

w = tk.Tk()
ttk.Checkbutton(w, text = "Checkbox").grid()
w.mainloop()
```

The checkbox begins as normal size, but after hovering over it, it becomes small. See attached gif.

The issue does not occur without the SetProcessDPIAware call. 

I am running Windows 11, and my screen resolution is 2560x1440. My Settings>System>Display>Custom Scaling is set to 150%. I believe that this is relevant because SetProcessDPIAware() directly affects the dpi awareness (aka 'custom scaling') of the program, according to Microsoft documentation.

----------
components: Tkinter
files: KwUqCTWl58.gif
messages: 405401
nosy: GabeMillikan
priority: normal
severity: normal
status: open
title: tkinter breaks on high resolution screen after ctypes SetProcessDPIAware()
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file50413/KwUqCTWl58.gif

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45681>
_______________________________________

From report at bugs.python.org  Sun Oct 31 09:32:18 2021
From: report at bugs.python.org (Giampaolo Rodola')
Date: Sun, 31 Oct 2021 13:32:18 +0000
Subject: [issue2628] ftplib Persistent data connection
In-Reply-To: <1208130611.58.0.0933193390026.issue2628@psf.upfronthosting.co.za>
Message-ID: <1635687138.41.0.975633524904.issue2628@roundup.psfhosted.org>


Giampaolo Rodola' <g.rodola at gmail.com> added the comment:

Hello.
I added some initial comments to the PR, but I'm sort of skeptical about this. It must be noted that:

1) very few FTP servers probably support this feature (https://en.wikipedia.org/wiki/File_Transfer_Protocol#Data_transfer_modes)

2) the specs are very old (RFC-959 is from 1985), and I doubt they've been upgraded in later RFCs. The fact that a header is sent *before every data block* seems inefficient (why not just send the  file size once?), probably more inefficient that opening a new connection each time (unless files are small, I suppose).

Was this tested against an actual FTP server(s)? If yes, which one(s)? IMO, it would be good if some actual research/testing is done first, to see how actual FTP server products implement this feature.

Another thing to note is that the PR supports RETR (download) only, and not STOR (upload). Is this on purpose or does the original RFC/spec limits this functionality to RETR?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2628>
_______________________________________

From report at bugs.python.org  Sun Oct 31 09:55:19 2021
From: report at bugs.python.org (Olaf van der Spek)
Date: Sun, 31 Oct 2021 13:55:19 +0000
Subject: [issue45682] Nicer default logging format
Message-ID: <1635688519.79.0.666388517384.issue45682@roundup.psfhosted.org>


New submission from Olaf van der Spek <olafvdspek at gmail.com>:

The default logging format will print something like: 
WARNING:root:Hello Python!

Could it default to something like this instead?

2021-10-31 14:52:36,490 WARNING: Hello Python!

logging.basicConfig(format='%(asctime)s %(levelname)s: %(message)s')
logging.warning('Hello Python!')

----------
components: Library (Lib)
messages: 405403
nosy: olafvdspek
priority: normal
severity: normal
status: open
title: Nicer default logging format
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45682>
_______________________________________

From report at bugs.python.org  Sun Oct 31 10:36:37 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 31 Oct 2021 14:36:37 +0000
Subject: [issue45682] Nicer default logging format
In-Reply-To: <1635688519.79.0.666388517384.issue45682@roundup.psfhosted.org>
Message-ID: <1635690997.68.0.500273823351.issue45682@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Generally, we can't change defaults after an API has been published because it immediately affects the output for people who use that default.  However in the case of logging, an argument could be made that changing the default would have less impact.

----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45682>
_______________________________________

From report at bugs.python.org  Sun Oct 31 10:44:44 2021
From: report at bugs.python.org (Alex Waygood)
Date: Sun, 31 Oct 2021 14:44:44 +0000
Subject: [issue45677] [doc] improve sqlite3 docs
In-Reply-To: <1635544504.5.0.82834028892.issue45677@roundup.psfhosted.org>
Message-ID: <1635691484.05.0.291502019191.issue45677@roundup.psfhosted.org>


Change by Alex Waygood <Alex.Waygood at Gmail.com>:


----------
nosy: +AlexWaygood

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45677>
_______________________________________

From report at bugs.python.org  Sun Oct 31 10:57:28 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 31 Oct 2021 14:57:28 +0000
Subject: [issue45516] Add protocol description to the Traversable and
 TraversableResources documentation
In-Reply-To: <1634597903.13.0.806758851296.issue45516@roundup.psfhosted.org>
Message-ID: <1635692248.82.0.831091151794.issue45516@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset bc8fd7c9c24eb71217ebdb8a12cf38e9dc4215b2 by Filipe La?ns in branch 'main':
bpo-45516: fix Traversable.name documentation (GH-29194)
https://github.com/python/cpython/commit/bc8fd7c9c24eb71217ebdb8a12cf38e9dc4215b2


----------
nosy: +miss-islington

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45516>
_______________________________________

From report at bugs.python.org  Sun Oct 31 11:52:11 2021
From: report at bugs.python.org (Oleksandr Pavliuk)
Date: Sun, 31 Oct 2021 15:52:11 +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: <1635695531.3.0.392924386976.issue43633@roundup.psfhosted.org>


Change by Oleksandr Pavliuk <ragnarok49 at gmail.com>:


----------
keywords: +patch
nosy: +opavlyuk
nosy_count: 1.0 -> 2.0
pull_requests: +27610
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29345

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43633>
_______________________________________

From report at bugs.python.org  Sun Oct 31 12:08:57 2021
From: report at bugs.python.org (da2ce7)
Date: Sun, 31 Oct 2021 16:08:57 +0000
Subject: [issue44365] Bad dataclass post-init example
In-Reply-To: <1623252788.44.0.375918246935.issue44365@roundup.psfhosted.org>
Message-ID: <1635696537.4.0.0809188896268.issue44365@roundup.psfhosted.org>


da2ce7 <me at da2ce7.com> added the comment:

I have made a slightly more comprehensive example. See file attached.

Please consider for the updated documentation.

----------
nosy: +da2ce7
Added file: https://bugs.python.org/file50414/dataclass_inheritance_test.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44365>
_______________________________________

From report at bugs.python.org  Sun Oct 31 12:46:04 2021
From: report at bugs.python.org (Jonathan Bell)
Date: Sun, 31 Oct 2021 16:46:04 +0000
Subject: [issue2628] ftplib Persistent data connection
In-Reply-To: <1208130611.58.0.0933193390026.issue2628@psf.upfronthosting.co.za>
Message-ID: <1635698764.1.0.708843828536.issue2628@roundup.psfhosted.org>


Jonathan Bell <bellvis at gmail.com> added the comment:

This issue is 13 years old. The original 2008 patch was used in a production environment against an OpenVMS server identifying itself as MadGoat. That use case involved downloading documents only, and no write permission was available. Therefore the patch only supports RETR. See the debug.log file attached to this issue for the server interaction. 

I no longer have a need for BLOCK mode, and don't know what modern servers would support it. mikecmcleod revived this issue so perhaps they can provide some ability for testing, or perspective on the current needs.

The PR updates the patch to Python 3, and includes a test written against the minimal changes required for that 2.7->3.x update.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue2628>
_______________________________________

From report at bugs.python.org  Sun Oct 31 13:10:54 2021
From: report at bugs.python.org (da2ce7)
Date: Sun, 31 Oct 2021 17:10:54 +0000
Subject: [issue44365] Bad dataclass post-init example
In-Reply-To: <1623252788.44.0.375918246935.issue44365@roundup.psfhosted.org>
Message-ID: <1635700254.18.0.389298986987.issue44365@roundup.psfhosted.org>


da2ce7 <me at da2ce7.com> added the comment:

Upon Self Review, I think that this slightly updated version is a bit more illustrative.

----------
Added file: https://bugs.python.org/file50415/dataclass_inheritance_v2_test.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44365>
_______________________________________

From report at bugs.python.org  Sun Oct 31 13:14:20 2021
From: report at bugs.python.org (Ned Deily)
Date: Sun, 31 Oct 2021 17:14:20 +0000
Subject: [issue45682] Nicer default logging format
In-Reply-To: <1635688519.79.0.666388517384.issue45682@roundup.psfhosted.org>
Message-ID: <1635700460.75.0.993276112872.issue45682@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
nosy: +vinay.sajip

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45682>
_______________________________________

From report at bugs.python.org  Sun Oct 31 13:22:04 2021
From: report at bugs.python.org (Erlend E. Aasland)
Date: Sun, 31 Oct 2021 17:22:04 +0000
Subject: [issue45634] [sqlite3] don't combine error checks when adding integer
 constants
In-Reply-To: <1635368576.72.0.458292729425.issue45634@roundup.psfhosted.org>
Message-ID: <1635700924.69.0.545326205306.issue45634@roundup.psfhosted.org>


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

Thanks for reviewing, Dong-hee!

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45634>
_______________________________________

From report at bugs.python.org  Sun Oct 31 13:24:21 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 31 Oct 2021 17:24:21 +0000
Subject: [issue45516] Add protocol description to the Traversable and
 TraversableResources documentation
In-Reply-To: <1634597903.13.0.806758851296.issue45516@roundup.psfhosted.org>
Message-ID: <1635701061.86.0.0121422541962.issue45516@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27612
pull_request: https://github.com/python/cpython/pull/29349

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45516>
_______________________________________

From report at bugs.python.org  Sun Oct 31 13:24:17 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 31 Oct 2021 17:24:17 +0000
Subject: [issue45516] Add protocol description to the Traversable and
 TraversableResources documentation
In-Reply-To: <1634597903.13.0.806758851296.issue45516@roundup.psfhosted.org>
Message-ID: <1635701057.95.0.354538469673.issue45516@roundup.psfhosted.org>


Change by miss-islington <mariatta.wijaya+miss-islington at gmail.com>:


----------
pull_requests: +27611
pull_request: https://github.com/python/cpython/pull/29348

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45516>
_______________________________________

From report at bugs.python.org  Sun Oct 31 13:26:26 2021
From: report at bugs.python.org (Ned Deily)
Date: Sun, 31 Oct 2021 17:26:26 +0000
Subject: [issue45642] Unable to save
In-Reply-To: <1635413195.38.0.0518815063217.issue45642@roundup.psfhosted.org>
Message-ID: <1635701186.3.0.206912663522.issue45642@roundup.psfhosted.org>


Change by Ned Deily <nad at python.org>:


----------
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 <report at bugs.python.org>
<https://bugs.python.org/issue45642>
_______________________________________

From report at bugs.python.org  Sun Oct 31 13:30:04 2021
From: report at bugs.python.org (da2ce7)
Date: Sun, 31 Oct 2021 17:30:04 +0000
Subject: [issue44365] Bad dataclass post-init example
In-Reply-To: <1623252788.44.0.375918246935.issue44365@roundup.psfhosted.org>
Message-ID: <1635701404.42.0.468242400145.issue44365@roundup.psfhosted.org>


da2ce7 <me at da2ce7.com> added the comment:

Amazingly, the original example needs a very small change to make it work as expected:

@dataclass
class Rectangle:
    height: float
    width: float

@dataclass
class Square(Rectangle):
    side: float
    height: float = field(init=False)
    width: float = field(init=False)

    def __post_init__(self) -> None:
        super().__init__(self.side, self.side)

I discover this now, after playing around for a while.
Attached is the simplified version of my expanded example testcase.

----------
Added file: https://bugs.python.org/file50416/dataclass_inheritance_v3_test.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44365>
_______________________________________

From report at bugs.python.org  Sun Oct 31 13:36:10 2021
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Sun, 31 Oct 2021 17:36:10 +0000
Subject: [issue45625] Add support for top-level await
In-Reply-To: <1635334685.92.0.999778106074.issue45625@roundup.psfhosted.org>
Message-ID: <1635701770.3.0.410801430705.issue45625@roundup.psfhosted.org>


?ric Araujo <merwok at netwok.org> added the comment:

I don?t think that?s possible; it wouldn?t fit with the design of python to have an implicit async loop like that.  But I?m no expert here, so you could bring this idea to https://discuss.python.org/c/ideas/6 to see what people think.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45625>
_______________________________________

From report at bugs.python.org  Sun Oct 31 13:52:38 2021
From: report at bugs.python.org (Vinay Sajip)
Date: Sun, 31 Oct 2021 17:52:38 +0000
Subject: [issue45682] Nicer default logging format
In-Reply-To: <1635688519.79.0.666388517384.issue45682@roundup.psfhosted.org>
Message-ID: <1635702758.12.0.559050448244.issue45682@roundup.psfhosted.org>


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

> However in the case of logging, an argument could be made that changing the default would have less impact.

Except that people may have used the current basic format in, for example, unit tests, and that code could break after a change like the one proposed. The default has been intentionally kept minimal for the very simplest of needs and it is easy to override this default using e.g. basicConfig() for simple needs or e.g. dictConfig() for more elaborate needs.

For those reasons, I don't think this default should be changed.

----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45682>
_______________________________________

From report at bugs.python.org  Sun Oct 31 14:02:45 2021
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Sun, 31 Oct 2021 18:02:45 +0000
Subject: [issue10483] http.server - what is executable on Windows
In-Reply-To: <1290324390.55.0.445837984524.issue10483@psf.upfronthosting.co.za>
Message-ID: <1635703365.24.0.807420405093.issue10483@roundup.psfhosted.org>


?ric Araujo <merwok at netwok.org> 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 <report at bugs.python.org>
<https://bugs.python.org/issue10483>
_______________________________________

From report at bugs.python.org  Sun Oct 31 15:26:57 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 31 Oct 2021 19:26:57 +0000
Subject: [issue45516] Add protocol description to the Traversable and
 TraversableResources documentation
In-Reply-To: <1634597903.13.0.806758851296.issue45516@roundup.psfhosted.org>
Message-ID: <1635708417.47.0.493597832363.issue45516@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 89b1237ffbd2df2721dc4959e3ccb1106f3555b5 by Miss Islington (bot) in branch '3.10':
bpo-45516: add protocol description to the Traversable documentation (GH-29039)
https://github.com/python/cpython/commit/89b1237ffbd2df2721dc4959e3ccb1106f3555b5


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45516>
_______________________________________

From report at bugs.python.org  Sun Oct 31 15:27:58 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 31 Oct 2021 19:27:58 +0000
Subject: [issue45516] Add protocol description to the Traversable and
 TraversableResources documentation
In-Reply-To: <1634597903.13.0.806758851296.issue45516@roundup.psfhosted.org>
Message-ID: <1635708478.45.0.977958566744.issue45516@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset b04b307e0ebad0d9c7cc311fe6018b8d31b2ac8d by Miss Islington (bot) in branch '3.9':
bpo-45516: add protocol description to the Traversable documentation (GH-29039)
https://github.com/python/cpython/commit/b04b307e0ebad0d9c7cc311fe6018b8d31b2ac8d


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45516>
_______________________________________

From report at bugs.python.org  Sun Oct 31 15:44:09 2021
From: report at bugs.python.org (Marten Lienen)
Date: Sun, 31 Oct 2021 19:44:09 +0000
Subject: [issue45588] cached_method similar to cached_property to cache with
 classes
In-Reply-To: <1634993445.55.0.469846719114.issue45588@roundup.psfhosted.org>
Message-ID: <1635709449.78.0.47573732387.issue45588@roundup.psfhosted.org>


Marten Lienen <marten.lienen at gmail.com> added the comment:

As suggested, I have extracted the code and tests into a package on PyPI: https://pypi.org/project/cached_method/
With this I will close this issue. "third party" sounds about right as the Resolution setting.

@eric.araujo This feature is about caching the result of a method call.

----------
resolution:  -> third party
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45588>
_______________________________________

From report at bugs.python.org  Sun Oct 31 15:46:24 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 31 Oct 2021 19:46:24 +0000
Subject: [issue45670] New .mapping attribute is broken for some existing uses
 of dict views
In-Reply-To: <1635525410.44.0.846161043783.issue45670@roundup.psfhosted.org>
Message-ID: <1635709584.29.0.958091080076.issue45670@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Sorry, but this isn't bug in Python.  The documented and supported API is the MappingView ABC where the _mapping attribute is private.

As an optimization, the bidict project has elected to forgo the supported API and instead use a concrete implementation designed specifically for actual dictionaries.  This is an unsupported use and the constructor is not a public API.

We don't even do this internally in the standard library. OrderedDict, for example, has its own odict_keys() type for the C version and _OrderedDictKeysView() for the pure python version.

It would be possible for us to add a set_mapping() method or make the attribute writeable but that would send us down the path for having to support non-dicts throughout and would tie our hands with respect to implementation techniques that rely on the mapping being an actual dictionary.  That isn't worth it for a code optimization and it loses the benefits arising from separate concrete and abstract classes.

Likewise, I don't think a documentation update makes sense because we don't document a constructor, so there is no documented way for a user to get into this position.

For the bidict project, several options come to mind:

1) To continue down the path of using dict_keys, dict_values, and dict_items, consider building a subclass that hides the mapping attribute or that raises a NotImplementedError. That is what collections.Counter() does with the inherited fromkeys() classmethod.

2) Build a C or Cython extension to implement an optimized concrete implementation designed specifically for bidict. That is what collections.OrderedDict() does for keys, values, and items.

3) Forgo the optimization and use the supported MappingView ABC.  That is what collections.ChainMap() does.

4) Just document that *mapping* behaves differently in bidict.

Thank you for the clear bug report with examples. It made it easier to drill into what was happening.

----------
assignee:  -> rhettinger
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45670>
_______________________________________

From report at bugs.python.org  Sun Oct 31 15:46:45 2021
From: report at bugs.python.org (Olaf van der Spek)
Date: Sun, 31 Oct 2021 19:46:45 +0000
Subject: [issue45682] Nicer default logging format
In-Reply-To: <1635688519.79.0.666388517384.issue45682@roundup.psfhosted.org>
Message-ID: <1635709605.44.0.507634763598.issue45682@roundup.psfhosted.org>


Olaf van der Spek <olafvdspek at gmail.com> added the comment:

> Except that people may have used the current basic format in, for example, unit tests, and that code could break after a change like the one proposed.

They too could pass a format argument themselves rather then relying on the default format never changing.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45682>
_______________________________________

From report at bugs.python.org  Sun Oct 31 16:09:01 2021
From: report at bugs.python.org (Vinay Sajip)
Date: Sun, 31 Oct 2021 20:09:01 +0000
Subject: [issue45682] Nicer default logging format
In-Reply-To: <1635688519.79.0.666388517384.issue45682@roundup.psfhosted.org>
Message-ID: <1635710941.93.0.104250740923.issue45682@roundup.psfhosted.org>


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

> They too could pass a format argument themselves rather then relying on the default format never changing.

Changes to the stdlib shouldn't require changing previously working code (sometimes months or years old) to fix breakage caused by new stdlib changes.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45682>
_______________________________________

From report at bugs.python.org  Sun Oct 31 16:51:42 2021
From: report at bugs.python.org (miss-islington)
Date: Sun, 31 Oct 2021 20:51:42 +0000
Subject: [issue45618] Documentation builds fail with Sphinx 3.2.1
In-Reply-To: <1635287699.66.0.0951441516371.issue45618@roundup.psfhosted.org>
Message-ID: <1635713502.37.0.25165927444.issue45618@roundup.psfhosted.org>


miss-islington <mariatta.wijaya+miss-islington at gmail.com> added the comment:


New changeset 14a4fce457033412278ca9a056787db424310dc3 by m-aciek in branch 'main':
bpo-45618: Update Sphinx version used to build the documentation to 4.2.0 (GH-29256)
https://github.com/python/cpython/commit/14a4fce457033412278ca9a056787db424310dc3


----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45618>
_______________________________________

From report at bugs.python.org  Sun Oct 31 17:43:50 2021
From: report at bugs.python.org (Raymond Hettinger)
Date: Sun, 31 Oct 2021 21:43:50 +0000
Subject: [issue45670] New .mapping attribute is broken for some existing uses
 of dict views
In-Reply-To: <1635525410.44.0.846161043783.issue45670@roundup.psfhosted.org>
Message-ID: <1635716630.5.0.0899439599112.issue45670@roundup.psfhosted.org>


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Hmm, I'm looking through the bidict code a bit more.  Rather than saying the dict views are being used in an unsupported way, it is more accurate to say that your intended meaning for the *mapping* attribute differs from the published meaning.

Note, the implementation is already skating on thin ice.  The values() call unexpectedly returns an instance of dict_keys().  At first, I was surprised that this got past the type checker -- you can do set operations with KeysView but not with a ValuesView.

    >>> b.values()
    dict_keys([1, 2])

One suggestion is to document *mapping* do exactly what it currently does.  The mappingproxy means that you aren't promising a specific upstream implementation.   

Also consider that bidict could guarantee the meaning of *mapping* and its underlying store.  This would allow users to make fast conversions to other mapping types:

    # This is weird, but useful. 
    # It might be nice to guarantee it.
    >>> OrderedDict(b.values().mapping)
    >>> OrderedDict([(1, 'a'), (2, 'b')])

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45670>
_______________________________________