Commit graph

119701 commits

Author SHA1 Message Date
Miss Islington (bot)
216b022922
[3.12] gh-116851: Remove "from ctypes import *" from a ctypes example (GH-116852) (GH-116905)
It is confusing, because libc is not imported from ctypes,
but defined in previous examples, which already contain the import.
(cherry picked from commit 744c077795)

Co-authored-by: jnchen <caojingchen@live.com>
2024-03-16 13:10:10 +00:00
Miss Islington (bot)
04e6146634
[3.12] gh-116484: Fix collisions between Checkbutton and ttk.Checkbutton default names (GH-116495) (GH-116901)
Change automatically generated tkinter.Checkbutton widget names to
avoid collisions with automatically generated tkinter.ttk.Checkbutton
widget names within the same parent widget.
(cherry picked from commit c61cb507c1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-16 11:51:08 +00:00
Miss Islington (bot)
716d482ba4
[3.12] gh-116764: Fix regressions in urllib.parse.parse_qsl() (GH-116801) (GH-116894)
* Restore support of None and other false values.
* Raise TypeError for non-zero integers and non-empty sequences.

The regressions were introduced in gh-74668
(bdba8ef42b).
(cherry picked from commit 1069a462f6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-16 11:00:32 +00:00
Nikita Sobolev
32c775165f
[3.12] gh-116858: Add @cpython_only to several tests in test_cmd_line (GH-116859) (#116889) 2024-03-16 09:31:28 +00:00
Miss Islington (bot)
ccea6e82da
[3.12] gh-116782: Mention __type_params__ in inspect.getmembers docs (GH-116783) (#116870)
gh-116782: Mention `__type_params__` in `inspect.getmembers` docs (GH-116783)
(cherry picked from commit 16349868d3)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-03-15 15:54:59 +00:00
Jason R. Coombs
8336cb2b6f
[3.12] gh-116811: Ensure MetadataPathFinder.invalidate_caches is reachable when delegated through PathFinder. (GH-116812) (#116864)
* Make MetadataPathFinder a proper classmethod.

* In PathFinder.invalidate_caches, also invoke MetadataPathFinder.invalidate_caches.

* Add blurb
(cherry picked from commit 5f52d20a93)
2024-03-15 09:59:28 -04:00
Miss Islington (bot)
abd079806d
[3.12] gh-90095: Ignore empty lines and comments in .pdbrc (GH-116834) (#116854)
gh-90095: Ignore empty lines and comments in `.pdbrc` (GH-116834)
(cherry picked from commit a50cf6c3d7)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-03-15 09:52:00 +00:00
Miss Islington (bot)
37514111be
[3.12] gh-116842: Improve test comment and fix a doctest (gh-116846) (gh-116847) 2024-03-15 02:46:54 +00:00
Raymond Hettinger
e4ec445926
[3.12] Minor improvements to the itertools documentation (gh-116833) (gh-116838) 2024-03-14 19:41:38 -05:00
Miss Islington (bot)
988246a17b
[3.12] gh-112795: Move the test for ZipFile into the core tests for zipfile. (GH-116823) (#116830)
gh-112795: Move the test for ZipFile into the core tests for zipfile. (GH-116823)

Move the test for ZipFile into the core tests for zipfile.
(cherry picked from commit fd8e30eb62)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-03-14 16:24:19 -04:00
Miss Islington (bot)
9d08e14a00
[3.12] gh-116731: libregrtest: Clear inspect & importlib.metadata caches in clear_caches (GH-116805) (GH-116820)
gh-116731: libregrtest: Clear inspect & importlib.metadata caches in clear_caches (GH-116805)
(cherry picked from commit bae6579b46)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-03-14 16:39:38 +00:00
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