Commit graph

119018 commits

Author SHA1 Message Date
Serhiy Storchaka
4be9fa8961
[3.12] gh-90300: Improve the Python CLI help output (GH-115853) (GH-117022)
* document equivalent command-line options for all environment variables
* document equivalent environment variables for all command-line options
* reduce the size of variable and option descriptions to minimum
* remove the ending period in single-sentence descriptions

(cherry picked from commit b85572c47d)

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-03-19 18:33:34 +00:00
Miss Islington (bot)
05b2b30436
[3.12] gh-56374: Clarify documentation of nonlocal (GH-116942) (#117023)
Define 'nonlocal scopes' in a way that excludes class scopes.
Rearrange the rest of the doc.  Add "Programmer's note".

(cherry picked from commit 025ef7a5f7)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-03-19 18:05:27 +00:00
Miss Islington (bot)
1684f7ec1e
[3.12] Update titles and subtitles on landing page template (GH-116914) (#117020)
Update titles and subtitles on landing page template (GH-116914)

* Update titles and subtitles on landing page template

* address review from gvanrossum

* Edits from hugovk review

* Change word order back. Down the road we should split license and history
(cherry picked from commit c514a975ab)

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-03-19 17:52:35 +00:00
David Röthlisberger
0fc8ae4e28
[3.12] gh-116957: configparser: Do post-process values after DuplicateOptionError (GH-116958) (GH-117013)
If you catch DuplicateOptionError / DuplicateSectionError when reading a
config file (the intention is to skip invalid config files) and then
attempt to use the ConfigParser instance, any values it *had* read
successfully so far, were stored as a list instead of string! Later
`get` calls would raise "AttributeError: 'list' object has no attribute
'find'" from somewhere deep in the interpolation code.

(cherry picked from commit b1bc37597f)
2024-03-19 18:18:50 +01:00
Tian Gao
688623d402
[3.12] gh-116735: Use MISSING for CALL event if argument is absen… (#116873)
[3.12] gh-116735: Use `MISSING` for `CALL` event if argument is absent (GH-116737)
2024-03-19 17:00:54 +00:00
Miss Islington (bot)
5da6e3082c
[3.12] gh-116869: Make C API compatible with ISO C90 (GH-116950) (#117011)
gh-116869: Make C API compatible with ISO C90 (GH-116950)

Make the C API compatible with -Werror=declaration-after-statement
compiler flag again.
(cherry picked from commit a9c304cf02)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-03-19 16:06:15 +00:00
Miss Islington (bot)
1627c1ee01
[3.12] gh-107607: Update comment about utf-8 BOM being ignored (GH-107858) (#117016)
(cherry picked from commit 7f64ae30dd)
Co-authored-by: Terry Jan Reedy tjreedy@udel.edu
2024-03-19 12:00:40 -04:00
Victor Stinner
35e8f04f1b
[3.12] gh-90872: Fix subprocess.Popen.wait() for negative timeout (#116989) (#117002)
gh-90872: Fix subprocess.Popen.wait() for negative timeout (#116989)

On Windows, subprocess.Popen.wait() no longer calls
WaitForSingleObject() with a negative timeout: pass 0 ms if the
timeout is negative.

(cherry picked from commit 27cf3ed00c)
2024-03-19 14:15:05 +00:00
Miss Islington (bot)
23f97327fe
[3.12] gh-105866: fix dataclass with slots=True, weakref_slot=True (GH-105870) (GH-116978)
(cherry picked from commit a22d05f04c)

Co-authored-by: Aviel Boag <avboag@gmail.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Carl Meyer <carl@oddbird.net>
2024-03-19 11:57:31 +01:00
Miss Islington (bot)
e1f890828e
[3.12] Bump GitHub Actions (GH-116944) (#116948)
(cherry picked from commit 3a99f5c5f3)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-03-19 11:56:03 +01:00
Miss Islington (bot)
547e8827e6
[3.12] gh-90535: Fix support of interval>1 in logging.TimedRotatingFileHandler (GH-116220) (GH-116892)
Fix support of interval values > 1 in logging.TimedRotatingFileHandler
for when='MIDNIGHT' and when='Wx'.
(cherry picked from commit 269051d20e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-03-18 19:47:26 +02:00
Miss Islington (bot)
6383b14957
[3.12] gh-116881: Remove erroneous or redundant grammar NULL (GH-116885) (#116951)
In Lexical Analysis f-strings section, NULL in the description
of 'literal character' means '\0'.  In the format_spec grammar
production, it is wrong with that meaning and redundant if
instead interpreted as <nothing>.  Remove it there.
(cherry picked from commit 4e45c6c54a)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-03-18 10:37:26 -04:00
Miss Islington (bot)
1c0c6c91af
[3.12] gh-115874: Don't use module state in teedataobject tp_dealloc (GH-116204) (#116955)
(cherry picked from commit e2fcaf19d3)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2024-03-18 12:40:34 +00:00
Antoine Pitrou
25243b1461
[3.12] gh-112536: Add TSAN build on Github Actions (GH-116872)
(cherry picked from commit 20578a1f68)

Co-authored-by: Donghee Na <donghee.na@python.org>
2024-03-18 09:52:54 +00:00
Antoine Pitrou
fcb230180f
[3.12] gh-112536: Add --tsan test for reasonable TSAN execution times. (gh-116601) (#116929)
(cherry picked from commit ebf29b3)

Co-authored-by: Donghee Na <donghee.na@python.org>
2024-03-18 10:22:19 +01:00
Antoine Pitrou
2ac1b48a04
[3.12] gh-112536: Add support for thread sanitizer (TSAN) (gh-112648) (#116924)
* [3.12] gh-112536: Add support for thread sanitizer (TSAN) (gh-112648)
(cherry picked from commit 88cb972000)

* Remove doc for configure option (leave it hidden in this branch)

---------

Co-authored-by: Samet YASLAN <sametyaslan@gmail.com>
2024-03-17 16:33:35 +01:00
Nikita Sobolev
2dbc77e1ec
[3.12] gh-116780: Fix test_inspect in -OO mode (GH-116788) (#116799) 2024-03-17 13:33:38 +03:00
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