]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Sergey B Kirpichev [Wed, 23 Apr 2025 13:38:24 +0000 (16:38 +0300)]
gh-121249: adjust formatting codes for complex types in struct/ctypes (#132827)
* F - for float _Complex
* D - for double _Complex
* G - for long double _Complex (not supported by the struct module)
Pablo Galindo Salgado [Wed, 23 Apr 2025 13:27:53 +0000 (14:27 +0100)]
gh-132449: Add whatsnew entry for typos in keywords (#132838)
Serhiy Storchaka [Wed, 23 Apr 2025 11:27:21 +0000 (14:27 +0300)]
gh-132742: Update documentation for the fcntl module (GH-132765)
Serhiy Storchaka [Wed, 23 Apr 2025 11:08:30 +0000 (14:08 +0300)]
gh-132734: Fix build on FreeBSD and old Linux (GH-132829)
Ken Jin [Wed, 23 Apr 2025 10:17:35 +0000 (18:17 +0800)]
gh-132758: Fix tail call and pystats builds (GH-132759)
Victor Stinner [Wed, 23 Apr 2025 06:59:30 +0000 (08:59 +0200)]
gh-132713: Simplify list_repr_impl() (#132811)
pulkin [Wed, 23 Apr 2025 06:55:24 +0000 (08:55 +0200)]
gh-131913: multiprocessing: add interrupt for POSIX (GH-132453)
* multiprocessing: interrupt
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>
John [Wed, 23 Apr 2025 03:22:57 +0000 (22:22 -0500)]
gh-109981: Resolve situation on iOS regarding fd_count. (#132823)
Modifies the test helper that counts the list of open file descriptors to use
the optimised ``/dev/fd`` approach on all Apple platforms, not just macOS. This
avoids crashes caused by guarded file descriptors.
Eric Snow [Tue, 22 Apr 2025 23:37:20 +0000 (17:37 -0600)]
gh-132776: Minor Fixes for XIBufferViewType (gh-132779)
This change covers the following:
* dealloc: no cleanup if no buffer set
* dealloc: handle already-destroyed interpreter correctly
* handle errors in _memoryview_from_xid() correctly
* clean up the buffer if the xidata is never used
Victor Stinner [Tue, 22 Apr 2025 20:09:35 +0000 (22:09 +0200)]
gh-132713: Fix repr(list) race condition (#132801)
Hold a strong reference to the item while calling repr(item).
Jelle Zijlstra [Tue, 22 Apr 2025 18:32:22 +0000 (11:32 -0700)]
CODEOWNERS: add myself to unionobject.c (#132808)
Tomas R. [Tue, 22 Apr 2025 16:30:38 +0000 (18:30 +0200)]
GH-131798: JIT: Split CALL_TYPE_1 into several uops (GH-132419)
sobolevn [Tue, 22 Apr 2025 15:32:19 +0000 (18:32 +0300)]
Update `pre-commit` repos (#132792)
dura0ok [Tue, 22 Apr 2025 13:13:00 +0000 (20:13 +0700)]
gh-132470: Prevent crash in ctypes.CField when `byte_size` is incorrect (#132475)
Fix: Prevent crash in ctypes.CField when byte_size does not match type size (gh-132470)
When creating a ctypes.CField with an incorrect byte_size (e.g., using `byte_size=2` for `ctypes.c_byte`), the code would previously abort due to the failed assertion `byte_size == info->size`.
This commit replaces the assertion with a proper error handling mechanism that raises a `ValueError` when `byte_size` does not match the expected type size. This prevents the crash and provides a more informative error message to the us
Co-authored-by: sobolevn <mail@sobolevn.me>
Chris Eibl [Tue, 22 Apr 2025 13:06:30 +0000 (15:06 +0200)]
GH-131296: Avoid invalid signed char comparison in getpath.c assertion (GH-131594)
Sergey B Kirpichev [Tue, 22 Apr 2025 12:18:18 +0000 (15:18 +0300)]
gh-128813: hide mixed-mode functions for complex arithmetic from C-API (#131703)
Stan Ulbrych [Tue, 22 Apr 2025 12:16:51 +0000 (13:16 +0100)]
gh-46236: Add Py_UNICODE_REPLACEMENT_CHARACTER doc (#132706)
Co-authored-by: Victor Stinner <vstinner@python.org>
Serhiy Storchaka [Tue, 22 Apr 2025 11:02:13 +0000 (14:02 +0300)]
gh-132734: Add new constants for Bluetooth sockets (GH-132735)
RUANG (James Roy) [Tue, 22 Apr 2025 09:39:04 +0000 (17:39 +0800)]
gh-46236: Add PyUnicode_Resize() doc (#132628)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Sergey B Kirpichev [Tue, 22 Apr 2025 09:29:20 +0000 (12:29 +0300)]
gh-101410: Customize error messages for 1-arg math functions (#129497)
This also reverts loghelper() change in
75f59bb629 for integer
input. The error message shouldn't include argument value here.
Co-authored-by: Victor Stinner <vstinner@python.org>
Pablo Galindo Salgado [Tue, 22 Apr 2025 09:01:55 +0000 (10:01 +0100)]
gh-132449: Improve syntax error messages for keywords with typos (#132450)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
mpage [Mon, 21 Apr 2025 23:07:54 +0000 (16:07 -0700)]
gh-132578: Rename the `threading.Thread._handle` field (#132696)
Commit `
0e9c364f ` introduced the `_handle` field on instances of
`threading.Thread`. Unfortunately it's fairly common for subclasses
of `threading.Thread` to define a `_handle()` method, which is shadowed
by the new field.
Sebastian Rittau [Mon, 21 Apr 2025 21:15:05 +0000 (23:15 +0200)]
gh-122179: Fix hashlib.file_digest and non-blocking I/O (GH-122183)
* Fix hashlib.file_digest and non-blocking I/O
* Add documentation around this behavior
* Add versionchanged
Peter Bierma [Mon, 21 Apr 2025 21:09:34 +0000 (17:09 -0400)]
gh-132747: Fix `NULL` dereference when calling a method's `__get__` manually (#132772)
Duprat [Mon, 21 Apr 2025 20:59:15 +0000 (22:59 +0200)]
gh-132719: Fix AMD64 FreeBSD14/15 3.x failures - `test_rlock_locked_2processes` used an unknown `Value` (GH-132774)
* Fix creation of resvariable
Jelle Zijlstra [Mon, 21 Apr 2025 20:49:59 +0000 (13:49 -0700)]
gh-132479: Fix crash with multiple comprehensions in annotations (#132778)
Stan Ulbrych [Mon, 21 Apr 2025 20:33:19 +0000 (21:33 +0100)]
PR 132638 typo fix (#132785)
Update remote_debugging.rst
ivonastojanovic [Mon, 21 Apr 2025 20:18:24 +0000 (21:18 +0100)]
gh-131591: Add remote debugging attachment protocol documentation (#132638)
Add a developer-facing document describing the protocol used by
remote_exec(pid, script) to execute Python code in a running process.
This is intended to guide debugger and tool authors in reimplementing
the protocol.
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
Sam Gross [Mon, 21 Apr 2025 19:54:25 +0000 (15:54 -0400)]
gh-131586: Avoid refcount contention in context managers (gh-131851)
This avoid reference count contention in the free threading build
when calling special methods like `__enter__` and `__exit__`.
Peter Bierma [Mon, 21 Apr 2025 19:48:02 +0000 (15:48 -0400)]
gh-127604: Add C stack dumps to `faulthandler` (#128159)
sobolevn [Mon, 21 Apr 2025 17:48:48 +0000 (20:48 +0300)]
gh-132769: Refactor possible read-out-of-bounds in `lexer.c` (#132770)
Kumar Aditya [Mon, 21 Apr 2025 17:26:56 +0000 (22:56 +0530)]
gh-127945: add `test_ctypes` to free-threading TSAN CI (#132727)
Brandt Bucher [Mon, 21 Apr 2025 16:58:55 +0000 (09:58 -0700)]
GH-130415: Improve the JIT's unneeded uop removal pass (GH-132333)
Eric Snow [Mon, 21 Apr 2025 16:58:10 +0000 (10:58 -0600)]
gh-132777: Fix Error Message for Duplicates in generate_global_scripts.py (gh-132780)
The fstring would actually raise a KeyError, which we fix. We also adjust the text to be correct.
Steve Dower [Mon, 21 Apr 2025 14:59:03 +0000 (15:59 +0100)]
gh-132639: Adds PyLong_AsNativeBytes, PyLong_FromNativeBytes and PyLong_FromUnsignedNativeBytes to the limited API (GH-132640)
Jelle Zijlstra [Mon, 21 Apr 2025 14:06:33 +0000 (07:06 -0700)]
annotations: Add tests to check that async comprehensions produce errors (#132513)
This already works correctly but I forgot to test for it.
Саша Черных [Mon, 21 Apr 2025 09:05:37 +0000 (12:05 +0300)]
gh-132054: Add ``application/yaml`` to ``mimetypes`` (#132056)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Adam Turner [Mon, 21 Apr 2025 07:49:06 +0000 (08:49 +0100)]
gh-85583: Add an overview of formatted string literals (f-strings) to ``str`` (#132689)
Serhiy Storchaka [Mon, 21 Apr 2025 06:26:06 +0000 (09:26 +0300)]
gh-132742: Add more tests for fcntl.ioctl() (GH-132756)
Test with different types of argument: integer, mutable and immutable
buffers, immutable buffer with mutable_flag set to false.
Serhiy Storchaka [Sun, 20 Apr 2025 23:21:29 +0000 (02:21 +0300)]
gh-132753: Argument Clinic: Fix support of c_default for the bool converter (GH-132754)
Alper [Sun, 20 Apr 2025 22:24:21 +0000 (15:24 -0700)]
InternalDocs: Fix outdated struct references in frames.md (#132613)
Docs: Fix outdated struct references in frames.md
Co-authored-by: alperyoney <alperyoney@fb.com>
Bénédikt Tran [Sun, 20 Apr 2025 17:40:17 +0000 (19:40 +0200)]
gh-131298: eliminate HACL* static libraries for cryptographic modules (GH-132438)
* simplify HACL* build for MD5, SHA1, SHA2 and SHA3 modules
* remove statically linked libraries for HACL* implementation
* is it better now?
* is it better now?
* fixup
* Present HACL* as a static or shared library.
On WASI, extension modules based on HACL* require the HACL*
library to be linked statically. On other platforms, it can
be built dynamically.
* amend whitespace
* remove temporary .so file as it requires more symlinks
* avoid smelly symbols
* fixup checksums
* regen sbom
* fixup shell warnings and comments
* it *should* work
Bénédikt Tran [Sun, 20 Apr 2025 17:24:30 +0000 (19:24 +0200)]
gh-129098: avoid using content of `_pyrepl/__main__.py` when reporting tracebacks (#130721)
Bénédikt Tran [Sun, 20 Apr 2025 09:21:41 +0000 (11:21 +0200)]
gh-132390: Apply Ruff linting to `Tools/build` (#132391)
---------
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Bénédikt Tran [Sun, 20 Apr 2025 06:23:00 +0000 (08:23 +0200)]
gh-127117: ensure that `_initial_thread` is the last field of `PyInterpreterState` when `Py_STACKREF_DEBUG` is defined (#132721)
Stan Ulbrych [Sun, 20 Apr 2025 01:06:24 +0000 (02:06 +0100)]
gh-129327: revise hashlib documentation to account for FIPS removing sha1 (GH-132729)
* gh-129327: revise hashlib documentation to account for FIPS removing sha1
More generally, the current documentation is a bit scattered, talking
about what terms are "equal" despite those terms not being very
interesting and given the term "secure hash", probably wrong (because
md5 and sha1 are not secure anymore).
Let's talk about cryptographically secure instead, and note that two of
them aren't. And then we can also link to the source for NIST going
through the removal process for SHA1.
* Add Gregors Suggestion
* Clean up
---------
Co-authored-by: Eli Schwartz <eschwartz@gentoo.org>
Tomas R. [Sat, 19 Apr 2025 18:11:21 +0000 (20:11 +0200)]
gh-131952: Add colour to the ``json`` module CLI (#132126)
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>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Adam Turner [Sat, 19 Apr 2025 15:18:03 +0000 (16:18 +0100)]
gh-130167: Improve the error case for ``textwrap.dedent`` (#132666)
Willow Chargin [Sat, 19 Apr 2025 14:50:59 +0000 (07:50 -0700)]
Update entry for Willow Chargin in `.mailmap` and `ACKS` (#132714)
Stan Ulbrych [Sat, 19 Apr 2025 14:15:00 +0000 (15:15 +0100)]
Docs: Fix REPL example in `Doc/library/shutil.rst` (#132700)
Stan Ulbrych [Sat, 19 Apr 2025 13:34:40 +0000 (14:34 +0100)]
Exclude `.mailmap` in Codeowners (#132722)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Kumar Aditya [Sat, 19 Apr 2025 12:57:10 +0000 (18:27 +0530)]
gh-127945: add lock held assertions in ctypes arrays (#132720)
Duprat [Sat, 19 Apr 2025 09:49:18 +0000 (11:49 +0200)]
gh-132308: prevent `TracebackException` swallowing attributes of a falsey `Exception` or `ExceptionGroup` (#132363)
Bénédikt Tran [Sat, 19 Apr 2025 09:03:06 +0000 (11:03 +0200)]
gh-132399: ensure correct alignment of `PyInterpreterState` (#132428)
Bénédikt Tran [Sat, 19 Apr 2025 08:44:01 +0000 (10:44 +0200)]
gh-128398: improve error messages when incorrectly using `with` and `async with` (#132218)
Improve the error message with a suggestion when an object supporting the synchronous
(resp. asynchronous) context manager protocol is entered using `async with` (resp. `with`)
instead of `with` (resp. `async with`).
Sergey B Kirpichev [Sat, 19 Apr 2025 07:42:20 +0000 (10:42 +0300)]
Correct _PyLong_Frexp() description in comments (GH-132716)
This amends
d08c788822 , now this function always successful.
Chris Eibl [Sat, 19 Apr 2025 01:12:40 +0000 (03:12 +0200)]
speedup test_pyrepl (#132688)
speedup test_unix_console.py and test_windows_console.py
Pablo Galindo Salgado [Sat, 19 Apr 2025 00:38:12 +0000 (01:38 +0100)]
gh-131591: Execute the source and not the file to avoid locking it in Windows (#132712)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Rami [Fri, 18 Apr 2025 22:27:32 +0000 (01:27 +0300)]
gh-89562: Remove hostflags from PySSLContext (GH-28602)
Remove hostflags from PySSLContext as that was only needed for OpenSSL versions prior to 1.1.1
Jeroen Bogers [Fri, 18 Apr 2025 19:59:37 +0000 (21:59 +0200)]
gh-129719: Restore missing `socket.CAN_RAW_ERR_FILTER` on Linux (#129721)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Raymond Hettinger [Fri, 18 Apr 2025 17:41:13 +0000 (12:41 -0500)]
Minor doc edit: Make multinomial() the first math example (gh-132697)
Bénédikt Tran [Fri, 18 Apr 2025 17:14:54 +0000 (19:14 +0200)]
gh-132396: Resolve 'redefinition of unused name' errors in ``Lib/test/`` (#132397)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Kumar Aditya [Fri, 18 Apr 2025 16:13:49 +0000 (21:43 +0530)]
gh-126366: fix thread safety of dict key iterator (#132693)
Kumar Aditya [Fri, 18 Apr 2025 15:33:42 +0000 (21:03 +0530)]
gh-132685: fix thread safety of `PyMember_GetOne` with `_Py_T_OBJECT` (#132690)
Pieter Eendebak [Fri, 18 Apr 2025 14:50:29 +0000 (16:50 +0200)]
gh-132657: Avoid locking in frozenset.__contains__ (#132659)
sobolevn [Fri, 18 Apr 2025 14:32:28 +0000 (17:32 +0300)]
gh-132673: Fix `ctypes.Structure` with `_align_=0` (#132676)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Brandt Bucher [Fri, 18 Apr 2025 14:16:28 +0000 (07:16 -0700)]
GH-131498: Replace single-element arrays with scalars in bytecodes.c (GH-132615)
Łukasz Langa [Fri, 18 Apr 2025 13:56:44 +0000 (15:56 +0200)]
gh-132678: Add --prioritize to regrtest (GH-132679)
This is an option that allows the user to specify, which selected tests should
execute first, even if the order is otherwise randomized. This is particularly
useful for tests that run the longest.
Pablo Galindo Salgado [Fri, 18 Apr 2025 13:42:20 +0000 (14:42 +0100)]
gh-130861: Add clarification to the perf docs on optimization levels (#131098)
Kumar Aditya [Fri, 18 Apr 2025 13:12:45 +0000 (18:42 +0530)]
gh-127945: skip more tests in ctypes when using parallel threads (#132682)
Pablo Galindo Salgado [Fri, 18 Apr 2025 12:30:04 +0000 (13:30 +0100)]
gh-129958: Properly disallow newlines in format specs in single-quoted f-strings (GH-130063)
Pablo Galindo Salgado [Fri, 18 Apr 2025 12:26:59 +0000 (13:26 +0100)]
gh-132553: Build the perf tool without buildid cache (GH-132663)
Yuki Kobayashi [Fri, 18 Apr 2025 12:08:50 +0000 (21:08 +0900)]
gh-132668: Remove outdated description of `POP_JUMP_*` instructions (#132669)
Bénédikt Tran [Fri, 18 Apr 2025 11:52:17 +0000 (13:52 +0200)]
gh-132674: fix `_hashopenssl.c` compiler warnings on free-threaded build (#132675)
Bénédikt Tran [Fri, 18 Apr 2025 10:24:34 +0000 (12:24 +0200)]
gh-132097: use a macro for semantically casting function pointers (#132406)
Kumar Aditya [Fri, 18 Apr 2025 09:36:27 +0000 (15:06 +0530)]
gh-132643: use atomic load for dict in specializer (#132653)
Chris Eibl [Fri, 18 Apr 2025 08:45:30 +0000 (10:45 +0200)]
GH-131296: fix clang-cl warning on Windows in `Objects/longobject.c` for 32bit builds (#131604)
Jon Crall [Fri, 18 Apr 2025 08:39:30 +0000 (04:39 -0400)]
gh-103997: Automatically dedent the argument to "-c" (#103998)
Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <80244920+Eclips4@users.noreply.github.com>
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
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>
Bénédikt Tran [Fri, 18 Apr 2025 08:15:40 +0000 (10:15 +0200)]
gh-132097: allow AC to disable fastcall convention to avoid UBSan failures (#131605)
Adam Turner [Fri, 18 Apr 2025 01:49:19 +0000 (02:49 +0100)]
Remove duplicate includes: Python/importdl.c (#132623)
Alper [Thu, 17 Apr 2025 20:38:34 +0000 (13:38 -0700)]
gh-131173: Improve exception handling during take_ownership processing (#132620)
Save and restore exceptions during take_ownership processing to preserve
exceptions currently being raised.
Co-authored-by: alperyoney <alperyoney@fb.com>
Ee Durbin [Thu, 17 Apr 2025 19:42:40 +0000 (15:42 -0400)]
Docs: Migrate entirely to PSF hosted plausible for analytics (#132648)
Steve Dower [Thu, 17 Apr 2025 19:14:00 +0000 (20:14 +0100)]
gh-132649: Allow passing --include-tcltk to PC\layout on Windows ARM64 (GH-132650)
Kumar Aditya [Thu, 17 Apr 2025 18:44:14 +0000 (00:14 +0530)]
gh-127945: fix critical sections around ctypes array (#132646)
Tomasz Pytel [Thu, 17 Apr 2025 17:08:59 +0000 (13:08 -0400)]
gh-132284: Don't wrap base PyCFunction slots on class creation if not overridden (#132329)
Jelle Zijlstra [Thu, 17 Apr 2025 16:03:53 +0000 (09:03 -0700)]
gh-132493: Avoid eager import of annotationlib in typing (again) (#132596)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Sergey Miryanov [Thu, 17 Apr 2025 10:04:42 +0000 (03:04 -0700)]
gh-132042: Do not lookup tp_dict each time to speedup class creation (#132619)
Duprat [Thu, 17 Apr 2025 09:41:30 +0000 (11:41 +0200)]
gh-132561: Fix the public `multiprocessing.SemLock.locked` method (#132586)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Sergey B Kirpichev [Thu, 17 Apr 2025 07:55:00 +0000 (10:55 +0300)]
gh-101410: Revert loghelper() change in
75f59bb for integer input (GH-132625)
Bartosz Sławecki [Thu, 17 Apr 2025 07:14:55 +0000 (09:14 +0200)]
gh-130070: Fix `exec(<string>, closure=<non-None>)` unexpected path (#130071)
Fixed an assertion error (so, it could be reproduced only in builds with assertions enabled)
for `exec` when the `source` argument is a string and the `closure` argument is not `None`.
Co-authored-by: sobolevn <mail@sobolevn.me>
Adam Turner [Thu, 17 Apr 2025 07:10:01 +0000 (08:10 +0100)]
Remove duplicate includes: Python/ast_opt.c (#132621)
Jelle Zijlstra [Thu, 17 Apr 2025 03:46:36 +0000 (20:46 -0700)]
gh-118761: Add helper to ensure that lazy imports are actually lazy (#132614)
This ensures that if we jump through some hoops to make sure something is imported
lazily, we don't regress on importing it.
I recently already accidentally made typing import warnings and annotationlib eagerly.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Chris Eibl [Wed, 16 Apr 2025 21:44:57 +0000 (23:44 +0200)]
GH-131296: Remove unused variable from overlapped.c (GH-131590)
Neil Schemenauer [Wed, 16 Apr 2025 20:13:23 +0000 (13:13 -0700)]
gh-128384: Fix for unreliable warnings unit tests. (gh-132611)
When the `showwarning()` function is replaced, make sure to restore
it after the test finishes. Add a timeout for `Barrier()` so we
don't hang for a long time if something goes wrong.
Neil Schemenauer [Wed, 16 Apr 2025 19:43:01 +0000 (12:43 -0700)]
Add Doc section in free-threaded extension howto for critical sections (GH-132531)
Tan90909090 [Wed, 16 Apr 2025 19:23:13 +0000 (04:23 +0900)]
gh-132608: Fix a sample code coloring for ast.While (#132609)
Add missing '>' in prompt.
Remove unused headers from _asynciomodule.c file (#132047)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Yongzi Li [Wed, 16 Apr 2025 18:11:47 +0000 (02:11 +0800)]
Fix some typos in various doc files (GH-132589)
Tian Gao [Wed, 16 Apr 2025 17:44:33 +0000 (10:44 -0700)]
Clean up pdb state after each pdb doctest (#132577)
Jelle Zijlstra [Wed, 16 Apr 2025 17:44:17 +0000 (10:44 -0700)]
typing docs: Clarify Protocol / runtime_checkable docs (#132606)
- Explicitly say that isinstance/issubclass do not work on non-runtime checkable
protocols.
- Move the sentence "This raises TypeError when applied to a non-protocol class". It
took me quite some time to decide what "this" was here: it refers to applying the
decorator, not to an isinstance() call.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>