31666 Commits
Author SHA1 Message Date
Inada Naoki 495fef1b47 Doc: Fix allocator mismatch in PyStatus example (#160757) 2026-10-28 11:46:42 +09:00
Inada Naoki d8242407a5 Doc: fix PyBytesWriter sample code (#160756) 2026-10-28 11:45:16 +09:00
Inada Naoki dbf9776413 Doc: Fix typos in documentation and docstring (#160743) 2026-10-28 11:33:39 +09:00
techi101 d54c2d89b7 gh-126031: Mark argparse parameter headings as code (#160632) 2026-10-27 09:29:58 -07:00
Inada NaokiandStan Ulbrych 085d3665b1 Doc: Fix errors in documentation examples (#160742)
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-10-27 19:54:33 +09:00
b5660533cc gh-141674: Docs: Add 'Python' to the <title> of the landing page (#141868)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-10-27 10:27:48 +00:00
Inada Naoki 085b291748 Docs: Fix indentation that produced unintended definition lists and block quotes (#160740)
* Fix documentation markup for translation
* Fix more documentation markup for translation
2026-10-27 18:47:20 +09:00
Manoj K M 210e7ab2a5 Docs: Fix mimalloc allocator values and typos in C API init docs (#160666) 2026-10-26 15:04:54 +00:00
Inada Naoki fbcc278daf Docs: remove incorrect GIL runtime flag requirement from glossary (#160661) 2026-10-26 13:32:26 +09:00
Pengyu LeeandStan Ulbrych efbd165392 gh-151947: Fix all Sphinx reference warnings in email.{charset,parser}.rst (#152178)
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-10-25 17:43:56 +00:00
Christian Heimes e2a9dd97ef gh-160040: Add ssl eMudhra distrust entry to whatsnew (#160583)
Signed-off-by: Christian Heimes <christian@python.org>
2026-10-24 12:50:02 -07:00
Zachary Ware f39dfa707b gh-159102: Shrink and optimize Tachyon example GIFs (#160540) 2026-10-24 18:31:32 +01:00
Nice Zombies 1063adbe90 gh-160586: Document version changes for pprint.pp (#160595) 2026-10-24 18:27:17 +01:00
Michael Newman 94942ba7d9 Fix typo in C API Introduction documentation (#160563) 2026-10-24 09:42:11 +01:00
46edd6fa41 gh-89730: Implement support for Encrypted Client Hello (ECH) in ssl (GH-160318)
Co-authored-by: irl <iain@learmonth.me>
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2026-10-23 20:02:23 -04:00
Tian Gao eacae21c12 gh-160125: Support package.module.function for pdb breakpoint command (#160126) 2026-10-23 16:04:40 -07:00
Davi de Jesus 5ca490bda6 Docs: Fix installer name in the macOS command-line install example (#160527) 2026-10-23 15:40:54 -07:00
321925c92c gh-83156: Add dedicated anchor for regexp syntax elements (#17470)
Co-authored-by: Muse Code (Meta Muse Spark)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Lukasz Langa <ambv@meta.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2026-10-23 15:23:56 -07:00
Bénédikt Tran e9445f696c gh-141004: document the Python version adding each PyExpat_CAPI member (GH-160471) 2026-10-24 00:23:22 +02:00
Pranav Choudhary 02c5d552fc gh-153528: Document mode="func_type" in compile() (#153561) 2026-10-23 19:52:32 +00:00
Stan Ulbrych b341b81e92 gh-115810: Expose the name attribute of datetime.timezone (#131210) 2026-10-23 20:21:28 +01:00
Vyron Vasileiadis 6d6b1ab4c8 gh-146440: Add an example for the json array_hook decoder parameter (GH-154522) 2026-10-23 12:07:03 -07:00
Semyon Moroz 9a4187a697 gh-124694: Document missing ctxkwargs argument in ThreadPoolExecutor (#134321) 2026-10-23 11:25:21 -07:00
Sergey B Kirpichev 7f2bc25024 gh-109218: announce removal of complex constructor deprecations in 3.19 (#158212)
Accepting complex numbers as "real" and "image" arguments
was deprecated in the 3.14 (see ef01e95).

Removal will simplify constructor a lot, lets do this.
2026-10-23 11:21:57 -07:00
Himesh Rupchandani 8d11920807 gh-156725: Document O(N) behavior of PyCode_Addr2Line (GH-156736) 2026-10-23 13:43:47 -04:00
VictorienandStan Ulbrych 738d055b37 Fix references and typos in the email.utils documentation (#149644)
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-10-23 17:30:25 +00:00
Michele AngrisanoandStan Ulbrych fd8f475c7e gh-58083: Expand the introduction of the cmd module (#155738)
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-10-23 15:51:10 +00:00
Paul GanssleandStan Ulbrych 6854e79163 gh-158252: Add a C implementation for strptime (#158253)
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-10-23 15:23:02 +00:00
Hugo van Kemenade ae5c45758b gh-160425: Use parsed literals to keep version current in Windows docs (#160430) 2026-10-23 16:01:57 +01:00
Gregory P. Smith 9b9657cf54 Clarify TLS 1.3 behavior of the SSLContext PSK callbacks (GH-160159)
Under TLS 1.3 a PSK is only offered and may be declined, and both sides
fall back to certificate authentication when one is available, so
CERT_NONE leaves the server unauthenticated and a zero length PSK does
not reject the connection.  Drop CERT_NONE from the example and the PSK
tests.

A callback that raises is treated like one returning a zero length PSK,
so under TLS 1.3 it also falls back to certificate authentication.  A
server with a certificate loaded declines even a matching PSK with
OpenSSL's default TLS 1.3 cipher suite order, which selects a SHA-384
suite.  Mention checking session_reused as the client side alternative
to not using CERT_NONE.
2026-10-23 06:46:23 +00:00
Gregory P. SmithandBénédikt Tran a4ac2445c5 gh-160171: Fix ssl get_unverified_chain() on resumed server sessions (GH-160172)
Include the client's certificate when the session was resumed from a
ticket, and return [] instead of raising AttributeError when the client
sent no certificate.

ANT-2026-2RMA0IPV

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-10-23 06:26:33 +00:00
Gregory P. Smith e6190acde6 gh-160406: Keep the backup and create output exclusively in fileinput (GH-160407)
In-place filtering deleted the backup file, the only copy of the data,
when the output file could not be created.  An existing backup file is
now only replaced once there is a file to back up, so trying again does
not delete it either.  The output file is now created with O_EXCL and
its mode is set through the file descriptor.

ANT-2026-3TZS4H87
2026-10-23 02:51:38 +00:00
Gregory P. Smith 2c24bc1b6e gh-160322: document shutil.rmtree("link/") symlink following behavior (GH-160372) 2026-10-23 01:12:35 +02:00
Bhuvansh 1f1ae145d1 gh-154388: Document Python install variants on Windows (GH-154482) 2026-10-22 23:07:44 +00:00
Łukasz Langa e2766c0a00 gh-89721: Add copy_dir_stat parameter to shutil.copytree() (#160076)
copytree() now accepts copy_dir_stat (default true).  When false,
directory permissions and times are not copied with copystat(), e.g.
to copy a read-only tree into a writable one.  The flag propagates
through recursive calls; file metadata is unaffected and remains
handled by copy_function.  Document the parameter and cover both
behaviors with tests.
2026-10-22 15:13:33 -07:00
Zanie Blue c6661bdc7d gh-124948: Reject explicit Cortex-A53 workaround flags with BOLT (gh-160337) 2026-10-22 22:02:49 +00:00
limadog9 79a9ca07ad gh-126970: Correct LOAD_GLOBAL stack order documentation (#159851) 2026-10-22 22:08:53 +01:00
Stan Ulbrych e7e0b3523a gh-160097: Reject links replacing the destination in tarfile.tar_filter (#160098) 2026-10-22 21:23:08 +01:00
Neil MunozandStan Ulbrych 1d53cdbdb8 gh-151833: Document all docs make targets in Doc/README.rst (#151832)
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-10-22 19:40:31 +00:00
Jason R. CoombsandClaude Opus 5 c3a1ad5f77 gh-160104: Refresh zipfile.Path from zipp 4.1.2 (#160105)
`Path.iterdir` now raises `NotADirectoryError` rather than `ValueError`,
glob character classes follow shell-style semantics, and the workaround for
the `stacklevel` bug in PyPy < 7.3.19 is removed.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-10-22 11:53:41 -07:00
Russell Keith-Magee eb229a9b40 gh-49960: Allow ctypes callbacks to return struct/union types (GH-157974) 2026-10-22 17:52:55 +00:00
Savannah Ostrowski 1705e512b3 gh-155403: Clarify argparse default precedence (#160064) 2026-10-22 09:12:00 -07:00
Vyron Vasileiadis 97d361116f gh-157140: Fix inaccuracies in the curses documentation (GH-157141)
Correct the descriptions of halfdelay(), termname(), window.scroll(),
window.insnstr() and window.insch().
2026-10-22 14:00:15 +03:00
Nakum MilanandStan Ulbrych c3bcc92706 gh-160035: Simplify datetime awareness docs (#160086)
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-10-22 06:51:02 +00:00
Donghee Na 9f3d5067f3 gh-159111: Add missing downstream changes when upgrade to 2.5.2. (gh-160207) 2026-10-21 23:26:29 -07:00
Donghee Na aff7a2e23b gh-159111: Update vendored mimalloc to v2.5.2 (gh-159112)
* Update vendored mimalloc to v2.5.2

Upgrade mimalloc from v2.1.2 to v2.5.2 as-is from upstream.

v2.1.2: https://github.com/microsoft/mimalloc/releases/tag/v2.1.2
v2.5.2: https://github.com/microsoft/mimalloc/releases/tag/v2.5.2

* Re-apply CPython-specific changes to mimalloc v2.5.2

Most of the previous downstream changes were upstreamed in mimalloc
v2.1.3 - v2.1.7 (heap tags, _mi_heap_init/_mi_tld_init, MI_PRIM_THREAD_ID,
sub-processes, heap walk optimizations, platform fixes) and are dropped.

Remaining CPython-specific changes, all marked with a "CPython" comment:

- QSBR delayed page freeing for free-threaded builds (gh-115103,
  gh-145615): mi_page_t/mi_heap_t fields and _PyMem_mi_* hooks in
  page.c, heap.c and segment.c.
- debug_offset: preserve the first bytes of a PyObject (ob_tid, refcount
  fields) when filling freed or uninitialized memory in debug builds
  (gh-115491).
- Atomic mi_block_t.next loads/stores to avoid TSAN reports (gh-129748).
- Relax the owning thread assertion in _mi_free_delayed_block for
  free-threaded builds, since the GC traverses heaps of other threads.
- Call _mi_heap_delayed_free_partial() in mi_heap_visit_blocks()
  (gh-112532).
- Only count reclaimed pages up to MI_MEDIUM_OBJ_SIZE_MAX as a
  "right page" in mi_segment_reclaim (gh-115103).
- Rename the weak _ZSt15get_new_handlerv symbol and disable the
  mi_is_in_heap_region debug warning.
- Zero-initialize _mi_page_empty instead of a positional initializer.

* Update the free-threaded build to mimalloc v2.5.2 changes

mimalloc v2.1.4 replaced the list of abandoned segments with per-arena
bitmaps and introduced sub-processes (mi_subproc_t) to keep abandoned
segments of separate interpreters apart. Use them instead of the
CPython-specific mi_abandoned_pool_t:

- Each interpreter owns a mi_subproc_t created in init_interpreter().
- tstate_mimalloc_bind() sets tld->segments.subproc and uses the
  upstream _mi_heap_init() signature.
- The GC and sys.getallocatedblocks() visit abandoned segments with
  _PyMem_mi_visit_abandoned_blocks(), the upstream cursor API without
  the mi_option_visit_abandoned requirement, while STW.

* Update NEWS.d

* fix MSAN

* fix TSAN

* fix test_cext

* Disable THP

* Address code review

* Address code review

* Address code review

* nit

* Address code review

* Address code review
2026-10-21 17:41:07 -07:00
Serhiy StorchakaandGregory P. Smith ab5187ce84 gh-62222: Fix and extend quoted-printable decoding (GH-152679)
binascii.a2b_qp() and quopri now leave an invalid "=" escape in place and
rescan the following character instead of consuming it, like email.quoprimime
and other decoders (b'==41' now decodes to b'=A').

Add an opt-in strip_ws parameter to binascii.a2b_qp(), quopri.decode(),
quopri.decodestring() and email.quoprimime.decode() to strip trailing
whitespace per RFC 2045.  It is false by default everywhere except
email.quoprimime.decode(), preserving every existing default.

Also document that email's get_payload(decode=True) does not strip trailing
whitespace, contrary to RFC 2045.

Register the new "strip_ws" argument name in the global objects tables
(make regen-global-objects), needed by static builds where binascii is
compiled into the core, and replace an unresolved :func: reference to the
undocumented email.quoprimime.decode with a literal.

* gh-62222: Make strip_ws parameters keyword-only

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2026-10-22 00:22:49 +00:00
Furkan OnderMuse Code (Meta Muse Spark)Lukasz Langa
c72b435023 gh-61448: Fix inspect.getargvalues fails if arg name is not bound to a value (#101318)
Co-authored-by: Muse Code (Meta Muse Spark)
Co-authored-by: Lukasz Langa <ambv@meta.com>
2026-10-21 16:40:38 -07:00
Peter BiermaandPetr Viktorin aed4ad8c43 gh-141004: Document missing descriptor C APIs (GH-159709)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-10-21 22:24:45 +00:00
Petr Viktorin dbd0d9b8a9 Soft-deprecate C-API OSError aliases (GH-160111) 2026-10-21 23:48:53 +02:00