Commit graph

30390 commits

Author SHA1 Message Date
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
Petr Viktorin
049c2526bf
gh-134160: Start "Extending and embedding" with a Diataxis-style tutorial (GH-142314)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Daniele Nicolodi <daniele@grinta.net>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-12-19 17:48:34 +01:00
Andrej
610aabfef2
gh-142527: Docs: Clarify that random.seed() discards the sign of an integer input (#142483)
If *a* is an integer, the sign of *a* is discarded in the C source code. Clarify this behavior to prevent foot guns, where a common use case might naively assume that flipping the sign will produce different sequences (e.g. for a train/test split of a synthetic data generator in machine learning).

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-12-19 00:29:35 -08:00
Ethan Furman
e79c39101a
gh-118342: [Enum] update docs (GH-137290)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-18 18:31:37 +00:00
Donghee Na
14f0b5191a
gh-142419: Add mmap.set_name method for user custom annotation (gh-142480) 2025-12-18 23:33:49 +09:00
Hugo van Kemenade
d2abd5733b
gh-76007: Deprecate VERSION in xml.etree.ElementTree & version in xml.sax.expatreader & xml.sax.handler (#142898) 2025-12-18 14:22:23 +00:00
James
fc80096a07
gh-137063: Document that ast node types replaced by Constant are no longer available (#137064) 2025-12-18 13:17:42 +01:00
Damian Birchler
77c8e6a2b8
gh-142876: remove reference to thread in documentation of asyncio.Queue.shutdown (#142888) 2025-12-17 16:40:03 +00:00
Ken Jin
49627dc991
Use other name for JIT contributor (#142877) 2025-12-17 14:21:02 +00:00
Savannah Ostrowski
1fc3039d71
gh-139038: Add JIT What's New for 3.15 (#142845)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2025-12-17 12:14:44 +00:00
Lysandros Nikolaou
1e9a0ee682
gh-140374: Add glossary entries related to multithreading (#140375)
---------

Co-authored-by: Daniele Parmeggiani <8658291+dpdani@users.noreply.github.com>
2025-12-17 12:09:51 +01:00
Hugo van Kemenade
f1eb0c0b0c Python 3.15.0a3 2025-12-16 14:26:12 +02:00
Hugo van Kemenade
c10ec48bb9
gh-76007: Deprecate __version__ attribute in wsgiref.simple_server (#142675) 2025-12-16 14:08:51 +02:00
1nftf
e27f76b6fe
gh-142019: Add description about the exponent of result formatted with presentation type 'e' (#142084) 2025-12-16 13:56:12 +02:00
Cody Maloney
e12c744b0a
gh-83926: BlockingIOError characters_written is byte count (#141215) 2025-12-16 13:53:56 +02:00
Mohsin Mehmood
b372bd7295
gh-141218: Fix inaccurate object comparison documentation (#141221)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-12-16 13:46:42 +02:00
Owain Davies
a15bd217b2
Remove duplicate content in Mapping types - dict documentation (#141036) 2025-12-16 13:46:13 +02:00
Cameron Beck
190aa9fe7e
Correct Glossary key function example to use str.casefold instead of str.lower (#140316) 2025-12-16 13:44:12 +02:00
Sergey B Kirpichev
2450be607c
decimal docs: specification link and examples (#128698)
Co-authored-by: RUANG (James Roy) <longjinyii@outlook.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-12-16 11:41:59 +00:00
Adorilson Bezerra
ec2619c080
gh-106318: Add examples for str.ljust() method (#142719)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-16 13:39:20 +02:00
Petr Viktorin
dab9fb3dc2
Clarify that PyStructSequence is different from collections.namedtuple (#142626) 2025-12-16 13:38:11 +02:00
Arthur Wigo
ba587ed8f3
gh-130536: Add details to os.path documentation (#130557) 2025-12-16 13:29:52 +02:00
Stan Ulbrych
c24e238417
gh-85204: Improve locale.setlocale example (#132683) 2025-12-16 13:26:33 +02:00
Patrick R
58027999bf
gh-124864: Extends smtplib documentation on ESMTP options format (#132547) 2025-12-16 13:21:38 +02:00
Bartosz Sławecki
a44509ea87
gh-139320: Cover exception chaining in the docs of contextmanager.__exit__ (GH-140169) 2025-12-16 11:15:37 +01:00
AN Long
0978b9a7d5
gh-85222: Document the global start method side effect in multiprocessing (GH-136426)
* Document the ctx parameter in some types in multiprocessing.
* Reduce duplication while still linking to the central explanation from API points with the side effect.

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: R Chintan Meher <meherrihaan@gmail.com>
2025-12-15 14:12:52 -08:00
Hugo van Kemenade
b3b644b6b8
gh-141081: Revert "Add a .gitignore file to __pycache__ folders (#141162)" (#142758) 2025-12-15 21:27:06 +02:00
Petr Viktorin
e4d32a3ef9
gh-142020: ctypes docs: Note that find_library relies on the programs it runs (GH-142134) 2025-12-15 15:15:22 +01:00
Victor Stinner
14d3974db0
gh-142217: Recommend PyUnicode_InternFromString() to replace _PyUnicode_FromId() (GH-142746) 2025-12-15 14:25:30 +01:00
Pablo Galindo Salgado
6658e2cb07
gh-138122: Add --subprocesses flag to profile child processes in tachyon (#142636) 2025-12-15 12:11:40 +00:00
Hugo van Kemenade
38ad651b67
gh-76007: Deprecate __version__ attribute in ctypes (#142679) 2025-12-15 13:30:23 +02:00
Stan Ulbrych
15c9d9027e
gh-141081: Add a .gitignore file to __pycache__ folders (#141162)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
2025-12-15 12:16:56 +02:00
Adorilson Bezerra
3596dba691
gh-106318: Add examples for str.isnumeric() (#142680)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-14 20:12:12 +02:00
Pablo Galindo Salgado
e4d3c8395c
gh-138122: Add some screenshots to the profiling.sampling docs (#142676)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-14 17:43:03 +00:00
Bénédikt Tran
11aef219f5
gh-141938: document treatment of OSError raised by HTTPConnection.getresponse (#142339) 2025-12-14 11:12:20 +01:00
SYan212
39ecb17103
typo fixes in docs (#142683) 2025-12-14 13:47:22 +05:30
Stan Ulbrych
6cddf04344
Add 'Show translation source' to docs sidebar (#130355)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2025-12-14 01:03:23 +02:00
dr-carlos
e5a48480c0
Add missing comma to tuple in except* docs (#142395) 2025-12-14 00:51:35 +02:00
decorator-factory
f6b6a99aa5
gh-142411: Change documentation to reflect the new docstring adjustments in 3.13 (#142413) 2025-12-14 00:29:59 +02:00
Joshua Ward
c865ab3781
gh-142568: Fix eval() docs to use 'source' parameter name (#142644) 2025-12-13 08:07:53 -08:00
Hugo van Kemenade
170dac291e
gh-76007: Deprecate __version__ attribute in http.server (#142658)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-13 15:32:13 +00:00
Brett Cannon
0a97941245
GH-139686: Update versionchanged directive to 'next' in importlib (GH-142649)
An oversight when merging 57db12514a .
2025-12-12 20:47:20 +00:00
Amer Esmail Elsheikh
57db12514a
gh-139686: Make reloading a lazy module no-op (GH-139857)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
2025-12-12 20:26:50 +00:00
Savannah Ostrowski
8b669d54c3
GH-142389: Add backtick markup support in description and epilog (#142390) 2025-12-12 20:08:19 +00:00
Roman Donchenko
fa1ac9070c
Doc: remove the invalid type variables of typing.TextIO and BinaryIO (#142642)
They are not generic classes.
2025-12-12 11:20:49 -08:00
Victor Stinner
7aa353c414
gh-142217: Deprecate the private _Py_Identifier C API (#142221)
Deprecate functions:

* _PyObject_CallMethodId()
* _PyObject_GetAttrId()
* _PyUnicode_FromId()
2025-12-12 14:10:25 +01:00
Pablo Galindo Salgado
519bee474b
gh-138122: Add code examples to the profiling.sampling ddocs (#142609) 2025-12-12 01:37:47 +00:00
Pablo Galindo Salgado
6a0135a392
gh-138122: Add exception profiling mode to the sampling profiler (#142561) 2025-12-11 20:46:34 +00:00
Brett Cannon
af185727b2
GH-65961: Stop setting __cached__ on modules (GH-142165) 2025-12-11 11:44:46 -08:00