]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years ago[3.11] gh-111085: Fix invalid state handling in TaskGroup and Timeout (GH-111111...
Miss Islington (bot) [Sat, 21 Oct 2023 19:40:07 +0000 (21:40 +0200)] 
[3.11] gh-111085: Fix invalid state handling in TaskGroup and Timeout (GH-111111) (GH-111172)

asyncio.TaskGroup and asyncio.Timeout classes now raise proper RuntimeError
if they are improperly used.

* When they are used without entering the context manager.
* When they are used after finishing.
* When the context manager is entered more than once (simultaneously or
  sequentially).
* If there is no current task when entering the context manager.

They now remain in a consistent state after an exception is thrown,
so subsequent operations can be performed correctly (if they are allowed).

(cherry picked from commit 6c23635f2b7067ef091a550954e09f8b7c329e3f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: James Hilton-Balfe <gobot1234yt@gmail.com>
2 years ago[3.11] gh-111159: Fix `doctest` output comparison for exceptions with notes (GH-11116...
Miss Islington (bot) [Sat, 21 Oct 2023 18:23:38 +0000 (20:23 +0200)] 
[3.11] gh-111159: Fix `doctest` output comparison for exceptions with notes (GH-111160) (#111170)

gh-111159: Fix `doctest` output comparison for exceptions with notes (GH-111160)
(cherry picked from commit fd60549c0ac6c81f05594a5141d24b4433ae39be)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-110918: regrtest: allow to intermix --match and --ignore options (GH-110919...
Serhiy Storchaka [Sat, 21 Oct 2023 17:30:19 +0000 (20:30 +0300)] 
[3.11] gh-110918: regrtest: allow to intermix --match and --ignore options (GH-110919) (GH-111168)

Test case matching patterns specified by options --match, --ignore,
--matchfile and --ignorefile are now tested in the order of
specification, and the last match determines whether the test case be run
or ignored.
(cherry picked from commit 9a1fe09622cd0f1e24c2ba5335c94c5d70306fd0)

2 years ago[3.11] gh-111157: Mention `__notes__` in `traceback.format_exception_only` docstring...
Miss Islington (bot) [Sat, 21 Oct 2023 17:06:51 +0000 (19:06 +0200)] 
[3.11] gh-111157: Mention `__notes__` in `traceback.format_exception_only` docstring (GH-111158) (#111164)

gh-111157: Mention `__notes__` in `traceback.format_exception_only` docstring (GH-111158)
(cherry picked from commit 5e7727b05232b43589d177c15263d7f4f8c584a0)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-110932: Fix regrtest for SOURCE_DATE_EPOCH (GH-111143) (#111153)
Miss Islington (bot) [Sat, 21 Oct 2023 09:01:10 +0000 (11:01 +0200)] 
[3.11] gh-110932: Fix regrtest for SOURCE_DATE_EPOCH (GH-111143) (#111153)

gh-110932: Fix regrtest for SOURCE_DATE_EPOCH (GH-111143)

If the SOURCE_DATE_EPOCH environment variable is defined, use its
value as the random seed.
(cherry picked from commit 7237fb578dc9db9dc557759a24d8083425107b91)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-111126: Use `isinstance` instead of `assert[Not]IsInstance` in `test_typing...
Miss Islington (bot) [Fri, 20 Oct 2023 18:28:41 +0000 (20:28 +0200)] 
[3.11] gh-111126: Use `isinstance` instead of `assert[Not]IsInstance` in `test_typing` (GH-111127) (#111131)

gh-111126: Use `isinstance` instead of `assert[Not]IsInstance` in `test_typing` (GH-111127)
(cherry picked from commit ea7c26e4b89c71234c4a603567a93f0a44c9cc97)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] Synchronize test_contextlib with test_contextlib_async (GH-111000) (GH-111115)
Miss Islington (bot) [Fri, 20 Oct 2023 14:33:22 +0000 (16:33 +0200)] 
[3.11] Synchronize test_contextlib with test_contextlib_async (GH-111000) (GH-111115)

(cherry picked from commit ff4e53cb747063e95eaec181fd396f062f885ac2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years agogh-110913: Fix WindowsConsoleIO chunking of UTF-8 text (GH-111007)
Miss Islington (bot) [Fri, 20 Oct 2023 12:19:04 +0000 (14:19 +0200)] 
gh-110913: Fix WindowsConsoleIO chunking of UTF-8 text (GH-111007)

(cherry picked from commit 11312eae6ec3acf51aacafce4cb6d1a5edfd5f2e)

Co-authored-by: Tamás Hegedűs <sorgloomer@users.noreply.github.com>
2 years ago[3.11] gh-101100: Fix sphinx warnings in `library/codecs.rst` (GH-110979) (#111071)
Miss Islington (bot) [Fri, 20 Oct 2023 08:09:23 +0000 (10:09 +0200)] 
[3.11] gh-101100: Fix sphinx warnings in `library/codecs.rst` (GH-110979) (#111071)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] gh-101100: Fix Sphinx warnings in `library/tty.rst` (GH-111079) (#111098)
Miss Islington (bot) [Fri, 20 Oct 2023 04:50:17 +0000 (06:50 +0200)] 
[3.11] gh-101100: Fix Sphinx warnings in `library/tty.rst` (GH-111079) (#111098)

gh-101100: Fix Sphinx warnings in `library/tty.rst` (GH-111079)

Fix Sphinx warnings in library/tty.rst
(cherry picked from commit c42c68aa7bd19b0de7f2132ed468bc4ce83d8aa9)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] gh-111092: Make turtledemo run without default root enabled (GH-111093) (...
Miss Islington (bot) [Fri, 20 Oct 2023 04:25:17 +0000 (06:25 +0200)] 
[3.11] gh-111092: Make turtledemo run without default root enabled (GH-111093) (#111096)

gh-111092: Make turtledemo run without default root enabled (GH-111093)

Add missing 'root' argument to PanedWindow call.
Other root children already have it.
(cherry picked from commit b802882fb2bff8b431df661322908c07491f3ce7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2 years ago[3.11] gh-109510: Clearly explain "Which Docstrings Are Examined" (GH-109696) (#111078)
Miss Islington (bot) [Thu, 19 Oct 2023 15:35:07 +0000 (17:35 +0200)] 
[3.11] gh-109510: Clearly explain "Which Docstrings Are Examined" (GH-109696) (#111078)

Co-authored-by: Unique-Usman <86585626+Unique-Usman@users.noreply.github.com>
Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
Co-authored-by: Jacob Coffee <jacob@z7x.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2 years ago[3.11] GH-101100: Fix reference warnings for ``__enter__`` and ``__exit__`` (GH-11011...
Miss Islington (bot) [Thu, 19 Oct 2023 15:34:27 +0000 (17:34 +0200)] 
[3.11] GH-101100: Fix reference warnings for ``__enter__`` and ``__exit__`` (GH-110112) (#111076)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] GH-101100: Fix reference warnings for ``__getitem__`` (GH-110118) (#111074)
Miss Islington (bot) [Thu, 19 Oct 2023 15:33:12 +0000 (17:33 +0200)] 
[3.11] GH-101100: Fix reference warnings for ``__getitem__`` (GH-110118) (#111074)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] gh-101100: Fix sphinx warnings in `library/getpass.rst` (GH-110461) (#111072)
Miss Islington (bot) [Thu, 19 Oct 2023 15:31:29 +0000 (17:31 +0200)] 
[3.11] gh-101100: Fix sphinx warnings in `library/getpass.rst` (GH-110461) (#111072)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-108791: Fix pdb CLI invalid argument handling (GH-108816) (#111063)
Radislav Chugunov [Thu, 19 Oct 2023 13:26:40 +0000 (16:26 +0300)] 
[3.11] gh-108791: Fix pdb CLI invalid argument handling (GH-108816) (#111063)

* [3.11] gh-108791: Fix `pdb` CLI invalid argument handling (GH-108816)
(cherry picked from commit 162213f2db3835e1115178d38741544f4b4db416)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
2 years ago[3.11] gh-111050: IDLE - Simplify configdialog.HighPage.theme_elements (GH-111053...
Miss Islington (bot) [Thu, 19 Oct 2023 04:30:43 +0000 (06:30 +0200)] 
[3.11] gh-111050: IDLE - Simplify configdialog.HighPage.theme_elements (GH-111053) (#111056)

gh-111050: IDLE - Simplify configdialog.HighPage.theme_elements (GH-111053)

Replace tuple value with internal name, removing numbers.
Remove sorting of already ordered dislay names.
Remove '[0]' indexing into now-gone tuple.
(cherry picked from commit 642eb8df951f2f1d4bf4d93ee568707c5bf40a96)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2 years ago[3.11] GH-65052: Prevent pdb from crashing when trying to display objects (GH-111002)
Tian Gao [Wed, 18 Oct 2023 23:42:36 +0000 (16:42 -0700)] 
[3.11] GH-65052: Prevent pdb from crashing when trying to display objects (GH-111002)

(cherry picked from commit c523ce0f434582580a3721e15cb7dd6b56ad0236)

2 years ago[3.11] GH-104232: Fix statement about trace return values (GH-111045)
Miss Islington (bot) [Wed, 18 Oct 2023 20:34:20 +0000 (22:34 +0200)] 
[3.11] GH-104232: Fix statement about trace return values (GH-111045)

(cherry picked from commit d9246c7b734b8958da03494045208681d95f5b74)

2 years ago[3.11] gh-111015: Install IDLE.app and Python Launcher.app on macOS with correct...
Miss Islington (bot) [Wed, 18 Oct 2023 13:25:04 +0000 (15:25 +0200)] 
[3.11] gh-111015: Install IDLE.app and Python Launcher.app on macOS with correct permissions (gh-111038)

(cherry picked from commit cb1bf89c4066f30c80f7d1193b586a2ff8c40579)

Co-authored-by: Joshua Root <jmr@macports.org>
Co-authored-by: Ned Deily <nad@python.org>
2 years ago[3.11] gh-110696: Fix incorrect syntax error message for incorrect argument unpacking...
Pablo Galindo Salgado [Wed, 18 Oct 2023 12:59:17 +0000 (13:59 +0100)] 
[3.11] gh-110696: Fix incorrect syntax error message for incorrect argument unpacking (GH-110706) (#110766)

2 years ago[3.11] gh-103737: IDLE - Remove unneeded .keys() for dict iteration (GH-110960) ...
Miss Islington (bot) [Wed, 18 Oct 2023 08:40:39 +0000 (10:40 +0200)] 
[3.11] gh-103737: IDLE - Remove unneeded .keys() for dict iteration (GH-110960) (#111027)

gh-103737: IDLE - Remove unneeded .keys() for dict iteration (GH-110960)

Add comments where .keys() is needed.
Leave debugger usages along because situation is unclear as indicated in expanded comment.
Most testing is manual.
(cherry picked from commit baefbb21d91db2d950706737a6ebee9b2eff5c2d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2 years ago[3.11] gh-111019: Align expected and actual titles in test output (GH-111020) (#111025)
Miss Islington (bot) [Wed, 18 Oct 2023 08:04:39 +0000 (10:04 +0200)] 
[3.11] gh-111019: Align expected and actual titles in test output (GH-111020) (#111025)

gh-111019: Align expected and actual titles in test output (GH-111020)

Align expected and actual titles in output from
assert_has_calls/assert_called_with for greater readability
(cherry picked from commit 77dbd956090aac66e264d9d640f6adb6b0930b87)

Co-authored-by: James <morisja@gmail.com>
2 years ago[3.11] Regen Doc/requirements-oldest-sphinx.txt (GH-111012) (#111021)
Miss Islington (bot) [Wed, 18 Oct 2023 04:30:39 +0000 (06:30 +0200)] 
[3.11] Regen Doc/requirements-oldest-sphinx.txt (GH-111012) (#111021)

Regen Doc/requirements-oldest-sphinx.txt (GH-111012)

Fix https://github.com/python/cpython/security/dependabot/4: use
urllib3 version 2.0.7.
(cherry picked from commit e7ae43ad7dde74e731a9d258e372d17f3b2eb893)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-110756: Fix libregrtest clear_caches() for distutils (#111011)
Victor Stinner [Tue, 17 Oct 2023 23:20:36 +0000 (01:20 +0200)] 
[3.11] gh-110756: Fix libregrtest clear_caches() for distutils (#111011)

gh-110756: Fix libregrtest clear_caches() for distutils

Restore code removed by recent sync with the main branch which no
longer has distutils:
commit 26748ed4f61520c59af15547792d1e73144a4314.

2 years ago[3.11] gh-107450: Check for overflow in the tokenizer and fix overflow test (GH-11083...
Lysandros Nikolaou [Tue, 17 Oct 2023 22:34:56 +0000 (00:34 +0200)] 
[3.11] gh-107450: Check for overflow in the tokenizer and fix overflow test (GH-110832) (#110939)

(cherry picked from commit a1ac5590e0f8fe008e5562d22edab65d0c1c5507)

Co-authored-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-110995: Fix test_gdb check_usable_gdb() (GH-110998) (#111004)
Miss Islington (bot) [Tue, 17 Oct 2023 18:43:46 +0000 (20:43 +0200)] 
[3.11] gh-110995: Fix test_gdb check_usable_gdb() (GH-110998) (#111004)

gh-110995: Fix test_gdb check_usable_gdb() (GH-110998)

Fix detection of gdb built without Python scripting support.

* check_usable_gdb() doesn't check gdb exit code when calling
  run_gdb().
* Use shutil.which() to get the path to the gdb program.
(cherry picked from commit 920b3dfacad615c7bb9bd9a35774469f8809b453)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] Bump test deps: `ruff` and `pre-commit-hooks` (GH-110972) (#110981)
Nikita Sobolev [Tue, 17 Oct 2023 12:35:00 +0000 (15:35 +0300)] 
[3.11] Bump test deps: `ruff` and `pre-commit-hooks` (GH-110972) (#110981)

(cherry picked from commit b75b1f389f083db8568bff573c33ab4ecf29655a)

2 years ago[3.11] gh-110695: test_asyncio uses 50 ms for clock resolution (GH-110952) (#110971)
Miss Islington (bot) [Tue, 17 Oct 2023 09:59:10 +0000 (11:59 +0200)] 
[3.11] gh-110695: test_asyncio uses 50 ms for clock resolution (GH-110952) (#110971)

gh-110695: test_asyncio uses 50 ms for clock resolution (GH-110952)

Before utils.CLOCK_RES constant was added (20 ms), test_asyncio
already used 50 ms.
(cherry picked from commit 9a9fba825f8aaee4ea9b3429875c6c6324d0dee0)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] Bump sphinx-lint to v0.8.1 (GH-110933) (#110958)
Miss Islington (bot) [Tue, 17 Oct 2023 05:29:46 +0000 (07:29 +0200)] 
[3.11] Bump sphinx-lint to v0.8.1 (GH-110933) (#110958)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.11] Enable ruff on several more files in `Lib/test` (#110929) (#110935)
Alex Waygood [Mon, 16 Oct 2023 20:17:59 +0000 (21:17 +0100)] 
[3.11] Enable ruff on several more files in `Lib/test` (#110929) (#110935)

(cherry-picked from commit 02d26c4bef3ad0f9c97e47993a7fa67898842e5c)

2 years ago[3.11] C-API docs: Clarify the size of arenas (GH-110895) (#110947)
Miss Islington (bot) [Mon, 16 Oct 2023 19:06:34 +0000 (21:06 +0200)] 
[3.11] C-API docs: Clarify the size of arenas (GH-110895) (#110947)

C-API docs: Clarify the size of arenas (GH-110895)

Clarify the size of arenas

From 3.10.0 alpha 7, the pymalloc allocator uses arenas with a fixed size of 1
MiB on 64-bit platforms instead of 256 KiB on 32-bit platforms.
(cherry picked from commit f07ca27709855d4637b43bba23384cc795143ee3)

Co-authored-by: Mienxiu <82512658+mienxiu@users.noreply.github.com>
2 years ago[3.11] regrtest: Prepend 'use' options in --{fast,slow}-ci (GH-110363) (#110924)
Miss Islington (bot) [Mon, 16 Oct 2023 14:55:52 +0000 (16:55 +0200)] 
[3.11] regrtest: Prepend 'use' options in --{fast,slow}-ci (GH-110363) (#110924)

regrtest: Prepend 'use' options in --{fast,slow}-ci (GH-110363)

This allows individual resources to be disabled without having to explicitly re-enable all others.
(cherry picked from commit b75186f69edcf54615910a5cd707996144163ef7)

Co-authored-by: Zachary Ware <zach@python.org>
2 years ago[3.11] gh-110527: Improve `PySet_Clear` docs (GH-110528) (#110927)
Miss Islington (bot) [Mon, 16 Oct 2023 13:15:07 +0000 (15:15 +0200)] 
[3.11] gh-110527: Improve `PySet_Clear` docs (GH-110528) (#110927)

gh-110527: Improve `PySet_Clear` docs (GH-110528)
(cherry picked from commit bfc1cd8145db00df23fbbd2ed95324bb96c0b25b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-110886 Doc: add a link to BNF Wikipedia article (GH-110887) (#110901)
Miss Islington (bot) [Sun, 15 Oct 2023 17:00:57 +0000 (19:00 +0200)] 
[3.11] gh-110886 Doc: add a link to BNF Wikipedia article (GH-110887) (#110901)

Co-authored-by: partev <petrosyan@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] remove redundant call to attach_loop in watcher (GH-110847) (#110870)
Thomas Grainger [Sun, 15 Oct 2023 14:51:13 +0000 (07:51 -0700)] 
[3.11] remove redundant call to attach_loop in watcher (GH-110847) (#110870)

(cherry picked from commit 596589104fe5a4d90cb145b2cc69b71cc9aa9f07)

2 years ago[3.11] [3.12] bpo-42663: Fix parsing TZ strings in zoneinfo module (GH-23825) (GH...
Serhiy Storchaka [Sun, 15 Oct 2023 08:32:26 +0000 (11:32 +0300)] 
[3.11] [3.12] bpo-42663: Fix parsing TZ strings in zoneinfo module (GH-23825) (GH-110882) (GH-110889)

zipinfo now supports the full range of values in the TZ string
determined by RFC 8536 and detects all invalid formats.
Both Python and C implementations now raise exceptions of the same
type on invalid data.
(cherry picked from commit ab08ff7882b6181fb785eed7410dbf8030aded70)
(cherry picked from commit 72b0f0eaf52ac46d5f6e165f737d6f891cf8d172)

2 years ago[3.11] gh-101100: Fix sphinx warnings in `library/time.rst` (GH-110862) (#110878)
Miss Islington (bot) [Sat, 14 Oct 2023 14:28:23 +0000 (16:28 +0200)] 
[3.11] gh-101100: Fix sphinx warnings in `library/time.rst` (GH-110862) (#110878)

gh-101100: Fix sphinx warnings in `library/time.rst` (GH-110862)
(cherry picked from commit 12deda763359d46d4eccbb8991afed71fa31a68b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-109747: Improve errors for unsupported look-behind patterns (GH-109859...
Miss Islington (bot) [Sat, 14 Oct 2023 06:51:24 +0000 (08:51 +0200)] 
[3.11] gh-109747: Improve errors for unsupported look-behind patterns (GH-109859) (GH-110860)

Now re.error is raised instead of OverflowError or RuntimeError for
too large width of look-behind pattern.

The limit is increased to 2**32-1 (was 2**31-1).
(cherry picked from commit e2b3d831fd2824d8a5713e3ed2a64aad0fb6b62d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-107705: Fix file leak in test_tkinter in the C locale (GH-110507) (GH-110858)
Miss Islington (bot) [Sat, 14 Oct 2023 06:40:18 +0000 (08:40 +0200)] 
[3.11] gh-107705: Fix file leak in test_tkinter in the C locale (GH-110507) (GH-110858)

(cherry picked from commit ca0f3d858d069231ce7c5b382790a774f385b467)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-101100: Fix sphinx warnings in `usage/cmdline.rst` (GH-110841) (#110856)
Miss Islington (bot) [Sat, 14 Oct 2023 06:28:52 +0000 (08:28 +0200)] 
[3.11] gh-101100: Fix sphinx warnings in `usage/cmdline.rst` (GH-110841) (#110856)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] Bump sphinx-lint to 0.7.0 (GH-110830) (#110834)
Miss Islington (bot) [Fri, 13 Oct 2023 13:59:25 +0000 (15:59 +0200)] 
[3.11] Bump sphinx-lint to 0.7.0 (GH-110830) (#110834)

Bump sphinx-lint to 0.7.0 (GH-110830)
(cherry picked from commit 0ed2329a1627fc8ae97b009114cd960c25567f75)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.11] gh-110703: Add asyncio.wait_for() change notes for 3.11 (GH-110818) (#110827)
Miss Islington (bot) [Fri, 13 Oct 2023 13:24:29 +0000 (15:24 +0200)] 
[3.11] gh-110703: Add asyncio.wait_for() change notes for 3.11 (GH-110818) (#110827)

gh-110703: Add asyncio.wait_for() change notes for 3.11 (GH-110818)

* Remove redundant versionchanged

* Add missing versionchanged

* Update Doc/library/asyncio-task.rst

---------

(cherry picked from commit f81e36f700ac8c6766207fcf3bc2540692af868b)

Co-authored-by: paskozdilar <53006174+paskozdilar@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 years ago[3.11] gh-107450: Fix parser column offset overflow test on Windows (GH-110768) ...
Miss Islington (bot) [Fri, 13 Oct 2023 08:32:42 +0000 (10:32 +0200)] 
[3.11] gh-107450: Fix parser column offset overflow test on Windows (GH-110768) (#110809)

(cherry picked from commit 05439d308740b621d03562451a7608eb725937ae)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years agogh-110756: Sync regrtest with main branch (#110758) (#110781)
Victor Stinner [Thu, 12 Oct 2023 21:45:36 +0000 (23:45 +0200)] 
gh-110756: Sync regrtest with main branch (#110758) (#110781)

Copy files from main to this branch:

* Lib/test/libregrtest/*.py
* Lib/test/__init__.py
* Lib/test/__main__.py
* Lib/test/autotest.py
* Lib/test/pythoninfo.py
* Lib/test/regrtest.py
* Lib/test/test_regrtest.py

Copy also changes from:

* Lib/test/support/__init__.py
* Lib/test/support/os_helper.py
* Lib/test/support/testresult.py
* Lib/test/support/threading_helper.py
* Lib/test/test_support.py

Do not modify scripts running tests such as Makefile.pre.in,
.github/workflows/build.yml or Tools/scripts/run_tests.py: do not use
--fast-ci and --slow-ci in this change.

Changes:

* SPLITTESTDIRS: don't include test_inspect.
* Add utils.process_cpu_count() using len(os.sched_getaffinity(0)).
* test_regrtest doesn't use @support.without_optimizer which doesn't
  exist in Python 3.11.
* Add support.set_sanitizer_env_var().
* Update test_faulthandler to use support.set_sanitizer_env_var().
* @support.without_optimizer doesn't exist in 3.11.
* Add support.Py_DEBUG.
* regrtest.refleak: 3.11 doesn't have sys.getunicodeinternedsize.

2 years ago[3.11] gh-109216: Fix possible memory leak in `BUILD_MAP` (#109323)
Nikita Sobolev [Thu, 12 Oct 2023 12:52:03 +0000 (15:52 +0300)] 
[3.11] gh-109216: Fix possible memory leak in `BUILD_MAP` (#109323)

* [3.11] gh-109216: Fix possible memory leak in `BUILD_MAP`

* Add NEWS

* Update Python/ceval.c

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

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 years ago[3.11] gh-107450: Raise OverflowError when parser column offset overflows (GH-110754...
Miss Islington (bot) [Thu, 12 Oct 2023 09:57:36 +0000 (11:57 +0200)] 
[3.11] gh-107450: Raise OverflowError when parser column offset overflows (GH-110754) (#110763)

(cherry picked from commit fb7843ee895ac7f6eeb58f356b1a320eea081cfc)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2 years ago[3.11] GH-107518: Remove the Argument Clinic How-To (#109900) (#110761)
Erlend E. Aasland [Thu, 12 Oct 2023 09:52:59 +0000 (11:52 +0200)] 
[3.11] GH-107518: Remove the Argument Clinic How-To (#109900) (#110761)

(cherry picked from commit d1f7fae424d51b0374c8204599583c4a26c1a992)

* Remove the content of the Argument Clinic HOWTO
* Update cross-references to the Argument Clinic
* Add a note directing readers to the devguide

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] gh-110673: test_pty raises on short write (GH-110677) (#110743)
Miss Islington (bot) [Thu, 12 Oct 2023 08:09:49 +0000 (10:09 +0200)] 
[3.11] gh-110673: test_pty raises on short write (GH-110677) (#110743)

gh-110673: test_pty raises on short write (GH-110677)

Add write_all() helper function to test_pty to raise an exception on
short write: if os.writes() does not write all bytes. It should not
happen for a PTY.
(cherry picked from commit b4e8049766a46a9e6548b18d7e9a0c9f573cd122)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-110631: Fix reST indentation in `Doc/reference` (GH-110708) (#110741)
Ezio Melotti [Thu, 12 Oct 2023 00:01:48 +0000 (02:01 +0200)] 
[3.11] gh-110631: Fix reST indentation in `Doc/reference` (GH-110708) (#110741)

Fix wrong indentation in the Doc/reference dir..
(cherry picked from commit 41d8ec5a1bae1e5d4452da0a1a0649ace4ecb7b0)

2 years ago[3.11] gh-110631: Fix reST indentation (GH-110724) (#110739)
Ezio Melotti [Wed, 11 Oct 2023 21:12:53 +0000 (23:12 +0200)] 
[3.11] gh-110631: Fix reST indentation (GH-110724) (#110739)

* Fix wrong indentation in the other dirs.

* Fix more wrong indentation..
(cherry picked from commit 718391f475f2550d99dd794069ca76312f7f6aa6)

2 years ago[3.11] gh-110631: Fix reST indentation in `Doc/library` (GH-110685) (#110737)
Ezio Melotti [Wed, 11 Oct 2023 21:11:41 +0000 (23:11 +0200)] 
[3.11] gh-110631: Fix reST indentation in `Doc/library` (GH-110685) (#110737)

* [3.11] gh-110631: Fix reST indentation in `Doc/library` (GH-110685)

Fix wrong indentation in the Doc/library dir..
(cherry picked from commit bb7923f556537a463c403dc1097726d8a8e1a6f2)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* Fix merge glitch.

2 years ago[3.11] gh-108826: Document `dis` module CLI and rename `_test` function to `main...
Hugo van Kemenade [Wed, 11 Oct 2023 20:48:03 +0000 (22:48 +0200)] 
[3.11] gh-108826: Document `dis` module CLI and rename `_test` function to `main` (#108827) (#110689)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
2 years ago[3.11] gh-99834: Update macOS installer to Tcl/Tk 8.6.13. (GH-110710)
Miss Islington (bot) [Wed, 11 Oct 2023 19:42:24 +0000 (21:42 +0200)] 
[3.11] gh-99834: Update macOS installer to Tcl/Tk 8.6.13. (GH-110710)

(cherry picked from commit 13e460086b007691f2ca1c5ff677cdb70d19eba8)

Co-authored-by: Ned Deily <nad@python.org>
2 years ago[3.11] gh-76106: Remove the cleanup lock in test_socket (GH-110539) (GH-110700)
Miss Islington (bot) [Wed, 11 Oct 2023 11:13:06 +0000 (13:13 +0200)] 
[3.11] gh-76106: Remove the cleanup lock in test_socket  (GH-110539) (GH-110700)

It does not already work (because it locks only addCleanup(), not doCleanups()),
and it is no longer needed since the clean up procedure waits for all test threads to join.
(cherry picked from commit f27b83090701b9c215e0d65f1f924fb9330cb649)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-110631: fix wrong indentation in the `Doc/whatsnew` dir (GH-110632) (#110691)
Ezio Melotti [Wed, 11 Oct 2023 09:53:26 +0000 (11:53 +0200)] 
[3.11] gh-110631: fix wrong indentation in the `Doc/whatsnew` dir (GH-110632) (#110691)

fix wrong indentation in the `Doc/whatsnew` dir (#110632)

2 years ago[3.11] gh-110662: multiprocessing test_async_timeout() increase timeout (GH-110663...
Miss Islington (bot) [Wed, 11 Oct 2023 03:07:03 +0000 (05:07 +0200)] 
[3.11] gh-110662: multiprocessing test_async_timeout() increase timeout (GH-110663) (#110675)

gh-110662: multiprocessing test_async_timeout() increase timeout (GH-110663)

Increase timeout from 1 second to 30 seconds, if not longer. The
important part is that apply_async() takes longer than TIMEOUT2.
(cherry picked from commit 790ecf6302e47b84da5d1c3b14dbdf070bce615b)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-110666: Fix multiprocessing test_terminate() elapsed (GH-110667) (#110669)
Miss Islington (bot) [Wed, 11 Oct 2023 02:09:53 +0000 (04:09 +0200)] 
[3.11] gh-110666: Fix multiprocessing test_terminate() elapsed (GH-110667) (#110669)

gh-110666: Fix multiprocessing test_terminate() elapsed (GH-110667)

multiprocessing test_terminate() and test_wait_socket_slow() no
longer test the CI performance: no longer check maximum elapsed time.

Add CLOCK_RES constant: tolerate a difference of 100 ms.
(cherry picked from commit 1556f426da3f2fb5842689999933c8038b65c034)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-110656: Fix logging test_post_fork_child_no_deadlock() if ASAN (GH-110657...
Miss Islington (bot) [Wed, 11 Oct 2023 01:22:51 +0000 (03:22 +0200)] 
[3.11] gh-110656: Fix logging test_post_fork_child_no_deadlock() if ASAN (GH-110657) (#110665)

gh-110656: Fix logging test_post_fork_child_no_deadlock() if ASAN (GH-110657)

Skip test_post_fork_child_no_deadlock() if Python is built with ASAN.

Add support.HAVE_ASAN_FORK_BUG.
(cherry picked from commit f901f56313610389027cb4eae80d1d4b071aef69)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-110647: Fix signal test_stress_modifying_handlers() (GH-110650) (#110659)
Miss Islington (bot) [Wed, 11 Oct 2023 00:21:51 +0000 (02:21 +0200)] 
[3.11] gh-110647: Fix signal test_stress_modifying_handlers() (GH-110650) (#110659)

gh-110647: Fix signal test_stress_modifying_handlers() (GH-110650)

* cycle_handlers() now waits until at least one signal is received.
* num_received_signals can be equal to num_sent_signals.
(cherry picked from commit e07c37cd5212c9d13749b4d02a1d68e1efcba6cf)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-109286: Update Windows installer to use SQLite 3.43.1 (#110403) (#110479)
Erlend E. Aasland [Tue, 10 Oct 2023 22:41:12 +0000 (00:41 +0200)] 
[3.11] gh-109286: Update Windows installer to use SQLite 3.43.1 (#110403) (#110479)

2 years ago[3.11] [3.12] gh-108303: Move all certificates to `Lib/test/certdata/` (GH-109489...
Miss Islington (bot) [Tue, 10 Oct 2023 21:02:21 +0000 (23:02 +0200)] 
[3.11] [3.12] gh-108303: Move all certificates to `Lib/test/certdata/` (GH-109489) (GH-109682) (#110646)

[3.12] gh-108303: Move all certificates to `Lib/test/certdata/` (GH-109489) (GH-109682)

* gh-108303: Move all certificates to `Lib/test/certdata/` (GH-109489)
(cherry picked from commit e57ecf6bbc59f999d27b125ea51b042c24a07bd9)

Python 3.12 backport: update also `test_nntplib`.

(cherry picked from commit c2d542b42cd109d81c0308f9c4437c38ac74d2e0)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: T. Wouters <thomas@python.org>
2 years ago[3.11] gh-110631: Set three-space indents for reST in EditorConfig (GH-110635) (...
Miss Islington (bot) [Tue, 10 Oct 2023 15:03:11 +0000 (17:03 +0200)] 
[3.11] gh-110631: Set three-space indents for reST in EditorConfig (GH-110635) (#110638)

gh-110631: Set three-space indents for reST in EditorConfig (GH-110635)

Set three-space indents in EditorConfig
(cherry picked from commit 66a9b1082049855889854bfde617059499c26dd2)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] gh-110388: Add tests for tty (GH-110394) (GH-110634)
Serhiy Storchaka [Tue, 10 Oct 2023 14:27:22 +0000 (17:27 +0300)] 
[3.11] gh-110388: Add tests for tty (GH-110394) (GH-110634)

(cherry picked from commit 7f702b2)

2 years ago[3.11] Don't doubly-parallelise sphinx-lint (GH-110617) (#110627)
Miss Islington (bot) [Tue, 10 Oct 2023 13:00:24 +0000 (15:00 +0200)] 
[3.11] Don't doubly-parallelise sphinx-lint (GH-110617) (#110627)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] gh-81002: Add tests for termios (GH-110386) (GH-110620)
Miss Islington (bot) [Tue, 10 Oct 2023 12:11:06 +0000 (14:11 +0200)] 
[3.11] gh-81002: Add tests for termios (GH-110386) (GH-110620)

(cherry picked from commit 92a9e980245156bf75ede0869f8ba9512e04d2eb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-101100: Fix sphinx warnings in `library/socketserver.rst` (GH-110207) ...
Miss Islington (bot) [Tue, 10 Oct 2023 12:10:33 +0000 (14:10 +0200)] 
[3.11] gh-101100: Fix sphinx warnings in `library/socketserver.rst` (GH-110207) (GH-110624)

(cherry picked from commit 756062b296df6242ba324e4cdc8f3e38bfc83617)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-110378: Fix test_async_gen_propagates_generator_exit in test_contextlib_asy...
Miss Islington (bot) [Tue, 10 Oct 2023 11:12:40 +0000 (13:12 +0200)] 
[3.11] gh-110378: Fix test_async_gen_propagates_generator_exit in test_contextlib_async (GH-110500) (#110611)

It now fails if the original bug is not fixed, and no longer produce ResourceWarning with fixed code.
(cherry picked from commit 5aa62a8de15212577a13966710b3aede46e93824)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-110590: Fix a bug where _sre.compile would overwrite exceptions (GH-110591...
Miss Islington (bot) [Tue, 10 Oct 2023 10:48:07 +0000 (12:48 +0200)] 
[3.11] gh-110590: Fix a bug where _sre.compile would overwrite exceptions (GH-110591) (#110614)

TypeError would be overwritten by OverflowError
if 'code' param contained non-ints.
(cherry picked from commit 344d3a222a7864f8157773749bdd77d1c9dfc1e6)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-78469: Declare missing sethostname for Solaris 10 (GH-109447) (#110581)
Miss Islington (bot) [Tue, 10 Oct 2023 10:06:18 +0000 (12:06 +0200)] 
[3.11] gh-78469: Declare missing sethostname for Solaris 10 (GH-109447) (#110581)

Add OS version specific macro for Solaris: Py_SUNOS_VERSION.
(cherry picked from commit 3b1580af07c0ce90d1c2073ab087772283d7e3b9)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2 years ago[3.11] gh-110378: Close invalid generators in contextmanager and asynccontextmanager...
Miss Islington (bot) [Tue, 10 Oct 2023 09:12:52 +0000 (11:12 +0200)] 
[3.11] gh-110378: Close invalid generators in contextmanager and asynccontextmanager (GH-110499) (#110589)

contextmanager and asynccontextmanager context managers now close an invalid
underlying generator object that yields more then one value.
(cherry picked from commit 96fed66a65097eac2dc528ce29c9ba676bb07689)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2 years ago[3.11] gh-109408: Add the docs whitespace check from patchcheck to pre-commit (GH...
Miss Islington (bot) [Tue, 10 Oct 2023 08:36:28 +0000 (10:36 +0200)] 
[3.11] gh-109408: Add the docs whitespace check from patchcheck to pre-commit (GH-109854) (#110595)

gh-109408: Add the docs whitespace check from patchcheck to pre-commit (GH-109854)
(cherry picked from commit 7426ed0347d66f7ef61ea7ae6c3163258b8fb128)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] Add some 'meta hooks' to our pre-commit config (GH-110587) (#110600)
Miss Islington (bot) [Tue, 10 Oct 2023 08:24:17 +0000 (10:24 +0200)] 
[3.11] Add some 'meta hooks' to our pre-commit config (GH-110587) (#110600)

Add some 'meta hooks' to our pre-commit config (GH-110587)
(cherry picked from commit d5ec77fafd352b4eb290b86d70e4d0b4673459eb)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.11] Remove unused `SPHINXLINT` var from `Doc/Makefile`. (GH-110570) (#110584)
Miss Islington (bot) [Tue, 10 Oct 2023 01:13:34 +0000 (03:13 +0200)] 
[3.11] Remove unused `SPHINXLINT` var from `Doc/Makefile`. (GH-110570) (#110584)

Remove unused `SPHINXLINT` var from `Doc/Makefile`. (GH-110570)

Remove unused `SPHINXLINT` var.
(cherry picked from commit bdbe43c7d0ad5ebda0232a4ab39689ea79a9733a)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2 years ago[3.11] gh-109191: Fix build with newer editline (gh-110239) (#110575)
Bo Anderson [Mon, 9 Oct 2023 19:42:25 +0000 (20:42 +0100)] 
[3.11] gh-109191: Fix build with newer editline (gh-110239) (#110575)

(cherry picked from commit f4cb0d27cc08f490c42a22e646eb73cc7072d54a)

2 years ago[3.11] gh-110519: Improve deprecation warning in the gettext module (GH-110520) ...
Miss Islington (bot) [Mon, 9 Oct 2023 14:10:34 +0000 (16:10 +0200)] 
[3.11] gh-110519: Improve deprecation warning in the gettext module (GH-110520) (GH-110564)

Deprecation warning about non-integer numbers in gettext now always refers
to the line in the user code where gettext function or method is used.
Previously, it could refer to a line in gettext code.

Also, increase test coverage for NullTranslations and domain-aware functions
like dngettext().
(cherry picked from commit 326c6c4e07137b43c49b74bd5528619360080469)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-110437: Allow overriding VCRuntimeDLL with a semicolon separated list of...
Miss Islington (bot) [Mon, 9 Oct 2023 11:42:57 +0000 (13:42 +0200)] 
[3.11] gh-110437: Allow overriding VCRuntimeDLL with a semicolon separated list of DLLs to bundle (GH-110470)

gh-110437: Allow overriding VCRuntimeDLL with a semicolon separated list of DLLs to bundle (GH-110470)
(cherry picked from commit 12cc6792d0ca1d0b72712d77c6efcb0aa0c7e7ba)

Co-authored-by: Steve Dower <steve.dower@python.org>
2 years ago[3.11] gh-109286: Update macOS installer to use SQLite 3.43.1 (GH-110482) (#110551)
Miss Islington (bot) [Mon, 9 Oct 2023 10:31:27 +0000 (12:31 +0200)] 
[3.11] gh-109286: Update macOS installer to use SQLite 3.43.1 (GH-110482) (#110551)

(cherry picked from commit 48419a50b44a195ad7de958f479a924e7c2d3e1b)

Co-authored-by: jtranquilli <76231120+jtranquilli@users.noreply.github.com>
2 years ago[3.11] gh-110497: Add note about `OSError` being an alias to `IOError` in docs (GH...
Miss Islington (bot) [Mon, 9 Oct 2023 09:42:01 +0000 (11:42 +0200)] 
[3.11] gh-110497: Add note about `OSError` being an alias to `IOError` in docs (GH-110498) (#110545)

gh-110497: Add note about `OSError` being an alias to `IOError` in docs (GH-110498)
(cherry picked from commit 5e7edac7717bfe5f3c533d83ddd0f564db8de40b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-110534 fix a URL redirect to wikipedia article on Fibonacci numbers (GH...
Miss Islington (bot) [Mon, 9 Oct 2023 04:55:37 +0000 (21:55 -0700)] 
[3.11] gh-110534 fix a URL redirect to wikipedia article on Fibonacci numbers (GH-110535) (#110537)

gh-110534 fix a URL redirect to wikipedia article on Fibonacci numbers (GH-110535)
(cherry picked from commit 892ee72b3622de30acd12576b59259fc69e2e40a)

Co-authored-by: partev <petrosyan@gmail.com>
2 years ago[3.11] gh-110237: Check `PyList_Append` for errors in `_PyEval_MatchClass` (GH-110238...
Miss Islington (bot) [Sun, 8 Oct 2023 00:29:46 +0000 (17:29 -0700)] 
[3.11] gh-110237: Check `PyList_Append` for errors in `_PyEval_MatchClass` (GH-110238) (#110512)

gh-110237: Check `PyList_Append` for errors in `_PyEval_MatchClass` (GH-110238)
(cherry picked from commit dd9d781da30aa3740e54c063a40413c542d78c25)

Co-authored-by: denballakh <47365157+denballakh@users.noreply.github.com>
2 years ago[3.11] gh-109848: Make test_rot13_func in test_codecs independent (GH-109850) (GH...
Miss Islington (bot) [Sat, 7 Oct 2023 13:24:27 +0000 (06:24 -0700)] 
[3.11] gh-109848: Make test_rot13_func in test_codecs independent (GH-109850) (GH-110505)

(cherry picked from commit b987fdb19b981ef6e7f71b41790b5ed4e2064646)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-109864: Make test_gettext tests order independent (GH-109866) (GH-110503)
Miss Islington (bot) [Sat, 7 Oct 2023 13:23:54 +0000 (06:23 -0700)] 
[3.11] gh-109864: Make test_gettext tests order independent (GH-109866) (GH-110503)

(cherry picked from commit 1aad4fc5dba993899621de86ae5955883448d6f6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-109521: Fix obscure cases handling in PyImport_GetImporter() (GH-109522...
Serhiy Storchaka [Sat, 7 Oct 2023 13:05:13 +0000 (16:05 +0300)] 
[3.11] gh-109521: Fix obscure cases handling in PyImport_GetImporter() (GH-109522) (GH-109781)

PyImport_GetImporter() now sets RuntimeError if it fails to get sys.path_hooks
or sys.path_importer_cache or they are not list and dict correspondingly.

Previously it could return NULL without setting error in obscure cases,
crash or raise SystemError if these attributes have wrong type.
(cherry picked from commit 62c7015e89cbdedb5218d4fedd45f971885f67a8)

2 years ago[3.11] Fix typo in Doc/library/textwrap.rst (GH-110328) (#110474)
Miss Islington (bot) [Fri, 6 Oct 2023 14:35:23 +0000 (07:35 -0700)] 
[3.11] Fix typo in Doc/library/textwrap.rst (GH-110328) (#110474)

Co-authored-by: InSync <122007197+InSyncWithFoo@users.noreply.github.com>
2 years ago[3.11] gh-110184: Fix subprocess test_pipesize_default() (GH-110465) (#110472)
Miss Islington (bot) [Fri, 6 Oct 2023 14:11:51 +0000 (07:11 -0700)] 
[3.11] gh-110184: Fix subprocess test_pipesize_default() (GH-110465) (#110472)

gh-110184: Fix subprocess test_pipesize_default() (GH-110465)

For proc.stdin, get the size of the read end of the test pipe.

Use subprocess context manager ("with proc:").
(cherry picked from commit d023d4166b255023dac448305270350030101481)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] Add support.MS_WINDOWS constant (#110446) (#110452) (#110464)
Victor Stinner [Fri, 6 Oct 2023 10:19:49 +0000 (12:19 +0200)] 
[3.11] Add support.MS_WINDOWS constant (#110446) (#110452) (#110464)

[3.12] Add support.MS_WINDOWS constant (#110446) (#110452)

Add support.MS_WINDOWS constant (#110446)

(cherry picked from commit e0c44377935de3491b2cbe1e5f87f8b336fdc922)
(cherry picked from commit e188534607761af1f8faba483ce0b1e8578c73e5)

2 years ago[3.11] gh-103053: Fix test_tools.test_freeze on FreeBSD (GH-110451) (#110457)
Miss Islington (bot) [Fri, 6 Oct 2023 01:32:21 +0000 (18:32 -0700)] 
[3.11] gh-103053: Fix test_tools.test_freeze on FreeBSD (GH-110451) (#110457)

gh-103053: Fix test_tools.test_freeze on FreeBSD (GH-110451)

Fix test_tools.test_freeze on FreeBSD: run "make distclean" instead
of "make clean" in the copied source directory to remove also the
"python" program.

Other test_freeze changes:

* Log executed commands and directories, and the current directory.
* No longer uses make -C option to change the directory, instead use
  subprocess cwd parameter.
(cherry picked from commit a4baa9e8ac62cac3ea6363b15ea585b1998ea1f9)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-103053: Fix make check-clean-src: check "python" program (GH-110449) (...
Miss Islington (bot) [Fri, 6 Oct 2023 01:10:39 +0000 (18:10 -0700)] 
[3.11] gh-103053: Fix make check-clean-src: check "python" program (GH-110449) (#110454)

gh-103053: Fix make check-clean-src: check "python" program (GH-110449)

"make check-clean-src" now also checks if the "python" program is
found in the source directory: fail with an error if it does exist.
(cherry picked from commit a155f9f3427578ca5706d27e20bd0576f0395073)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-109888: Fix test_os _kill_with_event() on Windows (GH-110421) (#110443)
Miss Islington (bot) [Thu, 5 Oct 2023 22:06:28 +0000 (15:06 -0700)] 
[3.11] gh-109888: Fix test_os _kill_with_event() on Windows (GH-110421) (#110443)

gh-109888: Fix test_os _kill_with_event() on Windows (GH-110421)

Replace os.kill() with proc.kill() which catchs PermissionError.

Rewrite _kill_with_event():

* Use subprocess context manager ("with proc:").
* Use sleeping_retry() to wait until the child process is ready.
* Replace SIGINT with proc.kill() on error.
* Replace 10 seconds with SHORT_TIMEOUT to wait until the process is
  ready.
* Replace 0.5 seconds with SHORT_TIMEOUT to wait for the process
  exit.
(cherry picked from commit aaf297c048694cd9652790f8b74e69f7ddadfbde)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-110393: Remove watchdog with hardcoded timeout (GH-110400) (#110444)
Miss Islington (bot) [Thu, 5 Oct 2023 22:05:20 +0000 (15:05 -0700)] 
[3.11] gh-110393: Remove watchdog with hardcoded timeout (GH-110400) (#110444)

gh-110393: Remove watchdog with hardcoded timeout (GH-110400)

test_builtin and test_socketserver no longer use signal.alarm() to
implement a watchdog with a hardcoded timeout (2 and 60 seconds).
Python test runner regrtest has two watchdogs: faulthandler and
timeout on running worker processes. Tests using short hardcoded
timeout can fail on slowest buildbots just because the timeout is too
short.
(cherry picked from commit 1328fa31fe9c72748fc6fd11d017c82aafd48a49)

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