Commit graph

14434 commits

Author SHA1 Message Date
Petr Viktorin
748c4b47b7
Document None for timeout argument of select.select (#142177) 2025-12-02 10:57:09 +02:00
Gregory P. Smith
3e2c557493
gh-141473: Document not calling Popen.wait after Popen.communicate times out. (GH-142101)
Document not calling Popen.wait after Popen.communicate times out.

Closes #141473
2025-11-30 18:50:05 -08:00
Tadej Magajna
981ce0cf3a
gh-142066: Fix grammar in multiprocessing Pipes and Queues (GH-142121)
docs: Fix grammar in multiprocessing Pipes and Queues (gh-142066)
2025-11-30 18:14:20 -08:00
flovent
229ed3dd1f
gh-142067: Add missing default value for param in multiprocessing.Pipe's doc (GH-142109) 2025-11-30 13:10:01 -08:00
Duprat
db098a475a
gh-133146: Add the old public get_value method to documentation and refactor code. (GH-133301)
also uses it within the internals in a few places.
2025-11-29 22:12:48 +00:00
Adam Turner
77399436bf
Docs: Prepare for Sphinx 9 (#142057) 2025-11-29 16:49:37 +02:00
Adam Turner
3c117380ab
GH-121970: Remove Docutils list monkeypatch (#142056) 2025-11-29 14:28:23 +00:00
Moshe Kaplan
cfcd52490d
GH-141963: Clarify argparse documentation (GH-141964)
Clarify argparse documentation

Tightens the phrasing for several argparse actions.
2025-11-28 23:23:34 -08:00
Hugo van Kemenade
890fe5aad5
Docs: multi-disk ZIP files -> multipart ZIP files (GH-141962)
* Remove some old currentlies
* multi-disk -> multipart
* Sentence case headings
2025-11-28 23:11:59 -08:00
Sebastian Pipping
440bcb9456
gh-141994: Warn of XXE vulnerability in documentation of SAX feature xml.sax.handler.feature_external_ges (GH-141996)
Doc/library/xml.sax.handler.rst: Warn of XXE with feature_external_ges

Related to commit baa9f33897
2025-11-28 23:08:17 -08:00
Artur Jamro
526d7a8bb4
gh-141473: Fix subprocess.Popen.communicate to send input to stdin upon a subsequent post-timeout call (GH-141477)
* gh-141473: Fix subprocess.Popen.communicate to send input to stdin
* Docs: Clarify that `input` is one time only on `communicate()`
* NEWS entry
* Add a regression test.

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-11-28 18:04:52 -08:00
Cody Maloney
d2d2e92110
Docs: Move to method references for bytearray.take_bytes (#142053) 2025-11-28 22:07:34 +01:00
SIVALANAGASHANKARNIVAS
e02801dc37
gh-140505: Fix 'parameters' to 'arguments' in xmlrpc.client.MultiCall docs (GH-141942)
Fix terminology: change 'parameters' to 'arguments' in MultiCall docs

Fixes #140505
2025-11-27 18:01:15 +01:00
Guo Ci
8c33c6143e
Correct indentation in stdtypes.rst (#141957) 2025-11-26 11:55:52 +05:30
Adorilson Bezerra
fb655527d8
gh-106318: Add examples for str.join() (#140315)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-24 16:53:25 +02:00
Adorilson Bezerra
0cde70bde0
gh-106318: Add example for str.format() (#137018) 2025-11-24 16:51:10 +02:00
Satyam Kumar Verman
9346e22dd0
gh-141831: Document behavior of functools.lru_cache with concurrent access (gh-141869) 2025-11-24 14:36:09 +00:00
Adorilson Bezerra
0387a8e0f7
gh-106318: Add example for str.isalpha() (#137557)
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-11-24 14:10:35 +00:00
Adorilson Bezerra
0afcb51d17
gh-106318: Add example for str.isascii() (#137558)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-11-24 16:02:18 +02:00
Adorilson Bezerra
6462322840
gh-106318: Add example for str.isdecimal() (#137559)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-11-24 11:47:54 +00:00
Pablo Galindo Salgado
3eec46d3c3
gh-138122: Refactor the CLI of profiling.sampling into subcommands (#141813) 2025-11-24 11:45:08 +00:00
Mark Dufour
23b67aa037
math.dist documentation: add 'strict=True' to equivalent code (#141819) 2025-11-23 17:33:27 -06:00
Brandt Bucher
227b9d326e
GH-140638: Add a GC "candidates" stat (GH-141814) 2025-11-22 21:59:14 +00:00
Serhiy Storchaka
425fd85ca3
gh-138525: Support single-dash long options and prefix_chars in BooleanOptionalAction (GH-138692)
-nofoo is generated for -foo.
++no-foo is generated for ++foo.
/nofoo is generated for /foo.
2025-11-22 20:54:02 +00:00
Adam Turner
cde19e565c
GH-101100: Resolve reference warnings in library/stdtypes.rst (#138420) 2025-11-22 19:23:29 +00:00
Weilin Du
d4e3829a74
gh-101100: Fix sphinx warnings in library/unittest.rst (#140109)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-11-22 21:16:09 +02:00
Chris Angelico
f21ed37daf
gh-141817: Add IPV6_HDRINCL constant to the socket module (#141818)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-11-22 18:07:21 +01:00
Serhiy Storchaka
77cb39e0c7
gh-138697: Fix inferring dest from a single-dash long option in argparse (#138699)
* gh-138697: Fix inferring dest from a single-dash long option in argparse

If a short option and a single-dash long option are passed to add_argument(),
dest is now inferred from the single-dash long option.

* Make double-dash options taking priority over single-dash long options.

---------

Co-authored-by: Savannah Ostrowski <savannah@python.org>
2025-11-20 18:41:58 +00:00
Guo Ci
e5adaafc52
[Docs] Fix typo in bdb: is_skipped_line to is_skipped_module (#141771) 2025-11-19 18:39:54 -08:00
Luciano Ramalho
01713b4342
gh-141721: Improve docstring for LastUpdatedOrderedDict example (gh141724) 2025-11-19 12:22:27 -06:00
Brandt Bucher
598d4c64de
GH-140638: Add a GC "duration" stat (GH-141720) 2025-11-19 08:51:39 -08:00
Guo Ci
52f70a6f60
Correct class name from PullDom to PullDOM (#141207) 2025-11-19 12:30:53 +02:00
Hugo van Kemenade
a62562859d Python 3.15.0a2 2025-11-18 16:51:17 +02:00
Mariusz Felisiak
b87613f214
Add missing backticks in os and decimal docs (#141699) 2025-11-18 12:32:15 +02:00
Semyon Moroz
cc6b62ac56
gh-130160: Add anchors to CLI Usage section for cmdline (#133182) 2025-11-17 14:51:21 +00:00
Brandt Bucher
336366fd7c
GH-140643: Add <native> and <GC> frames to the sampling profiler (#141108)
- Introduce a new field in the GC state to store the frame that initiated garbage collection.
- Update RemoteUnwinder to include options for including "<native>" and "<GC>" frames in the stack trace.
- Modify the sampling profiler to accept parameters for controlling the inclusion of native and GC frames.
- Enhance the stack collector to properly format and append these frames during profiling.
- Add tests to verify the correct behavior of the profiler with respect to native and GC frames, including options to exclude them.

Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2025-11-17 13:39:00 +00:00
Thomas Ballard
20b64bdf23
Docs: Fix typo in socketserver documentation (#140956) 2025-11-17 13:47:28 +02:00
dereckduran
d527d3bf8b
gh-62480: De-personalize "Coping with mutable arguments" section in unittest.mock examples (#141323) 2025-11-17 13:44:44 +02:00
Tamzin Hadasa Kelly
df8091d516
gh-141650: Fix typo in xml.sax.saxutils.unescape documentation (#141652) 2025-11-17 13:35:01 +02:00
Yongzi Li
ed81baf81f
gh-140458: xmlrpc.client raises Fault, does not returns it. (GH-140759) 2025-11-15 17:14:23 +01:00
Osama Abdelkader
a486d452c7
gh-140601: Add ResourceWarning to iterparse when not closed (GH-140603)
When iterparse() opens a file by filename and is not explicitly closed,
emit a ResourceWarning to alert developers of the resource leak.

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-11-13 21:05:28 +02:00
Serhiy Storchaka
b2b68d40f8
gh-140873: Add support of non-descriptor callables in functools.singledispatchmethod() (GH-140884) 2025-11-13 19:48:52 +02:00
Cody Maloney
732224e113
gh-139871: Add bytearray.take_bytes([n]) to efficiently extract bytes (GH-140128)
Update `bytearray` to contain a `bytes` and provide a zero-copy path to
"extract" the `bytes`. This allows making several code paths more efficient.

This does not move any codepaths to make use of this new API. The documentation
changes include common code patterns which can be made more efficient with
this API.

---

When just changing `bytearray` to contain `bytes` I ran pyperformance on a
`--with-lto --enable-optimizations --with-static-libpython` build and don't see
any major speedups or slowdowns with this; all seems to be in the noise of
my machine (Generally changes under 5% or benchmarks that don't touch
bytes/bytearray).


Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Maurycy Pawłowski-Wieroński <5383+maurycy@users.noreply.github.com>
2025-11-13 13:19:44 +00:00
Serhiy Storchaka
d8e6bdc0d0
gh-135801: Add the module parameter to compile() etc (GH-139652)
Many functions related to compiling or parsing Python code, such as
compile(), ast.parse(), symtable.symtable(),
and importlib.abc.InspectLoader.source_to_code() now allow to pass
the module name used when filtering syntax warnings.
2025-11-13 13:21:32 +02:00
Jacob Austin Lincoln
70748bdbea
gh-131116: Fix inspect.getdoc() to work with cached_property objects (GH-131165) 2025-11-12 10:07:21 +00:00
Mark Byrne
35908265b0
gh-75593: Add support of bytes and path-like paths in wave.open() (GH-140951) 2025-11-12 10:20:55 +02:00
Maurycy Pawłowski-Wieroński
0d7b48a8f5
gh-137952: update csv.Sniffer().has_header() docs to describe the actual off-by-onish behavior (GH-137953)
* checks 21, not 20
* Say "header" instead of "first row" to disambiguate per review.

---------

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
2025-11-12 00:03:14 +00:00
Serhiy Storchaka
7906f4d96a
gh-132686: Add parameters inherit_class_doc and fallback_to_class_doc for inspect.getdoc() (GH-132691) 2025-11-12 00:01:25 +02:00
Aniket
b5196fa15a
gh-137339: Clarify host and port parameter behavior in smtplib.SMTP{_SSL} initialization (#137340)
This also documents the previously undocumented default_port parameter.

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-11 15:25:26 -05:00
Marco Barbosa
c903d76832
gh-139533: fix refs to code without proper markups on turtledemo doc (GH-139534)
gh-139533: fix refs to code without proper markups on turtledemo documentation
2025-11-11 11:35:55 -08:00