]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years ago[3.11] gh-109955 : Update state transition comments for asyncio.Task (GH-109910)...
Miss Islington (bot) [Fri, 29 Sep 2023 13:25:34 +0000 (06:25 -0700)] 
[3.11] gh-109955 : Update state transition comments for asyncio.Task (GH-109910) (#109993)

gh-109955 : Update state transition comments for asyncio.Task (GH-109910)
(cherry picked from commit 45cf5b0c69bb5c51f33fc681d90c45147e311ddf)

Co-authored-by: Kristján Valur Jónsson <sweskman@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] gh-110031: Skip test_threading fork tests if ASAN (#110100) (#110104)
Victor Stinner [Fri, 29 Sep 2023 13:19:37 +0000 (15:19 +0200)] 
[3.11] gh-110031: Skip test_threading fork tests if ASAN (#110100) (#110104)

gh-110031: Skip test_threading fork tests if ASAN (#110100)

Skip test_threading tests using thread+fork if Python is built with
Address Sanitizer (ASAN).

(cherry picked from commit 86e76ab8af9a5018acbcdcbb6285678175b1bd8a)

2 years ago[3.11] gh-110088, gh-109878: Fix test_asyncio timeouts (#110092) (#110099)
Victor Stinner [Fri, 29 Sep 2023 12:16:15 +0000 (14:16 +0200)] 
[3.11] gh-110088, gh-109878: Fix test_asyncio timeouts (#110092) (#110099)

gh-110088, gh-109878: Fix test_asyncio timeouts (#110092)

Fix test_asyncio timeouts: don't measure the maximum duration, a test
should not measure a CI performance. Only measure the minimum
duration when a task has a timeout or delay. Add CLOCK_RES to
test_asyncio.utils.

(cherry picked from commit db0a258e796703e12befea9d6dec04e349ca2f5b)

2 years ago[3.11] gh-102304: Add links to the Stable ABI and Limited C API docs (#105345) (...
Adam Turner [Fri, 29 Sep 2023 09:17:44 +0000 (10:17 +0100)] 
[3.11] gh-102304: Add links to the Stable ABI and Limited C API docs (#105345) (#105371) (#109901)

* Add "limited-c-api" and "stable-api" targets
* Rename the "stable-abi-list" target to "limited-api-list"

2 years ago[3.11] gh-101100: Fix references to ``URLError`` and ``HTTPError`` in ``howto/urllib2...
Miss Islington (bot) [Fri, 29 Sep 2023 08:44:28 +0000 (01:44 -0700)] 
[3.11] gh-101100: Fix references to ``URLError`` and ``HTTPError`` in ``howto/urllib2.rst`` (GH-107966) (#110087)

Co-authored-by: Yuki K <drsuaimqjgar@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] gh-101100: Fix Sphinx warnings in `tutorial/controlflow.rst` (GH-109424) ...
Miss Islington (bot) [Fri, 29 Sep 2023 08:36:24 +0000 (01:36 -0700)] 
[3.11] gh-101100: Fix Sphinx warnings in `tutorial/controlflow.rst` (GH-109424) (#110085)

Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] gh-101100: Fix sphinx warnings in `library/difflib.rst` (GH-110074) (#110082)
Hugo van Kemenade [Fri, 29 Sep 2023 08:19:34 +0000 (02:19 -0600)] 
[3.11] gh-101100: Fix sphinx warnings in `library/difflib.rst` (GH-110074) (#110082)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-109634: Use :samp: role (GH-109635) (GH-109778)
Serhiy Storchaka [Fri, 29 Sep 2023 06:39:31 +0000 (09:39 +0300)] 
[3.11] gh-109634: Use :samp: role (GH-109635) (GH-109778)

(cherry picked from commit 92af0cc580051fd1129c7a86af2cbadeb2aa36dc)

Co-authored-by: Jacob Coffee <jacob@z7x.org>
2 years ago[3.11] gh-110052: Fix faulthandler for freed tstate (#110069) (#110072)
Victor Stinner [Fri, 29 Sep 2023 02:43:28 +0000 (04:43 +0200)] 
[3.11] gh-110052: Fix faulthandler for freed tstate (#110069) (#110072)

gh-110052: Fix faulthandler for freed tstate (#110069)

faulthandler now detected freed interp and freed tstate, and no
longer dereference them.

Backport to 3.11: add pycore_pymem.h include to traceback.c.

(cherry picked from commit 2e37a38bcbfbe1357436e030538290e7d00b668d)

2 years ago[3.11] gh-110036: multiprocessing Popen.terminate() catches PermissionError (GH-11003...
Miss Islington (bot) [Fri, 29 Sep 2023 01:04:58 +0000 (18:04 -0700)] 
[3.11] gh-110036: multiprocessing Popen.terminate() catches PermissionError (GH-110037) (#110065)

gh-110036: multiprocessing Popen.terminate() catches PermissionError (GH-110037)

On Windows, multiprocessing Popen.terminate() now catchs
PermissionError and get the process exit code. If the process is
still running, raise again the PermissionError. Otherwise, the
process terminated as expected: store its exit code.
(cherry picked from commit bd4518c60c9df356cf5e05b81305e3644ebb5e70)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-109960: Remove test_pty timeout of 10 seconds (GH-110058) (#110061)
Miss Islington (bot) [Fri, 29 Sep 2023 00:30:38 +0000 (17:30 -0700)] 
[3.11] gh-109960: Remove test_pty timeout of 10 seconds (GH-110058) (#110061)

gh-109960: Remove test_pty timeout of 10 seconds (GH-110058)

In 2003, test_pty got a hardcoded timeout of 10 seconds to prevent
hanging on AIX & HPUX "if run after test_openpty":
commit 7d8145268ee282f14d6adce9305dc3c1c7ffec14. Since 2003, test_pty
was no longer reported to hang on AIX. But today, the test can fail
simply because a CI is busy running other tests in parallel.
The timeout of 10 seconds is no longer needed, just remove it.
Moreover, regrtest now has multiple built-in generic timeout
mecanisms.
(cherry picked from commit 5fdcea744024c8a19ddb57057bf5ec2889546c98)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-110038: KqueueSelector must count all read/write events (GH-110039) (#110044)
Davide Rizzo [Thu, 28 Sep 2023 18:58:24 +0000 (20:58 +0200)] 
[3.11] gh-110038: KqueueSelector must count all read/write events (GH-110039) (#110044)

[3.11] gh-110038: KqueueSelector must count all read/write events (GH-110039).
(cherry picked from commit b14f0ab51cb4851b25935279617e388456dcf716)

2 years ago[3.11] gh-110033: Fix signal test_interprocess_signal() (GH-110035) (#110041)
Miss Islington (bot) [Thu, 28 Sep 2023 17:48:58 +0000 (10:48 -0700)] 
[3.11] gh-110033: Fix signal test_interprocess_signal() (GH-110035) (#110041)

gh-110033: Fix signal test_interprocess_signal() (GH-110035)

Fix test_interprocess_signal() of test_signal. Make sure that the
subprocess.Popen object is deleted before the test raising an
exception in a signal handler. Otherwise, Popen.__del__() can get the
exception which is logged as "Exception ignored in: ...." and the
test fails.
(cherry picked from commit 7e0fbf5175fcf21dae390ba68b7f49706d62aa49)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-109594: Fix concurrent.futures test_timeout() (GH-110018) (#110022)
Miss Islington (bot) [Thu, 28 Sep 2023 13:49:56 +0000 (06:49 -0700)] 
[3.11] gh-109594: Fix concurrent.futures test_timeout() (GH-110018) (#110022)

gh-109594: Fix concurrent.futures test_timeout() (GH-110018)

Fix test_timeout() of test_concurrent_futures.test_wait. Remove the
future which may or may not complete depending if it takes longer
than the timeout ot not. Keep the second future which does not
complete before wait(). Make also the test faster: 0.5 second instead
of 6 seconds, so remove @support.requires_resource('walltime')
decorator.
(cherry picked from commit 9be283e5e15d5d5685b78a38eb132501f7f3febb)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-109991: Update macOS installer to use OpenSSL 3.0.10. (GH-110010)
Miss Islington (bot) [Thu, 28 Sep 2023 06:34:24 +0000 (23:34 -0700)] 
[3.11] gh-109991: Update macOS installer to use OpenSSL 3.0.10. (GH-110010)

(cherry picked from commit 98c0c1de18e9ec02a0dde0a89b9acf9415891de2)

Co-authored-by: Ned Deily <nad@python.org>
2 years ago[3.11] gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.11 and multissltests...
Ned Deily [Thu, 28 Sep 2023 05:31:17 +0000 (01:31 -0400)] 
[3.11] gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.11 and multissltests to use 1.1.1w, 3.0.11, and 3.1.3. (#110006)

(cherry picked from commit c88037d137a98d7c399c7bd74d5117b5bcae1543)

2 years ago[3.11] Enhance TypedDict docs around required/optional keys (GH-109547) (#109983)
Miss Islington (bot) [Wed, 27 Sep 2023 17:54:27 +0000 (10:54 -0700)] 
[3.11] Enhance TypedDict docs around required/optional keys (GH-109547) (#109983)

As discussed in comments to GH-109544, the semantics of this attribute
are somewhat confusing. Add a note explaining its limitations and
steering users towards __required_keys__ and __optional_keys__ instead.
(cherry picked from commit f49958c886a2f2608f1008186d588efc2a98b445)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years ago[3.11] gh-109615: Fix support test_copy_python_src_ignore() on WASM (GH-109970) ...
Miss Islington (bot) [Wed, 27 Sep 2023 15:58:20 +0000 (08:58 -0700)] 
[3.11] gh-109615: Fix support test_copy_python_src_ignore() on WASM (GH-109970) (#109976)

gh-109615: Fix support test_copy_python_src_ignore() on WASM (GH-109970)

Not only check if src_dir exists, but look also for Lib/os.py
landmark.
(cherry picked from commit cc54bcf17b5b5f7681f52baf3acef75b995fa1fd)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-101100: Fix sphinx warnings in `library/devmode.rst` (GH-109963) (#109967)
Miss Islington (bot) [Wed, 27 Sep 2023 14:16:01 +0000 (07:16 -0700)] 
[3.11] gh-101100: Fix sphinx warnings in `library/devmode.rst` (GH-109963) (#109967)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] gh-109615: Fix support test_copy_python_src_ignore() (#109958) (#109962)
Victor Stinner [Wed, 27 Sep 2023 11:00:22 +0000 (13:00 +0200)] 
[3.11] gh-109615: Fix support test_copy_python_src_ignore() (#109958) (#109962)

gh-109615: Fix support test_copy_python_src_ignore() (#109958)

Fix the test when run on an installed Python: use "abs_srcdir" of
sysconfig, and skip the test if the Python source code cannot be
found.

* Tools/patchcheck/patchcheck.py, Tools/freeze/test/freeze.py and
  Lib/test/libregrtest/utils.py now first try to get "abs_srcdir"
  from sysconfig, before getting "srcdir" from sysconfig.
* test.pythoninfo logs sysconfig "abs_srcdir".

(cherry picked from commit b89ed9df39851348fbb1552294644f99f6b17d2c)

2 years ago[3.11] gh-109615: Fix test_tools.test_freeze SRCDIR (#109935) (#109951)
Victor Stinner [Wed, 27 Sep 2023 08:59:02 +0000 (10:59 +0200)] 
[3.11] gh-109615: Fix test_tools.test_freeze SRCDIR (#109935) (#109951)

gh-109615: Fix test_tools.test_freeze SRCDIR (#109935)

Fix copy_source_tree() function of test_tools.test_freeze:

* Don't copy SRC_DIR/build/ anymore. This directory is modified by
  other tests running in parallel.
* Add test.support.copy_python_src_ignore().
* Use sysconfig to get the source directory.
* Use sysconfig.get_config_var() to get CONFIG_ARGS variable.

(cherry picked from commit 1512d6c6ee2a770afb339bbb74c1b990116f7f89)

2 years ago[3.11] gh-107298: Document PyMODINIT_FUNC macro (#109236) (#109948)
Victor Stinner [Wed, 27 Sep 2023 08:40:24 +0000 (10:40 +0200)] 
[3.11] gh-107298: Document PyMODINIT_FUNC macro (#109236) (#109948)

gh-107298: Document PyMODINIT_FUNC macro (#109236)

Document PyMODINIT_FUNC macro.

Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are
not documented. These macros should only be used to define the Python
C API. They should not be used outside Python code base.

(cherry picked from commit d7a27e527d7e669d2e45cff80ad725978226477c)

2 years ago[3.11] Remove loop from docstring for asyncio.streams.open_connection (GH-108528...
Miss Islington (bot) [Wed, 27 Sep 2023 06:18:25 +0000 (23:18 -0700)] 
[3.11] Remove loop from docstring for asyncio.streams.open_connection (GH-108528) (#109942)

Remove loop from docstring for asyncio.streams.open_connection (GH-108528)
(cherry picked from commit e721f7a95186452339dc9e57630d639d549b2521)

Co-authored-by: Tom Gillespie <tgbugs@gmail.com>
2 years ago[3.11] gh-109098: Fuzz re module instead of internal sre (GH-109911) (GH-109933)
Miss Islington (bot) [Wed, 27 Sep 2023 06:15:40 +0000 (23:15 -0700)] 
[3.11] gh-109098: Fuzz re module instead of internal sre (GH-109911) (GH-109933)

* Fix c-analyzer globals test failure
* Put globals exception in ignored.tsv
(cherry picked from commit a829356f86d597e4dfe92e236a6d711c8a464f16)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
2 years ago[3.11] gh-101100: Fix Sphinx warnings in Doc/using/configure.rst (GH-109931) (#109938)
Miss Islington (bot) [Wed, 27 Sep 2023 00:35:26 +0000 (17:35 -0700)] 
[3.11] gh-101100: Fix Sphinx warnings in Doc/using/configure.rst (GH-109931) (#109938)

gh-101100: Fix Sphinx warnings in Doc/using/configure.rst (GH-109931)
(cherry picked from commit 3538930d87e6bdd2bfffa3f674a62cc91d359d31)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-107888: Fix test_mmap.test_access_parameter() on macOS 14 (GH-109928) ...
Miss Islington (bot) [Tue, 26 Sep 2023 22:51:34 +0000 (15:51 -0700)] 
[3.11] gh-107888: Fix test_mmap.test_access_parameter() on macOS 14 (GH-109928) (#109930)

gh-107888: Fix test_mmap.test_access_parameter() on macOS 14 (GH-109928)
(cherry picked from commit 9dbfe2dc8e7bba25e52f9470ae6969821a365297)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-109845: Make test_ftplib more stable under load (GH-109912) (GH-109920)
Miss Islington (bot) [Tue, 26 Sep 2023 20:23:20 +0000 (13:23 -0700)] 
[3.11] gh-109845: Make test_ftplib more stable under load (GH-109912) (GH-109920)

recv() can return partial data cut in the middle of a multibyte
character. Test raw binary data instead of data incorrectly decoded by parts.
(cherry picked from commit 2ef2fffe3be953b91852585c75188d5475b09474)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-109593: Fix reentrancy issue in multiprocessing resource_tracker (GH-109629...
Miss Islington (bot) [Tue, 26 Sep 2023 12:21:52 +0000 (05:21 -0700)] 
[3.11] gh-109593: Fix reentrancy issue in multiprocessing resource_tracker (GH-109629) (#109897)

gh-109593: Fix reentrancy issue in multiprocessing resource_tracker (GH-109629)

---------

(cherry picked from commit 0eb98837b60bc58e57ad3e2b35c6b0e9ab634678)

Co-authored-by: Antoine Pitrou <antoine@python.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2 years ago[3.11] gh-109832: concurrent.futures test_deadlock restores sys.stderr (GH-109887...
Miss Islington (bot) [Tue, 26 Sep 2023 11:08:27 +0000 (04:08 -0700)] 
[3.11] gh-109832: concurrent.futures test_deadlock restores sys.stderr (GH-109887) (#109893)

gh-109832: concurrent.futures test_deadlock restores sys.stderr (GH-109887)

test_error_at_task_unpickle() and
test_error_during_result_unpickle_in_result_handler() now restore
sys.stderr which is overriden by _raise_error_ignore_stderr().
(cherry picked from commit 2897142d2ec0930a8991af964c798b68fb6dcadd)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-109370: Fix unexpected traceback output in test_concurrent_futures (GH...
Miss Islington (bot) [Tue, 26 Sep 2023 08:21:09 +0000 (01:21 -0700)] 
[3.11] gh-109370: Fix unexpected traceback output in test_concurrent_futures (GH-109780) (GH-109882)

Follow-up of gh-107219.

* Only close the connection writer on Windows.
* Also use existing constant _winapi.ERROR_OPERATION_ABORTED instead of
  WSA_OPERATION_ABORTED.
(cherry picked from commit 0b4e090422db5f959184353d53552d1675f74212)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-109631: Allow interruption of short repeated regex matches (GH-109867)...
Miss Islington (bot) [Tue, 26 Sep 2023 08:19:29 +0000 (01:19 -0700)] 
[3.11] gh-109631: Allow interruption of short repeated regex matches (GH-109867) (GH-109885)

Counting for signal checking now continues in new match from the point where
it ended in the previous match instead of starting from 0.
(cherry picked from commit 8ac2085b80eca4d9b2a1093d0a7da020fd12e11a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-101100: Fix Sphinx warnings in `Doc/library/weakref.rst` (GH-109881) (...
Miss Islington (bot) [Tue, 26 Sep 2023 07:58:59 +0000 (00:58 -0700)] 
[3.11] gh-101100: Fix Sphinx warnings in `Doc/library/weakref.rst` (GH-109881) (#109883)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-109401: Fix threading barrier test_default_timeout() (GH-109875) (#109877)
Miss Islington (bot) [Tue, 26 Sep 2023 00:34:00 +0000 (17:34 -0700)] 
[3.11] gh-109401: Fix threading barrier test_default_timeout() (GH-109875) (#109877)

gh-109401: Fix threading barrier test_default_timeout() (GH-109875)

Increase timeouts. Barrier default timeout should be long enough to
spawn 4 threads on a slow CI.
(cherry picked from commit e5186c3de4194de3ea8c80edb182d786f5e20944)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-109748: Fix venv test_zippath_from_non_installed_posix() (GH-109872) (...
Miss Islington (bot) [Mon, 25 Sep 2023 23:41:32 +0000 (16:41 -0700)] 
[3.11] gh-109748: Fix venv test_zippath_from_non_installed_posix() (GH-109872) (#109874)

gh-109748: Fix venv test_zippath_from_non_installed_posix() (GH-109872)

Fix test_zippath_from_non_installed_posix() of test_venv: don't copy
__pycache__/ sub-directories, because they can be modified by other
Python tests running in parallel.
(cherry picked from commit 25bb266fc876b344e31e0b5634a4db94912c1aba)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-89363: Skip threading test_is_alive_after_fork() if ASAN (GH-109835) (...
Miss Islington (bot) [Mon, 25 Sep 2023 16:29:56 +0000 (09:29 -0700)] 
[3.11] gh-89363: Skip threading test_is_alive_after_fork() if ASAN (GH-109835) (#109856)

gh-89363: Skip threading test_is_alive_after_fork() if ASAN (GH-109835)

Skip test_is_alive_after_fork() of test_threading if Python is built
with Address Sanitizer (ASAN).
(cherry picked from commit bc06743533b5fea2d5ecdad6dd3caa372c67439f)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-109795: `_thread.start_new_thread`: allocate thread bootstate usin… (#109852)
Victor Stinner [Mon, 25 Sep 2023 16:12:43 +0000 (18:12 +0200)] 
[3.11] gh-109795: `_thread.start_new_thread`: allocate thread bootstate usin… (#109852)

gh-109795: `_thread.start_new_thread`: allocate thread bootstate using raw memory allocator (#109808)

(cherry picked from commit 1b8f2366b38c87b0450d9c15bdfdd4c4a2fc3a01)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
2 years ago[3.11] gh-109833: Fix asyncio test_wait_for() (GH-109834) (#109838)
Miss Islington (bot) [Mon, 25 Sep 2023 14:22:41 +0000 (07:22 -0700)] 
[3.11] gh-109833: Fix asyncio test_wait_for() (GH-109834) (#109838)

gh-109833: Fix asyncio test_wait_for() (GH-109834)

Expect the test to be "short" but don't measure the exact performance
of the CI. SHORT_TIMEOUT is about 30 seconds whereas the cancelled
coroutine takes around 1 hour.
(cherry picked from commit f29bc9c9a0a6794c6b8a9e84a7ba9237b427a10a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-105829: Fix concurrent.futures.ProcessPoolExecutor deadlock (GH-108513...
elfstrom [Sun, 24 Sep 2023 19:28:03 +0000 (21:28 +0200)] 
[3.11] gh-105829: Fix concurrent.futures.ProcessPoolExecutor deadlock (GH-108513) (#109783)

This fixes issue GH-105829, https://github.com/python/cpython/issues/105829

(cherry picked from commit 405b06375a8a4cdb08ff53afade09a8b66ec23d5)

2 years ago[3.11] gh-101100: Fix sphinx warnings in `Doc/library/xml.etree.elementtree.rst`...
Miss Islington (bot) [Sun, 24 Sep 2023 10:02:07 +0000 (03:02 -0700)] 
[3.11] gh-101100: Fix sphinx warnings in `Doc/library/xml.etree.elementtree.rst` (GH-109799) (#109801)

gh-101100: Fix sphinx warnings in `Doc/library/xml.etree.elementtree.rst` (GH-109799)
(cherry picked from commit 649768fb6781ba810df44017fee1975a11d65e2f)

gh-101100: Fix shpinx warnings in `Doc/library/xml.etree.elementtree.rst`

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] GH-95913: Add the release date for Python 3.11 (GH-109750) (#109772)
Miss Islington (bot) [Sat, 23 Sep 2023 04:19:22 +0000 (21:19 -0700)] 
[3.11] GH-95913: Add the release date for Python 3.11 (GH-109750) (#109772)

GH-95913: Add the release date for Python 3.11 (GH-109750)
(cherry picked from commit b10de68c6ceae1076cdc98c890b9802dc81a7f44)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] Docs: Update Donghee Na's name (GH-109743) (#109759)
Hugo van Kemenade [Sat, 23 Sep 2023 03:53:47 +0000 (21:53 -0600)] 
[3.11] Docs: Update Donghee Na's name (GH-109743) (#109759)

* Update Donghee Na's name in Docs/

* Update Donghee Na's name in Misc/ACKS

* Update Donghee Na's name in Misc/NEWS.d/

2 years ago[3.11] gh-109706: Fix multiprocessing test_nested_startmethod() (GH-109707) (#109763)
Miss Islington (bot) [Fri, 22 Sep 2023 22:09:46 +0000 (15:09 -0700)] 
[3.11] gh-109706: Fix multiprocessing test_nested_startmethod() (GH-109707) (#109763)

gh-109706: Fix multiprocessing test_nested_startmethod() (GH-109707)

Don't check order, queue items can be written in any order.
(cherry picked from commit b03a791497ff4b3c42805e06c73d08ac34087402)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-108303: Fix and move `badsyntax_pep3120.py` (GH-109513) (#109724)
Nikita Sobolev [Fri, 22 Sep 2023 15:50:32 +0000 (18:50 +0300)] 
[3.11] gh-108303: Fix and move `badsyntax_pep3120.py` (GH-109513) (#109724)

* [3.11] gh-108303: Fix and move `badsyntax_pep3120.py` (GH-109513)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>.
(cherry picked from commit 4dd47c63a97b3c39cd964ad12431fcdaf76dc823)

Backport to 3.11: update also test_imp.

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] ACKS: Fix ordering; Correct Itamar Oren's surname; Add Adam Turner (GH-109737...
Miss Islington (bot) [Fri, 22 Sep 2023 15:05:04 +0000 (08:05 -0700)] 
[3.11] ACKS: Fix ordering; Correct Itamar Oren's surname; Add Adam Turner  (GH-109737) (#109742)

ACKS: Fix ordering; Correct Itamar Oren's surname; Add Adam Turner  (GH-109737)
(cherry picked from commit 3e8fcb7df74248530c4280915c77e69811f69c3f)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] gh-109709: Fix asyncio test_stdin_broken_pipe() (#109710) (#109735)
Victor Stinner [Fri, 22 Sep 2023 14:34:53 +0000 (16:34 +0200)] 
[3.11] gh-109709: Fix asyncio test_stdin_broken_pipe() (#109710) (#109735)

gh-109709: Fix asyncio test_stdin_broken_pipe() (#109710)

Replace harcoded sleep of 500 ms with synchronization using a pipe.

Fix also Process._feed_stdin(): catch also BrokenPipeError on
stdin.write(input), not only on stdin.drain().

(cherry picked from commit cbbdf2c1440c804adcfc32ea0470865b3b3b8eb2)

2 years ago[3.11] gh-109625: Move _ready_to_import() from test_import to support.import_helper...
Nikita Sobolev [Fri, 22 Sep 2023 10:34:46 +0000 (13:34 +0300)] 
[3.11] gh-109625: Move _ready_to_import() from test_import to support.import_helper (GH-109626) (#109718)

[3.11] gh-109625: Move _ready_to_import() from test_import to support.import_helper (GH-109626).
(cherry picked from commit 115c49ad5a5ccfb628fef3ae06a566f7a0197f97)

2 years ago[3.11] gh-109702: Increase concurrent_futures deadlock timeout (GH-109703) (#109708)
Miss Islington (bot) [Fri, 22 Sep 2023 02:02:57 +0000 (19:02 -0700)] 
[3.11] gh-109702: Increase concurrent_futures deadlock timeout (GH-109703) (#109708)

gh-109702: Increase concurrent_futures deadlock timeout (GH-109703)

Replace SHORT_TIMEOUT with LONG_TIMEOUT in test_deadlock of
test_concurrent_futures.
(cherry picked from commit 1eb1b45183c3b8aeefe3d5d27694155741e82bbc)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-109375: Fix bug where pdb registers an alias without an associated command...
Miss Islington (bot) [Fri, 22 Sep 2023 01:45:11 +0000 (18:45 -0700)] 
[3.11] gh-109375: Fix bug where pdb registers an alias without an associated command (GH-109376) (#109430)

gh-109375: Fix bug where pdb registers an alias without an associated command (GH-109376)
(cherry picked from commit 68a6f21f47e779ddd70e33cf04d170a63f077fcd)

Co-authored-by: buermarc <44375277+buermarc@users.noreply.github.com>
2 years ago[3.11] gh-108388: Convert test_concurrent_futures to package (#108401) (#109704)
Victor Stinner [Fri, 22 Sep 2023 01:37:25 +0000 (03:37 +0200)] 
[3.11] gh-108388: Convert test_concurrent_futures to package (#108401) (#109704)

* gh-108388: Convert test_concurrent_futures to package (#108401)

Convert test_concurrent_futures to a package of sub-tests.

(cherry picked from commit aa6f787faa4bc45006da4dc2f942fb9b82c98836)

Notes on backport to 3.11:

* AsCompletedTests: Revert test_future_times_out() => test_zero_timeout()
* Restore TODO comment
* ThreadPoolExecutorTest.test_hang_global_shutdown_lock():
  add @support.requires_resource('cpu').

2 years ago[3.11] gh-108948: Skip test_tarfile.test_modes() on EFTYPE error (#109697) (#109699)
Victor Stinner [Thu, 21 Sep 2023 23:29:49 +0000 (01:29 +0200)] 
[3.11] gh-108948: Skip test_tarfile.test_modes() on EFTYPE error (#109697) (#109699)

gh-108948: Skip test_tarfile.test_modes() on EFTYPE error (#109697)

On FreeBSD, regular users cannot set the sticky bit. Skip the test if
chmod() fails with EFTYPE error.

(cherry picked from commit 26e06ad617bb416201c769fea91cd33d544c6a1c)

2 years ago[3.11] gh-108388: Split test_multiprocessing_spawn (GH-108396) (#109688)
Miss Islington (bot) [Thu, 21 Sep 2023 20:44:21 +0000 (13:44 -0700)] 
[3.11] gh-108388: Split test_multiprocessing_spawn (GH-108396) (#109688)

gh-108388: Split test_multiprocessing_spawn (GH-108396)

Split test_multiprocessing_fork, test_multiprocessing_forkserver and
test_multiprocessing_spawn into test packages. Each package is made
of 4 sub-tests: processes, threads, manager and misc. It allows
running more tests in parallel and so reduce the total test duration.
(cherry picked from commit aa9a359ca2663195b0f04eef46109c28c4ff74d3)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-108303: Move tokenize-related data to Lib/test/tokenizedata (GH-109265...
Victor Stinner [Thu, 21 Sep 2023 19:46:05 +0000 (21:46 +0200)] 
[3.11] gh-108303: Move tokenize-related data to Lib/test/tokenizedata (GH-109265) (#109678)

* gh-108303: Move tokenize-related data to Lib/test/tokenizedata (GH-109265)

(cherry picked from commit 1110c5bc828218086f6397ec05a9312fb73ea30a)

* gh-108303: Add `Lib/test/tokenizedata` to `TESTSUBDIRS` (#109314)

(cherry picked from commit 42ab2cbd7b5e76e919b70883ae683e789dbd913d)

---------

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-108303: Move `test_future` into its own test_future_stmt subdir (#109368...
Victor Stinner [Thu, 21 Sep 2023 19:45:37 +0000 (21:45 +0200)] 
[3.11] gh-108303: Move `test_future` into its own test_future_stmt subdir (#109368) (#109680)

gh-108303: Move `test_future` into its own test_future_stmt subdir (#109368)

(cherry picked from commit 82505dc351b2f7e37aa395218709b432d83292cd)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-109546: Add more tests for formatting floats (GH-109548) (#109685)
Victor Stinner [Thu, 21 Sep 2023 19:45:18 +0000 (21:45 +0200)] 
[3.11] gh-109546: Add more tests for formatting floats (GH-109548) (#109685)

gh-109546: Add more tests for formatting floats (GH-109548)

(cherry picked from commit beb5ec5817b645562ebbdd59f25683a93061c32c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-108303: Create Lib/test/test_dataclasses/ directory (#108978) (#109675)
Victor Stinner [Thu, 21 Sep 2023 18:59:11 +0000 (20:59 +0200)] 
[3.11] gh-108303: Create Lib/test/test_dataclasses/ directory (#108978) (#109675)

gh-108303: Create Lib/test/test_dataclasses/ directory (#108978)

Move test_dataclasses.py and its "dataclass_*.py" modules into the
new Lib/test/test_dataclasses/ subdirectory.

Backport to 3.11: update Lib/test/.ruff.toml.

(cherry picked from commit 14d6e197cc56e5256d501839a4e66e3864ab15f0)

2 years ago[3.11] gh-108303: Move `ann_module*.py` files to `typinganndata/` folder (#108354...
Victor Stinner [Thu, 21 Sep 2023 18:18:39 +0000 (20:18 +0200)] 
[3.11] gh-108303: Move `ann_module*.py` files to `typinganndata/` folder (#108354) (#109673)

gh-108303: Move `ann_module*.py` files to `typinganndata/` folder (#108354)

(cherry picked from commit 3f61cf646d0506baa0c0c2118f05110446519c62)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-108303: Remove unused Lib/test/sgml_input.html (GH-108305) (#109670)
Miss Islington (bot) [Thu, 21 Sep 2023 18:07:14 +0000 (11:07 -0700)] 
[3.11] gh-108303: Remove unused Lib/test/sgml_input.html (GH-108305) (#109670)

gh-108303: Remove unused Lib/test/sgml_input.html (GH-108305)

In Python 2.7, the file was used by Lib/test/test_sgmllib.py to test
Lib/sgmllib.py. The sgmllib module and its tests have been removed in
Python 3.0.
(cherry picked from commit d2879f2095abd5c8186c7f69c964a341c2053572)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-109613: _pystat_fromstructstat() checks for exceptions (#109618) (#109668)
Victor Stinner [Thu, 21 Sep 2023 18:00:38 +0000 (20:00 +0200)] 
[3.11] gh-109613: _pystat_fromstructstat() checks for exceptions (#109618) (#109668)

gh-109613: _pystat_fromstructstat() checks for exceptions (#109618)

Fix os.stat() and os.DirEntry.stat(): check for exceptions.
Previously, on Python built in debug mode, these functions could
trigger a fatal Python error (and abort the process) when a function
succeeded with an exception set.

_pystat_fromstructstat() now exits immediately if an exception is
raised, rather only checking for exceptions at the end. It fix
following fatal error in fill_time():

    Fatal Python error: _Py_CheckSlotResult:
    Slot * of type int succeeded with an exception set

(cherry picked from commit d4cea794a7b9b745817d2bd982d35412aef04710)

2 years ago[3.11] GH-109209: Bump the minimum Sphinx version to 4.2 (GH-109210) (#109637)
Miss Islington (bot) [Thu, 21 Sep 2023 06:32:10 +0000 (23:32 -0700)] 
[3.11] GH-109209: Bump the minimum Sphinx version to 4.2 (GH-109210) (#109637)

GH-109209: Bump the minimum Sphinx version to 4.2 (GH-109210)
(cherry picked from commit 712cb173f8e1d02c625a40ae03bba57b0c1c032a)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] gh-109408: Move Windows builds from Azure Pipelines PR to GitHub Actions ...
Hugo van Kemenade [Wed, 20 Sep 2023 19:27:39 +0000 (13:27 -0600)] 
[3.11] gh-109408: Move Windows builds from Azure Pipelines PR to GitHub Actions (GH-109569) (#109624)

2 years ago[3.11] Fix typos in docs and comments (#109619) (#109622)
Alex Waygood [Wed, 20 Sep 2023 17:50:48 +0000 (18:50 +0100)] 
[3.11] Fix typos in docs and comments (#109619) (#109622)

Co-authored-by: Heinz-Alexander Fuetterer <35225576+afuetterer@users.noreply.github.com>
2 years ago[3.11] gh-103053: Skip test_freeze_simple_script() on PGO build (#109591) (#109616)
Victor Stinner [Wed, 20 Sep 2023 15:45:23 +0000 (17:45 +0200)] 
[3.11] gh-103053: Skip test_freeze_simple_script() on PGO build (#109591) (#109616)

gh-103053: Skip test_freeze_simple_script() on PGO build (#109591)

Skip test_freeze_simple_script() of test_tools.test_freeze if Python
is built with "./configure --enable-optimizations", which means with
Profile Guided Optimization (PGO): it just makes the test too slow.
The freeze tool is tested by many other CIs with other (faster)
compiler flags.

test.pythoninfo now gets also get_build_info() of
test.libregrtests.utils.

(cherry picked from commit 81cd1bd713624c3d26b647f3d28f2fd905887a0d)

2 years ago[3.11] gh-108973: Fix asyncio SubprocessProtocol doc (#109431) (#109610)
Victor Stinner [Wed, 20 Sep 2023 14:15:08 +0000 (16:15 +0200)] 
[3.11] gh-108973: Fix asyncio SubprocessProtocol doc (#109431) (#109610)

gh-108973: Fix asyncio SubprocessProtocol doc (#109431)

SubprocessProtocol process_exited() method can be called before
pipe_data_received() and pipe_connection_lost() methods. Document it
and adapt the example in the doc.

Co-authored-by: Davide Rizzo <sorcio@gmail.com>
(cherry picked from commit ced6924630037f1e5b3d1dbef2b600152fb07fbb)

2 years ago[3.11] Fix error handling in _PySys_UpdateConfig() (GH-109524) (GH-109551)
Miss Islington (bot) [Mon, 18 Sep 2023 18:24:41 +0000 (11:24 -0700)] 
[3.11] Fix error handling in _PySys_UpdateConfig() (GH-109524) (GH-109551)

(cherry picked from commit c829975428253568d47ebfc3104fa7386b5e0b58)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-108843: fix ast.unparse for f-string with many quotes (#108980)
Shantanu [Mon, 18 Sep 2023 14:11:56 +0000 (07:11 -0700)] 
[3.11] gh-108843: fix ast.unparse for f-string with many quotes (#108980)

* [3.11] gh-108843: fix ast.unparse for f-string with many quotes

* 📜🤖 Added by blurb_it.

* simplify

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2 years ago[3.11] gh-109408: Azure Pipelines: test 3.12 branch (GH-109453) (#109536)
Miss Islington (bot) [Mon, 18 Sep 2023 13:03:44 +0000 (06:03 -0700)] 
[3.11] gh-109408: Azure Pipelines: test 3.12 branch (GH-109453) (#109536)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] Fix extraneous backslashes in hashlib docs (GH-109468) (#109531)
Miss Islington (bot) [Mon, 18 Sep 2023 07:34:20 +0000 (00:34 -0700)] 
[3.11] Fix extraneous backslashes in hashlib docs (GH-109468) (#109531)

Fix extraneous backslashes in hashlib docs (GH-109468)
(cherry picked from commit ce5b3e19e6fb940fa72db1b98a8df80f6e464265)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2 years ago[3.11] gh-109408: Remove Ubuntu unit tests from Azure Pipelines (GH-109452) (#109520)
Hugo van Kemenade [Sun, 17 Sep 2023 19:24:26 +0000 (13:24 -0600)] 
[3.11] gh-109408: Remove Ubuntu unit tests from Azure Pipelines (GH-109452) (#109520)

(cherry picked from commit a75daed7e004ee9a53b160307c4c072656176a02)

2 years ago[3.11] gh-109451: Fix wrong format specifier in logging documentation (GH-109465...
Miss Islington (bot) [Sat, 16 Sep 2023 14:39:06 +0000 (07:39 -0700)] 
[3.11] gh-109451: Fix wrong format specifier in logging documentation (GH-109465) (GH-109482)

(cherry picked from commit 929cc4e4a0999b777e1aa94f9c007db720e67f43)

2 years ago[3.11] gh-109414: Add some basic information about venvs in the introduction. (GH...
Miss Islington (bot) [Sat, 16 Sep 2023 10:14:07 +0000 (03:14 -0700)] 
[3.11] gh-109414: Add some basic information about venvs in the introduction. (GH-109440) (GH-109480)

(cherry picked from commit a6846d45ff3c836bc859c40e7684b57df991dc05)

2 years ago[3.11] gh-109474: Update two Unix packaging URLs (GH-109307) (#109478)
Miss Islington (bot) [Sat, 16 Sep 2023 07:56:16 +0000 (00:56 -0700)] 
[3.11] gh-109474: Update two Unix packaging URLs  (GH-109307) (#109478)

gh-109474: Update two Unix packaging URLs  (GH-109307)

update packaging URLs

fix a broken URL for fedora RPM packaging guide and fix a URL redirect for Slackware packaging guide.
(cherry picked from commit 0b38ce440bd76b3d25b6d042ee9613841fb4a947)

Co-authored-by: partev <petrosyan@gmail.com>
2 years ago[3.11] Fix date.__repr__() docstring (#109422) (#109449)
Victor Stinner [Fri, 15 Sep 2023 13:29:57 +0000 (15:29 +0200)] 
[3.11] Fix date.__repr__() docstring (#109422) (#109449)

Fix date.__repr__() docstring (#109422)

(cherry picked from commit 5eec58a9e57383128ade7b527965b1efc474735b)

Co-authored-by: Christopher Yeh <chrisyeh96@users.noreply.github.com>
2 years ago[3.11] Docs: Superseded modules: list only module names (GH-109439) (#109446)
Miss Islington (bot) [Fri, 15 Sep 2023 13:10:07 +0000 (06:10 -0700)] 
[3.11] Docs: Superseded modules: list only module names (GH-109439) (#109446)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] gh-109395: Remove skipped macOS builds from Azure Pipelines (GH-109400) (...
Miss Islington (bot) [Fri, 15 Sep 2023 09:18:54 +0000 (02:18 -0700)] 
[3.11] gh-109395: Remove skipped macOS builds from Azure Pipelines (GH-109400) (#109442)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-109395: Remove skipped coverage job from Azure Pipelines (GH-109412) (...
Miss Islington (bot) [Fri, 15 Sep 2023 09:10:41 +0000 (02:10 -0700)] 
[3.11] gh-109395: Remove skipped coverage job from Azure Pipelines (GH-109412) (#109434)

gh-109395: Remove skipped coverage job from Azure Pipelines (GH-109412)
(cherry picked from commit fa493900fbf19cbfac44164f3d8acb4f598ff3c1)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] gh-60283: Check for redefined test names in CI (#109161) (#109366)
Hugo van Kemenade [Fri, 15 Sep 2023 05:45:23 +0000 (23:45 -0600)] 
[3.11] gh-60283: Check for redefined test names in CI (#109161) (#109366)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
(cherry picked from commit 3cb9a8edca6e3fa0f0045b03a9a6444cf8f7affe)

2 years ago[3.11] gh-108822: Fix regrtest clear_caches() (#109432)
Victor Stinner [Fri, 15 Sep 2023 00:07:28 +0000 (02:07 +0200)] 
[3.11] gh-108822: Fix regrtest clear_caches() (#109432)

gh-108822: Fix regrtest clear_caches()

Python 3.11 doesn't have fractions._hash_algorithm cache.

2 years ago[3.11] gh-109396: Fix test_socket.test_hmac_sha1() in FIPS mode (GH-109423) (#109427)
Miss Islington (bot) [Thu, 14 Sep 2023 22:52:40 +0000 (15:52 -0700)] 
[3.11] gh-109396: Fix test_socket.test_hmac_sha1() in FIPS mode (GH-109423) (#109427)

gh-109396: Fix test_socket.test_hmac_sha1() in FIPS mode (GH-109423)

Use a longer key: FIPS mode requires at least of at least 112 bits.
The previous key was only 32 bits.
(cherry picked from commit e091b9f20fa8e409003af79f3c468b8225e6dcd3)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-101100: Fix sphinx warnings in `turtle.rst` (GH-109394) (#109417)
Miss Islington (bot) [Thu, 14 Sep 2023 18:41:26 +0000 (11:41 -0700)] 
[3.11] gh-101100: Fix sphinx warnings in `turtle.rst` (GH-109394) (#109417)

(cherry picked from commit 21e80f4c1925aaafae199840f8737b5c39a82c70)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-109351: Fix crash when compiling AST with invalid NamedExpr (GH-109352...
Miss Islington (bot) [Wed, 13 Sep 2023 16:32:08 +0000 (09:32 -0700)] 
[3.11] gh-109351: Fix crash when compiling AST with invalid NamedExpr (GH-109352) (#109380)

gh-109351: Fix crash when compiling AST with invalid NamedExpr (GH-109352)
(cherry picked from commit 79101edb03b7381b514126c68acabfcbbba2f842)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years ago[3.11] gh-104736: Fix test_gdb tests on ppc64le with clang (GH-109360) (#109362)
Miss Islington (bot) [Wed, 13 Sep 2023 04:48:44 +0000 (21:48 -0700)] 
[3.11] gh-104736: Fix test_gdb tests on ppc64le with clang (GH-109360) (#109362)

gh-104736: Fix test_gdb tests on ppc64le with clang (GH-109360)

Fix test_gdb on Python built with LLVM clang 16 on Linux ppc64le (ex:
Fedora 38). Search patterns in gdb "bt" command output to detect
when gdb fails to retrieve the traceback. For example, skip a test if
"Backtrace stopped: frame did not save the PC" is found.
(cherry picked from commit 44d9a71ea246e7c3fb478d9be62c16914be6c545)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] Update workflow permissions in require-pr-label Action (GH-109342) (#109354)
Mariatta [Wed, 13 Sep 2023 04:24:43 +0000 (21:24 -0700)] 
[3.11] Update workflow permissions in require-pr-label Action (GH-109342) (#109354)

Change the permission from `read` to `write`..
(cherry picked from commit 44c8699196c1951037bc549c895ea5af26c7254e)

2 years ago[3.11] GH-104395: Add a link in 'Meta Information' to the docs download page (GH...
Miss Islington (bot) [Tue, 12 Sep 2023 20:41:39 +0000 (13:41 -0700)] 
[3.11] GH-104395: Add a link in 'Meta Information' to the docs download page (GH-104443) (#109346)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] gh-109184: update traceback module doc w.r.t notes (message is no longer alway...
Irit Katriel [Tue, 12 Sep 2023 17:08:38 +0000 (18:08 +0100)] 
[3.11] gh-109184: update traceback module doc w.r.t notes (message is no longer always at the end) (#109201) (#109336)

gh-109184: update traceback module doc w.r.t notes (message is no longer always at the end) (#109201)

(cherry picked from commit 0e76cc359ba5d5e29d7c75355d7c1bc7e817eecf)

2 years ago[3.11] gh-84867: Do not load tests from TestCase and FunctionTestCase (GH-100497...
Miss Islington (bot) [Tue, 12 Sep 2023 14:05:58 +0000 (07:05 -0700)] 
[3.11] gh-84867: Do not load tests from TestCase and FunctionTestCase (GH-100497) (GH-109328)

(cherry picked from commit 66d1d7eb067d445f1ade151f4a6db3864dd9109f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-109179: Fix traceback display for SyntaxErrors with notes (#109197) (#109283)
Irit Katriel [Tue, 12 Sep 2023 09:57:28 +0000 (10:57 +0100)] 
[3.11] gh-109179: Fix traceback display for SyntaxErrors with notes (#109197) (#109283)

gh-109179: Fix traceback display for SyntaxErrors with notes (#109197)

(cherry picked from commit ecd21a629a2a30bcae89902f7cad5670e9441e2c)

2 years ago[3.11] gh-107322: zipapp: Remove the suggestion to remove .dist-info directories...
Miss Islington (bot) [Tue, 12 Sep 2023 05:53:15 +0000 (22:53 -0700)] 
[3.11] gh-107322: zipapp: Remove the suggestion to remove .dist-info directories (GH-107296) (#109282)

Co-authored-by: wim glenn <hey@wimglenn.com>
2 years ago[3.11] gh-109295: Fix test_os.test_access_denied() for TEMP=cwd (GH-109299) (#109303)
Miss Islington (bot) [Tue, 12 Sep 2023 02:00:36 +0000 (19:00 -0700)] 
[3.11] gh-109295: Fix test_os.test_access_denied() for TEMP=cwd (GH-109299) (#109303)

gh-109295: Fix test_os.test_access_denied() for TEMP=cwd (GH-109299)

Fix test_os.test_access_denied() when the TEMP environment variable
is equal to the current working directory. Run the test using a
different filename, since self.fname already exists in this case.
(cherry picked from commit 7dedfd36dc16d9e1e15d7d0b0a636dd401a5a543)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-109295: Clean up multiprocessing in test_asyncio and test_compileall (GH...
Miss Islington (bot) [Tue, 12 Sep 2023 01:53:59 +0000 (18:53 -0700)] 
[3.11] gh-109295: Clean up multiprocessing in test_asyncio and test_compileall (GH-109298) (#109302)

gh-109295: Clean up multiprocessing in test_asyncio and test_compileall (GH-109298)

test_asyncio and test_compileall now clean up multiprocessing by
calling multiprocessing _cleanup_tests(): explicitly clean up
resources and stop background processes like the resource tracker.
(cherry picked from commit 09ea4b8706165fd9474165090a0ba86509abd6c8)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-108987: Fix _thread.start_new_thread() race condition (#109135) (#109272)
Victor Stinner [Mon, 11 Sep 2023 17:33:08 +0000 (19:33 +0200)] 
[3.11] gh-108987: Fix _thread.start_new_thread() race condition (#109135) (#109272)

gh-108987: Fix _thread.start_new_thread() race condition (#109135)

Fix _thread.start_new_thread() race condition. If a thread is created
during Python finalization, the newly spawned thread now exits
immediately instead of trying to access freed memory and lead to a
crash.

thread_run() calls PyEval_AcquireThread() which checks if the thread
must exit. The problem was that tstate was dereferenced earlier in
_PyThreadState_Bind() which leads to a crash most of the time.

Move _PyThreadState_CheckConsistency() from thread_run() to
_PyThreadState_Bind().

(cherry picked from commit 517cd82ea7d01b344804413ef05610934a43a241)

2 years ago[3.11] gh-90805: Make sure test_functools works with and without _functoolsmodule...
Miss Islington (bot) [Mon, 11 Sep 2023 16:35:41 +0000 (09:35 -0700)] 
[3.11] gh-90805: Make sure test_functools works with and without _functoolsmodule (GH-108644) (GH-109274)

(cherry picked from commit baa6dc8e388e71b2a00347143ecefb2ad3a8e53b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] Test DocTestFinder directly instead of calling support.run_doctest() (GH-10891...
Miss Islington (bot) [Mon, 11 Sep 2023 11:30:24 +0000 (04:30 -0700)] 
[3.11] Test DocTestFinder directly instead of calling support.run_doctest() (GH-108917) (GH-109260)

(cherry picked from commit 0abc935086931d4915ea3c45cffffecb31e7a45c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-107219: Fix concurrent.futures terminate_broken() (GH-109244) (#109255)
Miss Islington (bot) [Mon, 11 Sep 2023 08:52:17 +0000 (01:52 -0700)] 
[3.11] gh-107219: Fix concurrent.futures terminate_broken() (GH-109244) (#109255)

gh-107219: Fix concurrent.futures terminate_broken() (GH-109244)

Fix a race condition in concurrent.futures. When a process in the
process pool was terminated abruptly (while the future was running or
pending), close the connection write end. If the call queue is
blocked on sending bytes to a worker process, closing the connection
write end interrupts the send, so the queue can be closed.

Changes:

* _ExecutorManagerThread.terminate_broken() now closes
  call_queue._writer.
* multiprocessing PipeConnection.close() now interrupts
  WaitForMultipleObjects() in _send_bytes() by cancelling the
  overlapped operation.
(cherry picked from commit a9b1f84790e977fb09f75b148c4c4f5924a6ef99)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-109230: test_pyexpat no longer depends on the current directory (GH-109233...
Miss Islington (bot) [Sun, 10 Sep 2023 22:46:47 +0000 (15:46 -0700)] 
[3.11] gh-109230: test_pyexpat no longer depends on the current directory (GH-109233) (#109242)

gh-109230: test_pyexpat no longer depends on the current directory (GH-109233)

Fix test_pyexpat.test_exception(): it can now be run from a directory
different than Python source code directory. Before, the test failed
in this case.

Skip the test if Modules/pyexpat.c source is not available. Skip also
the test on Python implementations other than CPython.
(cherry picked from commit e55aab95786e0e9fb36a9a1122d2d0fb3d2403cd)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-109237: Fix test_site for non-ASCII working directory (GH-109238) (#109240)
Miss Islington (bot) [Sun, 10 Sep 2023 22:39:49 +0000 (15:39 -0700)] 
[3.11] gh-109237: Fix test_site for non-ASCII working directory (GH-109238) (#109240)

gh-109237: Fix test_site for non-ASCII working directory (GH-109238)

Fix test_site.test_underpth_basic() when the working directory
contains at least one non-ASCII character: encode the "._pth" file to
UTF-8 and enable the UTF-8 Mode to use UTF-8 for the child process
stdout.
(cherry picked from commit cbb3a6f8ada3d133c3ab9f9465b65067fce5bb42)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-50644: Forbid pickling of codecs streams (GH-109180) (GH-109232)
Miss Islington (bot) [Sun, 10 Sep 2023 17:41:19 +0000 (10:41 -0700)] 
[3.11] gh-50644: Forbid pickling of codecs streams (GH-109180) (GH-109232)

Attempts to pickle or create a shallow or deep copy of codecs streams
now raise a TypeError.

Previously, copying failed with a RecursionError, while pickling
produced wrong results that eventually caused unpickling to fail with
a RecursionError.
(cherry picked from commit d6892c2b9263b39ea1c7905667942914b6a24b2c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-109207: Fix SystemError when printing symtable entry object. (GH-109225...
Miss Islington (bot) [Sun, 10 Sep 2023 13:50:22 +0000 (06:50 -0700)] 
[3.11] gh-109207: Fix SystemError when printing symtable entry object. (GH-109225) (GH-109228)

(cherry picked from commit 429749969621b149c1a7c3c004bd44f52bec8f44)

Co-authored-by: 云line <31395137+yunline@users.noreply.github.com>
2 years ago[3.11] gh-107924: re-order os.sendfile() flag documentation (#107926) (#109178)
Hugo van Kemenade [Sat, 9 Sep 2023 09:34:18 +0000 (03:34 -0600)] 
[3.11] gh-107924: re-order os.sendfile() flag documentation (#107926) (#109178)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
2 years ago[3.11] Check the result of PySet_Contains() for error in Python/symtable.c (GH-109146...
Serhiy Storchaka [Fri, 8 Sep 2023 19:28:18 +0000 (22:28 +0300)] 
[3.11] Check the result of PySet_Contains() for error in Python/symtable.c (GH-109146) (GH-109158)

(cherry picked from commit 87a7faf6b68c8076e640a9a1347a255f132d8382)

2 years ago[3.11] GH-109067: fix randomly failing `test_async_gen_asyncio_gc_aclose_09` test...
Miss Islington (bot) [Fri, 8 Sep 2023 17:02:57 +0000 (10:02 -0700)] 
[3.11] GH-109067: fix randomly failing `test_async_gen_asyncio_gc_aclose_09` test (GH-109142) (#109150)

GH-109067: fix randomly failing `test_async_gen_asyncio_gc_aclose_09` test (GH-109142)

Use `asyncio.sleep(0)` instead of short sleeps.
(cherry picked from commit ccd48623d4860e730a16f3f252d67bfea8c1e905)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>