There is no need to temporary switch locale for items ALT_DIGITS and ERA
if the nl_langinfo() result is empty (most locales).
(cherry picked from commit 5c984ae35e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-127705: Move Py_INCREF_MORTAL() to the internal C API (GH-136178)
Rename Py_INCREF_MORTAL() to _Py_INCREF_MORTAL() and move it to
pycore_object.h internal header.
(cherry picked from commit fa43a1e0f8)
Co-authored-by: Victor Stinner <vstinner@python.org>
Replace `capi-sig` mailing list with `discuss.python.org` (GH-136211)
(cherry picked from commit 7afe1adb00)
Co-authored-by: sobolevn <mail@sobolevn.me>
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-130396: Move PYOS_LOG2_STACK_MARGIN to internal headers (GH-135928)
Move PYOS_LOG2_STACK_MARGIN, PYOS_STACK_MARGIN,
PYOS_STACK_MARGIN_BYTES and PYOS_STACK_MARGIN_SHIFT macros to
pycore_pythonrun.h internal header. Add underscore (_) prefix to the
names to make them private. Rename _PYOS to _PyOS.
(cherry picked from commit 28940e8e48)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-136169: Update parameter name in fractions.from_float method (GH-136172)
Update parameter name in fractions.from_float method
(cherry picked from commit 9c0cb5beb8)
Co-authored-by: Vladyslav Lazoryk <80263725+lazorikv@users.noreply.github.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>
gh-135607: remove null checking of weakref list in dealloc of extension modules and objects (#135614)
(cherry picked from commit b1056c2a44)
Co-authored-by: Xuanteng Huang <44627253+xuantengh@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
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>
* gh-127604: Docs: Include a C stack in the `faulthandler` example (GH-136081)
(cherry picked from commit 3947847914)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Fix a possible crash when deserializing a large marshal data
(at least several GiBs) containing a slice.
(cherry picked from commit 30ba03ea8e)
Co-authored-by: Akshat Gupta <akshat.gupta24@gmail.com>
Doc: Fix duplicate words in idlelib (GH-136089)
(cherry picked from commit f04d2b8819)
Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
Rename undocumented `HACL_CAN_COMPILE_SIMD{128,256}` macros
to `_Py_HACL_CAN_COMPILE_VEC{128,256}`. These macros are private.
(cherry picked from commit 1e975aee28)
gh-108765: fix comment about macro definitions in `_stat.c` post GH-108854 (GH-136027)
(cherry picked from commit 0141e7f9e6)
Co-authored-by: Lee Dogeon <dev.moreal@gmail.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>
The iOS testbed now treats the app_packages folder as a site folder. This ensures it is
on the path, but also ensures any .pth files are processed on app startup.
(cherry picked from commit b38810bab7)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.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-135110: Fix misleading `generator.close()` documentation (GH-135152)
The documentation incorrectly stated that generator.close() 'raises' a
GeneratorExit exception. This was misleading because the method doesn't
raise the exception to the caller - it sends the exception internally
to the generator and returns None.
(cherry picked from commit 0d76dccc3b)
Co-authored-by: Connor Denihan <188690869+cdenihan@users.noreply.github.com>