Commit Graph

29219 Commits

Author SHA1 Message Date
sobolevn 63ffb406bb
gh-129567: Add a note to `typing.TypedDict` docs about name mangling (#130233) 2025-03-04 18:15:00 +03:00
Petr Viktorin d91cc9db15
gh-129666: Add C11/C++11 to docs and -pedantic-errors to GCC/clang test_c[pp]ext tests (GH-130692)
Disable pedantic check for c++03 (unlimited API)

Also add a check for c++03 *limited* API, which passes in pedantic mode
after removing a comma in the `PySendResult` declaration, and allowing
`long long`.
2025-03-04 14:10:09 +01:00
Bénédikt Tran 3929af5e3a
gh-89083: add support for UUID version 7 (RFC 9562) (#121119)
Add support for generating UUIDv7 objects according to RFC 9562, §5.7 [1].

The functionality is provided by the `uuid.uuid7()` function. The implementation
is based on a 42-bit counter as described by Method 1, §6.2 [2] and guarantees
monotonicity within the same millisecond.

[1]: https://www.rfc-editor.org/rfc/rfc9562.html#section-5.7
[2]: https://www.rfc-editor.org/rfc/rfc9562.html#section-6.2

---------

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Éric <merwok@netwok.org>
2025-03-04 10:47:19 +01:00
Yuki Kobayashi b3c18bfd82
gh-130711: Document `PyBaseObject_Type` (GH-130712)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-03-03 15:08:05 +01:00
Yuki Kobayashi a105f99019
gh-101100: Fix sphinx warnings in `library/email.errors.rst` (#130774) 2025-03-03 11:56:45 +02:00
Victorien 373eb1b47a
gh-101100: Fix Sphinx documentation warnings in `collections.rst` (#130629) 2025-03-03 11:46:38 +02:00
Mike Castle a85eeb9771
gh-129015: Improve disambiguation between `NotImplemented` and `NotImplementedError` (#129562)
---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-03-03 09:23:41 +01:00
Charles Machalow f97e4098ff
gh-128041: Add `terminate_workers` and `kill_workers` methods to ProcessPoolExecutor (GH-128043)
This adds two new methods to `multiprocessing`'s `ProcessPoolExecutor`:
- **`terminate_workers()`**: forcefully terminates worker processes using `Process.terminate()`
- **`kill_workers()`**: forcefully kills worker processes using `Process.kill()`

These methods provide users with a direct way to stop worker processes without `shutdown()` or relying on implementation details, addressing situations where immediate termination is needed.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Commit-message-mostly-authored-by: Claude Sonnet 3.7 (because why not -greg)
2025-03-02 18:01:45 -08:00
Bénédikt Tran c6513f7a62
gh-128481: indicate that the default value for `FrameSummary.end_lineno` changed in 3.13 (#130755)
The value taken by `FrameSummary.end_lineno` when passing `end_lineno=None` changed in gh-112097.

Previously, a `end_lineno` could be specified to be `None` directly but since 939fc6d, passing None makes
the constructor use the value of `lineno` instead.
2025-03-02 18:16:51 +01:00
Bénédikt Tran 990ad272f6
gh-89083: add support for UUID version 6 (RFC 9562) (#120650)
Add support for generating UUIDv6 objects according to RFC 9562, §5.6 [1].

The functionality is provided by the `uuid.uuid6()` function which takes as inputs an optional 48-bit
hardware address and an optional 14-bit clock sequence. The UUIDv6 temporal fields are ordered
differently than those of UUIDv1, thereby providing improved database locality.

[1]: https://www.rfc-editor.org/rfc/rfc9562.html#section-5.6

---------

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-03-02 12:41:56 +01:00
Damien 051f0e5683
gh-128481: Improve documentation for `traceback.FrameSummary` (#128484)
Complete the `traceback.FrameSummary` signature and add missing
documentation for the `colno` and `end_{col,line}no` attributes.
2025-03-02 10:29:12 +01:00
Arijit Kumar Das 37145cb89f
Fix grammar typo in `Doc/c-api/arg.rst` (#130741) 2025-03-02 10:24:34 +01:00
Tim Hoffmann c71e55869e
Add link in the `importlib.metadata.version()` docs (#130739)
Link the specification for the returned data makes it clearer what this is
and what the format of the version string can be.
2025-03-02 10:23:32 +01:00
Apostol Fet 5181ddb29f
gh-130160: use `.. program::` directive for documenting `cProfile` CLI (#130314)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-03-01 23:39:25 +03:00
Barney Gale 5326c27fc6
Revert "GH-116380: Speed up `glob.[i]glob()` by making fewer system calls. (#116392)" (#130743)
This broke tests on the 'aarch64 Fedora Stable Clang Installed 3.x' and
'AMD64 Fedora Stable Clang Installed 3.x' build bots.

This reverts commit da4899b94a.
2025-03-01 20:04:01 +00:00
Barney Gale da4899b94a
GH-116380: Speed up `glob.[i]glob()` by making fewer system calls. (#116392)
## Filtered recursive walk

Expanding a recursive `**` segment entails walking the entire directory
tree, and so any subsequent pattern segments (except special segments) can
be evaluated by filtering the expanded paths through a regex. For example,
`glob.glob("foo/**/*.py", recursive=True)` recursively walks `foo/` with
`os.scandir()`, and then filters paths through a regex based on "`**/*.py`,
with no further filesystem access needed.

This fixes an issue where `glob()` could return duplicate results.

## Tracking path existence

We store a flag alongside each path indicating whether the path is
guaranteed to exist. As we process the pattern:

- Certain special pattern segments (`""`, `"."` and `".."`) leave the flag
  unchanged
- Literal pattern segments (e.g. `foo/bar`) set the flag to false
- Wildcard pattern segments (e.g. `*/*.py`) set the flag to true (because
  children are found via `os.scandir()`)
- Recursive pattern segments (e.g. `**`) leave the flag unchanged for the
  root path, and set it to true for descendants discovered via
  `os.scandir()`.

If the flag is false at the end, we call `lstat()` on each path to filter
out missing paths.

## Minor speed-ups

- Exclude paths that don't match a non-terminal non-recursive wildcard
  pattern _prior_ to calling `is_dir()`.
- Use a stack rather than recursion to implement recursive wildcards.
  - This fixes a recursion error when globbing deep trees.
- Pre-compile regular expressions and pre-join literal pattern segments.
- Convert to/from `bytes` (a minor use-case) in `iglob()` rather than
  supporting `bytes` throughout. This particularly simplifies the code
  needed to handle relative bytes paths with `dir_fd`.
- Avoid calling `os.path.join()`; instead we keep paths in a normalized
  form and append trailing slashes when needed.
- Avoid calling `os.path.normcase()`; instead we use case-insensitive regex
  matching.

## Implementation notes

Much of this functionality is already present in pathlib's implementation
of globbing. The specific additions we make are:

1. Support for `dir_fd`
2. Support for `include_hidden`
3. Support for generating paths relative to `root_dir`

This unifies the implementations of globbing in the `glob` and `pathlib`
modules.

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-02-28 20:33:51 +00:00
Barney Gale b545450961
GH-130608: Remove `dirs_exist_ok` argument from `pathlib.Path.copy()` (#130610)
This feature isn't sufficiently motivated.
2025-02-28 19:29:20 +00:00
Petr Viktorin ab11c09705
gh-129666: Revert "gh-129666: Add C11/C++11 to docs and `-pedantic-errors` to GCC/clang test_c[pp]ext tests (GH-130686)" (GH-130688)
This reverts commit 003e6d2b97.
2025-02-28 16:05:36 +00:00
Petr Viktorin 003e6d2b97
gh-129666: Add C11/C++11 to docs and `-pedantic-errors` to GCC/clang test_c[pp]ext tests (GH-130686) 2025-02-28 16:03:02 +01:00
Petr Viktorin e21863ce78
gh-46236: PyUnicode docs improvements (GH-129966)
Move deprecated PyUnicode API docs to new section

Move Py_UNICODE to a new "Deprecated API" section.

Formally soft-deprecate PyUnicode_READY, and move it

Document and soft-deprecate PyUnicode_IS_READY, and move it

Document PyUnicode_IS_ASCII, PyUnicode_CHECK_INTERNED

PyUnicode_New docs: Clarify requirements for "fresh" strings

PyUnicodeWriter_DecodeUTF8Stateful: Link "error-handlers"



Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-02-28 15:11:44 +01:00
Adam Turner 043ab3af9a
GH-121970: Extract ``issue_role`` into a new extension (#130615)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-27 19:06:13 +00:00
Yuki Kobayashi b26286ca49
Docs: Fix a misplaced statement in the document for `ServerProxy` (GH-130616)
The sentence "If an HTTPS URL ..." explains what the parameter means,
so moved it to the paragraph explaining what the other parameters mean.
2025-02-27 16:14:56 +01:00
Fredrik Ahlberg 45a24f54af
gh-129288: Add optional l2_cid and l2_bdaddr_type in BTPROTO_L2CAP socket address tuple (#129293)
Add two optional, traling elements in the AF_BLUETOOTH socket address tuple:

- l2_cid, to allow e.g raw LE ATT connections
- l2_bdaddr_type. To be able to connect L2CAP sockets to Bluetooth LE devices,
  the l2_bdaddr_type must be set to BDADDR_LE_PUBLIC or BDADDR_LE_RANDOM.
2025-02-27 12:51:47 +00:00
Adam Turner 3f3e1c4095
Doc: Strip trailing whitespace in ``pydoc_topics`` (#130492) 2025-02-26 20:10:55 +00:00
Yuki Kobayashi b536e37104
gh-130433: Update documentation for `MultipartConversionError` (GH-130436) 2025-02-26 08:34:10 +00:00
Sergey B Kirpichev f39a07be47
gh-87790: support thousands separators for formatting fractional part of floats (#125304)
```pycon
>>> f"{123_456.123_456:_._f}"  # Whole and fractional
'123_456.123_456'
>>> f"{123_456.123_456:_f}"    # Integer component only
'123_456.123456'
>>> f"{123_456.123_456:._f}"   # Fractional component only
'123456.123_456'
>>> f"{123_456.123_456:.4_f}"  # with precision
'123456.1_235'
```
2025-02-25 16:27:07 +01:00
Yuki Kobayashi 4d3a7ea354
Docs: Fix some semantic usages of `iterator.__iter__` (GH-130172)
These references to an `__iter__` method mean `object.__iter__`, not `iterator.__iter__`.
2025-02-25 13:38:47 +01:00
Kanishk Pachauri 85f1cc8d60
gh-130461: Remove unnecessary usages of `.. index::` directives in Doc/library/uuid.rst (#130526)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-02-25 14:27:50 +02:00
Mark Shannon 014223649c
GH-130396: Use computed stack limits on linux (GH-130398)
* Implement C recursion protection with limit pointers for Linux, MacOS and Windows

* Remove calls to PyOS_CheckStack

* Add stack protection to parser

* Make tests more robust to low stacks

* Improve error messages for stack overflow
2025-02-25 09:24:48 +00:00
RUANG (James Roy) 9f25c1f012
gh-46236: Add docs for PyUnicode_GetDefaultEncoding() doc (GH-130335)
* Clarify sys.getdefaultencoding() documentation

* Add missing documentation for PyUnicode_GetDefaultEncoding,
  the C equivalent of sys.getdefaultencoding
2025-02-24 15:37:21 +01:00
Petr Viktorin fc8d2cba54
gh-129405: Fix doc for Py_mod_multiple_interpreters default, and add test (GH-129406) 2025-02-24 14:59:19 +01:00
Bénédikt Tran 39ba4b6619
gh-127522: wsgiref: indicate that `start_response` objects should follow a specific protocol (GH-127525) 2025-02-24 13:43:56 +01:00
Petr Viktorin ef29104f7d
GH-91079: Revert "GH-91079: Implement C stack limits using addresses, not counters. (GH-130007)" for now (GH130413)
Revert "GH-91079: Implement C stack limits using addresses, not counters. (GH-130007)" for now

Unfortunatlely, the change broke some buildbots.

This reverts commit 2498c22fa0.
2025-02-24 11:16:08 +01:00
Kanishk Pachauri 0ff1611574
gh-130160: use `.. program::` directive for documenting `idle` CLI (#130278)
---------
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-02-24 02:02:34 +00:00
mingyu 9f81f828c7
gh-129948: Add `set()` to `multiprocessing.managers.SyncManager` (#129949)
The SyncManager provided support for various data structures such as dict, list, and queue, but oddly, not set.
This introduces support for set by defining SetProxy and registering it with SyncManager.

---
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-02-23 20:07:33 +00:00
Jacob Austin Lincoln 25a7ddf2ef
gh-65697: Prevent configparser from writing keys it cannot properly read (#129270)
---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2025-02-23 11:06:33 -05:00
Bénédikt Tran b8c313a41c
gh-84559: improve What's New entry for `multiprocessing` start method changes (#128173)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-02-23 10:35:08 +01:00
sobolevn 5ec4bf86b7
gh-121970: Replace `.. coroutine{method,function}` with `:async:` (#130448)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-22 17:54:43 +00:00
Adam Turner 3cc9e867eb
Docs: Test presence of optional extensions with importlib (#130445) 2025-02-22 17:52:47 +00:00
sobolevn 89d8b2d14b
Add measuring unit to `sys.getswitchinterval` docs (#130457) 2025-02-22 19:05:10 +03:00
Russell Keith-Magee 474c388740
gh-129712: Document the wheels tags corresponding to each universal SDK. (#130389)
Document the architectures supported by macOS universal SDK configuration flags, 
and add details on wheel tag naming.
2025-02-22 16:30:30 +08:00
Adam Turner 30e892473e
GH-121970: Replace custom abstract method directive with the ``:abstract:`` option (#129311) 2025-02-22 01:53:57 +00:00
Adam Turner 8e96adf453
gh-130159: Fix list indentation in collections.abc (#130165) 2025-02-22 01:41:15 +00:00
Hugo van Kemenade 1cf9b6d9b8
gh-129965: Add missing MIME types (#129969)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-02-21 15:44:53 +00:00
sobolevn 9bf73c032f
Add `.. versionadded` directive to `dis` CLI options (#130267) 2025-02-21 15:59:17 +03:00
UV 5d66c55c8a
gh-127805: Clarify Formatter initialization in logging.rst. (GH-127850) 2025-02-21 07:10:04 +00:00
Marc Mueller 0f5b82169e
gh-46236: Document PyUnicode_RSplit, PyUnicode_Partition and PyUnicode_RPartition (#130191)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-02-20 16:41:41 +01:00
Vinay Sajip 8cbcf51d61
[doc]: Update logging cookbook to mention domain socket configuration in a recipe. (GH-130348) 2025-02-20 14:09:15 +00:00
Victor Stinner 519c2c6740
gh-128863: Deprecate the private _PyUnicodeWriter API (#129245)
Deprecate private C API functions:

* _PyUnicodeWriter_Init()
* _PyUnicodeWriter_Finish()
* _PyUnicodeWriter_Dealloc()
* _PyUnicodeWriter_WriteChar()
* _PyUnicodeWriter_WriteStr()
* _PyUnicodeWriter_WriteSubstring()
* _PyUnicodeWriter_WriteASCIIString()
* _PyUnicodeWriter_WriteLatin1String()

These functions are not deprecated in the internal C API (if the
Py_BUILD_CORE macro is defined).
2025-02-20 14:02:02 +01:00
Yuki Kobayashi 3bda821a83
gh-101100: Fix sphinx warnings in `readline.rst` (#130300) 2025-02-20 14:56:27 +02:00
Alcaro 417372bd43
Fix some ctypes docs typos (GH-130307) 2025-02-20 11:58:50 +01:00
Sabfo 47ace53995
gh-130130: Clarify `hash=False` docs in `dataclasses.field` (#130324) 2025-02-20 02:43:27 -05:00
Irit Katriel 6c982aeb54
gh-130250: fix regression in traceback.print_last (#130318) 2025-02-19 21:44:35 +00:00
za 73801864d8
gh-122876: Fix "End of lines" typo (#125310)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-19 19:16:38 +00:00
Mark Shannon 2498c22fa0
GH-91079: Implement C stack limits using addresses, not counters. (GH-130007)
* Implement C recursion protection with limit pointers

* Remove calls to PyOS_CheckStack

* Add stack protection to parser

* Make tests more robust to low stacks

* Improve error messages for stack overflow
2025-02-19 11:44:57 +00:00
Adam Turner 736ad664e0
Docs: Upgrade Sphinx to 8.2 (#130171) 2025-02-18 23:45:02 +00:00
Sergey Miryanov bcc9a5dddb
gh-129515: Clarify syntax error messages for conditional expressions (#129880)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-02-18 21:43:19 +00:00
Pablo Galindo Salgado 51d4bf1e0e
bpo-45325: Add a new 'p' parameter to Py_BuildValue to convert an integer into a Python bool (#28634) 2025-02-18 17:14:11 +00:00
sobolevn 97d0011e7e
gh-130160: use `option` instead of `cmdoption` in `dis.rst` (#130255) 2025-02-18 15:54:14 +03:00
Kanishk Pachauri 8cd7f8bf8d
gh-130160: use `.. program::` directive for documenting `ensurepip` CLI (gh-130253) 2025-02-18 12:09:22 +00:00
Tomas R. 25422561de
gh-125756: Document Pickler.clear_memo() (GH-125762) 2025-02-17 17:48:29 +02:00
Yuki Kobayashi fc8c99a8ce
gh-130214: Document `PyEllipsis_Type` (GH-130215) 2025-02-17 13:56:33 +01:00
Irit Katriel c9b1bf302c
gh-130139: always check ast node type in ast.parse() with ast input (#130140) 2025-02-16 13:32:39 +00:00
Stan Ulbrych 9837c2a214
gh-130169: Fix broken list markup in `Doc/c-api/function.rst` (#130174) 2025-02-16 13:55:31 +03:00
AN Long 798f8d3ea9
Replace non-breaking spaces with normal spaces (#130116)
Using normal spaces in place of non-breaking spaces.
2025-02-16 09:33:14 +08:00
Ken Jin a13460ac44
Add Neil's suggestions to whatsnew wording for tailcall (#130155)
Add Neil's suggestions

Co-authored-by: Neil Schemenauer <690853+nascheme@users.noreply.github.com>
2025-02-15 21:09:37 +08:00
Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) d2e60d8e59
gh-130106: Fix a typo in unittest.mock doc (#130107) 2025-02-15 03:30:12 +00:00
Inada Naoki e65e9f9062
Doc: update term "namespace package" (#129251) 2025-02-14 13:47:54 -05:00
Stan Ulbrych 3402e133ef
gh-82045: Correct and deduplicate "isprintable" docs; add test. (GH-130118)
We had the definition of what makes a character "printable" documented in three places, giving two different definitions.
The definition in the comment on `_PyUnicode_IsPrintable` was inverted; correct that.

With that correction, the two definitions turn out to be equivalent -- but to confirm that, you have to go look up, or happen to know, that those are the only five "Other" categories and only three "Separator" categories in the Unicode character database.  That makes it hard for the reader to tell whether they really are the same, or if there's some subtle difference in the intended semantics.

Fix that by cutting the C API docs' and the C comment's copies of the subtle details, in favor of referring to the Python-level docs. That ensures it's explicit that these are all meant to agree, and also lets us concentrate improvements to the wording in one place.

Speaking of which, borrow some ideas from the C comment, along with other tweaks, to hopefully add a bit more clarity to that one newly-centralized copy in the docs.

Also add a thorough test that the implementation agrees with this definition.

Author:    Greg Price <gnprice@gmail.com>

Co-authored-by: Greg Price <gnprice@gmail.com>
2025-02-14 18:16:47 +01:00
Ken Jin aa28423201
Revert "gh-130048: Reintroduce full LTO as default on Clang (GH-130049)" (#130088)
This reverts commit 34c06ccc4c.
2025-02-13 17:27:19 +00:00
Ken Jin 34c06ccc4c
gh-130048: Reintroduce full LTO as default on Clang (GH-130049) 2025-02-13 22:06:00 +08:00
Ammar Askar f9a7d41bac
gh-96092: Fix traceback.walk_stack(None) skipping too many frames (#129330)
As it says in its documentation, walk_stack was meant to just
follow `f.f_back` like other functions in the traceback module.
Instead it was previously doing `f.f_back.f_back` and then this
changed to `f_back.f_back.f_back.f_back' in Python 3.11 breaking
its behavior for external users.

This happened because the walk_stack function never really had
any good direct tests and its only consumer in the traceback module was
`extract_stack` which passed the result into `StackSummary.extract`.
As a generator, it was previously capturing the state of the stack
when it was first iterated over, rather than the stack when `walk_stack`
was called. Meaning when called inside the two method deep
`extract` and `extract_stack` calls, two `f_back`s were needed.
When 3.11 modified the sequence of calls in `extract`, two more
`f_back`s were needed to make the tests happy.

This changes the generator to capture the stack when `walk_stack` is
called, rather than when it is first iterated over. Since this is
technically a breaking change in behavior, there is a versionchanged
to the documentation. In practice, this is unlikely to break anyone,
you would have been needing to store the result of `walk_stack` and
expecting it to change.
2025-02-13 01:43:09 +00:00
Pablo Galindo Salgado 6fb5138776
gh-88535: Improve syntax error for wrongly closed strings (#26633) 2025-02-13 01:30:20 +00:00
Satyam Kumar 791cdfe141
gh-129912: Fix references to `Py_TPFLAGS_MANAGED_DICT` (gh-130044) 2025-02-12 17:48:14 -05:00
Andrew Svetlov 469d2e416c
gh-129889: Support context manager protocol by contextvars.Token (#129888) 2025-02-12 12:32:58 +01:00
Stan Ulbrych 555ee43d92
gh-59149: Setup documentation for IDLE on Linux and add section in Editors (#130003)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
---------

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-02-12 03:16:56 -05:00
Wulian233 06ac157c53
gh-125746: Delay deprecated `zipimport.zipimporter.load_module` removal time to 3.15 (#125748) 2025-02-11 23:59:09 +00:00
Hugo van Kemenade 53e8e72dab Merge branch 'main' of https://github.com/python/cpython 2025-02-11 21:29:11 +02:00
Tomas R. aa81a6f6e4
gh-97850: Update the deprecation warning of `importlib.abc.Loader.load_module` (GH-129855) 2025-02-11 11:04:16 -08:00
Hugo van Kemenade 3ae9101482 Python 3.14.0a5 2025-02-11 19:16:29 +02:00
Yuki Kobayashi 1da412e574
gh-101100: Docs: Fix some typos in the document (#129988)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-02-11 13:06:32 +02:00
Wulian233 12bd15f7b3
gh-129939: Add darkmode support for difflib's comparison pages (#129940) 2025-02-11 10:58:57 +02:00
Hugo van Kemenade 1feaecc2bc
gh-123299: Copyedit "What's New in Python 3.14" (#129970) 2025-02-10 23:46:36 +02:00
Ken Jin 516c70d4dd
Clarify baseline for new interpreter (GH-129972) 2025-02-10 19:07:24 +00:00
Yuki Kobayashi 8d9d3e4ecb
gh-46236: Document `PyUnicode_DecodeCodePageStateful` (GH-127934)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-02-10 17:17:37 +01:00
Vinay Sajip 7c156a63d3
gh-129143: Fix incorrect documentation for logging.Handler.close(). (GH-129950) 2025-02-10 11:13:52 +00:00
Victorien 2abb6a4f13
Fix typo in 3.14 `pdb` whatsnew entry (#129886) 2025-02-09 22:17:05 -08:00
Victorien d05053a203
Fix typo in `enum` documentation (#129920) 2025-02-09 21:48:11 +00:00
Stan Ulbrych 6fbf15f98e
gh-129873: IDLE: Improve help.py's method of parsing HTML (#129859)
In `help.copy_strip`, only copy the text `<section>`.  In `help.HelpParser.handle_starttag` and elsewhere, remove code to skip the no longer present html.  Add a reminder at the top of idle.rst to run copy_strip after changes.
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-02-09 08:17:35 +00:00
Tian Gao 29f8a67ae0
Provide curframe_locals for backward compatibility but deprecate it (#125951) 2025-02-08 23:35:28 +00:00
Gregory P. Smith 5ce70ad129
gh-64414: mention AF_INET6 and IPv6 in socketserver docs. (#129866)
mention AF_INET6 and IPv6 in socketserver docs.
2025-02-08 12:06:28 -08:00
Ned Batchelder f2ae79d29e
Docs: more explanation of the implications of new tail-call interpreter (GH-129863)
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2025-02-08 19:28:35 +00:00
Stan Ulbrych 33a7094aa6
gh-129699: Add description to IDLE doc title (#129727)
Also extend the 'idlelib' section header. These additions affect both the displayed idle.html file and the contents.html file displayed by clicking the Complete table of contents link on the main docs.python.org page. (The module index entries are generated from the module name and synopsis within module files.)
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-02-08 14:26:07 -05:00
Hugo van Kemenade 1bccd6c34f
gh-128317: Move CLI calendar highlighting to private class (#129625)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-02-08 15:56:57 +00:00
Brian Ward 421ea1291d
gh-119349: Add ctypes.util.dllist -- list loaded shared libraries (GH-122946)
Add function to list the currently loaded libraries to ctypes.util

The dllist() function calls platform-specific APIs in order to
list the runtime libraries loaded by Python and any imported modules.
On unsupported platforms the function may be missing.


Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-02-08 14:02:36 +01:00
Tian Gao d3b60fff58
gh-124703: Add documentation and whatsnew entry for pdb exit change (#129818) 2025-02-07 21:02:46 -05:00
Barney Gale 718ab66299
GH-125413: Add `pathlib.Path.info` attribute (#127730)
Add `pathlib.Path.info` attribute, which stores an object implementing the `pathlib.types.PathInfo` protocol (also new). The object supports querying the file type and internally caching `os.stat()` results. Path objects generated by `Path.iterdir()` are initialised with status information from `os.DirEntry` objects, which is gleaned from scanning the parent directory.

The `PathInfo` protocol has four methods: `exists()`, `is_dir()`, `is_file()` and `is_symlink()`.
2025-02-08 01:16:45 +00:00
Irit Katriel a1417b211f
gh-100239: replace BINARY_SUBSCR & family by BINARY_OP with oparg NB_SUBSCR (#129700) 2025-02-07 22:39:54 +00:00
Ken Jin e4a00f70b1
Fix link in 3.14 whatsnew (#129828) 2025-02-07 19:30:23 +00:00
Ken Jin 7b2e01bb55
Remove tail-calling wording as it is confusing (GH-129823) 2025-02-07 18:49:28 +00:00