It is confusing, because libc is not imported from ctypes,
but defined in previous examples, which already contain the import.
(cherry picked from commit 744c077795)
Co-authored-by: jnchen <caojingchen@live.com>
Change automatically generated tkinter.Checkbutton widget names to
avoid collisions with automatically generated tkinter.ttk.Checkbutton
widget names within the same parent widget.
(cherry picked from commit c61cb507c1)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Restore support of None and other false values.
* Raise TypeError for non-zero integers and non-empty sequences.
The regressions were introduced in gh-74668
(bdba8ef42b).
(cherry picked from commit 1069a462f6)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Make MetadataPathFinder a proper classmethod.
* In PathFinder.invalidate_caches, also invoke MetadataPathFinder.invalidate_caches.
* Add blurb
(cherry picked from commit 5f52d20a93)
gh-112795: Move the test for ZipFile into the core tests for zipfile. (GH-116823)
Move the test for ZipFile into the core tests for zipfile.
(cherry picked from commit fd8e30eb62)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
gh-116731: libregrtest: Clear inspect & importlib.metadata caches in clear_caches (GH-116805)
(cherry picked from commit bae6579b46)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
GH-115979: update test_importlib to work under WASI SDK 21 (GH-116754)
(cherry picked from commit 61733a2fb9)
Co-authored-by: Brett Cannon <brett@python.org>
gh-110918: Fix side effects of regrtest test_match_tests() (GH-116718)
test_match_tests now saves and restores patterns.
Add get_match_tests() function to libregrtest.filter.
Previously, running test_regrtest multiple times in a row only ran
tests once: "./python -m test test_regrtest -R 3:3.
(cherry picked from commit 612f1ec988)
Co-authored-by: Victor Stinner <vstinner@python.org>
* Fix the description of the "-b" option.
* Add references to environment variables for "-s" and "-X dev" options.
(cherry picked from commit 33662d4e01)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
If the `shutdown()` call happens before the worker thread starts executing
the task, then nothing will be printed to stdout.
(cherry picked from commit 7d1abe9502)
Co-authored-by: Sam Gross <colesbury@gmail.com>
gh-116307: Proper fix for 'mod' leaking across importlib tests (GH-116680)
(cherry picked from commit a254807761)
gh-116307: Create a new import helper 'isolated modules' and use that instead of 'Clean Import' to ensure that tests from importlib_resources don't leave modules in sys.modules.
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
gh-116656: Fix test_capi test_py_config_isoloated_per_interpreter() (GH-116658)
Don't parse argv when setting the configuration, to avoid SystemExit if parsing argv fails.
(cherry picked from commit f6e7a6ce65)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-110819: Fix ‘kind’ may be used uninitialized warning in `longobject` (GH-116599)
(cherry picked from commit eb947cdc13)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* and fix global flag repr
(cherry picked from commit 06e29a224f)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
There now may be multiple carets pointing at a token
rather than just a character. Fix the sentence about
possible causes.
(cherry picked from commit 3e45030076)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
gh-71052: Use `raise_signal` in `ThreadSignals.test_signals` (GH-116423)
Use `raise_signal` rather than `kill` in `ThreadSignals.test_signals`
(cherry picked from commit 34920f3691)
Co-authored-by: Malcolm Smith <smith@chaquo.com>
The tests failed (with less than 1% probability) if for example the file
was created at 11:46:03.999, but the record was emitted at 11:46:04.001,
with atTime=11:46:04, which caused an unexpected rollover. Ensure that the
tests are always run within the range of the same whole second.
Also share code between test_rollover_at_midnight and test_rollover_at_weekday.
(cherry picked from commit d8712fa0c7)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-116576: Fix `Tools/scripts/sortperf.py` sorting the same list (GH-116577)
(cherry picked from commit 4704e55a71)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>