Commit graph

14214 commits

Author SHA1 Message Date
Wulian233
5c6937ad20
gh-133656: Remove deprecated zipimport.zipimporter.load_module (GH-133662)
Remove deprecated `zipimport.zipimporter.load_module`.
2025-08-30 01:28:18 +00:00
Hang
5f7906715a
gh-123858: Improve Doc: SyntaxWarning is emitted during bytecode generation (gh-122844)
---------

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2025-08-29 23:29:59 +10:00
Andreas Pelme
f733e428f8
Docs: Fix typo in shutil.make_archive example (GH-138188) 2025-08-27 11:57:37 -04:00
Blaise Pabon
14a5ad1db1
gh-106318: Add example for str.find() (#134529)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-08-27 09:42:00 +03:00
Serhiy Storchaka
65fb4d11a0
gh-137609: Update signatures of builtins in the documentation (GH-137610)
Show signatures that match the actual signatures or future multisignatures
for all functions, classes and methods in the "builtins" module.
2025-08-25 15:28:27 +03:00
Serhiy Storchaka
aa1dbd4dde
gh-137986: Fix and improve the csv functions docstrings (GH-137987)
The csv.register_dialect() docstring no longer imply that it returns a
dialect.
All functions have now signatures.

Co-authored-by: maurycy <5383+maurycy@users.noreply.github.com>
2025-08-24 11:13:31 +03:00
Kentaro Jay Takahashi
282e88506b
gh-133125: Clarify ZipInfo.date_time attribute documentation (#136082)
Specifically, clarify that ZipInfo.date_time pulls the datetime information from the central directory, and that times are interpreted as local time.

Co-authored-by: Emma Smith <emma@emmatyping.dev>
2025-08-22 16:52:30 -07:00
Krishna Chaitanya
f278afcabf
gh-91116: Add hyperlink from sys.settrace to frame objects (GH-138062) 2025-08-22 12:28:33 -04:00
Bénédikt Tran
4519b8acb5
gh-136134: imaplib: fix CRAM-MD5 on FIPS-only environments (#136615) 2025-08-22 12:08:55 +02:00
vict-Yang
ce70a57bc0
gh-137920: Fix semantically relevant typo in curses.window.attron (#137940) 2025-08-22 10:27:02 +02:00
Yüce Tekol
7dc42b67a7
gh-137884: Added threading.get_native_id() on Illumos/Solaris (GH-137927) 2025-08-20 17:10:44 +00:00
Tangyuan
7685b8ada8
gh-137900: Improve dataclasses frozen parameter documentation (#137937) 2025-08-20 09:08:45 -04:00
Serhiy Storchaka
23adbf53c5
gh-137044: To weaken the statement regarding the RLIM_INFINITY value (GH-137954) 2025-08-20 15:05:38 +03:00
Maximilian Linhoff
9b5235b62e
Fix typo in logging docs (GH-137981) 2025-08-20 07:07:32 -04:00
Serhiy Storchaka
e39255e76d
Update the availability info in the resource docs (GH-137922) 2025-08-19 18:11:03 +03:00
Serhiy Storchaka
8700404f86
Update the dbm documentation (GH-137919)
Unify documentation for all backends, enumerate all not implemented mapping
methods, document particularities of implemented mapping methods.
2025-08-19 18:05:24 +03:00
PrinceNaroliya
379161dd51
[docs] minor, fix grammar in ssl.SSLContect.sslsocket_class docstring (GH-137935)
Fix grammar in ssl.SSLContect.sslsocket_class docstring

---------

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2025-08-19 12:00:39 +00:00
Serhiy Storchaka
6e2b9a2130
gh-137512: Add new constants in the resource module (GH-137513)
* RLIMIT_NTHR
* RLIMIT_THREADS
* RLIMIT_UMTXP
* RLIM_SAVED_CUR
* RLIM_SAVED_MAX

* Document RLIMIT_PIPEBUF. Other doc fixes.
2025-08-19 08:52:45 +02:00
Serhiy Storchaka
0324c726de
gh-137044: Make resource.RLIM_INFINITY always positive (GH-137511)
It is now a positive integer larger larger than any limited resource value.
This simplifies comparison of the resource values.
Previously, it could be negative, such as -1 or -3, depending on platform.

Deprecation warning is emitted if the old negative value is passed.
2025-08-18 19:28:56 +03:00
Bartosz Sławecki
138ed6db9f
gh-44538: Mention nested classes/functions in doctest docs (GH-137870) 2025-08-18 10:58:23 -04:00
Kumar Aditya
1c3950abc1
gh-135862: add C contiguous one-dimensional buffer requirement to asyncio.StreamWriter docs (#137910) 2025-08-18 18:36:43 +05:30
Bar Harel
92be979f64
gh-127859: Fixed documentation for call_later and call_at for early wakeup in asyncio (#137859) 2025-08-18 17:48:54 +05:30
Semyon Moroz
043f251154
gh-131885: Use positional-only markers for the `decimal` module (#131990) 2025-08-18 12:49:21 +01:00
Weilin Du
63fffb15f5
gh-137847: Add examples for UUIDv6-8 (#137848)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-08-18 11:24:19 +00:00
Serhiy Storchaka
0c8fecc4cf
gh-137729: Fix support for locales with @-modifiers (GH-137253) 2025-08-18 10:11:15 +03:00
Christoph Walcher
8e3244d39b
Emend an error in `string.templatelib` example output (#137890) 2025-08-17 23:12:32 +01:00
Terry Jan Reedy
3663b2ad54
gh-137846: Add missing 'be' to profile doc. (#137856)
Insert 'be' into 'will interpreted'.
2025-08-16 10:29:47 -04:00
Kumar Aditya
038a6e3b95
gh-90483: fix docs of SubprocessTransport.get_pipe_transport (#137852) 2025-08-16 11:11:45 +00:00
Kumar Aditya
4b2dbe8e0a
gh-101359: clarify docs for asyncio.Event.clear (#137849) 2025-08-16 10:50:54 +00:00
Nick Burns
d86c2257a6
gh-92936: update http.cookies docs post GH-113663 (#137566)
* add versionchanged and example with quotes in cookie value

* update whatsnew with http.cookies change

* Update Doc/library/http.cookies.rst

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Update Doc/whatsnew/3.15.rst

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* spelling, quote

* demonstrate json

* Update Doc/library/http.cookies.rst

Co-authored-by: Senthil Kumaran <senthil@python.org>

* Apply suggestions from code review

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

* shorter description

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Senthil Kumaran <senthil@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-08-15 13:47:46 -07:00
rimchoi
eee6589c17
gh-137777: Disband the 'Program Frameworks' chapter (#137796) 2025-08-15 18:41:09 +01:00
Chaemin-Lim
d6719c6be6
gh-137760: Update REPL constants documentation (gh-137798) 2025-08-15 22:53:15 +09:00
Adam Turner
75d20b2c67
GH-123299: Copyedit 3.14 What's New: Optimizations (#137789) 2025-08-15 11:14:45 +00:00
Jakub Stasiak
095bc775ec
Mention the "context manager" keyword in concurrent.futures documentation (#130976) 2025-08-15 15:30:22 +05:30
Serhiy Storchaka
15ab45775c
gh-87281: Improve documentation for locale.setlocale() and locale.getlocale() (GH-137313)
Add a section explaining the locale name formats.
2025-08-13 20:49:33 +03:00
Stan Ulbrych
9e512ae010
gh-64612: Remove error handlers list under open() (GH-137304)
This was duplicated and out-of date.
2025-08-13 12:38:30 +02:00
Serhiy Storchaka
35759fe2fa
gh-137668: Document that ord() supports also bytes and bytearray (GH-137669) 2025-08-13 12:12:16 +03:00
RafaelWO
003bd8cc63
gh-136672: Docs: Move Enum functions and add examples (GH-136791)
* Docs: Move Enum functions and add examples

When the `Enum` functions `_add_alias_` and `_add_value_alias_` were added in de6bca9564, the documentation for them was done under `EnumType` instead of `Enum`.

This change moves them to the docs of the `Enum` class and adds an example for each function.

---------

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2025-08-12 12:28:27 -07:00
Evan Kohilas
dd079db4b9
gh-131885: Use positional-only markers for `max() and min()` (#131868) 2025-08-12 00:29:17 +01:00
Brett Cannon
7140b99b0d
GH-137426: Remove code deprecation of importlib.abc.ResourceLoader (GH-137567)
Enough other classes in `importlib.abc` inherit from the class and the deprecation was to redirect people to `TraversableResources`. The documentation now makes it clear the class only exists for backwards compatibility.

---------

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-08-11 16:18:54 -07:00
Konstantin Baikov
0c83daaf45
gh-125897: Mark range function parameters as positional only (#125945) 2025-08-11 19:12:55 -04:00
Serhiy Storchaka
046a4e39b3
gh-136571: Convert more code in datetime to Argument Clinic (GH-136573)
This adds signatures for some classes and methods.

date.fromisocalendar() can now raise OverflowError for arguments that
don't fit in the C int.
2025-08-09 18:25:49 +00:00
Alexander Nordin
3964f97489
gh-137026: Add an explainer guide for asyncio (GH-137215)
* - Add an explainer guide (aka HOWTO, not how-to) for asyncio.

* Fix linter errors.

* - Enforce max line length of roughly 79 chars.
- Start sentences on new lines to minimize disruption of diffs.

* Add reference to subinterpreters.

* - Significantly reduce article size. Remove both example sections & "Which concurrency do I want" section.

* Align section-header lengths with section names.

* - Remove reference to deleted section.

* - Fix a variety of rote style guide items like title-alignment, use of ie and $, and so forth.
- Add links to other parts of the docs for keywords and objects like await, coro, task, future, etc.

* - One last title alignment.

* - Style nit.

* - Rework a variety of I statements.

* Lint fix.

* - Firm up commentary on yield from in corotuines.

* Update language comparing await and yield from.

* - Remove await-ing Tasks and futures section

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* - Address comments related to style & writing flow.

* per-thread event loop note.

* Add section describing coroutines roots in generators.

* Phrasing tweak.

* Use asyncio.create_task instead of asyncio.Task

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* small phrasing.

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* phrasing nit.

* style nits

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* phrasing nit

* Fix misnaming of async generator.

* phrasing nits.

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* consistent spacing

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* phrasing nits

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* add conclusion

* nits

* - Variety of style & grammar improvements thanks to ZeroIntensity's comments.

* - Make all directives start with a 3 space indent. Then 4 thereafter.

* - Use :linenos: instead of manually writing the line numbers.

* - Fix label typo for article.

* fix label link.

* Apply suggestions from code review

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* - introduce async-sleep name

* Phrasing

* nit

* ungendered octopus

* teammates

* jobs

* rework fella to penguin

* - remove byline; add seealso

* Change ref from asyncio to use seealso block.

* Remove typehints. Fix indentation in one code example.

* Slight rephrase for clarity.

* Make references point to asyncio. Wrap some long lines.

* - Variety of style/phrasing improvements based on PR feedback.

* phrasing.

* phrasing nit.

* Apply suggestions from code review

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>

* nit

* Apply suggestions from code review

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>

* fix backticks.

* nits

* nit

* add section on asyncio.run

* title change under the hood.

* modify task coro example.

* howtos article link.

* prefer await without backticks.

* phrasing tweak.

* Rework phrasing around how await tasks pauses and returns control in the await section.

* move code block to beforfe explanation in coroutine under the hood.

* phrasing.

* link to yield from.

* style nits

* nit

* - Modify language re: event-loop cycling endlessly.
- Discuss why await was designed to not yield for coros.

* - Add a note about debug=True on asyncio.run to await coro section.

* clarity nit

* - Add two other references in seealso block.

* nit

* Language simplification

* Apply suggestions from code review

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* nit

* grammar fix.

* fix

* worker bees

* rework event loop paragraph to significantly deemphasize queues

* remove all references to queue besides the initial analogy.

* add note about garbage collection of tasks

* add practical note re: garbage collection

* phrasing nits

* re arrange note on task gc.

* line wrap nit

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Kumar Aditya <kumaraditya@python.org>

* link to debug mode docs.

* readd part2 prefix.

* simplify title.

* fix titles. tihnk I messed this up earlier.

* avoid idiom in title.

* fix titles once agian.

* Apply suggestions from code review

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

* rework task gc example.

* phrasing tweak.

* tewak.

* nit

* nit

* nit

* nit

---------

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-08-08 22:29:51 -07:00
Douglas Thor
34d7351ac7
gh-133722: Add Difflib theme to _colorize and 'color' option to difflib.unified_diff (#133725) 2025-08-08 18:34:02 +03:00
Tom Forbes
64ee1babfb
Replace "ordered arguments" with "positional arguments" in unittest.mock documentation (GH-137552) 2025-08-08 14:00:18 +00:00
Adorilson Bezerra
f06fcb7f4b
[Doc] Remove unnecessary quotes from typing module (#137207)
* gh-106320: Remove private _PyInterpreterState functions (#106335)

Remove private _PyThreadState and _PyInterpreterState C API
functions: move them to the internal C API (pycore_pystate.h and
pycore_interp.h). Don't export most of these functions anymore, but
still export functions used by tests.

Remove _PyThreadState_Prealloc() and _PyThreadState_Init() from the C
API, but keep it in the stable API.

* Doc: minor change

* Revert "Doc: minor change"

This reverts commit ebfa0937c2.

* [Doc] Remove unnecessary quotes from typing (See Also section)

* [Doc] Remove unnecessary quotes from typing

---------

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-08-07 19:04:59 -07:00
Sergey B Kirpichev
37b5a0d671
gh-130102: drop "require numeric arguments" from pow() docs (#137456)
Co-authored-by: Senthil Kumaran <senthil@python.org>
2025-08-07 23:43:18 +00:00
Sebastien Williams-Wynn
244c7b8c4c
gh-137526: Fix broken link to drdobbs journal in difflib.rst (#137527) 2025-08-07 12:36:05 -07:00
tobiasjcat
3c1471d971
gh-137499: Fixed dead link to NIST website (#137500) 2025-08-07 08:41:16 +03:00
Mendel Feygelson
37b9a5df93
Docs: Use the correct example module in warnings.rst (#137402) 2025-08-06 22:51:59 +01:00