Commit graph

123870 commits

Author SHA1 Message Date
Miss Islington (bot)
6041dba911
[3.13] gh-130130: Clarify hash=False docs in dataclasses.field (GH-130324) (#130337)
gh-130130: Clarify `hash=False` docs in `dataclasses.field` (GH-130324)
(cherry picked from commit 47ace53995)

Co-authored-by: Sabfo <alpha.sabfo@gmail.com>
2025-02-20 07:51:39 +00:00
Miss Islington (bot)
439cba75d9
[3.13] gh-130293: Ensure test__colorize will pass on dumb terminals. (GH-130333) (#130334)
Ensure colorize tests will run on dumb terminals (or environment with TERM=dumb set)

(cherry picked from commit 1b070060c0)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-02-20 07:12:56 +00:00
Miss Islington (bot)
46237d19d9
[3.13] gh-130250: fix cleanup in test (impacts refleaks runs) (GH-130329) (#130330)
gh-130250: fix cleanup in test (impacts refleaks runs) (GH-130329)
(cherry picked from commit c718c6be0f)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2025-02-20 02:00:49 +00:00
Miss Islington (bot)
d172415a4e
[3.13] gh-130250: fix regression in traceback.print_last (GH-130318) (#130325)
gh-130250: fix regression in traceback.print_last (GH-130318)
(cherry picked from commit 6c982aeb54)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2025-02-19 22:06:43 +00:00
Miss Islington (bot)
6c92424b94
[3.13] gh-122876: Fix "End of lines" typo (GH-125310) (#130315)
Co-authored-by: za <za@python.or.id>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-19 21:23:49 +02:00
Tian Gao
094394a380
[3.13] gh-128396: Fix a crash when inline comprehension has the same … (#130311)
[3.13] gh-128396: Fix a crash when inline comprehension has the same local variable as the outside scope (GH-130235)
(cherry picked from commit ccf17323c2)
2025-02-19 17:40:03 +00:00
Miss Islington (bot)
5907cd6829
[3.13] Docs: Upgrade Sphinx to 8.2 (GH-130171) (#130289)
Docs: Upgrade Sphinx to 8.2 (GH-130171)
(cherry picked from commit 736ad664e0)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-02-18 23:51:48 +00:00
sobolevn
57e8b0cbee
[3.13] gh-130160: use option instead of cmdoption in dis.rst (GH-130255) (#130264)
(cherry picked from commit 97d0011e7e)
2025-02-18 13:55:30 +00:00
Miss Islington (bot)
a273543444
[3.13] gh-130160: use .. program:: directive for documenting ensurepip CLI (gh-130253) (gh-130259)
gh-130160: use `.. program::` directive for documenting `ensurepip` CLI (gh-130253)
(cherry picked from commit 8cd7f8bf8d)

Co-authored-by: Kanishk Pachauri <itskanishkp.py@gmail.com>
2025-02-18 12:51:33 +00:00
Miss Islington (bot)
5d83b6c160
[3.13] gh-130230: Fix crash in pow() with only Decimal third argument (GH-130237) (GH-130246)
(cherry picked from commit b93b7e566e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-02-18 13:18:37 +02:00
Miss Islington (bot)
fc1c9f884e
[3.13] gh-130214: Document PyEllipsis_Type (GH-130215) (#130223)
gh-130214: Document `PyEllipsis_Type` (GH-130215)
(cherry picked from commit fc8c99a8ce)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-02-17 19:23:42 +03:00
Miss Islington (bot)
d78e113d1b
gh-128703: Fix mimetypes.guess_type for empty Content-Type in registry (GH-128854)
(cherry picked from commit 303043f506)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2025-02-17 15:36:49 +00:00
Stan Ulbrych
320316ef7e
[3.13] gh-82045: Correct and deduplicate "isprintable" docs; add test. (GH-130127)
We had the definition of what makes a character "printable" documented in three places, giving two different definitions.
The definition in the comment on `_PyUnicode_IsPrintable` was inverted; correct that.

With that correction, the two definitions turn out to be equivalent -- but to confirm that, you have to go look up, or happen to know, that those are the only five "Other" categories and only three "Separator" categories in the Unicode character database.  That makes it hard for the reader to tell whether they really are the same, or if there's some subtle difference in the intended semantics.

Fix that by cutting the C API docs' and the C comment's copies of the subtle details, in favor of referring to the Python-level docs. That ensures it's explicit that these are all meant to agree, and also lets us concentrate improvements to the wording in one place.

Speaking of which, borrow some ideas from the C comment, along with other tweaks, to hopefully add a bit more clarity to that one newly-centralized copy in the docs.

Also add a thorough test that the implementation agrees with this definition.

Author:    Greg Price <gnprice@gmail.com>

Co-authored-by: Greg Price <gnprice@gmail.com>
(cherry picked from commit 3402e133ef)
2025-02-17 15:02:39 +01:00
Hugo van Kemenade
fefd2c53f2
[3.13] CI: Use ImageOS (ubuntu24) instead of runner.os (Linux) in cache keys (GH-130200) (#130222) 2025-02-17 13:18:30 +00:00
Miss Islington (bot)
1b2cfb73f9
[3.13] gh-130193: Increase test coverage of gettext.c2py (GH-130208) (GH-130217)
(cherry picked from commit fb2d325725)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-02-17 09:21:00 +00:00
Pieter Eendebak
8f33c7ac17
[3.13] gh-127750: Fix functools.singledispatchmethod() (GH-130029)
Revert gh-107148
2025-02-17 11:12:24 +02:00
Miss Islington (bot)
30ed4523c0
[3.13] gh-86069: Add more PyNumber_InPlacePower() tests (GH-130111) (GH-130211)
Test it with the third argument.
(cherry picked from commit cfe41037eb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-02-17 10:24:59 +02:00
sobolevn
4d941d3fd1
[3.13] gh-129805: Fix bytes annotation in Tools/jit (GH-129806) (#130216)
(cherry picked from commit 422f8e9e02)
2025-02-17 08:21:47 +00:00
Miss Islington (bot)
831695b04c
[3.13] gh-118761: Revert "Improve import time of subprocess (GH-129427)" (GH-130201) (#130204)
gh-118761: Revert "Improve import time of `subprocess` (GH-129427)" (GH-130201)

* Revert "gh-118761: Improve import time of `subprocess` (GH-129427)"

This reverts commit 49f24650e4.
Also known as f502c8f6a6 in 3.13 (PR GH-129447)
Also known as f65aa0d1bf in 3.12 (PR GH-129448)

This caused bugs in the `__del__` finalizer:
 https://github.com/python/cpython/issues/118761#issuecomment-2661504264

---------
(cherry picked from commit ae30646089)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-02-16 19:03:32 +00:00
Miss Islington (bot)
2fcad2a47b
[3.13] gh-130179: Fix persistent_{id,load}_attr reference leaks in _pickle (GH-130180) (#130190)
gh-130179: Fix `persistent_{id,load}_attr` reference leaks in `_pickle` (GH-130180)
(cherry picked from commit e7f00cd14f)

Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-02-16 14:22:23 +00:00
Miss Islington (bot)
ff92f6b228
[3.13] gh-130185: Fix unintentionally skipped tests in test_functools (GH-130186) (#130188)
gh-130185: Fix unintentionally skipped tests in `test_functools` (GH-130186)
(cherry picked from commit 73d03005b0)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-02-16 13:57:27 +00:00
Miss Islington (bot)
945dcb05ce
[3.13] gh-127488: Add tests for Tools/i18n/msgfmt.py (GH-127540) (GH-130182)
(cherry picked from commit 361083b84b)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-02-16 13:20:49 +00:00
Miss Islington (bot)
5d240c7bb8
[3.13] gh-130177: Fix unintentionally skipped tests in test_gettext (GH-130178) (GH-130183)
(cherry picked from commit 2e8044a4f7)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-02-16 12:36:23 +00:00
Miss Islington (bot)
5740b95076
[3.13] gh-130169: Fix broken list markup in Doc/c-api/function.rst (GH-130174) (#130175)
gh-130169: Fix broken list markup in `Doc/c-api/function.rst` (GH-130174)
(cherry picked from commit 9837c2a214)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-02-16 11:01:45 +00:00
Miss Islington (bot)
1a7b8c0f4d
[3.13] gh-130145: fix loop.run_forever when loop is already running (GH-130146) (#130147)
gh-130145: fix `loop.run_forever` when loop is already running (GH-130146)
(cherry picked from commit a545749b0e)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-02-15 09:55:08 +00:00
Miss Islington (bot)
692d36f1fc
Doc: update term "namespace package" (GH-129251)
(cherry picked from commit e65e9f9062)
2025-02-15 15:10:24 +09:00
Miss Islington (bot)
e5ee784a7c
[3.13] gh-130106: Fix a typo in unittest.mock doc (GH-130107) (#130143)
gh-130106: Fix a typo in unittest.mock doc (GH-130107)
(cherry picked from commit d2e60d8e59)

Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్  రెడ్డి) <thatiparthysreenivas@gmail.com>
2025-02-15 03:37:05 +00:00
Andrew Svetlov
7b0543ebe6
[3.13] gh-128308: pass **kwargs to asyncio task_factory (GH-128768) (#130084)
* [3.13] gh-128308: pass `**kwargs` to asyncio task_factory (GH-128768)
(cherry picked from commit 38a9956876)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>


---------

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-02-14 22:04:17 +05:30
Miss Islington (bot)
9e23e0ad2c
[3.13] Update manpage environment variables and command line arguments (GH-129623) (#130078)
Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-13 16:42:21 +02:00
Miss Islington (bot)
32158ea476
[3.13] gh-130025: Correct handling of symlinks during iOS testbed framework installation. (GH-130026) (#130073)
Correct handling of symlinks during iOS testbed framework installation.
(cherry picked from commit 625470a7d2)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-02-13 14:47:05 +08:00
Miss Islington (bot)
a76aff6ea4
[3.13] gh-129693: Suppress SyntaxWarning in test_fstring (GH-129830) (#130068)
gh-129693: Suppress `SyntaxWarning` in test_fstring (GH-129830)

Suppress SyntaxWarning in test_fstring
(cherry picked from commit 2dd018848c)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-02-13 02:03:00 +00:00
Pablo Galindo Salgado
8d1d36b742
[3.13] gh-116042: Fix location for SyntaxErrors of invalid escapes in the tokenizer (GH-116049) (#130066)
(cherry picked from commit 56eda25633)
(cherry picked from commit 369704b428)
2025-02-13 01:49:25 +00:00
Miss Islington (bot)
4c2a59b7b8
[3.13] gh-129912: Fix references to Py_TPFLAGS_MANAGED_DICT (gh-130044) (gh-130059)
(cherry picked from commit 791cdfe141)

Co-authored-by: Satyam Kumar <isatyamks@gmail.com>
2025-02-12 22:56:02 +00:00
Sam Gross
2fbc9861c3
[3.13] gh-128759: Fix accesses to tp_version_tag. (GH-129750) (GH-130042)
We should use a relaxed atomic load in the free threading build in
`PyType_Modified()` because that's called without the type lock held.
It's not necessary to use atomics in `type_modified_unlocked()`.

We should also use `FT_ATOMIC_STORE_UINT_RELAXED()` instead of the
`UINT32` variant because `tp_version_tag` is declared as `unsigned int`.
(cherry picked from commit 57f45ee2d8)
2025-02-12 10:43:25 -05:00
Kumar Aditya
4cb251d06f
[3.13] gh-129983: fix data race in compile_template in sre.c (#130038)
gh-129983: fix data race in compile_template in sre.c (#130015)

(cherry picked from commit 3cf68cdd3e)

Co-authored-by: Tomasz Pytel <tompytel@gmail.com>
2025-02-12 13:33:56 +00:00
Miss Islington (bot)
fbe18bdc9a
[3.13] gh-59149: Setup documentation for IDLE on Linux and add section in Editors (GH-130003) (#130027)
---------
(cherry picked from commit 555ee43d92)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-02-12 08:24:00 +00:00
Sam Gross
e4d0303c1a
[3.13] gh-128133: use relaxed atomics for hash of bytes (GH-128412) (#130022)
(cherry picked from commit 0706bab1c0)

Co-authored-by: Abhijeet <abhijeetsharma2002@gmail.com>
2025-02-12 02:45:02 +01:00
Sam Gross
ee12a3482d
[3.13] gh-129967: Fix race condition in repr(set) (gh-129978) (gh-130020)
The call to `PySequence_List()` could temporarily unlock and relock the
set, allowing the items to be cleared and return the incorrect
notation `{}` for a empty set (it should be `set()`).

(cherry picked from commit a7427f2db9)

Co-authored-by: T. Wouters <thomas@python.org>
2025-02-11 18:18:12 -05:00
Miss Islington (bot)
36790830cb
[3.13] gh-101100: Docs: Fix some typos in the document (GH-129988) (#129997)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-11 21:37:25 +00:00
Miss Islington (bot)
e5c522e895
[3.13] gh-97850: Update the deprecation warning of importlib.abc.Loader.load_module (GH-129855) (GH-130013)
gh-97850: Update the deprecation warning of `importlib.abc.Loader.load_module` (GH-129855)
(cherry picked from commit aa81a6f6e4)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-02-11 19:28:25 +00:00
Miss Islington (bot)
052632279d
[3.13] gh-128100: Use atomic dictionary load in _PyObject_GenericGetAttrWithDict (GH-128297) (GH-129979)
(cherry picked from commit 47d2cb8eb7)

Co-authored-by: Bogdan Romanyuk <65823030+wrongnull@users.noreply.github.com>
2025-02-10 20:48:24 +00:00
Miss Islington (bot)
a38bacd41f
[3.13] gh-46236: Document PyUnicode_DecodeCodePageStateful (GH-127934) (GH-129961)
gh-46236: Document `PyUnicode_DecodeCodePageStateful` (GH-127934)

(cherry picked from commit 8d9d3e4ecb)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-02-10 17:36:06 +01:00
Miss Islington (bot)
fd665d5f09
[3.13] gh-127712: Fix secure argument of logging.handlers.SMTPHandler (GH-127726) (GH-129955)
(cherry picked from commit d7672e5d5a)
2025-02-10 14:30:31 +00:00
Miss Islington (bot)
7df30bbc49
[3.13] gh-129583: update bundled pip to 25.0.1 (GH-129909) (#129946)
Co-authored-by: Stéphane Bidoul <stephane.bidoul@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2025-02-10 14:03:40 +02:00
Miss Islington (bot)
a00f5a84fd
[3.13] gh-129143: Fix incorrect documentation for logging.Handler.close(). (GH-129950) (GH-129951)
(cherry picked from commit 7c156a63d3)
2025-02-10 11:26:50 +00:00
Miss Islington (bot)
cef406bbc3
[3.13] gh-126554: correct detection of gcc for TestNullDlsym.test_null_dlsym (GH-129872) (#129944)
gh-126554: correct detection of `gcc` for `TestNullDlsym.test_null_dlsym` (GH-129872)

In case gcc is not available, the test will fail with FileNotFoundError.
So catch the exception to skip the test correctly.
(cherry picked from commit 978211c8a8)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Co-authored-by: Peter Marko <peter.marko@siemens.com>
2025-02-10 10:16:28 +00:00
Miss Islington (bot)
dee4f2c2a2
[3.13] gh-68400: Remove outdated 2.7 comment (GH-129919) (#129937)
(cherry picked from commit d9bf3c16e5)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-02-10 05:16:09 +00:00
Erlend E. Aasland
d6daeeeb2f
[3.13] gh-129603: Don't segfault if sqlite3.Row description is None (#129604) (#129923)
(cherry picked from commit 7e6ee50b6b)
2025-02-10 00:21:33 +00:00
Miss Islington (bot)
d26c2fe7a2
[3.13] gh-129870: Skip test_dump_virtual_tables if SQLite lacks FTS4 support (GH-129913) (#129918)
(cherry picked from commit cda83cade0)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-02-09 21:06:16 +00:00
Miss Islington (bot)
26041daf01
[3.13] gh-129892: Doc: Remove unnecessary role directive in graphlib.py (GH-129896) (#129904)
gh-129892: Doc: Remove unnecessary role directive in graphlib.py (GH-129896)

Change `:exec:ValueError` to `ValueError` in `TopologicalSorter.done()` docstring
(cherry picked from commit c53730171f)

Co-authored-by: Nikola Savic <76233425+nikolasavic3@users.noreply.github.com>
2025-02-09 15:47:10 +00:00