Add link in the `importlib.metadata.version()` docs (GH-130739)
Link the specification for the returned data makes it clearer what this is
and what the format of the version string can be.
(cherry picked from commit c71e55869e)
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
* gh-128481: Improve documentation for `traceback.FrameSummary` (GH-128484)
Complete the `traceback.FrameSummary` signature and add missing
documentation for the `colno` and `end_{col,line}no` attributes.
(cherry picked from commit 051f0e5683)
Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
Revert "gh-128364: Fix flaky `test_timeout` test (gh-130724)" (gh-130732)
Change broke Android and iOS buildbots that do not have multiprocessing.
This reverts commit cfa0b1dc37.
(cherry picked from commit 5221d9ce0e)
Co-authored-by: Sam Gross <colesbury@gmail.com>
The race condition with `free_threadstate` and daemon threads exists in
both the free threading and default builds. We were missing a
suppression in the default build.
(cherry picked from commit cc17307faa)
Extend IPv6 tests and made little syntax refactoring
(cherry picked from commit 9f0879baf1)
Co-authored-by: Ilya Bazhenov <31971067+bazhil@users.noreply.github.com>
Postpone <stdbool.h> inclusion after Python.h (#130641)
Remove inclusions prior to Python.h.
<stdbool.h> will cause <features.h> to be included before Python.h can
define some macros to enable some additional features, causing multiple
types not to be defined down the line.
(cherry picked from commit 830f04b505)
Co-authored-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
gh-129726: Break `gzip.GzipFile` reference loop (GH-130055)
A reference loop was resulting in the `fileobj` held by the `GzipFile`
being closed before the `GzipFile`.
The issue started with gh-89550 in 3.12, but was hidden in most cases
until 3.13 when gh-62948 made it more visible.
(cherry picked from commit 7f39137662)
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
gh-129296: Fix `pyatomic.h` include paths (GH-129320)
Use relative includes in Include/cpython/pyatomic.h for
pyatomic_gcc.h, pyatomic_std.h and pyatomic_msc.h.
Do a similar change in Include/cpython/pythread.h for
pthread_stubs.h include.
(cherry picked from commit 3a974e39d5)
Co-authored-by: Zanie Blue <contact@zanie.dev>
Add a lock to ensure that only one iOS testbed per user can start at a time, so
that the simulator discovery process doesn't collide between instances.
(cherry picked from commit 9211b3dabe)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
(cherry picked from commit 043ab3af9a)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Fix a few thread-safety bugs to enable test_opcache when run with TSAN:
* Use relaxed atomics when clearing `ht->_spec_cache.getitem`
(gh-115999)
* Add temporary suppression for type slot modifications (gh-127266)
* Use atomic load when reading `*dictptr`
(cherry picked from commit f151d27159)
These references to an `__iter__` method mean `object.__iter__`, not `iterator.__iter__`.
(cherry picked from commit 4d3a7ea354)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
The use of PySys_GetObject() and _PySys_GetAttr(), which return a borrowed
reference, has been replaced by using one of the following functions, which
return a strong reference and distinguish a missing attribute from an error:
_PySys_GetOptionalAttr(), _PySys_GetOptionalAttrString(),
_PySys_GetRequiredAttr(), and _PySys_GetRequiredAttrString().
(cherry picked from commit 0ef4ffeefd)
Adds error handling when there are no pre-existing test simulators.
(cherry picked from commit 99088ab081)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
* Clarify sys.getdefaultencoding() documentation
* Add missing documentation for PyUnicode_GetDefaultEncoding,
the C equivalent of sys.getdefaultencoding
(cherry picked from commit 9f25c1f012)
Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
(cherry picked from commit 5d66c55c8a)
Co-authored-by: UV <yuvrajpradhan667@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-128714: Fix function object races in `__annotate__`, `__annotations__` and `__type_params__` in free-threading build (#129016)
(cherry picked from commit 55f17b77c3)
---------
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Add test checking value of a TypedDict's __total__ attribute when there is an assignment in the class body. (GH-130460)
In relation to GH-109544 which changed this behavior.
(cherry picked from commit d8ce092fe4)
Signed-off-by: Daniel Sperber <github.blurry@9ox.net>
Co-authored-by: Daraan <github.blurry@9ox.net>
Document the architectures supported by macOS universal SDK configuration flags,
and add details on wheel tag naming.
(cherry picked from commit 474c388740)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
gh-130159: Fix list indentation in collections.abc (GH-130165)
(cherry picked from commit 8e96adf453)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
gh-128446: Skip Windows CI for Unix build system changes (GH-128450)
(cherry picked from commit b05fa90b21)
Authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <thatiparthysreenivas@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>