Commit graph

31052 commits

Author SHA1 Message Date
Aniket
47b7dc788c
gh-139837: Document attributes of objects recorded by warnings.catch_warnings (GH-139893)
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-14 15:39:33 +03:00
Shardul Deshpande
9ad6ba0324
gh-151443: Fix documented default of unittest.mock.mock_open's read_data parameter (#151444) 2026-06-13 18:31:03 +00:00
Jonathan Dung
5b38519762
Docs: Fix method directive signatures in enum docs (#151429) 2026-06-13 09:47:23 +01:00
Rafael Fontenelle
f4f102027a
Fix typos in the curses.ascii module documentation (#129300)
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-12 16:02:33 +00:00
Maciej Olko
d986124d83
Docs: avoid repetitions of class references in functions.rst (#150891) 2026-06-12 17:53:06 +03:00
Aniket
402668b2b1
gh-138991: Update dataclass documentation for new eq behavior in Python 3.13 (#139007)
And add tests.

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-11 17:15:29 +00:00
Cody Maloney
b18168cb32
gh-101100: Fix Sphinx nitpick in unittest.mock.rst (#151302) 2026-06-11 16:29:40 +01:00
Maciej Olko
b9bffc09a6
gh-139588: Fix nondeterministic make latex doc build under parallel make (#151343) 2026-06-11 16:13:22 +01:00
Stan Ulbrych
9620f69cd4
Drop historical :author:s from HOWTOs (#151091) 2026-06-11 09:46:39 +01:00
glennglazer
84630e2cb9
gh-136880: Add warning about PYTHONPATH (GH-151098) 2026-06-11 07:14:34 +01:00
Petr Viktorin
7bbb9607a2
gh-141984: Reword the Generator expressions section (GH-150518)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-10 16:45:30 +02:00
Kumar Aditya
e2bd50d2e1
add asyncio guide for Free-Threaded Python (#150456) 2026-06-10 14:02:11 +00:00
Manoj K M
8c0e2515bb
Docs: Fix typos in the "Memory Management" section (GH-151243) 2026-06-10 09:13:17 -04:00
Bernát Gábor
a621e8ad81
gh-89554: Document socket.SocketType as a class (#150683)
socket.SocketType is a class (re-exported from _socket as an alias of
_socket.socket, the base class of socket.socket), but was documented with
the ".. data::" directive, so ":class:" cross-references to it cannot
resolve against a py:class target.

Switch the entry to ".. class::", correct the misleading description
(SocketType is the base class of the socket type, not "type(socket(...))"
which is socket.socket; addresses gh-88427), move it into the Socket
Objects section, and document the socket object methods and attributes
nested under the socket class, dropping the redundant "socket." prefix.
2026-06-10 15:01:01 +02:00
sobolevn
44a533fa1b
gh-150671: Deprecate PyAsyncGen_New, PyCoro_New, PyGen_New, PyGen_NewWithQualName functions (#150672)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-10 15:57:09 +03:00
Serhiy Storchaka
ca32ebf793
gh-80384: Check that callback is callable at weak reference creation (GH-151145)
* Python functions weakref.ref() and weakref.proxy() now raise TypeError
  if the callback argument is not callable or None.
* C functions PyWeakref_NewRef() and PyWeakref_NewProxy() now raise TypeError
  if the callback argument is not callable, None, or NULL.

Co-authored-by: Maxwell Bernstein <emacs@fb.com>
2026-06-10 13:34:55 +03:00
Taeknology
11c93d6df3
gh-149716: Document PySlot_DATA for Py_mod_gil and Py_mod_multiple_interpreters (GH-150053)
Add short code examples mirroring the existing Py_mod_abi example,
so it is clear which slot definition macro (PySlot_DATA, PySlot_INT64,
or PySlot_UINT64) to use for these two slots.
2026-06-10 12:10:15 +02:00
Savannah Ostrowski
82cb7d4bf6
GH-59633: Clarify dest collisions in argparse docs (#150987) 2026-06-09 10:07:03 -07:00
Savannah Ostrowski
bc37a227b2
GH-61082: Clarify nargs='*' positional default behavior (#150989) 2026-06-09 15:37:24 +00:00
Savannah Ostrowski
528550e0e7
GH-54732: Tweak wording around empty lines in argument files (#150980) 2026-06-09 15:37:15 +00:00
Sergio López Gómez
3266edefd7
Docs: add cross-references to improve navigation in getpass.rst (#151092) 2026-06-09 11:36:05 -04:00
Robsdedude
b2e2cd3912
gh-150898: Assume OpenSSL supports keylogging (#150870)
Since version 3.10, CPython requires OpenSSL 1.1.1 or higher.
Therefore, support for keylogging can be assumed.

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>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-09 16:37:38 +02:00
Stan Ulbrych
0a179e748b
Docs: Only add profiling-sampling-visualization.{css,js} to files when necessary (#151150) 2026-06-09 14:16:03 +01:00
Arshal Aromal
29a920e80e
gh-151070: Fix class referencing typo in collections.abc docs (GH-151088) 2026-06-08 22:38:14 +03:00
Eduardo Villalpando Mello
5c13217314
gh-148932: Fix profiling.sampling on Windows virtual environments (#150541) 2026-06-08 17:25:43 +00:00
Adorilson Bezerra
f051c68923
gh-106318: Add examples to the str.isdigit() method docs (#144721)
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-08 12:51:35 +00:00
Doron Behar
bd5fa31c5f
gh-141623: operator.rst: don't use term "bitwise" (GH-141846) 2026-06-08 15:12:48 +03:00
Jonathan Dung
e3762114e5
Mention frozendict in object.__hash__() documentation (#148867) 2026-06-08 12:39:41 +01:00
Christian Zinck
a1873300ee
gh-101100: Fix Sphinx warnings in 'Buffer Object Structures' documentation (#151058) 2026-06-08 11:24:26 +01:00
Sergio López Gómez
16ede813eb
Docs: Fix missing colon in bisect example function (GH-151061) 2026-06-08 05:39:03 -04:00
きょうすけ
4084141073
gh-69619: Clarify "whitespace" in the str.{l,r}strip() documentation (#150901)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-06-07 19:25:50 +01:00
saber-bit
81965c1683
Update an error message in the 'Functional Programming HOWTO' (#151047) 2026-06-07 17:47:50 +01:00
Alexander Shadchin
fded34d6fe
Delete mention encoding and errors for importlib.resources.path() (GH-143111) 2026-06-06 14:52:01 +03:00
Inada Naoki
4833b2031e
Doc: fix order of PyLong_FromUnsignedLongLong (#150937) 2026-06-06 20:37:49 +09:00
Jeff Epler
b6e66136cc
gh-150534: Add C23 half-turn trigonometric *pi functions (GH-150555)
Add the the following functions to the math module:
acospi, asinpi, atanpi, atan2pi, cospi, sinpi, tanpi.
2026-06-06 10:19:45 +00:00
Serhiy Storchaka
b18b6a49c6
gh-84649: Use statx() in TimedRotatingFileHandler if available (ПР-150968)
This allows to support rotation based on the file birth time on Linux.
2026-06-06 11:49:07 +03:00
Ilya Nikolaev
ea4c85552b
Use time.monotonic in OrderedDict LRU cache example (#150986) 2026-06-06 01:42:59 +03:00
Ezio Melotti
6544bf4263
gh-110631: Fix wrong blocks indentation in difflib.rst (GH-110885) 2026-06-05 17:02:10 +00:00
Cody Maloney
e4db68b9c9
gh-129011: Update docs for Raw I/O read, readinto, and write (#135328)
Update `RawIOBase` and `FileIO` documentation to match implementation
behavior around `.read`, `.readinto`, `.readall` and `.write`.

In particular:

 - They may make more than one system call (PEP-475)
 - Add warnings if `.write()` requires a wrapping retry loop (see: gh-126606)
    - "Raw I/O" `.write`` may not write all bytes
    - `buffering=0` example results in a "Raw I/O"

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-05 14:00:59 +02:00
Steve Dower
e28a2f4930
Add shebang documentation for PyManager 26.3b1 (GH-150931) 2026-06-04 21:37:18 +01:00
Adorilson Bezerra
a96cba5c4a
gh-106318: Add doctest role and a 'See also' to the str.split() docs (#144367) 2026-06-04 12:39:14 +01:00
Miro Hrončok
cb064e746d
Fix 2 broken links in documentation (#150892)
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-04 10:42:06 +01:00
jb2170
ae507e3b14
gh-119670: Add force keyword only argument to shlex.quote (#148846)
There are propositions to add a single-quote-double-quote switch
(gh-90630), so to avoid hiccups of people passing `force` as a
positional and it being used for the single-double switch, we make
kwargs kwargs-only.

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2026-06-04 11:06:02 +02:00
Stan Ulbrych
7a468a1012
gh-150032: Tidy up 3.15 pending removals (#149594)
Co-authored-by: Savannah Ostrowski <savannah@python.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Brett Cannon <brett@python.org>
2026-06-03 17:29:13 +03:00
Hugo van Kemenade
b643826c11
Docs: Replace hardcoded SOURCE_URI with patchlevel check (#150850) 2026-06-03 16:37:09 +03:00
Abduaziz π
5915a1fb9d
gh-132467: Document and test that generic aliases are not classes (#133504)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-06-03 13:35:25 +00:00
da-woods
58beae7319
Correct Stable ABI documentation for METH_FASTCALL (GH-149593)
* Correct Stable ABI documentation for METH_FASTCALL

The current documentation says:

> 
> METH_FASTCALL
>    Part of the Stable ABI since version 3.7.
>
> [...]
>
>   Added in version 3.7.
>
>    Changed in version 3.10: METH_FASTCALL is now part of the stable ABI.

so is contradictory about when it was added to the Stable ABI.  Looking at the header it seems like 3.10 is right.
2026-06-03 15:20:35 +02:00
Victorien
deb33ecba3
gh-105812: Make use of the Sphinx deco role in documentation (#139598) 2026-06-03 13:14:47 +00:00
Yashraj
6453065db9
gh-141004: Document unstable perf map functions in ceval.h (GH-143492) 2026-06-03 12:36:25 +00:00
Robsdedude
5553e003ca
Fix a typo in SSLSocket docs (GH-150839) 2026-06-03 08:18:06 -04:00