Commit graph

118990 commits

Author SHA1 Message Date
Tian Gao
56a3c5f767
[3.12] gh-116626: Emit CALL events for all `INSTRUMENTED_CALL_FUNCTION_EX (GH-116732)
Backport of GH-116627
2024-03-14 16:23:15 +00:00
Serhiy Storchaka
fc4d5fdffe
[3.12] gh-90300: Fix undocumented envvars in the Python CLI help (GH-116765) (GH-116797)
(cherry picked from commit 19ac28bd08)
2024-03-14 14:50:39 +02:00
Miss Islington (bot)
c4a22ad899
[3.12] gh-116785: Fix direct invocation of test_inspect (GH-116787) (#116794)
gh-116785: Fix direct invocation of `test_inspect` (GH-116787)
(cherry picked from commit 66fb613d90)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-14 10:20:20 +00:00
Serhiy Storchaka
991710af02
[3.12] gh-90300: Document equivalent -X options for envvars in the Python CLI help (GH-116756) (GH-116786)
(cherry picked from commit 8c6db45ce3)
2024-03-14 12:04:14 +02:00
Serhiy Storchaka
870cd901ea
[3.12] gh-90300: Sort the -X options and some envvars in the Python CLI help (GH-116739) (GH-116766)
(cherry picked from commit e54bdeab9c)
2024-03-13 23:02:29 +00:00
Miss Islington (bot)
0cc504771f
[3.12] GH-115979: update test_importlib to work under WASI SDK 21 (GH-116754) (GH-116759)
GH-115979: update test_importlib to work under WASI SDK 21 (GH-116754)
(cherry picked from commit 61733a2fb9)

Co-authored-by: Brett Cannon <brett@python.org>
2024-03-13 21:31:09 +00:00
Miss Islington (bot)
592c0e26c0
[3.12] Better presentation order for recipes. (gh-116755) (gh-116757) 2024-03-13 20:12:09 +00:00
Miss Islington (bot)
734c5c4a09
[3.12] gh-100746: Improve test_named_expressions.py (GH-116713) (#116747)
gh-100746: Improve `test_named_expressions.py` (GH-116713)
(cherry picked from commit 25684e7131)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-13 22:03:55 +03:00
Miss Islington (bot)
0cca76243c
[3.12] gh-98731: Improvements to the logging documentation (GH-101618) (GH-116734)
(cherry picked from commit 7f418fb111)
2024-03-13 17:16:48 +00:00
Miss Islington (bot)
8e45f7d2ae
[3.12] [doc]: Update cookbook recipe for Qt6. (GH-116719) (GH-116729)
(cherry picked from commit 186af3cf21)
2024-03-13 14:33:31 +00:00
Miss Islington (bot)
283dda83ec
[3.12] gh-110918: Fix side effects of regrtest test_match_tests() (GH-116718) (#116726)
gh-110918: Fix side effects of regrtest test_match_tests() (GH-116718)

test_match_tests now saves and restores patterns.

Add get_match_tests() function to libregrtest.filter.

Previously, running test_regrtest multiple times in a row only ran
tests once: "./python -m test test_regrtest -R 3:3.
(cherry picked from commit 612f1ec988)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-03-13 14:16:23 +00:00
Miss Islington (bot)
89b5c5e321
[3.12] gh-90300: Fix cmdline.rst (GH-116721) (GH-116724)
* Fix the description of the "-b" option.
* Add references to environment variables for "-s" and "-X dev" options.
(cherry picked from commit 33662d4e01)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-13 13:46:58 +00:00
Miss Islington (bot)
fc81b6497b
[3.12] gh-116714: Handle errors correctly in PyFloat_GetInfo (GH-116715) (#116722)
gh-116714: Handle errors correctly in `PyFloat_GetInfo` (GH-116715)
(cherry picked from commit fcd49b4f47)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-13 16:40:38 +03:00
Serhiy Storchaka
9caad1f99b
[3.12] gh-116401: Fix blocking os.fwalk() and shutil.rmtree() on opening a named pipe (GH-116421) (GH-116716)
(cherry picked from commit aa7bcf284f)
2024-03-13 10:02:37 +00:00
Miss Islington (bot)
9ef84b46db
[3.12] gh-116491: Improve test_win32_ver (GH-116506) (#116708)
gh-116491: Improve `test_win32_ver` (GH-116506)
(cherry picked from commit ee0dbbc045)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-13 07:29:13 +00:00
Miss Islington (bot)
e5c1456bbd
[3.12] Modernize roundrobin() recipe and improve variable names (gh-116710) (gh-116711) 2024-03-13 07:19:12 +00:00
Miss Islington (bot)
96c7604709
[3.12] gh-115264: Fix test_functools with -00 mode (GH-115276) (#116707)
gh-115264: Fix `test_functools` with `-00` mode (GH-115276)
(cherry picked from commit 27df81d564)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-13 07:10:59 +00:00
Miss Islington (bot)
d0c32ae419
[3.12] gh-111307: Update design FAQ 'switch' entry (GH-115899) (#116703)
(cherry picked from commit 43986f5567)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-03-13 05:36:43 +00:00
Miss Islington (bot)
982ff4a4b7
[3.12] Docs: fix broken links (GH-116651) (#116700)
(cherry picked from commit 3f1b6efee9)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2024-03-12 21:37:38 -07:00
Miss Islington (bot)
9f38686f62
[3.12] Minor clarity improvement for the iter_index() recipe. Also add value subsequence tests. (gh-116696) (gh-116698) 2024-03-13 02:40:31 +00:00
Miss Islington (bot)
84c8925e13
[3.12] gh-116682: stdout may be empty in test_cancel_futures_wait_false (GH-116683) (#116692)
If the `shutdown()` call happens before the worker thread starts executing
the task, then nothing will be printed to stdout.
(cherry picked from commit 7d1abe9502)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-03-13 00:28:21 +00:00
Pablo Galindo Salgado
acd7dc7ab0
Fix linting for Modules/gcmodule.c (#116691) 2024-03-13 00:00:14 +00:00
Pablo Galindo Salgado
dcfb21d8b4
[3.12] gh-116604: Correctly honor the gc status when calling _Py_RunGC (GH-116628) (#116653) 2024-03-12 23:38:20 +00:00
Miss Islington (bot)
f9d1ec8e80
[3.12] gh-116307: Proper fix for 'mod' leaking across importlib tests (GH-116680) (#116684)
gh-116307: Proper fix for 'mod' leaking across importlib tests (GH-116680)
(cherry picked from commit a254807761)


gh-116307: Create a new import helper 'isolated modules' and use that instead of 'Clean Import' to ensure that tests from importlib_resources don't leave modules in sys.modules.

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-03-12 19:33:23 -04:00
Miss Islington (bot)
65c6620a3a
[3.12] Add typing.NamedTuple in glossary section for named tuples (GH-108327) (#116689)
(cherry picked from commit 149f7f7ae2)

Co-authored-by: Tushar Sadhwani <tushar.sadhwani000@gmail.com>
2024-03-12 22:53:08 +00:00
Miss Islington (bot)
817ccac17c
[3.12] Beef-up tests for the itertool docs. (gh-116679) (gh-116688) 2024-03-12 22:26:32 +00:00
Miss Islington (bot)
b38c04e70c
[3.12] gh-116656: Fix test_capi test_py_config_isoloated_per_interpreter() (GH-116658) (#116668)
gh-116656: Fix test_capi test_py_config_isoloated_per_interpreter() (GH-116658)

Don't parse argv when setting the configuration, to avoid SystemExit if parsing argv fails.
(cherry picked from commit f6e7a6ce65)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-03-12 19:06:32 +01:00
Tian Gao
d19c2eb604
[3.12] gh-90095: Make .pdbrc work properly and add some reasonable te… (#116661)
[3.12] gh-90095: Make .pdbrc work properly and add some reasonable tests (GH-110496)
(cherry picked from commit 44f9a84b67)
2024-03-12 16:58:17 +00:00
Miss Islington (bot)
4ea9d15761
[3.12] gh-110819: Fix ‘kind’ may be used uninitialized warning in longobject (GH-116599) (#116648)
gh-110819: Fix ‘kind’ may be used uninitialized warning in `longobject` (GH-116599)
(cherry picked from commit eb947cdc13)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-12 11:09:15 +00:00
Miss Islington (bot)
d4e8cbbed4
[3.12] gh-116541: Handle errors correctly in _pystatvfs_fromstructstatvfs (GH-116542) (#116643)
gh-116541: Handle errors correctly in `_pystatvfs_fromstructstatvfs` (GH-116542)
(cherry picked from commit f8147d01da)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-12 10:30:40 +00:00
Miss Islington (bot)
1fb661579d
[3.12] gh-116600: [Enum] fix global Flag repr (GH-116615) (GH-116629)
* and fix global flag repr

(cherry picked from commit 06e29a224f)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-03-11 17:36:00 -07:00
Miss Islington (bot)
8b3b5be934
[3.12] gh-116040: [Enum] fix test_empty_names test (GH-116508) (GH-116619)
* and fix _not_given usage

(cherry picked from commit 3c0dcef980)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2024-03-11 15:16:22 -07:00
Miss Islington (bot)
1231697697
[3.12] gh-116563: Update tutorial error example (GH-116569) (#116624)
There now may be multiple carets pointing at a token
rather than just a character.  Fix the sentence about
possible causes.
(cherry picked from commit 3e45030076)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-03-11 22:11:44 +00:00
Miss Islington (bot)
2c1a81778d
[3.12] gh-71052: Use raise_signal in ThreadSignals.test_signals (GH-116423) (#116618)
gh-71052: Use `raise_signal` in `ThreadSignals.test_signals` (GH-116423)

Use `raise_signal` rather than `kill` in `ThreadSignals.test_signals`
(cherry picked from commit 34920f3691)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2024-03-11 21:09:42 +00:00
Miss Islington (bot)
d130cb4983
[3.12] gh-116545: Fix error handling in mkpwent in pwdmodule (GH-116548) (#116593)
gh-116545: Fix error handling in `mkpwent` in `pwdmodule` (GH-116548)
(cherry picked from commit ffd79bea0f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-11 11:55:09 +00:00
Miss Islington (bot)
1ddd2f9036
[3.12] gh-88352: Make TimedRotatingFileHandler tests more stable (GH-116409) (GH-116585)
The tests failed (with less than 1% probability) if for example the file
was created at 11:46:03.999, but the record was emitted at 11:46:04.001,
with atTime=11:46:04, which caused an unexpected rollover. Ensure that the
tests are always run within the range of the same whole second.

Also share code between test_rollover_at_midnight and test_rollover_at_weekday.
(cherry picked from commit d8712fa0c7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-11 12:49:30 +02:00
Miss Islington (bot)
de239beaec
[3.12] gh-116576: Fix Tools/scripts/sortperf.py sorting the same list (GH-116577) (#116582)
gh-116576: Fix `Tools/scripts/sortperf.py` sorting the same list (GH-116577)
(cherry picked from commit 4704e55a71)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-11 07:15:51 +00:00
Miss Islington (bot)
0d5455fc7f
[3.12] gh-116535: Fix distracting "TypeError" in example code (gh-116538) (gh-116551)
gh-116535: Fix distracting "TypeError" in example code (gh-116538)
(cherry picked from commit db8f423f58)

Co-authored-by: Declan <5962877+dec1@users.noreply.github.com>
2024-03-09 17:08:12 -05:00
Kirill Podoprigora
9f21f033c9
[3.12] gh-115142: Skip `test__xxsubinterpreters if _testcapi` is not available (#116543) 2024-03-09 14:06:24 +00:00
Miss Islington (bot)
3f92cf272e
[3.12] gh-116520: Fix error handling in os_get_terminal_size_impl in posixmodule (GH-116521) (#116539)
gh-116520: Fix error handling in `os_get_terminal_size_impl` in `posixmodule` (GH-116521)
(cherry picked from commit b4b4e764a7)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-09 11:36:02 +00:00
Miss Islington (bot)
d38298a9ba
[3.12] GH-116218 Docs: Add availability information for the 'resource' module (GH-116256) (#116533)
GH-116218 Docs: Add availability information for the 'resource' module (GH-116256)

Add availability data to 'resource' module Docs
(cherry picked from commit 03f86b1b62)

Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
2024-03-09 10:35:01 +01:00
Miss Islington (bot)
d5d86e2145
[3.12] gh-105535 Document potential performance trap during enum creation (GH-107119) (GH116511)
(cherry picked from commit 601f3a7b33)

Co-authored-by: Nicolas A. Oyarzabal <79150521+nicky-eng@users.noreply.github.com>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-03-08 16:56:58 -08:00
Miss Islington (bot)
2647afeab6
[3.12] gh-116447: Fix possible UB in arraymodule and getargs (GH-116459) (#116496)
gh-116447: Fix possible UB in `arraymodule` and `getargs` (GH-116459)
(cherry picked from commit fdb2d90a27)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-08 11:22:07 +00:00
Miss Islington (bot)
a8a95135a2
[3.12] gh-116485: Fixed the typo (GH-116486) (#116489)
Co-authored-by: Varun Gole <59524264+varungole@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-03-08 08:24:40 +00:00
Ethan Furman
d771729679
[3.12] gh-116040: [Enum] fix by-value calls when second value is falsey (GH-116072) (GH-116476)
e.g. Cardinal(1, 0)

(cherry picked from commit 13ffd4bd9f)
2024-03-07 15:26:13 -08:00
Miss Islington (bot)
4efd20e23a
gh-116472: Replace literal newlines with escape characters in MSBuild files (GH-116473)
(cherry picked from commit 5d0cdfe519)

Co-authored-by: Dan Albert <dan@gingerhq.net>
2024-03-07 22:33:19 +00:00
Petr Viktorin
0ab2384c5f
[3.12] gh-115421: List all test subdirs in Makefile, and test them (GH-115813) (#116462)
* gh-115421: Test that our Makefile has all needed test folders (GH-115813)

* Update the list of installed test subdirectories

---------

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-07 15:55:57 +01:00
Miss Islington (bot)
cbd94fdb6c
[3.12] gh-116448: Handle errors correctly in os_waitid_impl in posixmodule (GH-116449) (#116451)
gh-116448: Handle errors correctly in `os_waitid_impl` in `posixmodule` (GH-116449)
(cherry picked from commit 882fcede83)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-07 09:03:28 +00:00
Serhiy Storchaka
1e75fe1468
[3.12] gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298) (GH-116450)
(cherry picked from commit 808a77612f)
2024-03-07 08:21:25 +00:00
Miss Islington (bot)
01505953f2
[3.12] gh-88118: Fix some test_multiprocessing flakiness. (GH-116434) (GH-116440)
Fix some test_multiprocessing flakiness.

Potentially introduced by https://github.com/python/cpython/pull/25845

not joining that thread likely leads to recently observed "environment
changed" logically passing but overall failing tests seen on some
buildbots similar to:

```
1 test altered the execution environment (env changed):
    test.test_multiprocessing_fork.test_processes

2 re-run tests:
    test.test_multiprocessing_fork.test_processes
    test.test_multiprocessing_forkserver.test_processes
```
(cherry picked from commit ea1803e608)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-03-06 22:13:49 +00:00