Farhan Saif
bf4017b161
gh-125053: Document that ob_mutex must only be used via critical section API ( #144599 )
...
Add a warning in the free-threading extensions howto explaining that
PyObject.ob_mutex is reserved for the critical section API and must not
be locked directly with PyMutex_Lock, as this can cause deadlocks.
Extension authors who need their own lock should add a separate PyMutex
field to their object struct.
Also add an ob_mutex member entry under PyObject in the C API reference
(Doc/c-api/structures.rst) with a cross-reference to the howto.
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-10 17:23:39 +01:00
Ali Towaiji
2114da976c
gh-145591: Move slicing note to __getitem__ (GH-145606)
2026-03-10 16:48:41 +01:00
Charlie Lin
467507a651
gh-145697: Add .sql and .sqlite3 recognition in mimetypes (GH-145698)
...
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Benedikt Johannes <benedikt.johannes.hofer@gmail.com>
2026-03-10 16:21:33 +01:00
Peter Bierma
7990313afa
Docs: Improve the C API documentation involving threads (GH-145520)
...
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-03-10 10:57:13 -04:00
Hugo van Kemenade
7fbdc8fb54
Merge branch 'main' of https://github.com/python/cpython
2026-03-10 16:41:02 +02:00
Adorilson Bezerra
9585f509d7
gh-106318: Add examples for str.isspace() docs ( #145399 )
2026-03-10 16:19:24 +02:00
Hugo van Kemenade
6024d3c6da
Python 3.15.0a7
2026-03-10 14:31:15 +02:00
Hugo van Kemenade
55b36fdb3d
gh-133879: Copyedit "What's new in Python 3.15" ( #145737 )
2026-03-10 13:11:43 +02:00
Stan Ulbrych
bdf0105291
gh-103997: Remove incorrect statements about -c dedenting (gh-138624)
2026-03-10 09:56:00 +01:00
Stan Ulbrych
d6c1763a08
Remove the distutils-sig@python.org email in 'Installing Python Modules' ( #145613 )
2026-03-09 19:43:13 +00:00
Hugo van Kemenade
f31ac36df6
Docs: Update programming FAQ ( #144573 )
...
Co-authored-by: Savannah Ostrowski <savannah@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@ulbrych.org>
2026-03-09 20:23:11 +02:00
Stan Ulbrych
255e79fa95
gh-143055: Fix crash in AST unparser when unparsing dict comprehension unpacking ( #145556 )
2026-03-09 10:37:23 -07:00
Yashraj
171133aa84
gh-141617: clarify concurrent.futures.ThreadPoolExecutor deadlock example ( #141620 )
...
---------
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-03-09 16:30:00 +00:00
Maciej Olko
fc03cdccc0
gh-139588: Docs: fix PDF build ( #145480 )
2026-03-09 18:19:02 +02:00
Petr Viktorin
d64f83d07b
gh-78773: Improve ctypes dynamic library loading docs (GH-145313)
2026-03-09 15:02:06 +01:00
Petr Viktorin
44855458a4
Document that PyType_GetModule returns a borrowed ref (GH-145612)
2026-03-09 14:32:28 +01:00
James
5a15a52dd1
gh-145642: Docs: Avoid warning for invalid escape sequence in tutorial ( #145643 )
...
* Match tutorial output to real interpreter output
* Avoid invalid escape sequence in example
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
---------
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2026-03-08 18:41:47 -04:00
Victor Stinner
9159287f58
gh-144175: Add PyArg_ParseArray() function ( #144283 )
...
Add PyArg_ParseArray() and PyArg_ParseArrayAndKeywords()
functions to parse arguments of functions using the METH_FASTCALL
calling convention.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-03-06 21:57:44 +00:00
Andrew Barnes
b28e5f58eb
gh-69223: Document that add_argument() returns an Action object ( #145538 )
2026-03-06 16:10:12 +00:00
Hugo van Kemenade
d3b6faf975
Docs: import datetime as dt in examples ( #145315 )
2026-03-06 13:18:11 +02:00
Victor Stinner
4fce98a920
gh-141510: Change marshal version to 6 ( #145551 )
...
Fix SliceTestCase: test also that version 4 fails with ValueError.
2026-03-06 10:23:11 +01:00
Yash Kaushik
e0945443a0
doc: Clarify logger creation example in logging HOWTO (GH-145540)
2026-03-05 17:48:48 +00:00
Victor Stinner
37e421bb43
gh-141510: Complete What's New in Python 3.15 for frozendict ( #145537 )
...
Mention updated stdlib modules and built-in functions.
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-03-05 17:44:58 +01:00
Victor Stinner
0c29f83caa
gh-141510: No longer accept frozendict in PyDict_Copy() ( #145542 )
...
Rename _PyDict_Copy() to anydict_copy().
Replace PyObject_IsInstance(op, &PyFrozenDict_Type) with
PyFrozenDict_Check().
2026-03-05 15:26:54 +01:00
Victor Stinner
7bdfce0d3a
gh-145056: Accept frozendict in xml.etree ( #145508 )
...
Element and SubElement of xml.etree.ElementTree now also accept
frozendict for attrib.
Export _PyDict_CopyAsDict() function.
2026-03-05 12:55:28 +01:00
Victor Stinner
c0ecf211b2
gh-145055: Accept frozendict for globals in exec() and eval() ( #145072 )
2026-03-05 12:35:43 +01:00
Victor Stinner
2acfad9d57
gh-82626: Schedule removal of bool used as file descriptor ( #145469 )
2026-03-05 12:32:32 +01:00
Victor Stinner
31343cf2bc
gh-142417: Restore private _Py_InitializeMain() function ( #145472 )
...
This reverts commit 07c3518ffb .
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-03-04 11:00:08 +01:00
Justin Kunimune
dc12d1999b
Fix incorrect statement about argparse.ArgumentParser.add_argument() ( #145479 )
...
Co-authored-by: Savannah Ostrowski <savannah@python.org>
2026-03-03 21:41:26 +00:00
Ned Batchelder
15f6479c41
Docs: use a Sphinx extension to eliminate excessive links ( #145130 )
2026-03-03 15:48:43 -05:00
Victorien
34df70c83c
Reference memoryview.tolist as a method ( #145412 )
2026-03-03 16:05:14 +00:00
Victor Stinner
52c8efa87d
gh-145335: Fix os functions when passing fd -1 as path ( #145439 )
...
os.listdir(-1) and os.scandir(-1) now fail with OSError(errno.EBADF)
rather than listing the current directory.
os.listxattr(-1) now fails with OSError(errno.EBADF) rather than
listing extended attributes of the current directory.
2026-03-03 13:57:08 +01:00
Michiel W. Beijen
db41717cd5
GH-145450: Document missing wave.Wave_write getter methods (GH-145451)
2026-03-03 13:44:56 +01:00
Petr Viktorin
f1de65b366
gh-145455: Show output of blurb & sphinx-build version commands (GH-145457)
...
In gh-145455, an outdated dependency caused an import error that was not
printed out (`2>&1`); the message instead said that the tools are missing.
Don't redirect stderr, to show warnings and failures.
Also, switch `blurb` to output a version on a single line (`--version` rather
than `help`), and, and don't redirect stdout either.
This results in two version info lines being printed out. These get drowned
in typical Sphinx output, and can be helpful when debugging.
2026-03-03 11:47:02 +01:00
C.A.M. Gerlach
9124bc194a
Hide "object" prefix on dunders in contextlib docs & selectivly link some more ( #145436 )
2026-03-02 23:10:26 +02:00
Filipe LaÃns
eb611a8515
GH-145275: add -X pathconfig_warnings and PYTHON_PATHCONFIG_WARNINGS ( #145277 )
2026-03-02 19:19:05 +00:00
Thomas A Caswell
201d251567
DOC: clarify and expand documentation about PYTHONUSERBASE and PYTHONNOUSERSITE ( #144637 )
2026-03-02 15:54:26 +00:00
Petr Viktorin
3b276f3f59
gh-144748: Make PyErr_CheckSignals raise the exception scheduled by PyThreadState_SetAsyncExc (GH-145178)
...
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2026-03-02 11:47:32 +01:00
edson duarte
6c417e44c9
gh-140715: Improve class reference links on datetime.rst ( #123980 )
...
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-03-01 13:59:02 +02:00
Jelle Zijlstra
3484ef6003
gh-145033: Implement PEP 747 ( #145034 )
2026-02-28 19:52:04 -08:00
Zachary Ware
f1446d3922
Destroy the turtle window after its doctests finish (GH-125294)
2026-02-28 21:12:05 +00:00
Nathan Goldbaum
fdb4b3527f
gh-145269: simplify bisect.bisect doc example ( #145270 )
...
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
---------
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
2026-02-28 09:09:39 +00:00
Stan Ulbrych
4d89056ed0
gh-76007: Deprecate tarfile.version ( #145326 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-02-27 18:46:02 +00:00
indoor47
11eec7a492
gh-145305: Update ocert.org URLs in docs from http to https ( #145304 )
...
Co-authored-by: Adam (indoor47) <adamai@agentmail.to>
2026-02-27 18:24:39 +02:00
Taegyun Kim
8775f90017
gh-144693: Clarify that PyFrame_GetBack does not raise exceptions (GH-144824)
...
Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2026-02-27 10:25:46 -05:00
Peter Bierma
dc1b56aa03
gh-141004: Document missing type flags (GH-145127)
2026-02-27 10:11:52 -05:00
Pieter Eendebak
4401f23cbf
gh-141510: Update PyDict_Copy documentation with note on frozendict (GH-145249)
2026-02-26 11:00:22 -05:00
Rajhans Jadhao
e234662f7f
gh-144190: Clarify get_type_hints() instance behavior in docs ( #144831 )
2026-02-26 15:47:13 +02:00
Adorilson Bezerra
aa2c0c3acb
gh-106318: Add examples for str.rjust() method ( #143890 )
2026-02-26 15:41:49 +02:00
Lysandros Nikolaou
017ccd3bf4
gh-142518: Move thread safety sections into a new page ( #144716 )
...
- Create a new page for thread safety notes for built-in types
- Move thread safety notes for `list` into the new page
- Move thread safety notes for `dict` into the new page
---------
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-25 16:49:46 +01:00