]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years ago[3.11] GH-108202: Document ``calendar``'s command-line interface (GH-109020) (#109031)
Miss Islington (bot) [Thu, 7 Sep 2023 00:11:06 +0000 (17:11 -0700)] 
[3.11] GH-108202: Document ``calendar``'s command-line interface (GH-109020) (#109031)

GH-108202: Document ``calendar``'s command-line interface (GH-109020)
(cherry picked from commit f0f96a9f40762499811681d405b6f922b6ed7a55)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] gh-108740: Fix "make regen-all" race condition (#108741) (#109021)
Victor Stinner [Wed, 6 Sep 2023 21:00:30 +0000 (23:00 +0200)] 
[3.11] gh-108740: Fix "make regen-all" race condition (#108741) (#109021)

gh-108740: Fix "make regen-all" race condition (#108741)

Fix a race condition in "make regen-all". The deepfreeze.c source and
files generated by Argument Clinic are now generated or updated
before generating "global objects". Previously, some identifiers may
miss depending on the order in which these files were generated.

* "make regen-global-objects": Make sure that deepfreeze.c is
  generated and up to date, and always run "make clinic".
* "make regen-deepfreeze" now only updates deepfreeze.c (C file).
  It doesn't build deepfreeze.o (object) anymore.
* Remove misleading messages in "make regen-global-objects" and
  "make clinic". They are now outdated, these commands are now
  safe to use.

Backport notes:

* Omit Doc/using/configure.rst changes.
* no need to change "make clinic", it didn't run
  generate_global_objects.py script before.

Co-authored-by: Erlend E. Aasland <erlend@python.org>
(cherry picked from commit db1ee6a19ab62191c16ecb732cb4dcaede98a902)

2 years ago[3.11] gh-109002: Ensure only one wheel for each vendored package (GH-109003) (#109006)
Miss Islington (bot) [Wed, 6 Sep 2023 18:01:25 +0000 (11:01 -0700)] 
[3.11] gh-109002: Ensure only one wheel for each vendored package (GH-109003) (#109006)

Output with one wheel:
```
❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py
Verifying checksum for /Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl.
Expected digest: 7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be
Actual digest:   7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be
::notice file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl::Successfully verified the checksum of the pip wheel.
```

Output with two wheels:
```
❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py
::error file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-22.0.4-py3-none-any.whl::Found more than one wheel for package pip.

::error file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl::Found more than one wheel for package pip.
```

Output without wheels:
```
❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py
::error file=::Could not find a pip wheel on disk.
```
(cherry picked from commit f8a047941f2e4a1848700c21d58a08c9ec6a9c68)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2 years ago[3.11] gh-108851: Fix tomllib recursion tests (#108853) (#109013)
Victor Stinner [Wed, 6 Sep 2023 16:40:39 +0000 (18:40 +0200)] 
[3.11] gh-108851: Fix tomllib recursion tests (#108853) (#109013)

gh-108851: Fix tomllib recursion tests (#108853)

* Add get_recursion_available() and get_recursion_depth() functions
  to the test.support module.
* Change infinite_recursion() default max_depth from 75 to 100.
* Fix test_tomllib recursion tests for WASI buildbots: reduce the
  recursion limit and compute the maximum nested array/dict depending
  on the current available recursion limit.
* test.pythoninfo logs sys.getrecursionlimit().
* Enhance test_sys tests on sys.getrecursionlimit()
  and sys.setrecursionlimit().

Backport notes:

* Set support.infinite_recursion() minimum to 4 frames.
* test_support.test_get_recursion_depth() uses limit-2, apparently
  f-string counts for 2 frames in Python 3.11.
* test_sys.test_setrecursionlimit_to_depth() tests depth+2 instead of
  depth+1.

(cherry picked from commit 8ff11425783806f8cb78e99f667546b1f7f3428e)

2 years ago[3.11] gh-91960: Skip test_gdb if gdb cannot retrive Python frames (GH-108999) (...
Miss Islington (bot) [Wed, 6 Sep 2023 15:32:36 +0000 (08:32 -0700)] 
[3.11] gh-91960: Skip test_gdb if gdb cannot retrive Python frames (GH-108999) (#109011)

gh-91960: Skip test_gdb if gdb cannot retrive Python frames (GH-108999)

Skip test_gdb if gdb is unable to retrieve Python frame objects: if a
frame is "<optimized out>". When Python is built with "clang -Og",
gdb can fail to retrive the 'frame' parameter of
_PyEval_EvalFrameDefault(). In this case, tests like py_bt() are
likely to fail. Without getting access to Python frames,
python-gdb.py is mostly clueless on retrieving the Python traceback.
Moreover, test_gdb is no longer skipped on macOS if Python is built
with Clang.
(cherry picked from commit fbce43a251488f666be9794c908a6613bf8ae260)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-108983: Add more PEP 526 tests to `test_grammar` (GH-108984) (#109001)
Miss Islington (bot) [Wed, 6 Sep 2023 14:09:54 +0000 (07:09 -0700)] 
[3.11] gh-108983: Add more PEP 526 tests to `test_grammar` (GH-108984) (#109001)

gh-108983: Add more PEP 526 tests to `test_grammar` (GH-108984)
(cherry picked from commit 1fb20d42c58924e2e941622b3539645c7b843e0e)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-108857: improve markup in inspect.Signature.replace() docs (GH-108862)...
Miss Islington (bot) [Wed, 6 Sep 2023 00:39:09 +0000 (17:39 -0700)] 
[3.11] gh-108857: improve markup in inspect.Signature.replace() docs (GH-108862) (#108970)

gh-108857: improve markup in inspect.Signature.replace() docs (GH-108862)
(cherry picked from commit 6f8411cfd68134ccae01b0b4cb332578008a69e3)

Co-authored-by: nabin2004 <107109731+nabin2004@users.noreply.github.com>
2 years ago[3.11] gh-107565: Update Windows build to use OpenSSL 3.0.10 (GH-108932)
Zachary Ware [Tue, 5 Sep 2023 16:54:23 +0000 (11:54 -0500)] 
[3.11] gh-107565: Update Windows build to use OpenSSL 3.0.10 (GH-108932)

2 years ago[3.11] gh-108416: Mark slow but not CPU bound test methods with requires_resource...
Serhiy Storchaka [Tue, 5 Sep 2023 15:27:55 +0000 (18:27 +0300)] 
[3.11] gh-108416: Mark slow but not CPU bound test methods with requires_resource('walltime') (GH-108480) (GH-108924)

(cherry picked from commit 1e0d62793a84001e92f1c80b511d3a212b435acc)

2 years ago[3.11] gh-89392: Use unittest test runner for doctests in test_getopt (GH-108916...
Miss Islington (bot) [Tue, 5 Sep 2023 15:08:14 +0000 (08:08 -0700)] 
[3.11] gh-89392: Use unittest test runner for doctests in test_getopt (GH-108916) (GH-108920)

(cherry picked from commit f980cc19b9cafc09ef21e906871f810a1c89e62f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-89392: Use normal unittest runner in test_type_cache (GH-108911) (GH-108914)
Miss Islington (bot) [Tue, 5 Sep 2023 14:11:49 +0000 (07:11 -0700)] 
[3.11] gh-89392: Use normal unittest runner in test_type_cache (GH-108911) (GH-108914)

(cherry picked from commit eaabaac7c099884f92428a7bb04ffa1f1d6080dd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-89392: Remove support of test_main() in libregrtest (GH-108876) (GH-108898)
Serhiy Storchaka [Tue, 5 Sep 2023 06:54:12 +0000 (09:54 +0300)] 
[3.11] gh-89392: Remove support of test_main() in libregrtest (GH-108876) (GH-108898)

(cherry picked from commit 04a0830b00879efe057e3dfe75e9aa9c0caf1a26)

2 years ago[3.11] gh-89392: Fix running test_pep646_syntax as script (GH-108875) (GH-108877)
Miss Islington (bot) [Tue, 5 Sep 2023 06:41:15 +0000 (23:41 -0700)] 
[3.11] gh-89392: Fix running test_pep646_syntax as script (GH-108875) (GH-108877)

(cherry picked from commit f3b6608ba2b1db6ac449f656bf439bda8d66eb9f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] CI: Bump GitHub Actions (GH-108879) (#108891)
Hugo van Kemenade [Tue, 5 Sep 2023 00:21:07 +0000 (18:21 -0600)] 
[3.11] CI: Bump GitHub Actions (GH-108879) (#108891)

Bump GitHub Actions

2 years ago[3.11] bpo-45229: Make ElementTree tests discoverable (GH-108859) (GH-108874)
Serhiy Storchaka [Mon, 4 Sep 2023 10:43:12 +0000 (13:43 +0300)] 
[3.11] bpo-45229: Make ElementTree tests discoverable (GH-108859) (GH-108874)

(cherry picked from commit 074ac1f72e392a576516639f650bac0519d1cb52)

2 years ago[3.11] gh-89392: Remove test_main() in test_netrc (GH-108860) (GH-108868)
Miss Islington (bot) [Mon, 4 Sep 2023 10:20:24 +0000 (03:20 -0700)] 
[3.11] gh-89392: Remove test_main() in test_netrc (GH-108860) (GH-108868)

(cherry picked from commit 76f3c043b6c5971d5a13fc6decf87a80ddf7ef95)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-89392: Make test_pep646_syntax discoverable (GH-108861) (GH-108869)
Miss Islington (bot) [Mon, 4 Sep 2023 10:11:33 +0000 (03:11 -0700)] 
[3.11] gh-89392: Make test_pep646_syntax discoverable (GH-108861) (GH-108869)

(cherry picked from commit d0b22f6bd84239e50b43709f98f2bb950222cfe5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-108822: Backport libregrtest changes from the main branch (#108820)
Victor Stinner [Sun, 3 Sep 2023 17:21:53 +0000 (19:21 +0200)] 
[3.11] gh-108822: Backport libregrtest changes from the main branch (#108820)

* Revert "[3.11] gh-101634: regrtest reports decoding error as failed test (#106169) (#106175)"

This reverts commit d5418e97fc524420011a370ba3c2c3cf6a89a74f.

* Revert "[3.11] bpo-46523: fix tests rerun when `setUp[Class|Module]` fails (GH-30895) (GH-103342)"

This reverts commit ecb09a849689764193e0115d27e220f82b5f6d9f.

* Revert "gh-95027: Fix regrtest stdout encoding on Windows (GH-98492)"

This reverts commit b2aa28eec56d07b9c6777b02b7247cf21839de9f.

* Revert "[3.11] gh-94026: Buffer regrtest worker stdout in temporary file (GH-94253) (GH-94408)"

This reverts commit 0122ab235b5acb52dd99fd05d8802a00f438b828.

* Revert "Run Tools/scripts/reindent.py (GH-94225)"

This reverts commit f0f3a424afb00a15ce8c0140dd218f5b33929be6.

* Revert "gh-94052: Don't re-run failed tests with --python option (GH-94054)"

This reverts commit 1347607db12012f6458ffcba48d8ad797083812e.

* Revert "[3.11] gh-84461: Fix Emscripten umask and permission issues (GH-94002) (GH-94006)"

This reverts commit 10731849184a3101ed18683b0128d689f1671c3f.

* gh-93353: regrtest checks for leaked temporary files (#93776)

When running tests with -jN, create a temporary directory per process
and mark a test as "environment changed" if a test leaks a temporary
file or directory.

(cherry picked from commit e566ce5496f1bad81c431aaee65e36d5e44771c5)

* gh-93353: Fix regrtest for -jN with N >= 2 (GH-93813)

(cherry picked from commit 36934a16e86f34d69ba2d41630fb5b4d06d59cff)

* gh-93353: regrtest supports checking tmp files with -j2 (#93909)

regrtest now also implements checking for leaked temporary files and
directories when using -jN for N >= 2. Use tempfile.mkdtemp() to
create the temporary directory. Skip this check on WASI.

(cherry picked from commit 4f85cec9e2077681b3dacc3108e646d509b720bf)

* gh-84461: Fix Emscripten umask and permission issues (GH-94002)

- Emscripten's default umask is too strict, see
  https://github.com/emscripten-core/emscripten/issues/17269
- getuid/getgid and geteuid/getegid are stubs that always return 0
  (root). Disable effective uid/gid syscalls and fix tests that use
  chmod() current user.
- Cannot drop X bit from directory.

(cherry picked from commit 2702e408fd0e0dd7aec396b4cf8c7ce9caae81d8)

* gh-94052: Don't re-run failed tests with --python option (#94054)

(cherry picked from commit 0ff7b996f5d836e63cdaf652c7aa734285261096)

* Run Tools/scripts/reindent.py (#94225)

Reindent files which were not properly formatted (PEP 8: 4 spaces).

Remove also some trailing spaces.

(cherry picked from commit e87ada48a9e5d9d03f9759138869216df0d7383a)

* gh-94026: Buffer regrtest worker stdout in temporary file (GH-94253)

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

* gh-96465: Clear fractions hash lru_cache under refleak testing (GH-96689)

Automerge-Triggered-By: GH:zware
(cherry picked from commit 9c8f3794337457b1d905a9fa0f38c2978fe32abd)

* gh-95027: Fix regrtest stdout encoding on Windows (#98492)

On Windows, when the Python test suite is run with the -jN option,
the ANSI code page is now used as the encoding for the stdout
temporary file, rather than using UTF-8 which can lead to decoding
errors.

(cherry picked from commit ec1f6f5f139868dc2c1116a7c7c878c38c668d53)

* gh-98903: Test suite fails with exit code 4 if no tests ran (#98904)

The Python test suite now fails wit exit code 4 if no tests ran. It
should help detecting typos in test names and test methods.

* Add "EXITCODE_" constants to Lib/test/libregrtest/main.py.
* Fix a typo: "NO TEST RUN" becomes "NO TESTS RAN"

(cherry picked from commit c76db37c0d23174cbffd6fa978d39693890ef020)

* gh-100086: Add build info to test.libregrtest (#100093)

The Python test runner (libregrtest) now logs Python build information like
"debug" vs "release" build, or LTO and PGO optimizations.

(cherry picked from commit 3c892022472eb975360fb3f0caa6f6fcc6fbf220)

* bpo-46523: fix tests rerun when `setUp[Class|Module]` fails (#30895)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 995386071f96e4cfebfa027a71ca9134e4651d2a)

* gh-82054: allow test runner to split test_asyncio to execute in parallel by sharding. (#103927)

This runs test_asyncio sub-tests in parallel using sharding from Cinder. This suite is typically the longest-pole in runs because it is a test package with a lot of further sub-tests otherwise run serially. By breaking out the sub-tests as independent modules we can run a lot more in parallel.

After porting we can see the direct impact on a multicore system.

Without this change:
  Running make test is 5 min 26 seconds
With this change:
  Running make test takes 3 min 39 seconds

That'll vary based on system and parallelism. On a `-j 4` run similar to what CI and buildbot systems often do, it reduced the overall test suite completion latency by 10%.

The drawbacks are that this implementation is hacky and due to the sorting of the tests it obscures when the asyncio tests occur and involves changing CPython test infrastructure but, the wall time saved it is worth it, especially in low-core count CI runs as it pulls a long tail. The win for productivity and reserved CI resource usage is significant.

Future tests that deserve to be refactored into split up suites to benefit from are test_concurrent_futures and the way the _test_multiprocessing suite gets run for all start methods. As exposed by passing the -o flag to python -m test to get a list of the 10 longest running tests.

---------

Co-authored-by: Carl Meyer <carl@oddbird.net>
Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google, LLC]
(cherry picked from commit 9e011e7c77dad7d0bbb944c44891531606caeb21)

* Display the sanitizer config in the regrtest header. (#105301)

Display the sanitizers present in libregrtest.

Having this in the CI output for tests with the relevant environment
variable displayed will help make it easier to do what we need to
create an equivalent local test run.

(cherry picked from commit 852348ab65783601e0844b6647ea033668b45c11)

* gh-101634: regrtest reports decoding error as failed test (#106169)

When running the Python test suite with -jN option, if a worker stdout
cannot be decoded from the locale encoding report a failed testn so the
exitcode is non-zero.

(cherry picked from commit 2ac3eec103cf450aaaebeb932e51155d2e7fb37b)

* gh-108223: test.pythoninfo and libregrtest log Py_NOGIL (#108238)

Enable with --disable-gil --without-pydebug:

    $ make pythoninfo|grep NOGIL
    sysconfig[Py_NOGIL]: 1

    $ ./python -m test
    ...
    == Python build: nogil debug
    ...

(cherry picked from commit 5afe0c17ca14df430736e549542a4b85e7e7c7ac)

* gh-90791: test.pythoninfo logs ASAN_OPTIONS env var (#108289)

* Cleanup libregrtest code logging ASAN_OPTIONS.
* Fix a typo on "ASAN_OPTIONS" vs "MSAN_OPTIONS".

(cherry picked from commit 3a1ac87f8f89d3206b46a0df4908afae629d669d)

* gh-108388: regrtest splits test_asyncio package (#108393)

Currently, test_asyncio package is only splitted into sub-tests when
using command "./python -m test". With this change, it's also
splitted when passing it on the command line:
"./python -m test test_asyncio".

Remove the concept of "STDTESTS". Python is now mature enough to not
have to bother with that anymore. Removing STDTESTS simplify the
code.

(cherry picked from commit 174e9da0836844a2138cc8915dd305cb2cd7a583)

* regrtest computes statistics (#108793)

test_netrc, test_pep646_syntax and test_xml_etree now return results
in the test_main() function.

Changes:

* Rewrite TestResult as a dataclass with a new State class.
* Add test.support.TestStats class and Regrtest.stats_dict attribute.
* libregrtest.runtest functions now modify a TestResult instance
  in-place.
* libregrtest summary lists the number of run tests and skipped
  tests, and denied resources.
* Add TestResult.has_meaningful_duration() method.
* Compute TestResult duration in the upper function.
* Use time.perf_counter() instead of time.monotonic().
* Regrtest: rename 'resource_denieds' attribute to 'resource_denied'.
* Rename CHILD_ERROR to MULTIPROCESSING_ERROR.
* Use match/case syntadx to have different code depending on the
  test state.

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

* gh-108822: Add Changelog entry for regrtest statistics (#108821)

---------

Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Zachary Ware <zach@python.org>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Joshua Herman <zitterbewegung@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years ago[3.11] Reorder some test's decorators (GH-108804) (GH-108845)
Miss Islington (bot) [Sun, 3 Sep 2023 13:01:49 +0000 (06:01 -0700)] 
[3.11] Reorder some test's decorators (GH-108804) (GH-108845)

For example, do not demand the 'cpu' resource if the test cannot be run
due to non-working threads.
(cherry picked from commit 509bb61977cc8a4487efd3f9cdd63d9f7b86be62)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] [3.12] gh-63760: Don't declare gethostname() on Solaris (GH-108817) (GH-108824...
Miss Islington (bot) [Sun, 3 Sep 2023 06:53:02 +0000 (23:53 -0700)] 
[3.11] [3.12] gh-63760: Don't declare gethostname() on Solaris (GH-108817) (GH-108824) (#108832)

[3.12] gh-63760: Don't declare gethostname() on Solaris (GH-108817) (GH-108824)

gh-63760: Don't declare gethostname() on Solaris (GH-108817)

Since 2005, Solaris defines gethostname(). socketmodule.c no longer
has to define gethostname() for Solaris.

Oracle Solaris and OpenSolaris have patches to remove the
gethostname() definition in Python:

* https://github.com/oracle/solaris-userland/blob/master/components/python/python37/patches/15-gethostname.patch
* https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/python/python37/patches/15-gethostname.patch
* https://github.com/omniosorg/omnios-build/blob/master/build/python27/patches/24-gethostname.patch

(cherry picked from commit 7269916cd7b89b5e6f20bfe83ebe1038bda56b4b)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
(cherry picked from commit 0e6d582b3b73a88e71cae04327b31a1ee203722c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-108416: Mark slow test methods with @requires_resource('cpu') (GH-108421...
Serhiy Storchaka [Sun, 3 Sep 2023 06:34:30 +0000 (09:34 +0300)] 
[3.11] gh-108416: Mark slow test methods with @requires_resource('cpu') (GH-108421) (GH-108799)

Only mark tests which spend significant system or user time,
by itself or in subprocesses.
(cherry picked from commit f3ba0a74cd50274acdcd592d4ce8395b92492b7c)

2 years ago[3.11] gh-101100: Fix sphinx warnings in `unittest.mock-examples.rst` (GH-108810...
Nikita Sobolev [Sat, 2 Sep 2023 13:38:59 +0000 (16:38 +0300)] 
[3.11] gh-101100: Fix sphinx warnings in `unittest.mock-examples.rst` (GH-108810) (#108812)

(cherry picked from commit 5141b1ebe07ad54279e0770b4704eaf76f24951d)

2 years ago[3.11] gh-101100: Fix sphinx warnings in `uuid.rst` (GH-108805) (#108808)
Miss Islington (bot) [Sat, 2 Sep 2023 13:05:07 +0000 (06:05 -0700)] 
[3.11] gh-101100: Fix sphinx warnings in `uuid.rst` (GH-108805) (#108808)

(cherry picked from commit 21da4980f5916e8fd648f04367a9e60d141af366)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.11] gh-103186: assert in tests that UnsafeMailcapInput warnings are provided ...
Miss Islington (bot) [Sat, 2 Sep 2023 05:53:48 +0000 (22:53 -0700)] 
[3.11] gh-103186: assert in tests that UnsafeMailcapInput warnings are provided (GH-103217) (GH-108800)

(cherry picked from commit 1724553e6e8baae655901488968a40df981f32da)

Co-authored-by: Ijtaba Hussain <ijtabahussain@live.com>
2 years ago[3.11] Improve some C API documentation (GH-108768) (GH-108786)
Serhiy Storchaka [Sat, 2 Sep 2023 04:30:32 +0000 (07:30 +0300)] 
[3.11] Improve some C API documentation (GH-108768) (GH-108786)

* Express functions which take argument as a C string in terms of
  functions which take Python object.
* Use "note" directive for PyMapping_HasKey() and
  PyMapping_HasKeyString() notes.

(cherry picked from commit 6f97eeec222f81bd7ae836c149872a40b079e2a6)

2 years ago[3.11] gh-105563: reference DateType in datetime's documentation (GH-105946) (#108790)
Miss Islington (bot) [Fri, 1 Sep 2023 20:46:21 +0000 (13:46 -0700)] 
[3.11] gh-105563: reference DateType in datetime's documentation (GH-105946) (#108790)

gh-105563: reference DateType in datetime's documentation (GH-105946)
(cherry picked from commit 8f9ea43ee805f98391f857397daac9df7ffa71cd)

Co-authored-by: TATHAGATA ROY <royzen9495@gmail.com>
2 years ago[3.11] gh-101100: Fix sphinx warnings in `tutorial/appendix.rst` (GH-108750) (#108757)
Miss Islington (bot) [Fri, 1 Sep 2023 12:09:43 +0000 (05:09 -0700)] 
[3.11] gh-101100: Fix sphinx warnings in `tutorial/appendix.rst` (GH-108750) (#108757)

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 `tutorial/classes.rst` (GH-108746) (#108755)
Miss Islington (bot) [Fri, 1 Sep 2023 10:57:30 +0000 (03:57 -0700)] 
[3.11] gh-101100: Fix sphinx warnings in `tutorial/classes.rst` (GH-108746) (#108755)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-104372: Drop the GIL around the vfork() call. (#104782) (#104958)
Gregory P. Smith [Fri, 1 Sep 2023 08:53:06 +0000 (01:53 -0700)] 
[3.11] gh-104372: Drop the GIL around the vfork() call. (#104782) (#104958)

gh-104372: Drop the GIL around the vfork() call. (#104782)

On Linux where the `subprocess` module can use the `vfork` syscall for
faster spawning, prevent the parent process from blocking other threads
by dropping the GIL while it waits for the vfork'ed child process `exec`
outcome.  This prevents spawning a binary from a slow filesystem from
blocking the rest of the application.

Fixes #104372.

(cherry picked from commit d08679212d9af52dd074cd4a6abb440edb944c9c)

2 years ago[3.11] `ast` docs: Fix incorrect link on `keyword` (GH-108728) (#108738)
Miss Islington (bot) [Thu, 31 Aug 2023 22:27:27 +0000 (15:27 -0700)] 
[3.11] `ast` docs: Fix incorrect link on `keyword` (GH-108728) (#108738)

`ast` docs: Fix incorrect link on `keyword` (GH-108728)

In two places, Sphinx was erroneously adding links to the `keyword` module instead of the `ast.keyword` class
(cherry picked from commit c1e2f3b2f70b8a72ea7e1bf792addf62a94ae65d)

Co-authored-by: Alex Povel <git@alexpovel.de>
2 years ago[3.11] gh-101100: Fix sphinx warnings in `threading.rst` (GH-108684) (#108708)
Miss Islington (bot) [Thu, 31 Aug 2023 08:28:47 +0000 (01:28 -0700)] 
[3.11] gh-101100: Fix sphinx warnings in `threading.rst` (GH-108684) (#108708)

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-108520: Fix bad fork detection in nested multiprocessing use case (GH-10856...
Miss Islington (bot) [Wed, 30 Aug 2023 20:36:26 +0000 (13:36 -0700)] 
[3.11] gh-108520: Fix bad fork detection in nested multiprocessing use case (GH-108568) (#108692)

gh-107275 introduced a regression where a SemLock would fail being passed along nested child processes, as the `is_fork_ctx` attribute would be left missing after the first deserialization.

---------

(cherry picked from commit add8d45cbe46581b9748909fbbf60fdc8ee8f71e)

Co-authored-by: albanD <desmaison.alban@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
2 years ago[3.11] gh-108590: Revert gh-108657 (commit 400a1cebc) (#108686) (#108694)
Erlend E. Aasland [Wed, 30 Aug 2023 20:12:10 +0000 (22:12 +0200)] 
[3.11] gh-108590: Revert gh-108657 (commit 400a1cebc) (#108686) (#108694)

(cherry picked from commit 2a3926fa51b7264787d5988abf083d8c4328f4ad)

Reverted per Serhiy's request.

2 years ago[3.11] gh-101100: Fix Sphinx warnings in the Logging Cookbook (GH-108678) (#108681)
Miss Islington (bot) [Wed, 30 Aug 2023 12:19:44 +0000 (05:19 -0700)] 
[3.11] gh-101100: Fix Sphinx warnings in the Logging Cookbook (GH-108678) (#108681)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] Fix typo in multiprocessing docs (GH-108666) (#108676)
Miss Islington (bot) [Wed, 30 Aug 2023 11:17:23 +0000 (04:17 -0700)] 
[3.11] Fix typo in multiprocessing docs (GH-108666) (#108676)

Fix typo in multiprocessing docs (GH-108666)
(cherry picked from commit 38ab0dba801884b0963ef0daa95e94e120a2b524)

Co-authored-by: kato8966 <66937409+kato8966@users.noreply.github.com>
2 years ago[3.11] gh-108590: Fix sqlite3.iterdump for invalid Unicode in TEXT columns (GH-108657...
Corvin [Wed, 30 Aug 2023 10:29:33 +0000 (06:29 -0400)] 
[3.11] gh-108590: Fix sqlite3.iterdump for invalid Unicode in TEXT columns (GH-108657) (#108674)

(cherry picked from commit 400a1cebc743515e40157ed7af86e48d654290ce)

2 years ago[3.11] Mention Ellipsis pickling in the docs (GH-103660) (#108662)
Miss Islington (bot) [Wed, 30 Aug 2023 06:04:42 +0000 (23:04 -0700)] 
[3.11] Mention Ellipsis pickling in the docs (GH-103660) (#108662)

Mention Ellipsis pickling in the docs (GH-103660)
(cherry picked from commit 14ec0bb7c363def917f768b76f334146a3cddd84)

Co-authored-by: sterliakov <50529348+sterliakov@users.noreply.github.com>
2 years ago[3.11] Revert "[3.11] Use non alternate name for Kyiv (GH-108533) (GH-108641)" (GH...
Serhiy Storchaka [Tue, 29 Aug 2023 20:09:20 +0000 (23:09 +0300)] 
[3.11] Revert "[3.11] Use non alternate name for Kyiv (GH-108533) (GH-108641)" (GH-108650)

This reverts commit 34f84f2b9f60d35a142fcdf2d2b855914b69de6d.

It broke tests on the Debian and macOS buildbots.

2 years ago[3.11] gh-107801: Improve the accuracy of io.IOBase.seek docs (#108268) (#108656)
Erlend E. Aasland [Tue, 29 Aug 2023 19:57:49 +0000 (21:57 +0200)] 
[3.11] gh-107801: Improve the accuracy of io.IOBase.seek docs (#108268) (#108656)

(cherry picked from commit 8178a88bd81edae87d6974483e4de9b32e808797)

- Add param docstrings
- Link to os.SEEK_* constants
- Mention the return value in the initial paragraph

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] Use non alternate name for Kyiv (GH-108533) (GH-108641)
Miss Islington (bot) [Tue, 29 Aug 2023 15:47:54 +0000 (08:47 -0700)] 
[3.11] Use non alternate name for Kyiv (GH-108533) (GH-108641)

tzdata provides Kiev as an alternative to Kyiv:

https://sources.debian.org/src/tzdata/2023c-10/backward/?hl=314GH-L314

But Debian moved it to the tzdata-legacy package breaking the test:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050530

This patch switches to the name provided by tzdata.
(cherry picked from commit 7659128b9d7a30ddbcb063bc12e2ddb0f1f119e0)

Co-authored-by: Jochen Sprickerhof <github@jochen.sprickerhof.de>
2 years ago[3.11] gh-108558: Improve sqlite3 row factory tests (GH-108578) (#108616)
Miss Islington (bot) [Tue, 29 Aug 2023 09:47:27 +0000 (02:47 -0700)] 
[3.11] gh-108558: Improve sqlite3 row factory tests (GH-108578) (#108616)

Add test_sqlite_row_keys() to explicitly test sqlite3.Row.keys().

Cleanups:
- Reduce test noise by converting docstrings to regular comments
- Reduce boilerplate code by adding a setUp() method to RowFactoryTests

(cherry picked from commit 6eaddc10e972273c1aed8b88c538e65e4773496e)

Co-authored-by: Edward Schauman-Haigh <142528725+EddInSverige@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2 years ago[3.11] Fix misc doc typos (GH-108592) (#108613)
Alex Waygood [Tue, 29 Aug 2023 08:56:14 +0000 (09:56 +0100)] 
[3.11] Fix misc doc typos (GH-108592) (#108613)

(cherry picked from commit 88f1c5b)

Co-authored-by: xzmeng <aumo@foxmail.com>
2 years ago[3.11] gh-105821: Use a raw f-string in test_httpservers.py (GH-105822) (#108576)
Miss Islington (bot) [Mon, 28 Aug 2023 17:44:13 +0000 (10:44 -0700)] 
[3.11] gh-105821: Use a raw f-string in test_httpservers.py (GH-105822) (#108576)

gh-105821: Use a raw f-string in test_httpservers.py (GH-105822)

Use a raw f-string in test_httpservers.py
(cherry picked from commit 09ce8c3b48f940eb8865330f029b8069854c3106)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2 years ago[3.11] gh-64662: Fix virtual table support in sqlite3.Connection.iterdump (#108340...
Erlend E. Aasland [Mon, 28 Aug 2023 13:09:33 +0000 (15:09 +0200)] 
[3.11] gh-64662: Fix virtual table support in sqlite3.Connection.iterdump (#108340) (#108564)

(cherry picked from commit d0160c7c22c8dff0a61c49b5304244df6e36465e)

Co-authored-by: Aviv Palivoda <palaviv@gmail.com>
2 years ago[3.11] gh-108550: Speed up sqlite3 tests (#108551) (#108567)
Erlend E. Aasland [Mon, 28 Aug 2023 13:09:10 +0000 (15:09 +0200)] 
[3.11] gh-108550: Speed up sqlite3 tests (#108551) (#108567)

Disable the busy handler for all concurrency tests; we have full
control over the order of the SQLite C API calls, so we can safely
do this.

test_sqlite3.test_transactions now completes ~10 times faster than before.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] Fix typo in typing docs: Remove redundant backtick (GH-108559) (#108561)
Miss Islington (bot) [Mon, 28 Aug 2023 11:28:19 +0000 (04:28 -0700)] 
[3.11] Fix typo in typing docs: Remove redundant backtick (GH-108559) (#108561)

Fix typo in typing docs: Remove redundant backtick (GH-108559)
(cherry picked from commit 72b615ab015ccff8a92e22c5b5f97fa8aca3ba1f)

Co-authored-by: nikkie <takuyafjp+develop@gmail.com>
2 years ago[3.11] gh-107801: Document io.TextIOWrapper.tell (#108265) (#108548)
Erlend E. Aasland [Sun, 27 Aug 2023 21:22:43 +0000 (23:22 +0200)] 
[3.11] gh-107801: Document io.TextIOWrapper.tell (#108265) (#108548)

(cherry picked from commit 38afa4af9bfc8297a5ee270c37f3f120a04297ea)

2 years ago[3.11] gh-108542: Fix incorrect module name in NEWS entry for gh-105475 (#108543...
Erlend E. Aasland [Sun, 27 Aug 2023 20:07:56 +0000 (22:07 +0200)] 
[3.11] gh-108542: Fix incorrect module name in NEWS entry for gh-105475 (#108543) (#108544)

(cherry picked from commit a429eafef2d86eafc007ac19682e7d372c32da31)

2 years ago[3.11] Fix grammatical error in stringprep documentation (GH-108414) (#108538)
Miss Islington (bot) [Sun, 27 Aug 2023 13:12:51 +0000 (06:12 -0700)] 
[3.11] Fix grammatical error in stringprep documentation (GH-108414) (#108538)

Fix grammatical error in stringprep documentation (GH-108414)

Remove the word "them", which didn't make grammatical sense.

(cherry picked from commit cd0a8aece974330ef44ffe4e0f2e8aa632e98438)

Co-authored-by: Matthew James Kraai <kraai@ftbfs.org>
Co-authored-by: KRAAI, MATTHEW [VISUS] <mkraai@its.jnj.com>
2 years ago[3.11] gh-107913: Fix possible losses of OSError error codes (GH-107930) (GH-108524)
Serhiy Storchaka [Sun, 27 Aug 2023 12:18:58 +0000 (15:18 +0300)] 
[3.11] gh-107913: Fix possible losses of OSError error codes (GH-107930) (GH-108524)

Functions like PyErr_SetFromErrno() and SetFromWindowsErr() should be
called immediately after using the C API which sets errno or the Windows
error code.
(cherry picked from commit 2b15536fa94d07e9e286826c23507402313ec7f4)

2 years ago[3.11] gh-105052:update timeit function's description (GH-105060) (#108535)
Miss Islington (bot) [Sun, 27 Aug 2023 07:57:32 +0000 (00:57 -0700)] 
[3.11] gh-105052:update timeit function's description (GH-105060) (#108535)

---------
Co-authored-by: Terry Jan Reedy tjreedy@udel.edu
Co-authored-by: R <cherrymelon@foxmail.com>
(cherry picked from commit 7096a2be33619dc02c06a6dc30aac414a9eba462)

2 years ago[3.11] gh-107453: Document errno.{ECANCELED,EOWNERDEAD,ENOTRECOVERABLE,ENOTSUP} ...
Miss Islington (bot) [Sun, 27 Aug 2023 05:33:23 +0000 (22:33 -0700)] 
[3.11] gh-107453: Document errno.{ECANCELED,EOWNERDEAD,ENOTRECOVERABLE,ENOTSUP} (GH-107486) (#108530)

Co-authored-by: qqwqqw689 <114795525+qqwqqw689@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] gh-102211: Document `re.{Pattern,Match}`’s existence (GH-102212) (#108491)
Miss Islington (bot) [Fri, 25 Aug 2023 17:28:56 +0000 (10:28 -0700)] 
[3.11] gh-102211: Document `re.{Pattern,Match}`’s existence (GH-102212) (#108491)

Co-authored-by: Philipp A <flying-sheep@web.de>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.11] [3.12] gh-108314: PyDict_GetItemString() mentions UTF-8 (GH-108448) (#108489)
Miss Islington (bot) [Fri, 25 Aug 2023 16:48:25 +0000 (09:48 -0700)] 
[3.11] [3.12] gh-108314: PyDict_GetItemString() mentions UTF-8 (GH-108448) (#108489)

[3.12] gh-108314: PyDict_GetItemString() mentions UTF-8 (GH-108448)

gh-108314: PyDict_GetItemString() mentions UTF-8

PyDict_GetItemString(), PyDict_SetItemString() and
PyDict_DelItemString() expects a UTF-8 encoding string for the key.
(cherry picked from commit 9a225d7d5b0530ee73fa00d4816897997a9eb733)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] Datamodel: Add headings to the standard type hierarchy (GH-108146) (#108484)
Adam Turner [Fri, 25 Aug 2023 15:27:34 +0000 (16:27 +0100)] 
[3.11] Datamodel: Add headings to the standard type hierarchy (GH-108146) (#108484)

* [3.11] Datamodel: Add headings to the standard type hierarchy (GH-108146)

Dedent content according to the new layout..
(cherry picked from commit 2b7bff0655a4caf51cd1a9e5bf85b3b96dd031c9)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Fix indentation

2 years ago[3.11] gh-108418: Speed up bigmem compression tests in dry mode (GH-108419) (GH-108481)
Serhiy Storchaka [Fri, 25 Aug 2023 12:10:22 +0000 (15:10 +0300)] 
[3.11] gh-108418: Speed up bigmem compression tests in dry mode (GH-108419) (GH-108481)

Only generate and compress small amount of random data in dry run.
(cherry picked from commit 4ae3edf3008b70e20663143553a736d80ff3a501)

2 years ago[3.11] Docs: Datamodel: Merge "Notes on using __slots__" with the parent section...
Miss Islington (bot) [Fri, 25 Aug 2023 11:04:00 +0000 (04:04 -0700)] 
[3.11] Docs: Datamodel: Merge "Notes on using __slots__" with the parent section (GH-108400) (#108475)

(cherry picked from commit 7f5b1a06612bf1454232ac634ad4d2c845f77b37)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] GH-108202: Document ``calendar`` exceptions (GH-108398) (#108468)
Miss Islington (bot) [Fri, 25 Aug 2023 06:06:34 +0000 (23:06 -0700)] 
[3.11] GH-108202: Document ``calendar`` exceptions (GH-108398) (#108468)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years agoPost 3.11.5
Pablo Galindo [Thu, 24 Aug 2023 19:31:59 +0000 (20:31 +0100)] 
Post 3.11.5

2 years agoPython 3.11.5 v3.11.5
Pablo Galindo [Thu, 24 Aug 2023 12:05:22 +0000 (13:05 +0100)] 
Python 3.11.5

2 years ago[3.11] gh-107432 Update Porting Python 2 Code to Python 3 how-to (GH-107434) (#108410)
Miss Islington (bot) [Thu, 24 Aug 2023 11:26:56 +0000 (04:26 -0700)] 
[3.11] gh-107432 Update Porting Python 2 Code to Python 3 how-to (GH-107434) (#108410)

https://docs.python.org/3/howto/pyporting.html was written for another time. In this patch:

- material that frames Python 3 as "new" is removed
- descriptions and directions have been trimmed
(cherry picked from commit 809ea7c4b6c2b818ae510f1f58e82b6b05ed4ef9)

Co-authored-by: Daniele Procida <daniele@vurt.org>
2 years ago[3.11] Revert "gh-46376: Return existing pointer when possible in ctypes (GH-107131...
Łukasz Langa [Thu, 24 Aug 2023 11:26:19 +0000 (13:26 +0200)] 
[3.11] Revert "gh-46376: Return existing pointer when possible in ctypes (GH-107131) (GH-107488)" (#108412)

This reverts commit 57f27e444175a8a5ffcd86971e06de61c1c38628.

The fix caused gh-107940. Until we have a bulletproof fix for that, the 3.11 backport needs to be reverted to make way for 3.11.5.

2 years ago[3.11] gh-108342: Make ssl TestPreHandshakeClose more reliable (GH-108370) (#108405)
Łukasz Langa [Thu, 24 Aug 2023 10:08:52 +0000 (12:08 +0200)] 
[3.11] gh-108342: Make ssl TestPreHandshakeClose more reliable (GH-108370) (#108405)

* In preauth tests of test_ssl, explicitly break reference cycles
  invoving SingleConnectionTestServerThread to make sure that the
  thread is deleted. Otherwise, the test marks the environment as
  altered because the threading module sees a "dangling thread"
  (SingleConnectionTestServerThread). This test leak was introduced
  by the test added for the fix of issue gh-108310.
* Use support.SHORT_TIMEOUT instead of hardcoded 1.0 or 2.0 seconds
  timeout.
* SingleConnectionTestServerThread.run() catchs TimeoutError
* Fix a race condition (missing synchronization) in
  test_preauth_data_to_tls_client(): the server now waits until the
  client connect() completed in call_after_accept().
* test_https_client_non_tls_response_ignored() calls server.join()
  explicitly.
* Replace "localhost" with server.listener.getsockname()[0].
(cherry picked from commit 592bacb6fc0833336c0453e818e9b95016e9fd47)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-70766: Mention the object getstate caveat in 3.11 What's new. (GH-108379...
Miss Islington (bot) [Wed, 23 Aug 2023 22:10:27 +0000 (15:10 -0700)] 
[3.11] gh-70766: Mention the object getstate caveat in 3.11 What's new. (GH-108379) (#108385)

gh-70766: Mention the object getstate caveat in 3.11 What's new. (GH-108379)
(cherry picked from commit b6be18812c68fce5ab56c266dc5fc5a3cceb09c0)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years ago[3.11] gh-77377: Ensure multiprocessing SemLock is valid for spawn-based Process...
Miss Islington (bot) [Wed, 23 Aug 2023 21:11:20 +0000 (14:11 -0700)] 
[3.11] gh-77377: Ensure multiprocessing SemLock is valid for spawn-based Process before serializing it (GH-107275) (#108378)

gh-77377: Ensure multiprocessing SemLock is valid for spawn-based Process before serializing it (GH-107275)

Ensure multiprocessing SemLock is valid for spawn Process before serializing it.

Creating a multiprocessing SemLock with a fork context, and then trying to pass it to a spawn-created Process, would segfault if not detected early.

---------

(cherry picked from commit 1700d34d314f5304a7a75363bda295a8c15c371f)

Co-authored-by: albanD <desmaison.alban@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
2 years ago[3.11] gh-108342: Break ref cycle in SSLSocket._create() exc (GH-108344) (#108349)
Miss Islington (bot) [Wed, 23 Aug 2023 10:10:04 +0000 (03:10 -0700)] 
[3.11] gh-108342: Break ref cycle in SSLSocket._create() exc (GH-108344) (#108349)

Explicitly break a reference cycle when SSLSocket._create() raises an
exception. Clear the variable storing the exception, since the
exception traceback contains the variables and so creates a reference
cycle.

This test leak was introduced by the test added for the fix of GH-108310.
(cherry picked from commit 64f99350351bc46e016b2286f36ba7cd669b79e3)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-107136: Remove Plausible for docs metrics (GH-107856) (#108335)
Miss Islington (bot) [Wed, 23 Aug 2023 09:01:30 +0000 (02:01 -0700)] 
[3.11] gh-107136: Remove Plausible for docs metrics (GH-107856) (#108335)

(cherry picked from commit fc23f34cc9701949e6832eb32f26ea89f6622b82)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] gh-108267: Dataclasses docs: Fix object.__setattr__ typo (GH-108355) (#108357)
Miss Islington (bot) [Wed, 23 Aug 2023 07:20:57 +0000 (00:20 -0700)] 
[3.11] gh-108267: Dataclasses docs: Fix object.__setattr__ typo (GH-108355) (#108357)

gh-108267: Dataclasses docs: Fix object.__setattr__ typo (GH-108355)

Fixed a sentence in dataclasses.rst

Changed "__setattr__" to "object.__setattr__" in a section that was specifically supposed to refer to the __setattr__ method of the object class. Also suppressed the link to the data model docs for __setattr__, since we're talking about a specific __setattr__ implementation, not __setattr__ methods in general.
(cherry picked from commit 79fdacc0059a3959074d2d9d054653eae1dcfe06)

Co-authored-by: FrozenBob <30644137+FrozenBob@users.noreply.github.com>
2 years ago[3.11] gh-105776: Fix test_cppext when CC contains -std=c11 option (#108343) (#108347)
Victor Stinner [Wed, 23 Aug 2023 03:47:41 +0000 (05:47 +0200)] 
[3.11] gh-105776: Fix test_cppext when CC contains -std=c11 option (#108343) (#108347)

gh-105776: Fix test_cppext when CC contains -std=c11 option (#108343)

Fix test_cppext when the C compiler command has the "-std=c11" option.
Remove "-std=" options from the compiler command.

(cherry picked from commit 9173b2bbe13aeccc075b571da05c653a2a91de1b)

2 years ago[3.11] gh-108303: Add Lib/test/test_cppext/ sub-directory (#108325) (#108336)
Victor Stinner [Wed, 23 Aug 2023 03:11:53 +0000 (05:11 +0200)] 
[3.11] gh-108303: Add Lib/test/test_cppext/ sub-directory (#108325) (#108336)

gh-108303: Add Lib/test/test_cppext/ sub-directory (#108325)

* Move test_cppext to its own directory
* Rename setup_testcppext.py to setup.py
* Rename _testcppext.cpp to extension.cpp
* The source (extension.cpp) is now also copied by the test.

(cherry picked from commit 21dda09600848ac280481f7c64f8d9516dc69bb2)

2 years ago[3.11] Docs: Add link to skip to datetime's format codes (GH-108027) (#108330)
Miss Islington (bot) [Tue, 22 Aug 2023 19:52:51 +0000 (12:52 -0700)] 
[3.11] Docs: Add link to skip to datetime's format codes (GH-108027) (#108330)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] Clarify how topics.py gets created. (GH-106121) (GH-106580)
Miss Islington (bot) [Tue, 22 Aug 2023 19:23:55 +0000 (12:23 -0700)] 
[3.11] Clarify how topics.py gets created. (GH-106121) (GH-106580)

When changing docs, it was easy to find text in topics.py, and I
wondered whether I was supposed to edit it.  Thankfully, the top of the
file says it's auto-generated, so I knew I didn't have to edit it. But I
didn't know what started the auto-generation process.

It's part of the release process, so I'll leave a note here for future
editors.
(cherry picked from commit dac1e364901d3668742e6eecc2ce63586330c11f)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2 years ago[3.11] gh-107700: [Enum] Document that `EnumType` was added in 3.11 (GH-108260) ...
Miss Islington (bot) [Tue, 22 Aug 2023 18:33:26 +0000 (11:33 -0700)] 
[3.11] gh-107700: [Enum] Document that `EnumType` was added in 3.11 (GH-108260) (#108300)

(cherry picked from commit e8ef0bdd8c613a722bf7965bf1da912882141a52)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.11] gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258...
Serhiy Storchaka [Tue, 22 Aug 2023 18:33:07 +0000 (21:33 +0300)] 
[3.11] gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258) (#108290)

(cherry picked from commit d7202e4879bf4e7e00a69500ddcb3143864139b4)

2 years ago[3.11] gh-107298: Fix C API datetime documentation (GH-108034) (#108233)
Miss Islington (bot) [Tue, 22 Aug 2023 18:32:48 +0000 (11:32 -0700)] 
[3.11] gh-107298: Fix C API datetime documentation (GH-108034) (#108233)

(cherry picked from commit d63972e289e05b0d82e59f32f107312a8b3de7b5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] Resolve reference warnings in faq/gui.rst (GH-108147) (#108194)
Miss Islington (bot) [Tue, 22 Aug 2023 18:32:16 +0000 (11:32 -0700)] 
[3.11] Resolve reference warnings in faq/gui.rst (GH-108147) (#108194)

(cherry picked from commit 8f3d09bf5d16b508fece5420a22abe6f0c1f00b7)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] gh-108310: Fix CVE-2023-40217: Check for & avoid the ssl pre-close flaw (...
Łukasz Langa [Tue, 22 Aug 2023 17:53:19 +0000 (19:53 +0200)] 
[3.11] gh-108310: Fix CVE-2023-40217: Check for & avoid the ssl pre-close flaw (#108317)

gh-108310: Fix CVE-2023-40217: Check for & avoid the ssl pre-close flaw

Instances of `ssl.SSLSocket` were vulnerable to a bypass of the TLS handshake
and included protections (like certificate verification) and treating sent
unencrypted data as if it were post-handshake TLS encrypted data.

The vulnerability is caused when a socket is connected, data is sent by the
malicious peer and stored in a buffer, and then the malicious peer closes the
socket within a small timing window before the other peers’ TLS handshake can
begin. After this sequence of events the closed socket will not immediately
attempt a TLS handshake due to not being connected but will also allow the
buffered data to be read as if a successful TLS handshake had occurred.

Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
2 years ago[3.11] gh-106016: Add Lib/test/test_module/ directory (GH-108293) (#108304)
Miss Islington (bot) [Tue, 22 Aug 2023 15:42:00 +0000 (08:42 -0700)] 
[3.11] gh-106016: Add Lib/test/test_module/ directory (GH-108293) (#108304)

gh-106016: Add Lib/test/test_module/ directory (GH-108293)

* Move Python scripts related to test_module to this new directory:
  good_getattr.py and bad_getattrX.py scripts.
* Move Lib/test/test_module.py to Lib/test/test_module/__init__.py.
(cherry picked from commit adfc118fdab66882599e01a84c22bd897055f3f1)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] gh-106242: Make ntpath.realpath errors consistent with abspath when there...
Miss Islington (bot) [Tue, 22 Aug 2023 14:35:16 +0000 (07:35 -0700)] 
[3.11] gh-106242: Make ntpath.realpath errors consistent with abspath when there are embedded nulls (GH-108248)

gh-106242: Make ntpath.realpath errors consistent with abspath when there are embedded nulls (GH-108248)

---------

(cherry picked from commit de33b5c662ea8d35d81ed857c6a39e34ab94c510)

Co-authored-by: Steve Dower <steve.dower@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years ago[3.11] Docs: align the param spec of sqlite3.Connection methods with the implementati...
Miss Islington (bot) [Tue, 22 Aug 2023 13:28:38 +0000 (06:28 -0700)] 
[3.11] Docs: align the param spec of sqlite3.Connection methods with the implementation (GH-108285) (#108288)

- no parameters of create_aggregate() are positional-only
- all parameters of create_collation() are positional-only
(cherry picked from commit 893215a4e7f59eabb8ccdf188c4b9b1de5bd8966)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2 years ago[3.11] Docs: move sphinx-lint to pre-commit (GH-105750) (#108276)
Hugo van Kemenade [Tue, 22 Aug 2023 12:18:39 +0000 (15:18 +0300)] 
[3.11] Docs: move sphinx-lint to pre-commit (GH-105750) (#108276)

2 years ago[3.11] Trim trailing whitespace and test on CI (GH-104275) (#108215)
Hugo van Kemenade [Tue, 22 Aug 2023 09:57:31 +0000 (12:57 +0300)] 
[3.11] Trim trailing whitespace and test on CI (GH-104275) (#108215)

2 years ago[3.11] gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846) (GH-108209)
Miss Islington (bot) [Tue, 22 Aug 2023 08:51:58 +0000 (01:51 -0700)] 
[3.11] gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846) (GH-108209)

gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846)

(cherry picked from commit acbd3f9c5c5f23e95267714e41236140d84fe962)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
2 years ago[3.11] gh-102507 Remove invisible pagebreak characters (GH-102531) (#108266)
Miss Islington (bot) [Tue, 22 Aug 2023 08:49:35 +0000 (01:49 -0700)] 
[3.11] gh-102507 Remove invisible pagebreak characters (GH-102531) (#108266)

gh-102507 Remove invisible pagebreak characters (GH-102531)
(cherry picked from commit b097925858c6975c73e989226cf278cc382c0416)

Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2 years ago[3.11] gh-107801: Improve the accuracy of io.TextIOWrapper.seek docs (#107933) (...
Erlend E. Aasland [Tue, 22 Aug 2023 08:19:56 +0000 (10:19 +0200)] 
[3.11] gh-107801: Improve the accuracy of io.TextIOWrapper.seek docs (#107933) (#108264)

(cherry picked from commit 7f87ebbc3f52680c939791f397b9a478edf0c8d4)

Clearly document the supported seek() operations:

- Rewind to the start of the stream
- Restore a previous stream position (given by tell())
- Fast-forward to the end of the stream

2 years ago[3.11] gh-108224: Fix asyncio doc inconsistency (GH-108230) (#108232)
Miss Islington (bot) [Mon, 21 Aug 2023 21:21:26 +0000 (14:21 -0700)] 
[3.11] gh-108224: Fix asyncio doc inconsistency (GH-108230) (#108232)

(Spawning subprocesses does not require the event loop to run in the main thread -- only signal handling does.)

(cherry picked from commit 1cc391d9e2ea24ca750005335507b52933fc0b52)

Co-authored-by: temach <tematibr@gmail.com>
2 years ago[3.11] gh-107298: Fix references to deprecated and removed PyUnicode C API (GH-108077...
Miss Islington (bot) [Mon, 21 Aug 2023 17:35:36 +0000 (10:35 -0700)] 
[3.11] gh-107298: Fix references to deprecated and removed PyUnicode C API (GH-108077) (GH-108226)

(cherry picked from commit db55383829ccd5ce80c551d60f26851346741fdf)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-107396: tarfiles: set self.exception before _init_read_gz() (GH-107485...
Miss Islington (bot) [Mon, 21 Aug 2023 15:16:59 +0000 (08:16 -0700)] 
[3.11] gh-107396: tarfiles: set self.exception before _init_read_gz() (GH-107485) (GH-108208)

gh-107396: tarfiles: set self.exception before _init_read_gz() (GH-107485)

In the stack call of: _init_read_gz()
```
_read, tarfile.py:548
read, tarfile.py:526
_init_read_gz, tarfile.py:491
```
a try;except exists that uses `self.exception`, so it needs to be set before
calling _init_read_gz().
(cherry picked from commit 37135d25e269ede92bc7da363bebfa574782e59a)

Co-authored-by: balmeida-nokia <83089745+balmeida-nokia@users.noreply.github.com>
2 years ago[3.11] gh-107916: Save the error code before decoding the filename in PyErr_SetFromEr...
Miss Islington (bot) [Mon, 21 Aug 2023 11:53:05 +0000 (04:53 -0700)] 
[3.11] gh-107916: Save the error code before decoding the filename in PyErr_SetFromErrnoWithFilename() etc (GH-107929) (GH-108206)

(cherry picked from commit 80bdebdd8593f007a2232ec04a7729bba6ebf12c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] Improve references in the tutorial (GH-108069) (GH-108204)
Serhiy Storchaka [Mon, 21 Aug 2023 10:53:36 +0000 (13:53 +0300)] 
[3.11] Improve references in the tutorial (GH-108069) (GH-108204)

* Use full qualified names for references (even if they do not work now,
  they will work in future).
* Silence references to examples.
(cherry picked from commit 622ddc41674c2566062af82f7b079aa01d2aae8c)

2 years ago[3.11] Docs: document 'manager' and '_log' attrs of logging.Logging (GH-108145) ...
Miss Islington (bot) [Mon, 21 Aug 2023 10:44:25 +0000 (03:44 -0700)] 
[3.11] Docs: document 'manager' and '_log' attrs of logging.Logging (GH-108145) (GH-108189)

(cherry picked from commit f904aa4e1f6943e5bd9a8a73cf762f063e6fa247)
Authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2 years ago[3.11] gh-105736: Sync pure python version of OrderedDict with the C version (GH...
Miss Islington (bot) [Mon, 21 Aug 2023 10:37:09 +0000 (03:37 -0700)] 
[3.11] gh-105736: Sync pure python version of OrderedDict with the C version (GH-108098) (GH-108201)

(cherry picked from commit 20cc90c0df3e368fe7cb63d958f0b17a78fa9d0a)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2 years ago[3.11] gh-107895: Fix test_asyncio.test_runners when run it in CPython's "development...
Miss Islington (bot) [Mon, 21 Aug 2023 08:36:37 +0000 (01:36 -0700)] 
[3.11] gh-107895: Fix test_asyncio.test_runners when run it in CPython's "development mode" (GH-108168) (GH-108197)

(cherry picked from commit 014a5b71e7538926ae1c03c8c5ea13c96e741be3)

Co-authored-by: Joon Hwan 김준환 <xncbf12@gmail.com>
2 years ago[3.11] Resolve reference warnings in faq/library.rst (GH-108149) (#108183)
Miss Islington (bot) [Sun, 20 Aug 2023 19:26:01 +0000 (12:26 -0700)] 
[3.11] Resolve reference warnings in faq/library.rst (GH-108149) (#108183)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.11] Resolve reference warnings in faq/design.rst (GH-108148) (#108181)
Adam Turner [Sun, 20 Aug 2023 18:56:14 +0000 (19:56 +0100)] 
[3.11] Resolve reference warnings in faq/design.rst (GH-108148) (#108181)

2 years ago[3.11] Docs: Fix Sphinx warnings in logging.rst (GH-108139) (#108175)
Erlend E. Aasland [Sun, 20 Aug 2023 16:40:57 +0000 (18:40 +0200)] 
[3.11] Docs: Fix Sphinx warnings in logging.rst (GH-108139) (#108175)

(cherry picked from commit c735e79afb62324624864e1943f84825249f58ed)

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2 years ago[3.11] Docs: Fix Sphinx warnings in license.rst (#108142) (#108176)
Erlend E. Aasland [Sun, 20 Aug 2023 16:27:44 +0000 (18:27 +0200)] 
[3.11] Docs: Fix Sphinx warnings in license.rst (#108142) (#108176)

(cherry picked by commit 4d4393139fae39db26dead33529b6ae0bafbfc58)

- Fix links to stdlib modules
- Silence links to external functions

2 years ago[3.11] Resolve reference warnings in faq/programming.rst (GH-108150) (#108171)
Miss Islington (bot) [Sun, 20 Aug 2023 14:01:24 +0000 (07:01 -0700)] 
[3.11] Resolve reference warnings in faq/programming.rst (GH-108150) (#108171)

Resolve reference warnings in faq/programming.rst (GH-108150)
(cherry picked from commit a390ec20f5a85b9c16e8708f117667783d08863c)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.11] Docs: Fix Sphinx warnings in sys.rst (GH-108106) (#108166)
Miss Islington (bot) [Sun, 20 Aug 2023 13:52:44 +0000 (06:52 -0700)] 
[3.11] Docs: Fix Sphinx warnings in sys.rst (GH-108106) (#108166)

Docs: Fix Sphinx warnings in sys.rst (GH-108106)

- Mark up named tuple attributes as attributes
- Remove links for external functions
- io.BufferedIOBase has no 'buffer' attribute;
  remove the link and mark up using :attr:`!buffer`
- (Re)format some tables as bullet lists:
  - sys._emscripten_info
  - sys.hash_info
  - sys.int_info
  - sys.thread_info
- In the paragraphs mentioning 'f_trace_lines' and 'f_trace_opcodes',
  add links to the frame objects reference.

(cherry picked from commit 29fa7afef94d74e18d97485c085d1ccf80c16ca3)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
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] gh-107659: Improve wording of the description of `ctypes.pointer` and `ctypes...
Miss Islington (bot) [Sun, 20 Aug 2023 11:05:24 +0000 (04:05 -0700)] 
[3.11] gh-107659: Improve wording of the description of `ctypes.pointer` and `ctypes.POINTER` (GH-107769) (#108164)

gh-107659: Improve wording of the description of `ctypes.pointer` and `ctypes.POINTER` (GH-107769)
(cherry picked from commit beffb30dc7a07044f4198245d049ddda1f4b24db)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>