Commit graph

30627 commits

Author SHA1 Message Date
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
Tadej Magajna
12828e5f98
gh-85809: Ensure shutil.make_archive accepts path-like objects in all cases (GH-143668) 2026-02-25 16:44:17 +02:00
Petr Viktorin
9b22261a86
GH-145000: Add a tool to record/check removed HTML IDs (#145001) 2026-02-25 13:37:59 +01:00
Matthias Kievernagel
f8ce51a522
gh-47655: Add support for user data and detail of Tk events to tkinter (GH-7142)
Expose the %d substitution as the tkinter.Event attributes:

* "detail" for Enter, Leave, FocusIn, FocusOut, and ConfigureRequest events
* "user_data" for virtual events

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-02-25 10:34:00 +02:00
rueteh
4e45c9c309
gh-136677: Introduce executable specific linker flags to configure (#137296)
* introduce executable specific linker flags

Add PY_CORE_EXE_LDFLAGS and EXE_LDFLAGS which stores executable specific
LDFLAGS, replacing PY_CORE_LDFLAGS for building
executable targets.

If PY_CORE_EXE_LDFLAGS / EXE_LDFLAGS is not provided, then it defaults
to the value of PY_CORE_LDFLAGS which is the existing behaviour.

If both flags are supplied, and there is a need
to distinguish between executable and shared specific LDFLAGS,
in particular, PY_CORE_LDFLAGS should contain the shared specific LDFLAGS.

* documentation for new linker flags

* update Misc folder documentation

* Update Makefile.pre.in

Co-authored-by: Victor Stinner <vstinner@python.org>

---------

Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Filipe Laíns <lains@riseup.net>
2026-02-24 22:52:02 +00:00
Bartosz Sławecki
97181bb336
gh-143535: Dispatch on the second argument if generic method is instance-bindable (GH-144615)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2026-02-24 17:04:37 +01:00
Philipp A.
ae7fc4a4f6
gh-110937: Document full public importlib.metadata.Distribution API (#143480) 2026-02-23 18:51:03 -05:00
Steve Dower
da39c68c2f
Update Python install manager docs (GH-145160)
These updates align with v26.0 that was just released.
2026-02-23 22:28:23 +00:00
Savannah Ostrowski
6194a552f2
Update argparse suggest_on_error code snippet in docs (#144985) 2026-02-23 17:25:05 +00:00
Peter Bierma
24cc998c16
gh-141004: Document PyModuleDef_Type (GH-145043) 2026-02-23 15:18:45 +01:00
Victor Stinner
25fc04d041
gh-141510: Test frozendict in test_capi.test_dict (#145084)
Complete PyDict_Clear() documentation.
2026-02-21 20:07:30 +01:00
Stan Ulbrych
f1f61bf872
gh-66802: Add unicodedata.block() function (#145042)
Closes #66802
2026-02-21 18:27:55 +01:00
Bartosz Sławecki
0499a0c17f
gh-144285: Update *What's New* entry after GH-144299 (#145077) 2026-02-21 12:50:55 +00:00
Bénédikt Tran
34f4fa8425
gh-141226: Deprecate PEP-456 support for embedders (#141287)
Deprecate PEP-456 [1] support for providing an external definition
of the string hashing scheme. Removal is scheduled for Python 3.19.

Previously, embedders could define the ``Py_HASH_ALGORITHM`` macro to be
``Py_HASH_EXTERNAL`` [2] to indicate that the hashing scheme was provided
externally but this feature was undocumented, untested and most likely
unused.

[1]: https://peps.python.org/pep-0456/
[2]: https://peps.python.org/pep-0456/#hash-function-selection
2026-02-21 12:42:13 +01:00
Mohsin Mehmood
85021bc247
gh-144694: Fix re.Match.group() doc claiming [1..99] range limit (#144696)
The documentation incorrectly stated that numeric group arguments
must be in the range [1..99]. This limit was removed in Python 3.5
(bpo-22437). Replace with "a positive integer" since the next
sentence already documents the IndexError for out-of-range values.
2026-02-20 21:36:26 -08:00
Peter Bierma
06292614ff
gh-144748: Document 3.12 and 3.14 changes to PyErr_CheckSignals (GH-144982)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-02-20 19:25:45 -05:00
Raymond Hettinger
8246d588e4
Simplify summary tables in the itertools docs (gh-145050)
Combine two dispatch tables into once.
2026-02-20 12:44:30 -06:00
Peter Bierma
60f3c396fe
gh-141811: Split up init.rst into multiple pages (GH-144844)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Benedikt Johannes <benedikt.johannes.hofer@gmail.com>
2026-02-20 16:37:39 +00:00
Ned Batchelder
852ec18978
Docs: remove unneeded author attributions (#145002)
These directives are not maintained and misleadingly indicate individual
rather than community ownership.

See https://github.com/python/docs-community/issues/180 for discussion,
and https://github.com/python/devguide/pull/1740 for an update to the
devguide.

Also ensured that everyone is in the Misc/ACKS file.
2026-02-19 18:45:28 -05:00
Victor Stinner
beb8e3f276
gh-141510: Document ParameterizedMIMEHeader.params change (#145003)
Document also the dataclasses.field() metadata change.
2026-02-19 22:13:16 +01:00
Filipe Laíns
157f271de3
gh-139899: Introduce MetaPathFinder.discover and PathEntryFinder.discover (#139900)
* gh-139899: Introduce MetaPathFinder.discover and PathEntryFinder.discover

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Fix doc reference

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Remove specific doc references

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Fix docstrings

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Revert "Remove specific doc references"

This reverts commit 31d1a8f551.

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Fix news references

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Add docs warning

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Raise ValueError on invalid parent

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Dedupe __path__ in PathFinder.discover

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Use context manager and add error handling to os.scandir

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Raise ValueError on invalid parent

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Dedupe when package exists with multiple suffixes

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Apply suggestions from code review

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>

* Add tests

Signed-off-by: Filipe Laíns <lains@riseup.net>

---------

Signed-off-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Brett Cannon <brett@python.org>
2026-02-19 15:25:50 +00:00
Donghee Na
52794cba13
gh-141510: Update Whats News for frozendict (gh-144961) 2026-02-19 12:48:57 +00:00
Stan Ulbrych
20caf1c084
Remove unused :platform: in module's docs (GH-144988)
It has not been outputted since Sphinx 1.1.
2026-02-19 13:45:30 +02:00
Stan Ulbrych
c6a142f947
Datetime: Tidy up docs (GH-144720)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-02-18 14:22:34 +01:00
Petr Viktorin
112d8ac972
gh-141984: Reword and reorganize the first part of Atoms docs (GH-144117)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-18 14:13:21 +01:00
Serhiy Storchaka
9e8fa2d4d1
gh-144386: Update equivalent code for "with", "async with" and "async for" (GH-144472)
They use special method lookup for special methods.
2026-02-18 13:13:32 +02:00
Ned Batchelder
7a7521bcfa
Docs: an "improve this page" feature (#144939)
* Docs: a start on an 'improve this page' feature

* pr feedback: simplify the link, and don't scare people with the cla

* pr feedback answered

- use the actual page URL
- tighten the wording

* fix the improve link on the improve page

* news item

* Update Doc/improve-page.rst

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>

* fix whitespace

* A nojs version of the page

* comments to help people keep the two pages in sync

* protect against XSS

* use template for issues from the nojs page

* use the template from the JS page as well

* give the docs issue template a fillable description field

* ugh, getting sloppy

* remove more sloppiness

---------

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-18 04:58:30 -05:00
Stan Ulbrych
6f7e3d4408
Docs: Remove unnecessary entry from nitpick_ignore (GH-144933) 2026-02-18 08:52:04 +01:00