Commit graph

14027 commits

Author SHA1 Message Date
Emma Smith
4b44b3409a
gh-134938: Add set_pledged_input_size() to ZstdCompressor (GH-135010) 2025-06-05 14:31:49 +03: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
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
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
Sergey B Kirpichev
5f61cde80a
gh-132908: Add math.isnormal/issubnormal() functions (GH132935) 2025-06-02 13:38:05 +03:00
GalaxySnail
128195e12e
gh-122153: indicate that Windows does not support socket.{send,recv}_fds (#134960)
This amends commit e3b6ff19aa.
2025-06-02 12:23:52 +02:00
Sergey B Kirpichev
7828d52680
gh-134449: fix grammar for precision_with_grouping in format description (#134608)
This amends commit f39a07be47.
2025-06-02 11:45:48 +02:00
Bénédikt Tran
ee65ebdb50
gh-134978: deprecate string keyword parameter for hash function constructors (#134979) 2025-06-02 10:25:50 +02:00
Andrea-Oliveri
f806463e16
gh-134004: Added the reorganize() methods to dbm.sqlite, dbm.dumb and shelve (GH-134028)
They are similar to the same named method in dbm.gnu.
2025-06-01 15:30:04 +03:00
Rihaan Meher
fe6f8a3619
gh-133503: clarify compileall -s/-p docs (#134756)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-06-01 10:18:31 +02:00
Serhiy Storchaka
ad39f01788
gh-108885: Use subtests for doctest examples run by unittest (GH-134890)
Run each example as a subtest in unit tests synthesized by
doctest.DocFileSuite() and doctest.DocTestSuite().

Add the doctest.DocTestRunner.report_skip() method.
2025-05-31 13:01:46 +03:00
Serhiy Storchaka
3c66e59766
gh-134918: Fix and improve doctest's documentation (GH-134919) 2025-05-31 12:03:08 +03:00
Serhiy Storchaka
4d31d19a1d
gh-134718: Omit optional Load() values in ast.dump() (GH-134934) 2025-05-31 10:32:53 +03:00
Serhiy Storchaka
1a89991d23
gh-134733: Fix documentation for the show_empty option of ast.dump() (GH-134925)
Optional None values are always omitted.
2025-05-30 15:52:36 +00:00
Emma Smith
5f60d0fccc
gh-134906: Document CompressionParameter.content_size_flag (#134907)
* Document CompressionParameter.content_size_flag
2025-05-29 21:37:43 -07:00
Jelle Zijlstra
381020d41f
ast docs: Fix description of ast.Constant (#134741)
Contrary to the current docs, ast.Constant will never hold containers
such as frozenset or tuple; the Python parser only emits it for simple
literals.

For precision, add the exact list of types that may be contained in an
ast.Constant.
2025-05-29 21:11:20 -07:00
Savannah Bailey
a4251411a9
GH-106235: Clarify parse_known_args documentation by removing "remaining" (#126921) 2025-05-29 20:34:34 -07:00
Stan Ulbrych
b783e1791b
gh-69011: : clarify & deduplicate ctypes.create_*_buffer docs (GH-132858)
This adds a warning about the possibly-missing NUL terminator, but in a way
that doesn't make it sound like a bug/wart.
2025-05-29 15:16:20 +02:00
Hugo van Kemenade
21672b694b
Update outdated statement from math about C standard (#134621)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-05-28 08:30:04 +01:00
Allen Hernandez
7be5916f6d
gh-134817: Document [Timed]RotatingFileHandler shouldRollover method (GH-134818)
Co-authored-by: Allen Hernandez <2349718+AllenSH12@users.noreply.github.com>
2025-05-28 07:44:38 +01:00
larryhastings
d7256ae4d7
Fix typing.TYPE_CHECKING docs to reflect PEP 649. (#134813)
typing.TYPE_CHECKING should no longer steer users towards
manual or automatic stringization (and PEP 563); PEP 649
makes all that unnecessary.
2025-05-27 23:08:52 -07:00
Rishabh Singh
967f361993
gh-134789: Document del s[i] operation for mutable sequences (#134804)
[main] Update stdtypes.rst

- Added explicit mention of `del s[i]` (item deletion by index) to the Mutable Sequence Types section.
- Clarified that this operation removes the item at the specified index from the sequence.
- Addresses issue #134789.
2025-05-27 14:48:04 -04:00
Bénédikt Tran
737b4ba020
gh-134635: add zlib.{adler32,crc32}_combine to combine checksums (#134650) 2025-05-27 10:48:34 +02:00
Shamil
92ea1eb38f
gh-134664: document cleanup_socket parameter in asyncio.start_unix_server (#134750) 2025-05-27 08:23:06 +00:00
tmlnv
71290a6fbe
gh-134559: Add versionadded for `object.__replace__()` (#134672) 2025-05-26 10:39:04 +01:00
Jelle Zijlstra
57fef27cfc
gh-133960: Improve typing.evaluate_forward_ref (#133961)
As explained in #133960, this removes most of the behavior differences with ForwardRef.evaluate.
The remaining difference is about recursive evaluation of forwardrefs; this is practically useful
in cases where an annotation refers to a type alias that itself is string-valued.

This also improves several edge cases that were previously not handled optimally. For example,
the function now takes advantage of the partial evaluation behavior of ForwardRef.evaluate() to
evaluate more ForwardRefs in the FORWARDREF format.

This also fixes #133959 as a side effect, because the buggy behavior in #133959 derives from
evaluate_forward_ref().
2025-05-25 17:26:39 +00:00
Jelle Zijlstra
b51b08a0a5
annotationlib docs: note that ForwardRef.evaluate eventually defaults to empty globals (#134661) 2025-05-25 17:23:28 +00:00
Eddy Mulyono
80284b5c5e
gh-80334: fix multiprocessing.freeze_support for other spawn platforms (GH-134462)
Doc/library/multiprocessing.rst: freeze_support: Change to specify spawn method instead of platform
Have multiprocessing.freeze_support() enable on spawn, not just win32.

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-05-24 03:50:19 +00:00
Blaise Pabon
1729468016
gh-106318: Add example for str.count() (#134519) 2025-05-23 12:47:11 +03:00
Blaise Pabon
da9b5c1c9c
gh-106318: Add example for str.center() (#134518) 2025-05-23 12:44:15 +03:00
Thomas Grainger
a3d0306ca0
gh-128307: Update docs for asyncio.create_task, TaskGroup.create_task, asyncio.create_task (#134202) 2025-05-22 15:54:56 -07:00
Josh Cannon
9b292ff022
Avoid __file__ in hashlib example (GH-134540) 2025-05-22 14:32:00 -07:00
Cody Maloney
e1f891414b
gh-80050: Update BufferedReader.read docs around non-blocking (GH-130653) 2025-05-21 16:06:40 +00:00
Emma Smith
d862b6de1b
gh-132983: Add documentation for compression.zstd (GH-133911)
Add documentation for compression & compression.zstd.

🎉

---------

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>
Co-authored-by: Sumana Harihareswara <sh@changeset.nyc>
Co-authored-by: Martin Panter <vadmium@users.noreply.github.com>
2025-05-21 07:18:21 -07:00
Yuki Kobayashi
15a8b5b9bd
gh-110631: Fix some incorrect indents in the documentation (#129312) 2025-05-21 13:52:02 +00:00
sobolevn
dcfc91e4e5
Fix signature of _curses.assume_default_colors in the docs (#134409) 2025-05-21 15:56:34 +03:00
ivonastojanovic
6856a04d68
Add documentation for remote debugging with pdb (#134260)
* Mention remote debugging via -p PID in usage text

Adds a brief note to the pdb help summary about attaching to a running
process using the -p option, making the remote debugging feature
more visible.

* Mention remote debugging in pdb.rst
2025-05-20 19:50:49 -04:00
tigerding
aadda87b3d
gh-134209: use heap-allocated memory in _curses.window.{instr,getstr} (GH-134283)
* made curses buffer heap allocated instead of stack
* change docs to explicitly mention the max buffer size
* changing GetStr() function to behave similarly too
* Update Doc/library/curses.rst
* Update instr with proper return error handling
* Update Modules/_cursesmodule.c
* change to strlen and better memory safety
* change from const int to Py_ssize_t
* add mem allocation guard
* update versionchanged to mention it was an increase.
* explicitly use versionchanged 3.14 as that is its own branch now.

TESTED: `python -m test -u curses test_curses`

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-05-20 20:36:04 +00:00
Alex Kautz
36eb711d2f
gh-85045: clarified that the underlying buffer of a TextIOBase can be a RawIOBase (GH-134372)
Added a clarification that the underlying binary buffer of a TextIOBase can be a BufferedIOBase OR a RawIOBase
2025-05-20 18:18:58 +00:00
Stan Ulbrych
86397cf65d
gh-76075: Correct datetime.timestamp documentation (#131202)
* Clean up timestamp docs

* Update datetime.rst

* Suggestion
2025-05-20 12:18:53 -04:00
Yuki Kobayashi
f3acbb72ff
gh-101100: Fix Sphinx warnings in library/decimal.rst (#134303) 2025-05-20 17:46:13 +03:00
Serhiy Storchaka
a31bbc951a
gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-05-20 14:08:40 +02:00
Alek Binion
66aaad6103
gh-134201: Expand explanation of Base85 encodings in base64 docs (#134288)
Explain history of de-facto standard and how to pick between the two Base-85 encoding functions in the base-64 module.

---------

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2025-05-19 18:59:06 -05:00
Sahil Shah
92f85ff3a0
gh-80184: Set getattr(socket, "SOMAXCONN", 5) as the default queue size for TCPServer (GH-134249)
socketserver.TCPServer default queue size becomes SOMAXCONN instead of 5 when possible.
2025-05-19 19:28:09 +00:00
Duprat
de70614c13
gh-132795: Add docs for multiprocessing.Semaphore.locked (#133299) 2025-05-19 20:06:09 +05:30
Serhiy Storchaka
44b73d3cd4
gh-122055: Clarify documentation for empty matches in RE (GH-133169) 2025-05-19 15:27:50 +02:00
Micha Albert
fa4e088668
gh-134150: Clarify distinction between JSON and Python objects (#134154)
* gh-134150: Clarify distinction between JSON objects and Python objects in json module docs

* Revert change to JSON introduction

* Clarify occurrences of "object literal" as JSON
2025-05-17 21:47:37 -04:00
Clifford Gama
b41d79c776
Docs: fix spelling of "test case" in unittest documentation (#134137) 2025-05-17 13:36:38 +02:00
Victorien
9d73875072
gh-113878: fix versionadded in dataclasses.field() documentation (#134065) 2025-05-17 10:00:13 +02:00
Bénédikt Tran
faac627e47
gh-133810: remove http.server.CGIHTTPRequestHandler and --cgi flag (#133811)
The CGI HTTP request handler has been deprecated since Python 3.13.
2025-05-17 09:58:16 +02:00