Commit graph

123168 commits

Author SHA1 Message Date
Victor Stinner
d432fa43b9
[3.13] Fix typos (#123775) (#123866)
Fix typos (#123775)

(cherry picked from commit 9017b95ff2)

Co-authored-by: algonell <algonell@gmail.com>
2024-10-07 23:44:31 +02:00
Miss Islington (bot)
2a40dda89d
[3.13] gh-95468: Add more tests for "--" (double dash) in test_argparse (GH-124274) (GH-125068)
(cherry picked from commit baa3550bc3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-07 21:40:47 +00:00
Miss Islington (bot)
970f3b73d2
[3.13] gh-124842: Fix test.support.import_helper.make_legacy_pyc() (GH-124843) (GH-124853)
For source file "path/to/file.py" it created file with incorrect path
"/absolute/path/to/path/to/file.pyc" instead of "path/to/file.pyc".
(cherry picked from commit 60ff67d010)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-08 00:29:54 +03:00
Miss Islington (bot)
4a9a359f32
[3.13] gh-61181: Fix support of choices with string value in argparse (GH-124578) (GH-124755)
Substrings of the specified string no longer considered valid values.
(cherry picked from commit f1a2417b9e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-08 00:28:17 +03:00
Miss Islington (bot)
11d4b54b88
[3.13] gh-116850: Fix argparse for namespaces with not directly writable dict (GH-124667) (GH-124757)
It now always uses setattr() instead of setting the dict item to modify
the namespace. This allows to use a class as a namespace.
(cherry picked from commit 95e92ef6c7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-08 00:27:11 +03:00
Miss Islington (bot)
597b6211ab
[3.13] gh-124345: Support abbreviated single-dash long options with = in argparse (GH-124428) (GH-124753)
(cherry picked from commit 61180446ee)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-08 00:26:37 +03:00
Miss Islington (bot)
f28906e58e
[3.13] gh-80259: Fix conflict between type and default=SUPPRESS in argparse (GH-124519) (GH-124751)
type() no longer called for SUPPRESS.

This only affects positional arguments with nargs='?'.
(cherry picked from commit 9bcadf589a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-08 00:26:00 +03:00
Miss Islington (bot)
aa648c21e9
[3.13] gh-104860: Fix allow_abbrev=False for single-dash long options (GH-124340) (GH-124749)
(cherry picked from commit 49e105f948)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-08 00:25:13 +03:00
Miss Islington (bot)
16127de2eb
[3.13] gh-59317: Improve parsing optional positional arguments in argparse (GH-124303) (GH-124436)
Fix parsing positional argument with nargs equal to '?' or '*' if it is
preceded by an option and another positional argument.
(cherry picked from commit 4a5e4aade4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-08 00:24:31 +03:00
Miss Islington (bot)
03ae82d0d3
[3.13] gh-124188: Fix PyErr_ProgramTextObject() (GH-124189) (GH-124423)
* Detect source file encoding.
* Use the "replace" error handler even for UTF-8 (default) encoding.
* Remove the BOM.
* Fix detection of too long lines if they contain NUL.
* Return the head rather than the tail for truncated long lines.
(cherry picked from commit e2f710792b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-08 00:23:49 +03:00
Miss Islington (bot)
167d8d2f07
[3.13] gh-63143: Fix parsing mutually exclusive arguments in argparse (GH-124307) (GH-124418)
Arguments with the value identical to the default value (e.g. booleans,
small integers, empty or 1-character strings) are no longer considered
"not present".
(cherry picked from commit 3094cd17b0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-08 00:20:31 +03:00
Miss Islington (bot)
63870162f4
[3.13] gh-81691: Fix handling of multiple "--" (double dashes) in argparse (GH-124233) (GH-124266)
Only the first one has now been removed, all subsequent ones are now
taken literally.
(cherry picked from commit aae126748f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-08 00:12:28 +03:00
Miss Islington (bot)
6fe746d702
[3.13] gh-122392: IDLE - Fix overlapping lines in browsers (GH-122392) (GH-124975) (#125061)
gh-122392: IDLE - Fix overlapping lines in browsers (GH-122392) (GH-124975)

Increase currently inadequate vertical spacing for the IDLE browsers (path,
module, and stack) on high-resolution monitors.
---------

(cherry picked from commit c5df1cb7bd)

Co-authored-by: Zhikang Yan <2951256653@qq.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-10-07 19:25:26 +00:00
Miss Islington (bot)
80ba17a3dd
[3.13] gh-112804: Clamping timeout value for _PySemaphore_PlatformWait (gh-124914) (gh-124991)
gh-112804: Clamping timeout value for _PySemaphore_PlatformWait (gh-124914)

* gh-112804: Clamping timeout value for _PySemaphore_PlatformWait

* Address code review

* nit
(cherry picked from commit a5fc50994a)

Co-authored-by: Donghee Na <donghee.na@python.org>
2024-10-07 16:53:32 +00:00
Thomas Wouters
8bc8d21ac7 Post 3.13.0 2024-10-07 17:22:36 +02:00
Thomas Wouters
60403a5409 Python 3.13.0 2024-10-07 07:02:14 +02:00
Miss Islington (bot)
8c80a26078
[3.13] GH-109975: Announce final release in What's New in Python 3.13 (GH-125007) (#125033)
Prepare What's New in Python 3.13 for final release
(cherry picked from commit 31516c98dd)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-07 04:48:13 +00:00
Miss Islington (bot)
626b4a824e
[3.13] gh-125025: _thread docs: fix/update the *caveats* list (GH-125026) (#125032)
gh-125025: `_thread` docs: fix/update the *caveats* list (GH-125026)
(cherry picked from commit 1e098dc766)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
2024-10-06 21:43:16 -07:00
Miss Islington (bot)
d7e4c790ff
[3.13] Doc: Simplify the definition of 'soft deprecated' (GH-124988) (#125029)
Doc: Simplify the definition of 'soft deprecated' (GH-124988)
(cherry picked from commit feca4cf64e)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-10-06 16:04:43 -07:00
Miss Islington (bot)
b30da225cf
[3.13] gh-125008: Fix tokenize.untokenize roundtrip for \n{{ (GH-125013) (#125020) 2024-10-06 13:39:47 +00:00
Miss Islington (bot)
b87aea6b0d
[3.13] gh-124871: fix 'visited' tracking in compiler's reachability analysis (GH-124952) (#124977)
gh-124871: fix 'visited' tracking in compiler's reachability analysis (GH-124952)
(cherry picked from commit f474391b26)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-10-04 15:34:20 -07:00
Miss Islington (bot)
dd4e62e35f
[3.13] gh-109975: Suggest `pynntp instead of nntplib` (GH-124830) (#124966)
gh-109975: Suggest ``pynntp`` instead of ``nntplib`` (GH-124830)

The ``nntplib`` library has been deleted from PyPI by its author.
(cherry picked from commit ac9648243d)

Co-authored-by: Christian Clauss <cclauss@me.com>
2024-10-04 15:31:51 -07:00
Miss Islington (bot)
ff0ab0eb3f
[3.13] gh-121982: `csv: Add a test case for invalid quoting` constant. (GH-121983) (#124926)
gh-121982: ``csv``: Add a test case for invalid ``quoting`` constant. (GH-121983)

Test invalid quoting constant

(cherry picked from commit 656b7a3c83)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-10-03 09:27:28 -07:00
Miss Islington (bot)
aa6cf9b402
[3.13] gh-122864: Fix a `test_funcattrs.test___builtins__` when executing directly (GH-124845) (#124884)
gh-122864: Fix a ``test_funcattrs.test___builtins__`` when executing directly (GH-124845)

Previously when executing ``test_functattrs.test___builtins__`` directly, it failed because the fact, that ``__builtins__`` is refers to the built-in module ``builtins`` while it's expects a ``__builtins__.__dict__``. But when this test is being run from another module, then ``__builtins__`` is refers to ``builtins.__dict__``. Now this part of the behaviour is covered.
---------

(cherry picked from commit 8fbf10d6cf)

Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2024-10-03 09:26:15 -07:00
Miss Islington (bot)
45dedab674
[3.13] Highlight datetime.timedelta.seconds vs .total_seconds() in docs. (GH-124811) (#124862)
Highlight `datetime.timedelta.seconds` vs `.total_seconds()` in docs. (GH-124811)

Thanks to the reviewers for suggesting the use of a "caution" section instead of "warning" or "note".
(cherry picked from commit d150e4abcf)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-10-03 09:25:12 -07:00
Miss Islington (bot)
4ff32aac9e
[3.13] gh-124370: Add "howto" for free-threaded Python (GH-124371) (#124860)
gh-124370: Add "howto" for free-threaded Python (GH-124371)
(cherry picked from commit 68e384c217)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: mpage <mpage@cs.stanford.edu>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-10-03 09:24:42 -07:00
Miss Islington (bot)
1869e82757
[3.13] GH-109975: Copyedit 3.13 What's New: Link to installing free-threaded binaries on macOS (GH-124831) (#124833)
GH-109975: Copyedit 3.13 What's New: Link to installing free-threaded binaries on macOS (GH-124831)
(cherry picked from commit 4129a74a37)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-03 09:21:38 -07:00
Miss Islington (bot)
ceb90d8d04
[3.13] GH-109975: Copyedit 3.13 What's New: Note delayed expected release date for Python 3.13.0 (GH-124827) (#124828)
GH-109975: Copyedit 3.13 What's New: Note delayed expected release date for Python 3.13.0 (GH-124827)

Note delayed expected release date of 3.13.0
(cherry picked from commit 8823690264)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-03 09:20:28 -07:00
Miss Islington (bot)
4392c5980d
[3.13] Doc: Fix archive filenames for standard builds (GH-124826) (#124836)
Doc: Fix archive filenames for standard builds (GH-124826)
(cherry picked from commit 91e64be731)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-03 09:19:14 -07:00
Miss Islington (bot)
bde4ae10ba
[3.13] gh-115145: Update documentation about `PyThreadState_DeleteCurrent` (gh-124920) (#124930)
gh-115145: Update documentation about ``PyThreadState_DeleteCurrent`` (gh-124920)
(cherry picked from commit 9eeb21bf76)

Co-authored-by: Donghee Na <donghee.na@python.org>
2024-10-03 08:54:56 -07:00
Thomas Wouters
e6fb7fa76b Post 3.13.0rc3 2024-10-01 16:15:44 +02:00
Thomas Wouters
fae84c70fb Python 3.13.0rc3 2024-10-01 04:03:08 +02:00
Jelle Zijlstra
b99c6620b2
[3.13] gh-124442: make __static_attributes__ deterministic by sorting (GH-124492) (#124738)
* [3.13] gh-124442: make `__static_attributes__` deterministic by sorting (GH-124492)
(cherry picked from commit 04c837d9d8)

Co-authored-by: Kira <kp2pml30@gmail.com>
Signed-off-by: kp2pml30 <kp2pml30@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-30 18:53:17 -07:00
Miss Islington (bot)
b843974ab4
[3.13] gh-124785: Revert "gh-116510: Fix crash due to shared immortal interned strings (gh-124646)" (gh-124807) (#124812)
gh-124785: Revert "gh-116510: Fix crash due to shared immortal interned strings (gh-124646)" (gh-124807)

Revert "gh-116510: Fix crash due to shared immortal interned strings. (gh-124646)"

This reverts commit 98b2ed7e23.
(cherry picked from commit 7bdfabe2d1)

Co-authored-by: T. Wouters <thomas@python.org>
2024-09-30 18:38:26 -07:00
T. Wouters
e0eb44ad49
[3.13] GH-124567: Revert the Incremental GC in 3.13 (#124770)
Revert the incremental GC in 3.13, since it's not clear that without further turning, the benefits outweigh the costs.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-30 21:27:29 +00:00
Miss Islington (bot)
bc1fae89af
[3.13] Doc: Run HTML and non-HTML daily builds separately (GH-124493) (#124790)
Doc: Run HTML and non-HTML daily builds separately (GH-124493)
(cherry picked from commit cce1125574)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-30 13:59:53 -07:00
Miss Islington (bot)
4f3e96f7c2
[3.13] gh-124613, regrtest: Detect JIT in build info (GH-124793) (#124797)
gh-124613, regrtest: Detect JIT in build info (GH-124793)
(cherry picked from commit e44eebfc1e)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-09-30 13:52:59 -07:00
Miss Islington (bot)
44ba11a204
[3.13] gh-124642: Dictionaries aren't marking objects as weakref'd (GH-124643) (#124798)
gh-124642: Dictionaries aren't marking objects as weakref'd (GH-124643)

Dictionaries aren't marking objects as weakref'd
(cherry picked from commit 077e7ef6a0)

Co-authored-by: Dino Viehland <dinoviehland@meta.com>
2024-09-30 13:51:24 -07:00
Miss Islington (bot)
fe58596cce
[3.13] Doc: Fix default `latex_elements['papersize']` (GH-124525) (#124725)
Doc: Fix default ``latex_elements['papersize']`` (GH-124525)

https://www.sphinx-doc.org/en/master/latex.htmlGH-the-latex-elements-configuration-setting

It should be 'letterpaper' or 'a4paper' not 'letter' or 'a4'
(not to be confused with PAPER env variable).
(cherry picked from commit fae5058ec1)

Co-authored-by: Jean-François B <2589111+jfbu@users.noreply.github.com>
2024-09-29 21:23:06 -07:00
Miss Islington (bot)
243db20b75
[3.13] gh-123811: test that round() can return signed zero (GH-123829) (#123938)
gh-123811: test that round() can return signed zero (GH-123829)
(cherry picked from commit d2b9b6f919)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-09-29 21:22:13 -07:00
Serhiy Storchaka
5bf32d1300
[3.13] gh-123339: Fix cases of inconsistency of __module__ and __firstlineno__ in classes (GH-123613) (#124735)
* Setting the __module__ attribute for a class now removes the
  __firstlineno__ item from the type's dict.
* The _collections_abc and _pydecimal modules now completely replace the
  collections.abc and decimal modules after importing them. This
  allows to get the source of classes and functions defined in these
  modules.
* inspect.findsource() now checks whether the first line number for a
  class is out of bound.
(cherry picked from commit 69a4063ca5)
2024-09-29 21:21:40 -07:00
Miss Islington (bot)
ce0eaa6703
[3.13] gh-124722: Fix leak in test_detach_materialized_dict_no_memory (GH-124769) (#124777)
gh-124722: Fix leak in `test_detach_materialized_dict_no_memory` (GH-124769)
(cherry picked from commit 6f4d64b048)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-09-29 21:18:24 -07:00
Miss Islington (bot)
a1a4cfcc8e
[3.13] gh-123826: Fix unused function warnings in mimalloc on NetBSD (GH-123827) (#123875)
gh-123826: Fix unused function warnings in mimalloc on NetBSD (GH-123827)
(cherry picked from commit 4a6b1f1796)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2024-09-30 01:58:09 +00:00
Sergey B Kirpichev
62e54ddc05
[3.13] gh-121039: add Floats/ComplexesAreIdenticalMixin to test.support.testcase (GH-121071) (#123840)
* [3.13] gh-121039: add Floats/ComplexesAreIdenticalMixin to test.support.testcase (GH-121071)
(cherry picked from commit 8ef8354ef1)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>

* +1
2024-09-29 18:27:23 -07:00
Miss Islington (bot)
25a23cb002
[3.13] gh-123823: Fix test_posix for unsupported posix_fallocate on NetBSD (GH-123824) (#123864)
gh-123823: Fix test_posix for unsupported posix_fallocate on NetBSD (GH-123824)

Fix test_posix for unsupported posix_fallocate on NetBSD.
(cherry picked from commit df4f0cbfad)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2024-09-29 18:26:50 -07:00
Miss Islington (bot)
3fd3b8a678
[3.13] gh-123915: Ensure that Windows AMD64 and ARM64 release builds use different directories (GH-123918) (#123921)
gh-123915: Ensure that Windows AMD64 and ARM64 release builds use different directories (GH-123918)
(cherry picked from commit 00ffdf2736)

Co-authored-by: adang1345 <adang1345@gmail.com>
2024-09-29 18:25:09 -07:00
Miss Islington (bot)
612e469624
[3.13] gh-123892: Add "_wmi" to sys.stdlib_module_names (GH-123893) (#123896)
gh-123892: Add "_wmi" to sys.stdlib_module_names (GH-123893)
(cherry picked from commit fb1b51a58d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-09-29 18:24:55 -07:00
Miss Islington (bot)
601ef402fd
[3.13] gh-123881: Add additional test coverage for PEP 695 edge cases (GH-123886) (#123890)
gh-123881: Add additional test coverage for PEP 695 edge cases (GH-123886)
(cherry picked from commit b52de7e02d)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-09-29 18:24:40 -07:00
Miss Islington (bot)
4c3d537531
[3.13] gh-77894: Fix a crash when the GC breaks a loop containing a memoryview (GH-123898) (#123936)
gh-77894: Fix a crash when the GC breaks a loop containing a memoryview (GH-123898)

Now a memoryview object can only be cleared if there are no buffers
that refer it.
(cherry picked from commit a1dbf2ea69)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-09-29 18:23:42 -07:00
Miss Islington (bot)
8b9bd43d40
[3.13] gh-123919: Fix null handling in _freeze_module.c (GH-123920) (#123948)
gh-123919: Fix null handling in `_freeze_module.c` (GH-123920)
(cherry picked from commit c8d1dbef5b)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-09-29 18:22:15 -07:00