gh-136315: Fix skipped multithreading test in test_zstd (GH-136320)
Fix skipped test in test_zstd
(cherry picked from commit 5dac137b9f)
Co-authored-by: Emma Smith <emma@emmatyping.dev>
gh-136297: Test all `pickle` protocols in `test_zoneinfo_property.py` (GH-136298)
(cherry picked from commit 5de7e3f973)
Co-authored-by: sobolevn <mail@sobolevn.me>
gh-135773: have pyvenv.cfg without home key anchor a venv and deduce home (GH-135831)
This is still formally undefined behaviour, but we may as well
keep the *same* undefined behaviour as previous versions.
PEP 796 proposes a cleaner and more consistent replacement for 3.15+
(cherry picked from commit 93263d4314)
Co-authored-by: Richard Levasseur <rlevasseur@google.com>
* Whitespaces no longer accepted between `</` and the tag name.
E.g. `</ script>` does not end the script section.
* Vertical tabulation (`\v`) and non-ASCII whitespaces no longer recognized
as whitespaces. The only whitespaces are `\t\n\r\f `.
* Null character (U+0000) no longer ends the tag name.
* Attributes and slashes after the tag name in end tags are now ignored,
instead of terminating after the first `>` in quoted attribute value.
E.g. `</script/foo=">"/>`.
* Multiple slashes and whitespaces between the last attribute and closing `>`
are now ignored in both start and end tags. E.g. `<a foo=bar/ //>`.
* Multiple `=` between attribute name and value are no longer collapsed.
E.g. `<a foo==bar>` produces attribute "foo" with value "=bar".
* Whitespaces between the `=` separator and attribute name or value are no
longer ignored. E.g. `<a foo =bar>` produces two attributes "foo" and
"=bar", both with value None; `<a foo= bar>` produces two attributes:
"foo" with value "" and "bar" with value None.
---------
(cherry picked from commit 0243f97cba)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
This moves the deprecation warning from compile time to run time.
(cherry picked from commit 86c3316183)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-85702: Catch PermissionError in zoneinfo.load_tzdata() (GH-136117)
(cherry picked from commit ee47670e8b)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Doc: fix duplicated words (GH-136086)
---------
(cherry picked from commit 698bab5a40)
Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Doc: Fix duplicate words in idlelib (GH-136089)
(cherry picked from commit f04d2b8819)
Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
Previous error message suggested to use cls.__new__(), which
obviously does not work. Now the error message is the same as for
cls(...).
(cherry picked from commit c45f4f3ebe)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-128051: Fix tests if sys.float_repr_style is 'legacy' (GH-135908)
(cherry picked from commit f3aec60d7a)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
* Add detection of decimal non-ASCII alt digits.
* Add support of non-decimal alt digits on locale lzh_TW.
* Accept only numbers in correct range if alt digits are known.
* Fix bug in detecting the position of the week day name on locales byn_ER and wal_ET.
* Fix support of single-digit hour on locales ar_SA and bg_BG.
* Add support for %T, %R, %r, %C, %OC.
* Prepare code to use nl_langinfo().
(cherry picked from commit 07183ebce3)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-135995: Fix missing char in palmos encoding (GH-135990)
0x8b correctly encodes to ‹, but 0x9b was mistakenly marked as a control character instead of ›.
---------
(cherry picked from commit 58a42dea97)
Co-authored-by: Nathan Korth <nkorth@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
IDLE: Update NEWS2x.txt with 2.7.0 release date (GH-129908)
(cherry picked from commit 642e5dfc74)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
gh-135956: Remove duplicate word in _pydatetime docstring (GH-135957)
_pydatetime.isoformat docstring repeats 'giving'.
(cherry picked from commit e3ea6f2b3b)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
gh-135487: fix `reprlib.Repr.repr_int` when given very large integers (GH-135506)
(cherry picked from commit e5f03b94b6)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
gh-135494: Fix python -m test --pgo -x test_re (GH-135713)
Fix regrtest to support excluding tests from --pgo tests.
(cherry picked from commit 15c6d63fe6)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-134986: Catch PermissionError when trying to call perf in tests (GH-134987)
Using Ubuntu 24.04 on the Windows Subsystem for Linux, perf will raise a
`PermissionError` instead of `FileNotFoundError`. This commit modifies
the tests to catch that.
(cherry picked from commit 6ab842fce5)
Co-authored-by: Emma Smith <emma@emmatyping.dev>
Temporarily skip test_os.test_mode on Emscripten; this fails consistently
on the buildbot, but not on other test configurations. Reported as GH-135783
for follow up.
(cherry picked from commit f4911258a8)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
gh-135557: use atomic stores in `heapq` operations in free-threading (GH-135601)
(cherry picked from commit 13cac83347)
Co-authored-by: Xuanteng Huang <44627253+xuantengh@users.noreply.github.com>
We weren't handling non-positive maxsize values (including the default) properly
in Queue.full(). This change fixes that and adjusts an associated assert.
(cherry picked from commit c5ea8e8e8, AKA gh-135724)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
gh-135608: Add a null check for attribute promotion to fix a JIT crash (GH-135613)
Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
gh-126112: Fix test_os.TimerfdTests: use 10 ms resolution (GH-135681)
Use 10 ms for CLOCK_RES instead of 100 ms to tolerate slow buildbots.
(cherry picked from commit 5c25c884b9)
Co-authored-by: Victor Stinner <vstinner@python.org>
Most importantly, this resolves the issues with functions and types defined in __main__.
It also expands the number of supported objects and simplifies the implementation.
(cherry picked from commit 725da50520, AKA gh-133957)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
The assertion reflected a misunderstanding of situations where "hidden" variables might exist,
namely generator expressions and comprehensions.
(cherry picked from commit 15f2bac02c, AKA gh-135466)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>