Commit graph

30438 commits

Author SHA1 Message Date
Alex Willmer
5462002bbe
gh-143513: Clarify changed argument name of ResourceReader.is_resource (GH-143523) 2026-01-08 08:40:17 -05:00
Serhiy Storchaka
c07e5ec0a9
gh-143553: Add support for parametrized resources in regrtests (GH-143554)
For example, "-u xpickle=2.7" will run test_xpickle only against Python 2.7.
2026-01-08 13:51:38 +02:00
Tomas R.
228d95582e
Fix a typo in STORE_SLICE docs (#143500) 2026-01-07 23:36:22 +01:00
Adorilson Bezerra
51a56a3a7b
gh-106318: Add examples for str.casefold() and str.lower() methods (#142154)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-01-07 16:16:25 +00:00
Giampaolo Rodola
a1eedaee98
gh-94172: delete mention of ssl_version from ftplib doc (#143515)
`FTP_TLS.ssl_version` class attribute was removed in ef0e72b31d.
2026-01-07 15:11:50 +01:00
Adorilson Bezerra
4fb6a31bce
gh-106318: Add example for str.index() (#137023) 2026-01-06 23:42:11 +02:00
Andrii Hrimov
ff7d1cec41
gh-133315: Document that compat32 should not be used with MIMEPart/EmailMessage (#143307) 2026-01-06 15:18:37 -05:00
Xiao Yuan
51227b6b1a
Doc: Fix missing closing parenthesis in argparse example (#143488) 2026-01-06 09:53:43 -08:00
ADITYA RAI
e79c9b7031
gh-142302: Fix mkstemp() documentation: clarify file descriptor inheritance behavior (#142338)
The documentation incorrectly stated that the file descriptor is not
inherited by child processes. In reality, the close-on-exec flag (when
available) only prevents inheritance across exec() calls, not fork().

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-01-06 17:08:25 +00:00
Adorilson Bezerra
7b0a372b20
gh-106318: Add examples for str.isprintable() (#140043)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-01-06 17:43:44 +01:00
Ken Jin
d9c1235db4
gh-139038: Add macOS performance numbers for the JIT (GH-143479) 2026-01-06 15:19:35 +00:00
Clay Dugo
d745b60ef2
gh-143474: Add os.RWF_ATOMIC constant (GH-143475) 2026-01-06 09:35:51 -05:00
Semyon Moroz
dd750b3485
gh-143331: Schedule to remove format "N" for Decimal (#143372) 2026-01-06 15:12:05 +02:00
Serhiy Storchaka
4d21297d28
gh-41779: Allow defining any __slots__ for a class derived from tuple (GH-141763) 2026-01-06 11:36:00 +02:00
Emma Smith
12d363bb66
gh-134740: Document distribution discovery in importlib.metadata (#134751)
Document the following items listed in `__all__` but missing from
documentation:

- `distributions()`: mentioned in doc strings as well
- `DistributionFinder`: mentioned but didn't have it's own :class:
  entry
- `DistributionFinder.Context`: mentioned but didn't have it's own :class:
  entry)
- `Distribution.discover()`: mentioned in doc strings

Closes #134740
Partially addresses #110937

---------

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2026-01-06 01:25:30 +00:00
Ritam Pal
240a6c3262
gh-143434: Fix typo in zstd documentation (#143437) 2026-01-05 11:55:11 -08:00
Ori Avtalion
1569275117
gh-138205: explicit mention to mmap.mmap.resize in "Porting to Python 3.15" notes (#143440) 2026-01-05 20:27:45 +01:00
László Kiss Kollár
ef3b8829e4
gh-142927: Clarify pstats file output in docs and CLI (#143388)
When running the `profiling.sampling` module in pstats mode, the output
can be emitted in two different ways: text to stdout or a binary file
when the `--output` argument is set.

The current documentation and help text is confusing as it does not
distinguish between these two output formats so it may be surprising to
the user to get different formats depending whether `--output` is set or not.
2026-01-03 21:16:29 +00:00
Tomas R.
136f6d8355
gh-76187: Document the c typecode for multiprocessing.Array. (#132504)
* Document the `c` typecode for `multiprocessing.Array`.

* Add quotes

* Mention that 'w' is not supported
2026-01-02 20:18:32 +01:00
Gregory P. Smith
61fc72a4a4
gh-124951: Optimize base64 encode & decode for an easy 2-3x speedup [no SIMD] (GH-143262)
Optimize base64 encoding/decoding by eliminating loop-carried dependencies. Key changes:
- Add `base64_encode_trio()` and `base64_decode_quad()` helper functions that process complete groups independently
- Add `base64_encode_fast()` and `base64_decode_fast()` wrappers
- Update `b2a_base64` and `a2b_base64` to use fast path for complete groups

Performance gains (encode/decode speedup vs main, PGO builds):
```
             64 bytes    64K        1M
  Zen2:      1.2x/1.8x   1.7x/2.8x  1.5x/2.8x
  Zen4:      1.2x/1.7x   1.6x/3.0x  1.5x/3.0x  [old data, likely faster]
  M4:        1.3x/1.9x   2.3x/2.8x  2.4x/2.9x  [old data, likely faster]
  RPi5-32:   1.2x/1.2x   2.4x/2.4x  2.0x/2.1x
```

Based on my exploratory work done in https://github.com/python/cpython/compare/main...gpshead:cpython:claude/vectorize-base64-c-S7Hku

See PR and issue for further thoughts on sometimes MUCH faster SIMD vectorized versions of this.
2026-01-01 22:03:05 -08:00
ivonastojanovic
5d133351c6
gh-142927: Auto-open HTML output in browser after generation (#143178) 2026-01-01 19:05:45 +00:00
Bartosz Sławecki
2d9f4e357a
gh-143048: Remove outdated mention to curses in the "Interactive Mode" docs (#143049) 2026-01-01 12:52:21 +01:00
Lakshya Upadhyaya
c5215978eb
gh-140920: remove incorrect mentions to concurrent.futures.interpreter.ExecutionFailed (#141723)
Remove documentation for inexistant `concurrent.futures.interpreter.ExecutionFailed`
and replace its occurrences by `concurrent.interpreters.ExecutionFailed` since this
is the documented exception.
2025-12-31 21:45:41 +01:00
Gregory P. Smith
04899b8539
gh-115634: document ProcessPoolExecutor max_tasks_per_child bug (GH-140897) 2025-12-30 15:24:32 -08:00
Adam Turner
7e3a5a7e79
gh-130167: Add a What's New entry for changes to `textwrap.{de,in}dent` (#131924)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-30 14:57:28 +02:00
Hugo van Kemenade
0aedf2f9cf
gh-143284: Temporarily install Sphinx<9 to fix Chinese search (#143286) 2025-12-30 14:31:41 +02:00
Sebastian Rittau
ef834dee89
gh-128546: Document that getaddrinfo() can return raw data (#128547)
Document that getaddrinfo() can return raw data

This is the case for IPv6 addresses if Python was compiled with
--disable-ipv6.
2025-12-29 21:23:30 -08:00
Thanos
79c03ac001
gh-69686: Remove untrue part of __import__ replacement docs (#143261)
Remove untrue part of `__import__` replacement docs

The original statement effectively says that replacing `__import__` at global scope affects import statements, and not only that, but only import statements within the rest of the executing module. None of that has been true since at least Python 2.7, I think.

This was likely missed in python/cpython#69686.
2025-12-29 21:16:54 -08:00
Samuel
f37f57dfe6
gh-131421: Fix ASDL kw_defaults being expr* instead of expr?* (GH-133773)
Also fix docs ASDL highlighting.
2025-12-29 13:43:09 +02:00
wangxiaolei
0efbad60e1
gh-142994, gh-142996: document missing async generator and coroutine field entries in inspect (#142997) 2025-12-28 19:03:30 +01:00
Fatih Çelik
3ca1f2a370
gh-143241: Fix infinite loop in zoneinfo._common.load_data (#143243)
Correctly reject truncated TZif files in `ZoneInfo.from_file`.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-12-28 15:48:43 +01:00
Ken Jin
23abbf1f2b
gh-139922: Link to results in MSVC tail calling in What's New 3.15 (GH-143242)
Link to results in MSVC tail calling for whats new in 3.15
2025-12-28 12:15:24 +00:00
Rafael Fontenelle
f5e11facf2
no-issue: Fix override value in os.rst (gh-123522) 2025-12-27 19:48:01 +09:00
AN Long
1af21ea320
gh-63016: Add flags parameter on mmap.flush (#139553)
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-12-27 10:33:56 +00:00
SYan212
57d569942c
Fix typos in docs (#143193) 2025-12-27 09:52:28 +02:00
Duane Hilton
5d1e78f7b5
gh-143181: Fix 'overriden' -> 'overridden' in c-api/module.rst (#143182)
* Doc: Fix typo 'overriden' -> 'overridden' in c-api/module.rst

* Fix 'overriden' -> 'overridden' in tests
2025-12-27 02:23:57 -05:00
László Kiss Kollár
888d101445
gh-138122: Remove default duration for statistical profiling (#143174)
Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2025-12-25 19:21:16 +00:00
Hauke D
8d46f961c3
gh-143103: Added pad parameter to base64.z85encode() (GH-143106)
This makes it analogous to a85encode() and b85encode() and allows the
user to more easily meet the Z85 specification, which requires input
lengths to be a multiple of 4.
2025-12-25 13:34:44 +02:00
Tom Kuson
84b7e6970f
gh-140717: Add exc_text to LogRecord attributes table (GH-140718) 2025-12-24 17:30:20 +00:00
László Kiss Kollár
d4dc3dd9aa
gh-138122: Replace --interval with --sampling-rate (#143085) 2025-12-24 13:46:33 +00:00
Ken Jin
c8b80f5e23
gh-134584: Add another contributor to whats new 3.15 (GH-143107)
Add another contributor to whats new 3.15
2025-12-23 16:47:46 +00:00
Hugo van Kemenade
f783cc37eb
Update pre-commit with zizmor and Ruff fixes (#143095) 2025-12-23 17:51:02 +02:00
Victor Stinner
6536fab194
gh-130796: Undeprecate locale.getdefaultlocale() (#143069) 2025-12-23 16:31:10 +01:00
Pablo Galindo Salgado
81c8eb85e1
gh-138122: Add blocking mode for accurate stack traces in Tachyon (#142998) 2025-12-23 10:49:47 +00:00
Stan Ulbrych
f9704f1d84
gh-84232: Fix pydoc docs.python.org link generation (#139995)
Co-authored-by: Éric <merwok@netwok.org>
2025-12-23 10:29:58 +02:00
Pablo Galindo Salgado
9e51301234
gh-138122: Allow tachyon to write and read binary output (#142730) 2025-12-22 23:57:20 +00:00
Ken Jin
714037ba84
gh-139922: Add tail call for MSVC for whats new in 3.15 (GH-143087) 2025-12-22 23:56:26 +00:00
Stan Ulbrych
3c0888b25b
gh-89152: Note truth testing exception in stdtypes.rst (#137640)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-12-22 11:36:44 -08:00
Gregory P. Smith
b8d3fddba6
gh-70647: Better promote how to safely parse yearless dates in datetime. (GH-116179)
* gh-70647: Better promote how to safely parse yearless dates in datetime.

Every four years people encounter this because it just isn't obvious.
This moves the footnote up to a note with a code example.

We'd love to change the default year value for datetime but doing
that could have other consequences for existing code.  This documented
workaround *always* works.

* doctest code within note is bad, dedent.

* Update to match the error message.

* remove no longer referenced footnote

* ignore the warning in the doctest

* use Petr's suggestion for the docs to hide the warning processing

* cover date.strptime (3.14) as well
2025-12-20 22:47:40 -08:00
Hai Zhu
3cc57505e5
gh-142834: pdb commands command should use last available breakpoint (#142835) 2025-12-20 09:27:34 -08:00