]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years ago[3.11] [3.12] gh-110167: Increase support.LOOPBACK_TIMEOUT to 10 seconds (GH-110413...
Miss Islington (bot) [Thu, 5 Oct 2023 21:10:01 +0000 (14:10 -0700)] 
[3.11] [3.12] gh-110167: Increase support.LOOPBACK_TIMEOUT to 10 seconds (GH-110413) (GH-110427) (#110440)

[3.12] gh-110167: Increase support.LOOPBACK_TIMEOUT to 10 seconds (GH-110413) (GH-110427)

gh-110167: Increase support.LOOPBACK_TIMEOUT to 10 seconds (GH-110413)

Increase support.LOOPBACK_TIMEOUT from 5 to 10 seconds. Also increase
the timeout depending on the --timeout option. For example, for a
test timeout of 40 minutes (ARM Raspbian 3.x), use LOOPBACK_TIMEOUT
of 20 seconds instead of 5 seconds before.

(cherry picked from commit 350d89b79588ebd140c3987cc05e3719ca17a973)

Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit 0db2f1475e6539e1954e1f8bd53e005c3ecd6a26)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-110429: Fix race condition in "make regen-all" (GH-110433) (#110439)
Miss Islington (bot) [Thu, 5 Oct 2023 20:49:32 +0000 (13:49 -0700)] 
[3.11] gh-110429: Fix race condition in "make regen-all" (GH-110433) (#110439)

gh-110429: Fix race condition in "make regen-all" (GH-110433)

"make regen-pegen" now creates a temporary file called "parser.c.new"
instead of "parser.new.c". Previously, if "make clinic" was run in
parallel with "make regen-all", clinic may try but fail to open
"parser.new.c" if the temporay file was removed in the meanwhile.
(cherry picked from commit fb6c4ed2bbb2a867d5f0b9a94656e4714be5d9c2)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-110383: Swap 'the all' -> 'all the' in socket docs (GH-110434) (#110436)
Miss Islington (bot) [Thu, 5 Oct 2023 20:14:32 +0000 (13:14 -0700)] 
[3.11] gh-110383: Swap 'the all' -> 'all the' in socket docs (GH-110434) (#110436)

Co-authored-by: Bradley Reynolds <bradley.reynolds@darbia.dev>
2 years ago[3.11] gh-109840: Fix multiprocessing test_waitfor_timeout() (GH-110428) (#110431)
Miss Islington (bot) [Thu, 5 Oct 2023 19:53:14 +0000 (12:53 -0700)] 
[3.11] gh-109840: Fix multiprocessing test_waitfor_timeout() (GH-110428) (#110431)

gh-109840: Fix multiprocessing test_waitfor_timeout() (GH-110428)

Don't measure the CI performance: don't fail if cond.wait_for() takes
longer than 1 second on a slow CI.
(cherry picked from commit 5eae8dc2cb832af6ae1ee340fb0194107fe3bd6e)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-110167: Fix test_socket deadlock in doCleanups() (GH-110416) (#110424)
Miss Islington (bot) [Thu, 5 Oct 2023 19:18:44 +0000 (12:18 -0700)] 
[3.11] gh-110167: Fix test_socket deadlock in doCleanups() (GH-110416) (#110424)

gh-110167: Fix test_socket deadlock in doCleanups() (GH-110416)

Fix a deadlock in test_socket when server fails with a timeout but
the client is still running in its thread. Don't hold a lock to call
cleanup functions in doCleanups(). One of the cleanup function waits
until the client completes, whereas the client could deadlock if it
called addCleanup() in such situation.

doCleanups() is called when the server completed, but the client can
still be running in its thread especially if the server failed with a
timeout. Don't put a lock on doCleanups() to prevent deadlock between
addCleanup() called in the client and doCleanups() waiting for
self.done.wait of ThreadableTest._setUp().
(cherry picked from commit 318f5df27109ff8d2519edefa771920a0ec62b92)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] Docs: Avoid the deprecated ``.. cmdoption::`` directive (GH-110292) (#110303)
Adam Turner [Thu, 5 Oct 2023 17:30:26 +0000 (18:30 +0100)] 
[3.11] Docs: Avoid the deprecated ``.. cmdoption::`` directive (GH-110292) (#110303)

[3.11] Docs: Avoid the deprecated ``.. cmdoption::`` directive (GH-110292).
(cherry picked from commit 77e9aae3837d9f0cf87461d023896f2c4aeb282f)

2 years ago[3.11] gh-110383 TimeIt Docs Spelling Fix (GH-110407) (#110410)
Miss Islington (bot) [Thu, 5 Oct 2023 17:10:39 +0000 (10:10 -0700)] 
[3.11] gh-110383 TimeIt Docs Spelling Fix (GH-110407) (#110410)

gh-110383 TimeIt Docs Spelling Fix (GH-110407)

Make 0.2 second plural
(cherry picked from commit a973bf0f97e55ace9eab100f9eb95d7eedcb28ac)

Co-authored-by: Towster15 <105541074+Towster15@users.noreply.github.com>
2 years ago[3.11] gh-110391: socket NetworkConnectionAttributesTest always declare cli (GH-11040...
Miss Islington (bot) [Thu, 5 Oct 2023 16:58:46 +0000 (09:58 -0700)] 
[3.11] gh-110391: socket NetworkConnectionAttributesTest always declare cli (GH-110401) (#110406)

gh-110391: socket NetworkConnectionAttributesTest always declare cli (GH-110401)

NetworkConnectionAttributesTest of test_socket now always declare the
'cli' attribute, so clientTearDown() cannot fail with AttributeError.
(cherry picked from commit e37d4557c3de0476e76ca4b8a1cc8d2566b86c79)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-110365: Fix error overwrite in `termios.tcsetattr` (GH-110366) (#110390)
Miss Islington (bot) [Thu, 5 Oct 2023 12:21:34 +0000 (05:21 -0700)] 
[3.11] gh-110365: Fix error overwrite in `termios.tcsetattr` (GH-110366) (#110390)

(cherry picked from commit 2bbbab212fb10b3aeaded188fb5d6c001fb4bf74)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2 years ago[3.11] Lint: Remove files that no longer fail to parse (GH-110356) (#110361)
Hugo van Kemenade [Wed, 4 Oct 2023 14:30:48 +0000 (08:30 -0600)] 
[3.11] Lint: Remove files that no longer fail to parse (GH-110356) (#110361)

Remove files that no longer fail to parse

2 years ago[3.11] gh-109974: Fix threading lock_tests race conditions (#110057) (#110355)
Victor Stinner [Wed, 4 Oct 2023 12:07:57 +0000 (14:07 +0200)] 
[3.11] gh-109974: Fix threading lock_tests race conditions (#110057) (#110355)

[3.12] gh-109974: Fix threading lock_tests race conditions (#110057) (#110346)

* gh-109974: Fix threading lock_tests race conditions (#110057)

Fix race conditions in test_threading lock tests. Wait until a
condition is met rather than using time.sleep() with a hardcoded
number of seconds.

* Replace sleeping loops with support.sleeping_retry() which raises
  an exception on timeout.
* Add wait_threads_blocked(nthread) which computes a sleep depending
  on the number of threads. Remove _wait() function.
* test_set_and_clear(): use a way longer Event.wait() timeout.
* BarrierTests.test_repr(): wait until the 2 threads are waiting for
  the barrier. Use a way longer timeout for Barrier.wait() timeout.
* test_thread_leak() no longer needs to count
  len(threading.enumerate()): Bunch uses
  threading_helper.wait_threads_exit() internally which does it in
  wait_for_finished().
* Add BaseLockTests.wait_phase() which implements a timeout.
  test_reacquire() and test_recursion_count() use wait_phase().

(cherry picked from commit 4e356ad183eeb567783f4a87fd092573da1e9252)

* gh-109974: Fix more threading lock_tests race conditions (#110089)

* Add context manager on Bunch class.
* Bunch now catchs exceptions on executed functions and re-raise them
  at __exit__() as an ExceptionGroup.
* Rewrite BarrierProxy.test_default_timeout(). Use a single thread.
  Only check that barrier.wait() blocks for at least default timeout
  seconds.
* test_with(): inline _with() function.

(cherry picked from commit 743e3572ee940a6cf88fd518e5f4a447905ba5eb)
(cherry picked from commit 1d032ea3d67e9725b63322f896d9aa727fd75521)

2 years ago[3.11] [3.12] gh-109972: Enhance test_gdb (GH-110026) (GH-110351) (#110354)
Miss Islington (bot) [Wed, 4 Oct 2023 12:03:28 +0000 (05:03 -0700)] 
[3.11] [3.12] gh-109972: Enhance test_gdb (GH-110026) (GH-110351) (#110354)

[3.12] gh-109972: Enhance test_gdb (GH-110026) (GH-110351)

* gh-109972: Enhance test_gdb (GH-110026)

* Split test_pycfunction.py: add test_cfunction_full.py.
  Split the function into the following 6 functions. In verbose
  mode, these "pycfunction" tests now log each tested call.

  * test_pycfunction_noargs()
  * test_pycfunction_o()
  * test_pycfunction_varargs()
  * test_pycfunction_varargs_keywords()
  * test_pycfunction_fastcall()
  * test_pycfunction_fastcall_keywords()

* Move get_gdb_repr() to PrettyPrintTests.
* Replace DebuggerTests.get_sample_script() with SAMPLE_SCRIPT.
* Rename checkout_hook_path to CHECKOUT_HOOK_PATH.
* Rename gdb_version to GDB_VERSION_TEXT.
* Replace (gdb_major_version, gdb_minor_version) with GDB_VERSION.
* run_gdb() uses "backslashreplace" error handler instead of "replace".
* Add check_gdb() function to util.py.
* Enhance support.check_cflags_pgo(): check also for sysconfig
  PGO_PROF_USE_FLAG (if available) in compiler flags.
* Move some SkipTest checks to test_gdb/__init__.py.
* Elaborate why gdb cannot be tested on Windows: gdb doesn't support
  PDB debug symbol files.

(cherry picked from commit 757cbd4f29c9e89b38b975e0463dc8ed331b2515)

* 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)

* gh-110166: Fix gdb CFunctionFullTests on ppc64le clang build (GH-110331)

CFunctionFullTests now also runs "bt" command before "py-bt-full",
similar to CFunctionTests which also runs "bt" command before
"py-bt". So test_gdb can skip the test if patterns like "?? ()" are
found in the gdb output.

(cherry picked from commit bbce8bd05dd25c6e74487940fa1977485b52baf4)

Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit 1de9406f9136e3952b849487f0151be3c669a3ea)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-110332: Remove mentions of `random.WichmannHill` from `test_zlib` (GH-11033...
Miss Islington (bot) [Wed, 4 Oct 2023 11:17:38 +0000 (04:17 -0700)] 
[3.11] gh-110332: Remove mentions of `random.WichmannHill` from `test_zlib` (GH-110334) (#110348)

gh-110332: Remove mentions of `random.WichmannHill` from `test_zlib` (GH-110334)
(cherry picked from commit e9f2352b7b7503519790ee6f51c2e298cf390e75)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-108927: Fix test_import + test_importlib + test_unittest problem (GH-108929...
Miss Islington (bot) [Wed, 4 Oct 2023 11:09:43 +0000 (04:09 -0700)] 
[3.11] gh-108927: Fix test_import + test_importlib + test_unittest problem (GH-108929) (#110347)

gh-108927: Fix test_import + test_importlib + test_unittest problem (GH-108929)
(cherry picked from commit 3f89b257639dd817a32079da2ae2c4436b8e82eb)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] Add test.support.busy_retry() (#93770) (#110341)
Victor Stinner [Wed, 4 Oct 2023 10:58:49 +0000 (12:58 +0200)] 
[3.11] Add test.support.busy_retry() (#93770) (#110341)

Add test.support.busy_retry() (#93770)

Add busy_retry() and sleeping_retry() functions to test.support.

(cherry picked from commit 7e9eaad864349d2cfd4c9ffc4453aba03b2cbc16)

2 years ago[3.11] gh-109972: Split test_gdb.py into test_gdb package (#109977) (… (#110343)
Victor Stinner [Wed, 4 Oct 2023 10:53:28 +0000 (12:53 +0200)] 
[3.11] gh-109972: Split test_gdb.py into test_gdb package (#109977) (… (#110343)

[3.12] gh-109972: Split test_gdb.py into test_gdb package (#109977) (#110339)

gh-109972: Split test_gdb.py into test_gdb package (#109977)

Split test_gdb.py file into a test_gdb package made of multiple
tests, so tests can now be run in parallel.

* Create Lib/test/test_gdb/ directory.
* Split test_gdb.py into multiple files in Lib/test/test_gdb/
  directory.
* Move Lib/test/gdb_sample.py to Lib/test/test_gdb/ directory.
  Update get_sample_script(): use __file__ to locate gdb_sample.py.
* Move gdb_has_frame_select() and HAS_PYUP_PYDOWN to test_misc.py.
* Explicitly skip test_gdb on Windows. Previously, test_gdb was
  skipped even if gdb was available because of
  gdb_has_frame_select().

(cherry picked from commit 8f324b7ecd2df3036fab098c4c8ac185ac07b277)
(cherry picked from commit e7a61d34b7897ac6cff53add2ec03309a5ff8350)

2 years ago[3.11] gh-110267: Add tests for pickling and copying PyStructSequence objects (GH...
Miss Islington (bot) [Wed, 4 Oct 2023 09:01:19 +0000 (02:01 -0700)] 
[3.11] gh-110267: Add tests for pickling and copying PyStructSequence objects (GH-110272) (GH-110284)

(cherry picked from commit 2d4865d775123e8889c7a79fc49b4bf627176c4b)

Co-authored-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
2 years ago[3.11] gh-109917: Fix test instability in test_concurrent_futures (GH-110306) (#110316)
Miss Islington (bot) [Tue, 3 Oct 2023 22:27:56 +0000 (15:27 -0700)] 
[3.11] gh-109917: Fix test instability in test_concurrent_futures (GH-110306) (#110316)

gh-109917: Fix test instability in test_concurrent_futures (GH-110306)

The test had an instability issue due to the ordering of the dummy
queue operation and the real wakeup pipe operations. Both primitives
are thread safe but not done atomically as a single update and may
interleave arbitrarily. With the old order of operations this can lead
to an incorrect state where the dummy queue is full but the wakeup
pipe is empty. By swapping the order in clear() I think this can no
longer happen in any possible operation interleaving (famous last
words).
(cherry picked from commit a376a72bd92cd7c9930467dd1aba40045fb75e3b)

Co-authored-by: elfstrom <elfstrom@users.noreply.github.com>
2 years ago[3.11] gh-109234: Hint to contextlib.closing in sqlite3 context manager docs (GH...
Miss Islington (bot) [Tue, 3 Oct 2023 16:02:04 +0000 (09:02 -0700)] 
[3.11] gh-109234: Hint to contextlib.closing in sqlite3 context manager docs (GH-109322) (#110294)

(cherry picked from commit 4227bfa8b273207a2b882f7d69c8ac49c3d2b57d)

Co-authored-by: Lincoln <71312724+Lincoln-developer@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2 years ago[3.11] Enable ruff on `Lib/test/test_typing.py` (#110179) (#110290)
Alex Waygood [Tue, 3 Oct 2023 15:09:06 +0000 (16:09 +0100)] 
[3.11] Enable ruff on `Lib/test/test_typing.py` (#110179) (#110290)

2 years ago[3.11] Bump various dependencies in `Doc/requirements-oldest-sphinx.txt` (GH-110278...
Miss Islington (bot) [Tue, 3 Oct 2023 13:18:08 +0000 (06:18 -0700)] 
[3.11] Bump various dependencies in `Doc/requirements-oldest-sphinx.txt` (GH-110278) (#110281)

Bump various dependencies in `Doc/requirements-oldest-sphinx.txt` (GH-110278)

This resolves a Dependabot security alert on the repository for urllib3==2.0.4.
(cherry picked from commit f1663a492e14c80c30cb9741fdc36fa221d5e30a)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.11] Remove unused Misc/requirements-test.txt (GH-110240) (#110254)
Miss Islington (bot) [Tue, 3 Oct 2023 05:36:35 +0000 (22:36 -0700)] 
[3.11] Remove unused Misc/requirements-test.txt (GH-110240) (#110254)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] [3.12] gh-109649: Enhance os.cpu_count() documentation (GH-110169) (#110226)
Miss Islington (bot) [Tue, 3 Oct 2023 01:36:55 +0000 (18:36 -0700)] 
[3.11] [3.12] gh-109649: Enhance os.cpu_count() documentation (GH-110169) (#110226)

[3.12] gh-109649: Enhance os.cpu_count() documentation (GH-110169)

* gh-109649: Enhance os.cpu_count() documentation

* Doc: Specify that os.cpu_count() counts *logicial* CPUs.
* Doc: Specify that os.sched_getaffinity(0) is related to the calling
  thread.
* Fix test_posix.test_sched_getaffinity(): restore the old CPU mask
  when the test completes!

* Restore removed text
(cherry picked from commit 5245b97e132ae071e2b574224e0788cab62fdcc9)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-108494: Document how to add a project in PCbuild/readme.txt (#110077) ...
Victor Stinner [Mon, 2 Oct 2023 19:43:05 +0000 (21:43 +0200)] 
[3.11] gh-108494: Document how to add a project in PCbuild/readme.txt (#110077) (#110232)

gh-108494: Document how to add a project in PCbuild/readme.txt (#110077)

(cherry picked from commit 6387b5313c60c1403785b2245db33372476ac304)

2 years agoPost 3.11.6
Pablo Galindo [Mon, 2 Oct 2023 16:23:15 +0000 (17:23 +0100)] 
Post 3.11.6

2 years agoPython 3.11.6 v3.11.6
Pablo Galindo [Mon, 2 Oct 2023 13:26:51 +0000 (14:26 +0100)] 
Python 3.11.6

2 years ago[3.11] Docs: bump Pygments to fix contrast ratios to meet WCAG AA guidelines (GH...
Miss Islington (bot) [Mon, 2 Oct 2023 10:42:57 +0000 (03:42 -0700)] 
[3.11] Docs: bump Pygments to fix contrast ratios to meet WCAG AA guidelines (GH-110208) (#110211)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] gh-110160: Fix flaky `test_find_periodic_pattern` in `string_tests` (… (#110183)
Victor Stinner [Sun, 1 Oct 2023 20:43:57 +0000 (22:43 +0200)] 
[3.11] gh-110160: Fix flaky `test_find_periodic_pattern` in `string_tests` (… (#110183)

gh-110160: Fix flaky `test_find_periodic_pattern` in `string_tests` (#110170)

(cherry picked from commit 06faa9a39bd93c5e7999d52b52043ecdd0774dac)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-110138: Improve grammar in idiomatic usage of ``__main__.py`` (GH-110142...
Miss Islington (bot) [Sun, 1 Oct 2023 19:32:44 +0000 (12:32 -0700)] 
[3.11] gh-110138: Improve grammar in idiomatic usage of ``__main__.py`` (GH-110142) (#110189)

gh-110138: Improve grammar in idiomatic usage of ``__main__.py`` (GH-110142)
(cherry picked from commit adf0f15a06c6e8ddd1a6d59b28efcbb26289f080)

Co-authored-by: Quentin Agren <quentin.agren@gmail.com>
2 years ago[3.11] gh-101100: Fix sphinx warnings in `library/site.rst` (GH-110144) (#110185)
Miss Islington (bot) [Sun, 1 Oct 2023 17:47:06 +0000 (10:47 -0700)] 
[3.11] gh-101100: Fix sphinx warnings in `library/site.rst` (GH-110144) (#110185)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.11] gh-110088: Fix asyncio test_prompt_cancellation() (GH-110157) (#110159)
Miss Islington (bot) [Sat, 30 Sep 2023 21:01:33 +0000 (14:01 -0700)] 
[3.11] gh-110088: Fix asyncio test_prompt_cancellation() (GH-110157) (#110159)

gh-110088: Fix asyncio test_prompt_cancellation() (GH-110157)

Don't measure the CI performance: don't test the maximum elapsed
time. The check failed on a slow CI.
(cherry picked from commit c62b49ecc8da13fa9522865ef6fe0aec194fd0d8)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-109748: Fix again venv test_zippath_from_non_installed_posix() (GH-110149...
Miss Islington (bot) [Sat, 30 Sep 2023 18:46:37 +0000 (11:46 -0700)] 
[3.11] gh-109748: Fix again venv test_zippath_from_non_installed_posix() (GH-110149) (#110153)

gh-109748: Fix again venv test_zippath_from_non_installed_posix() (GH-110149)

Call also copy_python_src_ignore() on listdir() names.

shutil.copytree(): replace set() with an empty tuple. An empty tuple
becomes a constant in the compiler and checking if an item is in an
empty tuple is cheap.
(cherry picked from commit 0def8c712bb6f66f1081cab71deb3681566b846d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] GH-101100: Fix reference warnings for ``gettext`` (GH-110115) (#110141)
Miss Islington (bot) [Sat, 30 Sep 2023 11:21:27 +0000 (04:21 -0700)] 
[3.11] GH-101100: Fix reference warnings for ``gettext`` (GH-110115) (#110141)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] GH-101100: Fix reference warnings for ``namedtuple`` (GH-110113) (#110136)
Miss Islington (bot) [Sat, 30 Sep 2023 06:42:37 +0000 (23:42 -0700)] 
[3.11] GH-101100: Fix reference warnings for ``namedtuple`` (GH-110113) (#110136)

GH-101100: Fix reference warnings for ``namedtuple`` (GH-110113)
(cherry picked from commit cbdacc738a52a876aae5b74b4665d30a5f204766)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] gh-107888: Fix test_mmap PROT_EXEC comment (GH-110125) (#110130)
Miss Islington (bot) [Fri, 29 Sep 2023 22:19:33 +0000 (15:19 -0700)] 
[3.11] gh-107888: Fix test_mmap PROT_EXEC comment (GH-110125) (#110130)

gh-107888: Fix test_mmap PROT_EXEC comment (GH-110125)
(cherry picked from commit 14098b78f7453adbd40c53e32c29588611b7c87b)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-108851: Fix support.get_recursion_available() for USE_STACKCHECK (#110127)
Victor Stinner [Fri, 29 Sep 2023 21:54:46 +0000 (23:54 +0200)] 
[3.11] gh-108851: Fix support.get_recursion_available() for USE_STACKCHECK (#110127)

Add _testcapi.USE_STACKCHECK.

USE_STACKCHECK on using on Windows 32-bit.

2 years agogh-109615: Look for 'Modules' as landmark for test_copy_python_src_ignore (GH-110108)
Miss Islington (bot) [Fri, 29 Sep 2023 15:48:59 +0000 (08:48 -0700)] 
gh-109615: Look for 'Modules' as landmark for test_copy_python_src_ignore (GH-110108)

(cherry picked from commit 20bc5f7c28a6f8a2e156c4a748ffabb5efc7c761)

Co-authored-by: Steve Dower <steve.dower@python.org>
2 years ago[3.11] gh-109991: Update Windows build to use OpenSSL 3.0.11 (GH-110059)
Zachary Ware [Fri, 29 Sep 2023 15:03:48 +0000 (10:03 -0500)] 
[3.11] gh-109991: Update Windows build to use OpenSSL 3.0.11 (GH-110059)

(cherry picked from commit cf4c29725636e1a0dd2ebab443613b56ca6c9486)

2 years ago[3.11] gh-109592: test_eintr tolerates 20 ms when comparing timings (GH-110102) ...
Miss Islington (bot) [Fri, 29 Sep 2023 13:47:24 +0000 (06:47 -0700)] 
[3.11] gh-109592: test_eintr tolerates 20 ms when comparing timings (GH-110102) (#110107)

gh-109592: test_eintr tolerates 20 ms when comparing timings (GH-110102)
(cherry picked from commit 9c73a9acec095c05a178e7dff638f7d9769318f3)

Co-authored-by: Victor Stinner <vstinner@python.org>
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>