Commit graph

29839 commits

Author SHA1 Message Date
Petr Viktorin
21f3d15534
gh-135676: lexical analysis: Improve section on Numeric literals (GH-134850) 2025-06-18 16:34:18 +02:00
Stan Ulbrych
5f6ab92465
gh-133390: Document SQLITE_KEYWORDS (GH-135659) 2025-06-18 12:56:49 +02:00
Vladyslav Lazoryk
7117002591
gh-135627: Remove documentation for LOAD_CONST_IMMORTAL opcode (GH-135632)
Remove documentation for LOAD_CONST_IMMORTAL opcode
2025-06-18 10:39:41 +08:00
Hugo van Kemenade
c51f241c97
gh-123299: Add PEP 779 to What's New in Python 3.14 (#135555) 2025-06-17 09:02:35 +03:00
Ned Deily
7c685894cd
gh-119132: Update 'Using Python on macOS' documentation. (#135591)
Remove `experimental` qualification for free-threading in the document text. Note that images included in the document will be updated later in the release cycle.
2025-06-16 19:35:59 -04:00
Hugo van Kemenade
21bac3aecd
Use replacements to update versions in "Using Python on macOS" (#130400) 2025-06-16 18:07:25 -04:00
Donghee Na
f079979599
gh-119132: Remove "experimental" tag from the CPython free-threading. (gh-135550)
* gh-119132: Remove "experimental" tag from the CPython free-threading build

* Address code review

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

* Add NEWS.d

* Regen configure.ac

* Update doc

* Update

* Update

* Update

* Update Doc/howto/free-threading-python.rst

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* Update ctypes.rst

* Update

* Update Doc/howto/free-threading-python.rst

Co-authored-by: T. Wouters <thomas@python.org>

* Apply suggestions from code review

Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

---------

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: T. Wouters <thomas@python.org>
2025-06-16 23:32:52 +09:00
Dan Lenski
60181f4ed0
gh-67022: Document bytes/str inconsistency in email.header.decode_header() and suggest email.headerregistry.HeaderRegistry as a sane alternative (#92900)
* gh-67022: Document bytes/str inconsistency in email.header.decode_header()

This function's possible return types have been surprising and error-prone
for the entirety of its Python 3.x history. It can return either:

1. `typing.List[typing.Tuple[bytes, typing.Optional[str]]]` of length >1
2. or `typing.List[typing.Tuple[str, None]]`, of length exactly 1

This means that any user of this function must be prepared to accept either
`bytes` or `str` for the first member of the 2-tuples it returns, which is a
very surprising behavior in Python 3.x, particularly given that the second
member of the tuple is supposed to represent the charset/encoding of the
first member.

This patch documents the behavior of this function, and adds test cases
to demonstrate it.

As discussed in bpo-22833, this cannot be changed in a backwards-compatible
way, and some users of this function depend precisely on the existing
behavior.

Add warnings about obsolescence of 'email.header.decode_header' and 'email.header.make_header' functions.

Recommend use of `email.headerregistry.HeaderRegistry` instead, as suggested
in https://github.com/python/cpython/pull/92900#discussion_r1112472177
2025-06-15 15:29:38 -04:00
Nadeshiko Manju
076f87468a
gh-135361: update documentation for remote_debugger_script audit event (#135362) 2025-06-15 20:49:49 +02:00
Jacob Austin Lincoln
81237fbcf6
gh-65697: Improved error msg for configparser key validation (#135527)
* Improved error msg for configparser key validation and added note in 3.14 whatsnew

* Properly added change to configparser

* 📜🤖 Added by blurb_it.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2025-06-15 12:13:19 -04:00
Serhiy Storchaka
8979d3afe3
gh-135171: Update documentation for the generator expression (GH-135351)
* gh-135171: Update documentation for the generator expression

Document that the iterator for the leftmost "for" clause is created
immediately.

* Update Doc/reference/expressions.rst

Co-authored-by: Brian Skinn <brian.skinn@gmail.com>

---------

Co-authored-by: Brian Skinn <brian.skinn@gmail.com>
2025-06-14 17:32:44 -07:00
sobolevn
fc413ecb8f
gh-135504: Document LIBZSTD_CFLAGS and LIBZSTD_LIBS config options (#135505) 2025-06-14 16:07:19 +01:00
Pablo Galindo Salgado
028309fb47
gh-135371: Fix asyncio introspection output to include internal coroutine chains (#135436) 2025-06-14 13:48:25 +01:00
Ken Jin
7b15873ed0
gh-135474: Specialize arithmetic only on compact ints (GH-135479)
Specialize arithmetic only on compact ints. This also makes int operations non-escaping in the JIT and in tier 1.
2025-06-14 17:13:32 +08:00
Blaise Pabon
14c1d093d5
gh-106318: Add example for str.expandtabs() (#134525) 2025-06-13 18:44:21 +03:00
Petr Viktorin
f4bc3a9320
gh-134160: Split extension module init from PyModule docs; emphasize multi-phase init (GH-135126)
Document behaviour of single-phase init. Call it "legacy".

Reorganize PyModule docs.

Move PyInit_modulename docs from the tutorial to reference documentation.

Move PyMODINIT_FUNC docs from generic macros to the new page.

Add doc stubs for `PYTHON_API_VERSION` & `PYTHON_ABI_VERSION`

Remove incorrect refcounts.dat entry for `PyModuleDef_Init`.
This removes the "Return value: Borrowed reference." note.
Instead, note that the function sometimes returns a borrowed reference,
sometimes as strong one.
(IMO, it's best to not think of `PyModuleDef` as a `PyObject` at all,
and act like it can't be reference-counted.)


Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-13 16:39:35 +02:00
LamentXU
394d7985da
gh-135244: improve wording of uuid8 docs about CSPRNG (#135433) 2025-06-13 16:06:11 +02:00
Blaise Pabon
eed827ed09
gh-106318: Add example for str.endswith() (#134523)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-13 11:54:16 +00:00
Blaise Pabon
273459562e
gh-106318: Add example for str.encode() (#134520)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-13 11:32:07 +00:00
Sergey B Kirpichev
747d390045
gh-135308: clarify math.issubnormal() description (GH-135324) 2025-06-13 08:30:44 +02:00
Eric Hanchrow
f273fd77d7
doc: Remove what was essentially duplicate wording. (GH-135431) 2025-06-12 18:47:12 +01:00
Petr Viktorin
e7a3c20b92
gh-133390: Support SQL keyword completion for sqlite3 CLI (GH-133393) (GH-135292)
Co-authored-by: Tan Long <tanloong@foxmail.com>
2025-06-12 16:28:30 +02:00
Victorien
71f5fafdfb
Fix presentation of dataclasses' unsafe_hash default value (#116532)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-06-11 21:30:33 -04:00
Eric Snow
62143736b6
gh-134939: Add the concurrent.interpreters Module (gh-133958)
PEP-734 has been accepted (for 3.14).

(FTR, I'm opposed to putting this under the concurrent package, but
doing so is the SC condition under which the module can land in 3.14.)
2025-06-11 17:35:48 -06:00
Malcolm Smith
b706ff003c
gh-133264: Correct documentation of how Py_Main and Py_RunMain handle SystemExit (#135337) 2025-06-11 17:23:47 +02:00
Erlend E. Aasland
ee7345d507
gh-118928: Amend sqlite3 execute*() deprecation notes (#135163) 2025-06-10 13:24:33 +02:00
Petr Viktorin
28d91d06f1
gh-127833: Reword and expand the Notation section (GH-134443)
Prepare the docs for using the notation used in the `python.gram`
file. If we want to sync the two, the meta-syntax should be the same.

Link the Full Grammar docs here; keep only a few extras.

Also, remove the distinction between lexical and syntactic rules,
except for whitespace handling.
With f- and t-strings, the line between the two is blurry.

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Colin Marquardt <cmarqu42@gmail.com>
2025-06-09 15:50:11 +02:00
Wulian233
f90483e13a
gh-135001: Explicitly specify the encoding parameter value of calendar.HTMLCalendar as 'utf-8' (#135002) 2025-06-09 15:40:09 +02:00
Victor Stinner
aaad2e81ce
gh-133968: Update PyUnicodeWriter_WriteASCII() documentation (#135297)
The function was added to Python 3.14.
2025-06-09 14:47:02 +02:00
Edward Z. Yang
8441b263af
bpo-45210: Document that error indicator may be set in tp_dealloc (#28358)
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-06-09 08:56:32 +00:00
Ezio Melotti
2677dd017a
Use f-strings in csv docs example (#135245) 2025-06-08 15:28:37 -07:00
Vladyslav Lazoryk
8d17a412da
gh-135263: Fix typo in token.NAME documentation (#135275) 2025-06-08 22:59:26 +03:00
Stan Ulbrych
254bdac711
Update tutorial for new "Copy" button (#135007)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-06-08 19:33:19 +03:00
Yongzi Li
158e5162bf
gh-134976: document the exception type that can be raised by s[i] (#134977) 2025-06-08 14:28:55 +02:00
LamentXU
1cb7163872
gh-135244: generate UUID random Node ID with a CSPRNG as per RFC 9562, §6.10.3 (#135226)
This aligns with the recommendations of RFC 9562, Section 6.10, paragraph 3 [1].

[1]: https://www.rfc-editor.org/rfc/rfc9562.html#section-6.10-3.

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-06-08 11:46:16 +00:00
Petr Viktorin
24069fbca8
Revert "gh-133390: Support SQL keyword completion for sqlite3 CLI (#133393)" temporarily (GH-135232)
This reverts commit 62b3d2d443,
which broke buildbots
2025-06-07 08:56:43 +00:00
Yuki Kobayashi
f00512db20
Docs: Update PyExc_* tables in the c-api documentation (GH-131640)
Add `PyExc_BaseExceptionGroup` and `PyExc_EncodingWarning`
2025-06-06 17:51:47 +02:00
Tan Long
62b3d2d443
gh-133390: Support SQL keyword completion for sqlite3 CLI (#133393) 2025-06-06 16:52:41 +02:00
Petr Viktorin
b22b964a5c
gh-57089: Note _layout_ in the bitfield docs (GH-134148)
Co-authored-by: Meador Inge <meadori@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-06-06 16:51:40 +02:00
Petr Viktorin
e413e26719
gh-134891: Add PyUnstable_Unicode_GET_CACHED_HASH (GH-134892) 2025-06-06 15:51:00 +02:00
Jean-Louis GUENEGO
343182853f
feat(docs): type fix - apply pep8 by using docstring instead of comment in the doc. (#135181)
Giving the right example incitates the tutorial readers to do the same in the future.
2025-06-06 15:16:12 +02:00
Rafael Fontenelle
39859fcac5
Fix versionadded directive rendering in c-api/arg.rst (#135199) 2025-06-06 14:23:07 +02:00
Emma Smith
4b44b3409a
gh-134938: Add set_pledged_input_size() to ZstdCompressor (GH-135010) 2025-06-05 14:31:49 +03:00
Malcolm Smith
2e1544fd2b
gh-131531: android.py enhancements to support cibuildwheel (#132870)
Modifies the environment handling and execution arguments of the Android management
script to support the compilation of third-party binaries, and the use of the testbed to 
invoke third-party test code.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-06-05 13:46:16 +08:00
Pablo Galindo Salgado
1f51510444
Use a more clear example for the PEP 758 what's new section (#135118) 2025-06-04 09:23:08 +00:00
Łukasz Langa
3612d8f517
gh-135034: Normalize link targets in tarfile, add os.path.realpath(strict='allow_missing') (#135037)
Addresses CVEs 2024-12718, 2025-4138, 2025-4330, and 2025-4517.

Signed-off-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-06-03 12:42:11 +02:00
Stan Ulbrych
0ac9e17fb4
gh-134830: Fix reference in Doc/extending/windows.rst (GH-134831)
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2025-06-03 00:08:20 +02:00
Serhiy Storchaka
e814f43f2c
gh-74232: Add a note about roundtrip of non-float numerics in CSV (GH-134963) 2025-06-02 23:31:06 +03:00
Rafael Fontenelle
c7051a3669
Remove newline in Doc/c-api/lifecycle.rst for gettext builder (GH-135013) 2025-06-02 21:13:08 +03:00
Serhiy Storchaka
0cec424af5
gh-66234: Add flag to disable the use of mmap in dbm.gnu (GH-135005)
This may harm performance, but improve crash tolerance.
2025-06-02 21:08:26 +03:00