gh-119050: Add type hints to libregrtest/results.py (GH-119144)
Sort also 'omitted' in TestResults.display_result().
(cherry picked from commit 30b4e9f9c4)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-119132: Update sys.version to identify free-threaded or not. (gh-119134)
(cherry picked from commit c141d43937)
Co-authored-by: Donghee Na <donghee.na@python.org>
docs: make mimalloc license text literal (GH-119046)
(cherry picked from commit 691429702f)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
gh-119132: Log sys._is_gil_enabled() in test.pythoninfo (GH-119140)
(cherry picked from commit 74072a3ffc)
Co-authored-by: Victor Stinner <vstinner@python.org>
The source line was not displayed if the warnings module had not yet
been imported.
(cherry picked from commit 100c7ab00a)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Use literal syntax in origin property (GH-119029)
(cherry picked from commit 66b73e9724)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
For unknown reasons some arguments for Tkinter binding can be created
as a 1-tuple containing a Tcl_Obj when wantobjects is 2.
(cherry picked from commit 5b88d95cc5)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
I honestly forgot this slipped into 3.13, but I think it's worth highlighting more, as it is a PEP-sized change that makes the type system significantly more powerful.
@Yhg1s I think it's also worth mentioning in your release announcements.
(cherry picked from commit ee13797dec)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
gh-58933: Make pdb return to caller frame correctly when f_trace is not set (GH-118979)
(cherry picked from commit f526314194)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Fixes an AttributeError that occurs when checking if ns.temp is an absolute path during building from source on Windows.
(cherry picked from commit d8a82cca12)
Co-authored-by: I-Shen Leong <i-shenl@activestate.com>
gh-117655: Prevent `test_strptime` from raising a DeprecationWarning (GH-117668)
* Fix `test_strptime` raises a DeprecationWarning
* Ignore deprecation warnings where appropriate.
* Update Lib/test/datetimetester.py
This is follow on work to silence unnecessary warnings from the test suite that changes for https://github.com/python/cpython/issues/70647 added.
(cherry picked from commit abead548af)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
This ensures we don't lose races that occur in subprocesses or
interleave races from workers running in parallel.
Log files are collected and packaged into a zipfile that can be
downloaded from the "Artifacts" section of the workflow run.
(cherry picked from commit b88889e9ff)
Co-authored-by: mpage <mpage@meta.com>
The free-threaded build currently immortalizes some objects once the
first thread is started. This can lead to test failures depending on the
order in which tests are run. This PR addresses those failures by
suppressing immortalization or skipping the affected tests.
(cherry picked from commit b309c8ebff)
Co-authored-by: Sam Gross <colesbury@gmail.com>
`_Py_qsbr_unregister` is called when the PyThreadState is already
detached, so the access to `tstate->qsbr` isn't safe without locking the
shared mutex. Grab the `struct _qsbr_shared` from the interpreter
instead.
(cherry picked from commit 33d20199af)
Co-authored-by: Alex Turner <alexturner@meta.com>
Correct the argument names for `secrets.choice` and `secrets.randbelow` in `secrets.rst` (GH-118098)
Correct the argument names for `secrets.choice` and `secrets.randbelow` in `secrets.rst`.
(cherry picked from commit c444362c6e)
Co-authored-by: Adam Dangoor <adamdangoor@gmail.com>
gh-118789: Restore hidden `_PyWeakref_ClearRef` (GH-118797)
_PyWeakref_ClearRef was previously exposed in the public C-API, although
it begins with an underscore and is not documented. It's used by a few
C-API extensions. There is currently no alternative public API that can
replace its use.
_PyWeakref_ClearWeakRefsExceptCallbacks is the only thread-safe way to
use _PyWeakref_ClearRef in the free-threaded build. This exposes the C
symbol, but does not make the API public.
(cherry picked from commit db5af7da09)
Co-authored-by: Sam Gross <colesbury@gmail.com>
This reverts commit ad4f909e0e.
The API ended up not being used.
(cherry picked from commit 46c808172f)
Co-authored-by: Sam Gross <colesbury@gmail.com>
Using `race:` filters out warnings if the function appears anywhere in
the stack trace. This can hide a lot of unrelated warnings, especially
for a function like `_PyEval_EvalFrameDefault`, which is somewhere on
the stack more often than not.
Change all free-threaded suppressions to `race_top:`, which only matches
the top frame, and add any new suppressions this exposes.
(cherry picked from commit 98ff3f65c0)
Co-authored-by: Brett Simmers <swtaarrs@users.noreply.github.com>