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>
gh-129363: Change regrtest sequential mode output (GH-129476)
First, write the test name without color. Then, write the test name
and the result with color. Each test is displayed twice.
(cherry picked from commit f1b81c408f)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
gh-129838: Don't redefine _Py_NO_SANITIZE_UNDEFINED (GH-129839)
Newer GCC versions accept both __attribute__((no_sanitize("undefined")))
and __attribute__((no_sanitize_undefined)) so check that the macro is
not already defined.
(cherry picked from commit 568db400ff)
Co-authored-by: Collin Funk <collin.funk1@gmail.com>
gh-46236: Document PyUnicode_RSplit, PyUnicode_Partition and PyUnicode_RPartition (GH-130191)
(cherry picked from commit 0f5b82169e)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
The `test_trace.test_coverage_ignore` test would fail if you had
`setuptools` installed, such as in `~/.local/lib/python3.xxx/site-packages/`.
Ignore everything in `sys.path` when running the test.
(cherry picked from commit 35925e9529)
gh-130250: use support.swap_attr() in test and don't assume we're beginning with a clean system state (GH-130342)
(cherry picked from commit 048ee2d5ec)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
gh-69001: Convert links to more usable buttons (GH-129591)
In Lib/idlelib/help_about.py, there are 2 links that are not underlined or colored, hence hard to tell that clicking works. All buttons might get converted to colored and underlined links in the future.
---------
(cherry picked from commit ed831b95a2)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Ensure colorize tests will run on dumb terminals (or environment with TERM=dumb set)
(cherry picked from commit 1b070060c0)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
[3.13] gh-128396: Fix a crash when inline comprehension has the same local variable as the outside scope (GH-130235)
(cherry picked from commit ccf17323c2)
Docs: Upgrade Sphinx to 8.2 (GH-130171)
(cherry picked from commit 736ad664e0)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>