Commit graph

29712 commits

Author SHA1 Message Date
Miss Islington (bot)
fa9a369044
[3.14] gh-136437: Document os.path.dirname as accepting only pos-only (GH-136946) (#136947)
gh-136437: Document `os.path.dirname` as accepting only pos-only (GH-136946)
(cherry picked from commit 3224429450)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-07-21 18:29:22 +00:00
Miss Islington (bot)
81edfb7140
[3.14] GH-136874: url2pathname(): discard query and fragment components (GH-136875) (#136942)
GH-136874: `url2pathname()`: discard query and fragment components (GH-136875)

In `urllib.request.url2pathname()`, ignore any query or fragment components
in the given URL.
(cherry picked from commit 80b2d60a51)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2025-07-21 19:08:07 +01:00
Miss Islington (bot)
aa17c39339
[3.14] gh-136437: Document some os.path functions as requiring pos-only (GH-136812) (#136944)
gh-136437: Document some `os.path` functions as requiring pos-only (GH-136812)
(cherry picked from commit b5428bb0e7)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-07-21 18:07:56 +00:00
Miss Islington (bot)
f86a59549b
[3.14] Pedantic rewording of why relative importing doesn't work in main modules (GH-136846) (#136940)
Pedantic rewording of why relative importing doesn't work in main modules (GH-136846)

Pedantically reword the section about relative imports and main modules.
(cherry picked from commit 4b68289ca6)

Co-authored-by: Josh Cannon <joshdcannon@gmail.com>
2025-07-21 09:58:27 -07:00
Miss Islington (bot)
0d87bb66d3
[3.14] gh-121028: Soft-deprecate sys.api_version (GH-136463) (GH-136928)
(cherry picked from commit 658599c15d)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-07-21 12:29:51 +00:00
Miss Islington (bot)
163f532530
[3.14] gh-136882: Update stale link in the basic logging tutorial. (GH-136885) (#136905)
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-07-21 12:04:39 +03:00
Miss Islington (bot)
d0623cbbf5
[3.14] gh-136428: amend UUIDv8 performance improvements (GH-136903) (#136904)
gh-136428: amend UUIDv8 performance improvements (GH-136903)

UUIDv8 has been added in Python 3.14.0a2 and its construction time
has been improved in Python 3.14.0a4, but since those changes will
not be visible when comparing the latest Python 3.13 and 3.14 together,
we do not document them on the What's New page to avoid confusion.
(cherry picked from commit 5798348a07)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-07-21 08:29:52 +00:00
Miss Islington (bot)
17c5959aa3
[3.14] GH-130645: Default to color help in argparse (GH-136809) (#136886)
GH-130645: Default to color help in argparse (GH-136809)
(cherry picked from commit acbe896cb1)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-07-20 15:22:53 -07:00
Miss Islington (bot)
2caae152b9
[3.14] gh-86608: Improve and restructure tarfile examples (GH-121771) (#136866)
gh-86608: Improve and restructure tarfile examples (GH-121771)

Add an example on how to write a tarfile to stdout; general improvements.
(cherry picked from commit cc81b4e501)

Co-authored-by: Dominic H <dom@dominic.sk>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-07-20 14:16:19 +01:00
Miss Islington (bot)
ee37365e0d
[3.14] gh-136854: Exit on error in make venv (GH-136856) (#136860)
Co-authored-by: Nacho Caballero <nachocab@gmail.com>
Co-authored-by: Nacho Caballero <nacho.caballero@astrazeneca.com>
2025-07-20 12:13:48 +00:00
Miss Islington (bot)
2cb3b534e7
[3.14] gh-108362: Retarget incremental GC changes to 3.14 (GH-125453) (#136851)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-07-20 14:28:17 +03:00
Miss Islington (bot)
cce38eefd4
[3.14] Doc/c-api/memory.rst: extend --without-pymalloc doc with ASan information (GH-136790) (GH-136798)
Extend the documentation for disabling pymalloc with the `--without-pymalloc` flag regarding why it is worth to use it when enabling AddressSanitizer for Python build (which is done, e.g., in CPython's CI builds).

I have tested the CPython latest main build with both ASan and pymalloc enabled and it seems to work just fine. I did run the `python -m test` suite which didn't uncover any ASan crashes (though, it detected some memory leaks, which I believe are irrelevant here).

I have discussed ASan and this flag with @encukou on the CPython Core sprint on EuroPython 2025. We initially thought that the `--without-pymalloc` flag is needed for ASan builds due to the fact pymalloc must hit the begining of page when determining if the memory to be freed comes from pymalloc or was allocated by the system malloc. In other words, we thought, that ASan would crash CPython during free of big objects (allocated by system malloc). It may be that this was the case in the past, but it is not the case anymore as the `address_in_range` function used by pymalloc is annotated to be skipped from the ASan instrumentation.


(cherry picked from commit d19bb44713)

Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-07-20 10:55:06 +02:00
Miss Islington (bot)
f8af7cb723
[3.14] gh-136752: Clarify documentation for `IPv{N}Address.is_reserved` (GH-136794) (#136827)
gh-136752: Clarify documentation for ``IPv{N}Address.is_reserved`` (GH-136794)
(cherry picked from commit 6293d8a1a6)

Co-authored-by: Matthieu Lienart <50069805+mlnrt@users.noreply.github.com>
Co-authored-by: Matthieu Lienart <matthieu.lienart@axians.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-07-19 14:50:30 +00:00
Miss Islington (bot)
8d063f3d92
[3.14] gh-54732: Make argparse error caused by empty rows in option files explicit (GH-136795) (#136818)
gh-54732: Make argparse error caused by empty rows in option files explicit (GH-136795)
(cherry picked from commit 8ffc3ef01e)

Co-authored-by: jdunter <2ve@mailbox.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-07-19 14:28:52 +00:00
Miss Islington (bot)
03457ca2ac
[3.14] gh-135730: Clarify multiprocessing.Queue close() documentation (GH-136803) (GH-136806)
gh-135730: Clarify multiprocessing.Queue close() documentation (GH-136803)

Add a copy of the text from SimpleQueue.close()

---------
(cherry picked from commit f575588ccf)

Co-authored-by: aggshruti99 <aggshruti99@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-07-19 14:57:52 +02:00
Miss Islington (bot)
8b4275c99a
[3.14] gh-136769: Include fixed-width integers in the fundamental data types table (GH-136784) (#136785)
gh-136769: Include fixed-width integers in the fundamental data types table (GH-136784)

Fixed-sized types, like ``c_int32``, are currently missing from the fundamental data types table
in the ``ctypes`` documentation. This commit adds them, and  notes that ``c_[u]int8`` is an alias
of ``c_[u]byte``.
(cherry picked from commit acefb978dc)

Co-authored-by: Sina Zel taat <111974143+SZeltaat@users.noreply.github.com>
2025-07-19 10:26:22 +00:00
Miss Islington (bot)
ba6ea7c53d
[3.14] gh-74598: document that fnmatch.filterfalse is affected by cache limitation (GH-136781) (#136782)
gh-74598: document that `fnmatch.filterfalse` is affected by cache limitation (GH-136781)
(cherry picked from commit 263e451c41)

Co-authored-by: Gergely Elias <gergely.elias@gmail.com>
2025-07-19 09:56:55 +00:00
Miss Islington (bot)
aeeacdb8b5
[3.14] Docs: Improve example for `itertools.batched()` (GH-136775) (#136778)
Docs: Improve example for ``itertools.batched()`` (GH-136775)

The current example `batched('ABCDEFG', n=3) → ABC DEF G` can confuse readers because both, the size of the tuples and the number of tuples are 3.
By using a batch size of n=2, it is clearer that the `n` argument refers to the size of the resulting tuples.
I.e. the new example is: `batched('ABCDEFG', n=2) → AB CD EF G`
(cherry picked from commit 3eecc72ac7)

Co-authored-by: RafaelWO <38643099+RafaelWO@users.noreply.github.com>
2025-07-19 09:36:35 +00:00
Miss Islington (bot)
2ea3b75200
[3.14] gh-136697: Use the standard audit event format for sys.monitoring docs (GH-136747) (#136749)
gh-136697: Use the standard audit event format for sys.monitoring docs (GH-136747)
(cherry picked from commit 28937d3a21)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2025-07-17 12:00:09 -07:00
Miss Islington (bot)
2ce207108c
[3.14] Improved venv docs to indicate that isolation is the default. (GH-136698) (GH-136705)
(cherry picked from commit 8e2f4b4483)
Co-authored-by: Facundo Batista <facundo@taniquetil.com.ar>
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2025-07-17 11:24:54 +01:00
Miss Islington (bot)
6943d8ef27
[3.14] gh-126548: Add a thread-unsafety warning for importlib.reload() (GH-136704) (GH-136723)
gh-126548: Add a thread-unsafety warning for `importlib.reload()` (GH-136704)
(cherry picked from commit 69d8fe50dd)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2025-07-16 16:40:11 +00:00
Miss Islington (bot)
323974295d
[3.14] Fix index entry and anchor for module.__test__ (GH-136674) (GH-136688)
It was "doctest.module attribute". Now it is "module attribute".
(cherry picked from commit 7689407fa4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-07-15 15:58:52 +00:00
Miss Islington (bot)
c939963b53
[3.14] gh-136682: Remove incorrect statement that os.path.samestat accepts file-like objects (GH-136683) (#136684)
gh-136682: Remove incorrect statement that `os.path.samestat` accepts file-like objects (GH-136683)
(cherry picked from commit 7e10a103df)

Co-authored-by: Ran Benita <ran@unusedvar.com>
2025-07-15 12:59:38 +00:00
Miss Islington (bot)
45b72c447c
[3.14] gh-72570: mention the incompatibility of XOFs with HMAC (GH-136676) (#136678)
gh-72570: mention the incompatibility of XOFs with HMAC (GH-136676)
(cherry picked from commit a02cf19dee)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-07-15 12:09:54 +00:00
Miss Islington (bot)
088d79e3ee
[3.14] gh-136663: fix signatures of PyFloat_Pack/Unpack in docs (GH-136664) (#136666)
gh-136663: fix signatures of PyFloat_Pack/Unpack in docs (GH-136664)
(cherry picked from commit e4654e0b3e)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-07-15 05:36:47 +00:00
Miss Islington (bot)
55eaaab8a4
[3.14] gh-116738: Make grp module thread-safe (GH-135434) (#136658)
gh-116738: Make grp module thread-safe (GH-135434)

Make grp module methods getgrgid() and getgrnam() thread-safe when the GIL is disabled and getgrgid_r()/getgrnam_r() C APIs are not available.
---------
(cherry picked from commit 9363703bd3)

Co-authored-by: Alper <alperyoney@fb.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-07-15 11:03:33 +05:30
Miss Islington (bot)
bbbbb2e2d1
[3.14] Partially revert "gh-101100: Fix sphinx warnings in library/email.parser.rst (GH-136475)" (GH-136629) (#136646)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-07-14 13:19:23 +03:00
Miss Islington (bot)
ed1e0cdc58
[3.14] gh-42237: Link to complete list of codec aliases (GH-136625) (#136626)
gh-42237: Link to complete list of codec aliases (GH-136625)

Closes GH-42237
(cherry picked from commit a93d9aaf62)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-07-13 13:19:23 +00:00
Miss Islington (bot)
9ee72ab266
[3.14] gh-132346: Docs: Clarify that reference counts aren't stable between versions (GH-132352) (GH-136613)
gh-132346: Docs: Clarify that reference counts aren't stable between versions (GH-132352)
(cherry picked from commit 3dbe02ccd3)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-07-13 09:17:48 +00:00
Miss Islington (bot)
e1dc08bd9a
[3.14] gh-134833: improve docs for del s[i:j] in Mutable Sequence Types (GH-134834) (#136608)
gh-134833: improve docs for `del s[i:j]` in `Mutable Sequence Types` (GH-134834)
(cherry picked from commit 609d5adc7c)

Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com>
2025-07-13 12:28:45 +05:30
Miss Islington (bot)
a1ed132a19
[3.14] Docs: Fix and improve the PyUnstable_Object_EnableDeferredRefcount documentation (GH-135323) (GH-136610)
Docs: Fix and improve the `PyUnstable_Object_EnableDeferredRefcount` documentation (GH-135323)
(cherry picked from commit 0d4fd10fba)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-07-13 06:52:58 +00:00
Miss Islington (bot)
f50cd5bec7
[3.14] gh-134939: Correct concurrent.interpreters source code link (GH-136564) (#136605)
gh-134939: Correct `concurrent.interpreters` source code link (GH-136564)
(cherry picked from commit 42b251bceb)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-07-13 05:42:51 +00:00
Miss Islington (bot)
d351f29ef0
[3.14] gh-101100: Fix sphinx warnings in Doc/library/platform.rst (GH-136562) (GH-136597)
(cherry picked from commit 47b01da4cc)

Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
2025-07-12 18:22:51 +00:00
Miss Islington (bot)
ac807cb3a0
[3.14] gh-101100: Fix sphinx warnings in Doc/library/functools.rst (GH-136424) (GH-136552)
Add index entries and anchors for cache_info, cache_clear and register.
(cherry picked from commit 252e2f710e)

Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
2025-07-11 17:09:22 +00:00
Miss Islington (bot)
e4e86a1b87
[3.14] gh-130160: use .. program:: directive for documenting venv CLI (GH-130699) (#136550)
gh-130160: use `.. program::` directive for documenting `venv` CLI (GH-130699)
(cherry picked from commit fb9f933b8e)

Co-authored-by: Kanishk Pachauri <itskanishkp.py@gmail.com>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-07-11 17:03:11 +00:00
Miss Islington (bot)
fdad31924c
[3.14] gh-76637: Note that undefined Codec is for testing (GH-136531) (#136536)
gh-76637: Note that `undefined` Codec is for testing (GH-136531)

Closes GH-76637
(cherry picked from commit 975b57d945)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-07-11 10:56:34 +00:00
Miss Islington (bot)
ec15251af5
[3.14] gh-101100: Fix sphinx warnings in library/email.parser.rst (GH-136475) (#136532)
Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
2025-07-11 09:43:52 +00:00
Miss Islington (bot)
326fe0df66
[3.14] gh-82663: Clarify codecs.iterdecode/encode docs (GH-136497) (#136513)
gh-82663: Clarify `codecs.iterdecode/encode` docs (GH-136497)

Closes GH-82663
(cherry picked from commit 4b41b2043b)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-07-10 17:41:31 +02:00
Miss Islington (bot)
1346049782
[3.14] gh-136209: Add .. c:var:: declarations for C exception types (GH-136210) (GH-136504)
(cherry picked from commit 85bc89f35f)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-07-10 15:10:43 +02:00
Miss Islington (bot)
b733bf7437
[3.14] gh-102740: Clarify time.monotonic() "system-wide" in the doc (GH-136431) (#136488)
gh-102740: Clarify time.monotonic() "system-wide" in the doc (GH-136431)
(cherry picked from commit 9c4d287775)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-07-09 23:13:29 +00:00
Miss Islington (bot)
4db567546a
[3.14] gh-136145: Define 'standard library' and 'stdlib' in the glossary (GH-136485)
(cherry picked from commit 92f392ad9e)

Co-authored-by: Zachary Ware <zach@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
2025-07-09 21:39:33 +00:00
Miss Islington (bot)
78359403c5
[3.14] gh-81520: Document unexpected os.path.ismount behaviour with btrfs subvolumes (GH-136058) (GH-136471)
gh-81520: Document unexpected `os.path.ismount` behaviour with btrfs subvolumes (GH-136058)
(cherry picked from commit 591abcc01f)

Co-authored-by: Oskar Roesler <o.roesler@oscloud.info>
2025-07-09 16:00:54 +00:00
Miss Islington (bot)
75640d4b1f
[3.14] gh-131825: Fix sqlite3 timezone-naive adapter recipe (GH-136270) (GH-136467)
gh-131825: Fix `sqlite3` timezone-naive adapter recipe (GH-136270)
(cherry picked from commit 6a6cd3c07c)

Co-authored-by: NekrodNIK <60639354+NekrodNIK@users.noreply.github.com>
2025-07-09 14:12:47 +00:00
Miss Islington (bot)
90717c2cec
[3.14] Docs: unittest.enterModuleContext is not a classmethod (GH-136464) (#136465)
Co-authored-by: Geoffrey Thomas <geofft@ldpreload.com>
2025-07-09 13:59:40 +00:00
Miss Islington (bot)
a9d2f08b57
[3.14] gh-136162: Document encodings package functions (GH-136164) (#136454)
gh-136162: Document `encodings` package functions (GH-136164)

Closes GH-136162.
(cherry picked from commit ffd7f2f231)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-07-09 10:07:34 +02:00
Miss Islington (bot)
85df16b7fa
[3.14] gh-53243: Document codecs.readbuffer_encode() (GH-136284) (#136452)
gh-53243: Document `codecs.readbuffer_encode()` (GH-136284)

Closes GH-53243
(cherry picked from commit f1dcf3c7bf)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-07-09 10:07:18 +02:00
Miss Islington (bot)
2cb5792836
[3.14] gh-94503: Update logging cookbook example with info on addressing log injection. (GH-136446) (GH-136449)
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-07-09 09:00:30 +01:00
Miss Islington (bot)
6a2a2906f8
[3.14] GH-133136: Revise QSBR to reduce excess memory held (gh-135473) (#135912)
The free threading build uses QSBR to delay the freeing of dictionary
keys and list arrays when the objects are accessed by multiple threads
in order to allow concurrent reads to proceed with holding the object
lock. The requests are processed in batches to reduce execution
overhead, but for large memory blocks this can lead to excess memory
usage.

Take into account the size of the memory block when deciding when to
process QSBR requests.

Also track the amount of memory being held by QSBR for mimalloc pages.  Advance the write sequence if this memory exceeds a limit.  Advancing the sequence will allow it to be freed more quickly.

Process the held QSBR items from the "eval breaker", rather than from `_PyMem_FreeDelayed()`.  This gives a higher chance that the global read sequence has advanced enough so that items can be freed.

(cherry picked from commit 113de8545f)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Co-authored-by: Sam Gross <colesbury@gmail.com>
2025-07-08 10:58:01 -07:00
Miss Islington (bot)
f0e603412b
[3.14] gh-101100: Fix sphinx warnings in Doc/library/exceptions.rst (GH-136309) (#136414)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-07-08 12:11:28 +00:00
Miss Islington (bot)
3296d9bcfd
[3.14] gh-136155: Docs: only add custom OpenGraph protocol meta tags for HTML builds (GH-136187) (#136382)
Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2025-07-08 10:03:40 +03:00