]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
13 months agogh-120754: Fix memory leak in FileIO.__init__() (#124225)
Victor Stinner [Wed, 18 Sep 2024 22:11:50 +0000 (00:11 +0200)] 
gh-120754: Fix memory leak in FileIO.__init__() (#124225)

Free 'self->stat_atopen' before assigning it, since
io.FileIO.__init__() can be called multiple times manually
(especially by test_io).

13 months agogh-124212: Fix undefined variable in error message in venv (GH-124211)
Jacek [Wed, 18 Sep 2024 22:05:18 +0000 (00:05 +0200)] 
gh-124212: Fix undefined variable in error message in venv (GH-124211)

13 months agogh-124083: Skip test_signal.test_strsignal() on NetBSD (#124084)
Furkan Onder [Wed, 18 Sep 2024 21:22:00 +0000 (00:22 +0300)] 
gh-124083: Skip test_signal.test_strsignal() on NetBSD (#124084)

Skip test_strsignal() on NetBSD due to TypeError.

13 months agoFix `make htmllive` target (GH-124219)
Zachary Ware [Wed, 18 Sep 2024 21:02:20 +0000 (16:02 -0500)] 
Fix `make htmllive` target (GH-124219)

Allow `make -C Doc htmllive` to work without manual venv activation

Set PATH to ensure that `sphinx-autobuild` can find `sphinx-build`.

13 months agogh-116022: Improve `repr()` of AST nodes (#117046)
Tomas R [Wed, 18 Sep 2024 17:28:22 +0000 (19:28 +0200)] 
gh-116022: Improve `repr()` of AST nodes (#117046)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
13 months agogh-124064: Fix -Wconversion warnings in Parser/string_parser.c (#124204)
Victor Stinner [Wed, 18 Sep 2024 17:10:56 +0000 (19:10 +0200)] 
gh-124064: Fix -Wconversion warnings in Parser/string_parser.c (#124204)

Fix integer overflow check in decode_unicode_with_escapes(): use
PY_SSIZE_T_MAX instead of SIZE_MAX.

13 months agogh-122145: Handle an empty AST body when reporting tracebacks (#122161)
Bénédikt Tran [Wed, 18 Sep 2024 16:42:33 +0000 (18:42 +0200)] 
gh-122145: Handle an empty AST body when reporting tracebacks (#122161)

13 months agogh-120754: Refactor I/O modules to stash whole stat result rather than individual...
Cody Maloney [Wed, 18 Sep 2024 15:47:57 +0000 (08:47 -0700)] 
gh-120754: Refactor I/O modules to stash whole stat result rather than individual members (#123412)

Multiple places in the I/O stack optimize common cases by using the
information from stat. Currently individual members are extracted from
the stat and stored into the fileio struct. Refactor the code to store
the whole stat struct instead.

Parallels the changes to _io. The `stat` Python object doesn't allow
changing members, so rather than modifying estimated_size, just clear
the value.

13 months agogh-124206: Fix calling get_annotate_function() on static types (#124208)
Jelle Zijlstra [Wed, 18 Sep 2024 15:39:22 +0000 (08:39 -0700)] 
gh-124206: Fix calling get_annotate_function() on static types (#124208)

Fixes #124206. No news entry because the bug this fixes was never
released.

13 months agogh-102511: Change the `os.path.splitroot` param name from `path` back to `p` (GH...
sobolevn [Wed, 18 Sep 2024 14:17:32 +0000 (17:17 +0300)] 
gh-102511: Change the `os.path.splitroot` param name from `path` back to `p` (GH-124097)

13 months agotest: fix _is_perf_version_at_least typo (#124199)
Sam James [Wed, 18 Sep 2024 12:44:32 +0000 (13:44 +0100)] 
test: fix _is_perf_version_at_least typo (#124199)

13 months agogh-118915: Add/fix docs entries for some new 3.13 C API (GH-124134)
Petr Viktorin [Wed, 18 Sep 2024 12:15:43 +0000 (14:15 +0200)] 
gh-118915: Add/fix docs entries for some new 3.13 C API (GH-124134)

13 months agogh-123085: _compile_importlib: Avoid copying sources before compilation (GH-124131)
Petr Viktorin [Wed, 18 Sep 2024 12:14:34 +0000 (14:14 +0200)] 
gh-123085: _compile_importlib: Avoid copying sources before compilation (GH-124131)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
13 months agogh-119771: Set errno on overflows in _Py_c_pow() (#120256)
Sergey B Kirpichev [Wed, 18 Sep 2024 08:39:11 +0000 (11:39 +0300)] 
gh-119771: Set errno on overflows in _Py_c_pow() (#120256)

Before we did this in complex_pow() and behavior of the public C API
function _Py_c_pow() was different from the pure-python pow().

13 months agogh-124190: Ignore files directories check warning tooling (#124193)
Nate Ohlson [Wed, 18 Sep 2024 07:49:43 +0000 (02:49 -0500)] 
gh-124190: Ignore files directories check warning tooling (#124193)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
13 months agogh-124153: Implement `PyType_GetBaseByToken()` and `Py_tp_token` slot (GH-124163)
neonene [Wed, 18 Sep 2024 07:18:19 +0000 (16:18 +0900)] 
gh-124153: Implement `PyType_GetBaseByToken()` and `Py_tp_token` slot (GH-124163)

13 months agoRevert "gh-123974: Fix time.get_clock_info() on NetBSD (#123975)" (GH-124115)
Serhiy Storchaka [Wed, 18 Sep 2024 06:29:24 +0000 (09:29 +0300)] 
Revert "gh-123974: Fix time.get_clock_info() on NetBSD (#123975)" (GH-124115)

This reverts commit b1d6f8a2ee04215c64aa8752cc515b7e98a08d28.

13 months agogh-124191: Disable -Wconversion in enable safety (gh-124192)
Nate Ohlson [Wed, 18 Sep 2024 03:55:09 +0000 (22:55 -0500)] 
gh-124191: Disable -Wconversion in enable safety (gh-124192)

13 months agogh-124194: Fix wrong issue number in What's New in Python 3.8 (#124195)
Bradley Reynolds [Wed, 18 Sep 2024 00:51:15 +0000 (19:51 -0500)] 
gh-124194: Fix wrong issue number in What's New in Python 3.8 (#124195)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
13 months agogh-122765: make prompt in activate.csh robust against unbalanced quotes and newlines...
Jacek [Tue, 17 Sep 2024 17:16:43 +0000 (19:16 +0200)] 
gh-122765: make prompt in activate.csh robust against unbalanced quotes and newlines (GH-123751)

13 months agogh-123836: workaround fmod(x, y) bug on Windows (#124171)
Sergey B Kirpichev [Tue, 17 Sep 2024 17:16:15 +0000 (20:16 +0300)] 
gh-123836: workaround fmod(x, y) bug on Windows (#124171)

Buildbot failure on Windows 10 with MSC v.1916 64 bit (AMD64):
FAIL: testFmod (test.test_math.MathTests.testFmod)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\Lib\test\test_math.py", line 605, in testFmod
    self.ftest('fmod(-10, 1)', math.fmod(-10, 1), -0.0)
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\buildarea\3.x.bolen-windows10\build\Lib\test\test_math.py", line 258, in ftest
    self.fail("{}: {}".format(name, failure))
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: fmod(-10, 1): expected -0.0, got 0.0 (zero has wrong sign)

Here Windows loose sign of the result; if y is nonzero, the result
should have the same sign as x.

This amends commit 28aea5d07d.

13 months agogh-110190: Fix ctypes structs with array on SPARC (GH-118233)
Jakub Kulík [Tue, 17 Sep 2024 17:06:53 +0000 (19:06 +0200)] 
gh-110190: Fix ctypes structs with array on SPARC (GH-118233)

13 months agogh-124064: Fix -Wconversion warnings in Parser/pegen.c (#124181)
Victor Stinner [Tue, 17 Sep 2024 15:58:43 +0000 (17:58 +0200)] 
gh-124064: Fix -Wconversion warnings in Parser/pegen.c (#124181)

13 months agogh-124064: Fix -Wconversion warnings in pycore_{long,object}.h (#124177)
Victor Stinner [Tue, 17 Sep 2024 15:35:40 +0000 (17:35 +0200)] 
gh-124064: Fix -Wconversion warnings in pycore_{long,object}.h (#124177)

Change also the fix for pycore_gc.h and pycore_stackref.h:
declare constants as uintptr_t, rather than casting constants.

13 months agoGH-103484: Fix broken links reported by linkcheck (#124169)
Rafael Fontenelle [Tue, 17 Sep 2024 15:05:15 +0000 (12:05 -0300)] 
GH-103484: Fix broken links reported by linkcheck (#124169)

13 months agogh-124064: Fix -Wconversion warnings in pycore_{gc,list,stackref}.h (#124174)
Victor Stinner [Tue, 17 Sep 2024 14:43:39 +0000 (16:43 +0200)] 
gh-124064: Fix -Wconversion warnings in pycore_{gc,list,stackref}.h (#124174)

13 months agoUse pep role instead of url (#121611)
Rafael Fontenelle [Tue, 17 Sep 2024 13:02:14 +0000 (10:02 -0300)] 
Use pep role instead of url (#121611)

13 months agoTools/build/stable_abi.py: Improve ergonomics (GH-105355)
Petr Viktorin [Tue, 17 Sep 2024 12:32:04 +0000 (14:32 +0200)] 
Tools/build/stable_abi.py: Improve ergonomics (GH-105355)

* Tools/build/stable_abi.py: Improve ergonomics

- Make the manifest file argument optional
- Output resolved paths with --list (getting rid of `../../`)
- Mention --all or --generate-all if no actions are specified

* Don't hardcode Misc/stable_abi.toml in Makefile, rely on the default

13 months agogh-123836: Check zero signs in math_testcases.txt (#123854)
Sergey B Kirpichev [Tue, 17 Sep 2024 08:22:40 +0000 (11:22 +0300)] 
gh-123836: Check zero signs in math_testcases.txt (#123854)

Just like cmath_testcases.txt. These tests require IEEE 754 anyway.

Correct zero sign for sqrt tests to match math.h convention.

13 months agoGH-123945: Update regex for parsing negative numbers that contain underscores (#123970)
Savannah Ostrowski [Tue, 17 Sep 2024 06:30:17 +0000 (23:30 -0700)] 
GH-123945: Update regex for parsing negative numbers that contain underscores (#123970)

---------

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
13 months agoGH-103484: Fix permanently redirects reported by linkcheck (GH-124144)
Rafael Fontenelle [Tue, 17 Sep 2024 02:53:38 +0000 (23:53 -0300)] 
GH-103484: Fix permanently redirects reported by linkcheck (GH-124144)

Fix redirects reported by linkcheck, update docs conf.py checks.

13 months agoGH-124108: Skip test_locale.test_strcoll_with_diacritic() on NetBSD (#124110)
Furkan Onder [Mon, 16 Sep 2024 23:00:36 +0000 (02:00 +0300)] 
GH-124108: Skip test_locale.test_strcoll_with_diacritic() on NetBSD (#124110)

Skip test_strcoll_with_diacritic() and test_strxfrm_with_diacritic()
of test_locale on NetBSD due to lack of UTF-8 LC_COLLATE
support.

13 months agogh-121023: Improve `_xxtestfuzz/README.rst` (#121024)
sobolevn [Mon, 16 Sep 2024 20:28:09 +0000 (23:28 +0300)] 
gh-121023: Improve `_xxtestfuzz/README.rst` (#121024)

Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
13 months agogh-124043: Disallow mixing `--with-trace-refs` and `--disable-gil` (#124078)
Peter Bierma [Mon, 16 Sep 2024 20:03:16 +0000 (16:03 -0400)] 
gh-124043: Disallow mixing `--with-trace-refs` and `--disable-gil` (#124078)

Tracing references is not currently thread-safe in the free-threaded build.

13 months agogh-124064: Make warning emitting compiler options opt-in (#124070)
Nate Ohlson [Mon, 16 Sep 2024 17:22:30 +0000 (12:22 -0500)] 
gh-124064: Make warning emitting compiler options opt-in (#124070)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
13 months agoGH-109975: Copyedit 3.13 What's New: New Deprecations (#123845)
Adam Turner [Mon, 16 Sep 2024 17:03:46 +0000 (18:03 +0100)] 
GH-109975: Copyedit 3.13 What's New: New Deprecations (#123845)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
13 months agogh-123969: refactor _PyErr_RaiseSyntaxError and _PyErr_EmitSyntaxWarning out of compi...
Irit Katriel [Mon, 16 Sep 2024 14:05:00 +0000 (15:05 +0100)] 
gh-123969: refactor _PyErr_RaiseSyntaxError and _PyErr_EmitSyntaxWarning out of compiler (#123972)

13 months agogh-124058: remove _PyCompile_IsNestedScope, roll it into _PyCompile_IsInteractive...
Irit Katriel [Mon, 16 Sep 2024 13:58:18 +0000 (14:58 +0100)] 
gh-124058: remove _PyCompile_IsNestedScope, roll it into _PyCompile_IsInteractive (#124061)

13 months agogh-97588: remove unused functions in _ctypes/cfield.c (GH-124010)
Irit Katriel [Mon, 16 Sep 2024 12:13:18 +0000 (13:13 +0100)] 
gh-97588: remove unused functions in _ctypes/cfield.c (GH-124010)

13 months agogh-123748: Add conditional compilation rules for HACL SIMD256 and SIMD128 on macOS...
Russell Keith-Magee [Mon, 16 Sep 2024 04:23:05 +0000 (12:23 +0800)] 
gh-123748: Add conditional compilation rules for HACL SIMD256 and SIMD128 on macOS (#123989)

Add conditional compilation rules to allow HACL SIMD256 and SIMD128 to be ignored on the ARM64 pass of universal2 macOS builds.

13 months agogh-121404: update CODEOWNERS (#124109)
Irit Katriel [Sun, 15 Sep 2024 19:21:22 +0000 (20:21 +0100)] 
gh-121404: update CODEOWNERS (#124109)

13 months agogh-121459: Add missing return to _PyDict_LoadGlobalStackRef (#124085)
Sam Gross [Sat, 14 Sep 2024 18:29:55 +0000 (14:29 -0400)] 
gh-121459: Add missing return to _PyDict_LoadGlobalStackRef (#124085)

We need to return immediately if there's an error during dictionary
lookup.

Also avoid the conditional-if operator. MSVC versions through v19.27 miscompile
compound literals with side effects within a conditional operator. This caused
crashes in the Windows10 buildbot.

13 months agoRemove unused `_allowed_types` from `typing.py` (#124090)
sobolevn [Sat, 14 Sep 2024 13:14:45 +0000 (16:14 +0300)] 
Remove unused `_allowed_types` from `typing.py` (#124090)

13 months agoRemove unused variable in `MagicMixin._mock_set_magics` (#124092)
sobolevn [Sat, 14 Sep 2024 10:20:44 +0000 (13:20 +0300)] 
Remove unused variable in `MagicMixin._mock_set_magics` (#124092)

13 months agogh-124068: Fix reference leak with generators in the free-threaded build (#124069)
Sam Gross [Sat, 14 Sep 2024 02:02:27 +0000 (22:02 -0400)] 
gh-124068: Fix reference leak with generators in the free-threaded build (#124069)

If the generator is already cleared, then most fields in the
generator's frame are not valid other than f_executable. The invalid
fields may contain dangling pointers and should not be used.

13 months agogh-121607: Edited source file import recipe to make it more clear (#121519)
Chris Barker [Fri, 13 Sep 2024 23:36:40 +0000 (16:36 -0700)] 
gh-121607: Edited source file import recipe to make it more clear (#121519)

Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
13 months agoMinor edits to the descriptor guide (GH-123928)
Raymond Hettinger [Fri, 13 Sep 2024 22:02:37 +0000 (17:02 -0500)] 
Minor edits to the descriptor guide (GH-123928)

13 months agogh-123974: Fix time.get_clock_info() on NetBSD (#123975)
Furkan Onder [Fri, 13 Sep 2024 20:34:25 +0000 (23:34 +0300)] 
gh-123974: Fix time.get_clock_info() on NetBSD (#123975)

Fix OSError for thread_time clock on NetBSD by setting default resolution.

13 months agoRevert "gh-112301: Enable warning emitting options and ignore warnings in CI (#123020...
Hugo van Kemenade [Fri, 13 Sep 2024 19:47:12 +0000 (22:47 +0300)] 
Revert "gh-112301: Enable warning emitting options and ignore warnings in CI (#123020)" (#124065)

13 months agogh-100554: Fix formatting of type.rst modifications (#124066)
Oleg Iarygin [Fri, 13 Sep 2024 18:35:08 +0000 (22:35 +0400)] 
gh-100554: Fix formatting of type.rst modifications (#124066)

13 months agogh-122957: Fix test flakiness in asyncio test in free-thread build (#124039)
Loïc Estève [Fri, 13 Sep 2024 18:13:30 +0000 (20:13 +0200)] 
gh-122957: Fix test flakiness in asyncio test in free-thread build (#124039)

13 months agogh-124030: Skip test_tcsendbreak on NetBSD for ENOTTY error (GH-124031)
Furkan Onder [Fri, 13 Sep 2024 16:27:54 +0000 (19:27 +0300)] 
gh-124030: Skip test_tcsendbreak on NetBSD for ENOTTY error (GH-124031)

13 months agogh-121459: Deferred LOAD_GLOBAL (GH-123128)
Ken Jin [Fri, 13 Sep 2024 16:23:51 +0000 (00:23 +0800)] 
gh-121459: Deferred LOAD_GLOBAL (GH-123128)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Sam Gross <655866+colesbury@users.noreply.github.com>
13 months agogh-100554: Add ``Py_tp_vectorcall`` slot to set ``PyTypeObject.tp_vectorcall`` using...
Wenzel Jakob [Fri, 13 Sep 2024 15:40:25 +0000 (00:40 +0900)] 
gh-100554: Add ``Py_tp_vectorcall`` slot to set ``PyTypeObject.tp_vectorcall`` using the ``PyType_FromSpec`` function family. (#123332)

13 months agoNormalize cdecl formatting as found elsewhere on ctypes.rst (#121379)
utkonos [Fri, 13 Sep 2024 15:26:16 +0000 (11:26 -0400)] 
Normalize cdecl formatting as found elsewhere on ctypes.rst (#121379)

13 months agoUpdate to 3.13 the output of exceptions raised (#123888)
Rafael Fontenelle [Fri, 13 Sep 2024 15:17:30 +0000 (12:17 -0300)] 
Update to 3.13 the output of exceptions raised (#123888)

13 months agogh-124022: add missing #include (#124052)
Irit Katriel [Fri, 13 Sep 2024 15:16:54 +0000 (16:16 +0100)] 
gh-124022: add missing #include (#124052)

13 months agogh-119802: Update memory management docs for free-threaded build (gh-124006)
Donghee Na [Fri, 13 Sep 2024 15:15:44 +0000 (00:15 +0900)] 
gh-119802: Update memory management docs for free-threaded build (gh-124006)

* gh-119802: Update memory management docs for free-threaded build

* nit

* nit

* Address code review

* nit

* Update Doc/c-api/memory.rst

Co-authored-by: Sam Gross <colesbury@gmail.com>
---------

Co-authored-by: Sam Gross <colesbury@gmail.com>
13 months agocloses gh-124016: update Unicode to 16.0.0 (#124017)
Benjamin Peterson [Fri, 13 Sep 2024 14:47:04 +0000 (07:47 -0700)] 
closes gh-124016: update Unicode to 16.0.0 (#124017)

13 months agogh-124022: Fix bug where class docstring is removed in interactive mode (#124023)
Irit Katriel [Fri, 13 Sep 2024 14:06:06 +0000 (15:06 +0100)] 
gh-124022: Fix bug where class docstring is removed in interactive mode (#124023)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
13 months agogh-112301: Enable warning emitting options and ignore warnings in CI (#123020)
Nate Ohlson [Fri, 13 Sep 2024 13:40:04 +0000 (08:40 -0500)] 
gh-112301: Enable warning emitting options and ignore warnings in CI (#123020)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
13 months agogh-123811: Test that round(Decimal) can return signed zero (GH-124007)
Sergey B Kirpichev [Fri, 13 Sep 2024 12:49:13 +0000 (15:49 +0300)] 
gh-123811: Test that round(Decimal) can return signed zero (GH-124007)

13 months agogh-123961: Add `curses` prefix to global variables in `_cursesmodule.c` (#124047)
Bénédikt Tran [Fri, 13 Sep 2024 12:43:06 +0000 (14:43 +0200)] 
gh-123961: Add `curses` prefix to global variables in `_cursesmodule.c` (#124047)

Use the `const char*` type instead of a `const *` for the encoding name.

13 months agogh-124044: protect macros expansions in `_cursesmodules.c` using `do { ... } while...
Bénédikt Tran [Fri, 13 Sep 2024 11:26:19 +0000 (13:26 +0200)] 
gh-124044: protect macros expansions in `_cursesmodules.c` using `do { ... } while (0)` (#124045)

13 months agogh-123909: PyType_From*: Disallow metaclasses with custom tp_new (GH-123947)
Petr Viktorin [Fri, 13 Sep 2024 11:18:49 +0000 (13:18 +0200)] 
gh-123909: PyType_From*: Disallow metaclasses with custom tp_new (GH-123947)

13 months agogh-108303: Remove the non-test `Lib/test/reperf.py` (GH-114356)
sobolevn [Fri, 13 Sep 2024 11:13:52 +0000 (14:13 +0300)] 
gh-108303: Remove the non-test `Lib/test/reperf.py` (GH-114356)

13 months agogh-123961: Remove global variable `ModDict` in `_cursesmodule.c` (#123962)
Bénédikt Tran [Fri, 13 Sep 2024 10:33:13 +0000 (12:33 +0200)] 
gh-123961: Remove global variable `ModDict` in `_cursesmodule.c` (#123962)

13 months agoGH-101599: Update docs to remove redundant option in argparse tutorial (#124025)
Savannah Ostrowski [Fri, 13 Sep 2024 06:14:52 +0000 (23:14 -0700)] 
GH-101599: Update docs to remove redundant option in argparse tutorial (#124025)

13 months agogh-116622: Mock the passage of time in Android logcat rate limit tests (#124015)
Malcolm Smith [Fri, 13 Sep 2024 04:58:11 +0000 (05:58 +0100)] 
gh-116622: Mock the passage of time in Android logcat rate limit tests (#124015)

Mock the passage of time in Android logcat rate limit tests

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
13 months agogh-123614: Add save function to turtle.py (#123617)
Yngve Mardal Moe [Fri, 13 Sep 2024 04:36:17 +0000 (06:36 +0200)] 
gh-123614: Add save function to turtle.py (#123617)

13 months agogh-116622: Android test script improvements (#124012)
Malcolm Smith [Fri, 13 Sep 2024 04:23:54 +0000 (05:23 +0100)] 
gh-116622: Android test script improvements (#124012)

* Set Android test script stdout to line-buffered
* Print warning logcat messages on stderr
* Add a -vv option to display high-volume messages which are rarely useful
* Documentation and comment improvements

13 months agogh-123976: Refresh docs around custom providers. (#123977)
Jason R. Coombs [Fri, 13 Sep 2024 02:29:08 +0000 (22:29 -0400)] 
gh-123976: Refresh docs around custom providers. (#123977)

* gh-123976: Refresh docs around custom providers.

* Remove excess whitespace.

13 months agogh-124027: Support Del, PgUp, and PgDn on TERM=vt100 (#124028)
Miro Hrončok [Fri, 13 Sep 2024 01:07:23 +0000 (03:07 +0200)] 
gh-124027: Support Del, PgUp, and PgDn on TERM=vt100 (#124028)

pyrepl: Support Del, PgUp, and PgDn on TERM=vt100

From Fedora's /etc/inputrc:

    "\e[5~": history-search-backward
    "\e[6~": history-search-forward
    "\e[3~": delete-char

Fixes https://github.com/python/cpython/issues/124027

13 months agogh-124019: do not call codegen_annotations_in_scope if there are no annotations ...
Irit Katriel [Thu, 12 Sep 2024 19:24:15 +0000 (20:24 +0100)] 
gh-124019: do not call codegen_annotations_in_scope if there are no annotations (#124020)

13 months agogh-123085: Fix issue in inferred caller when resources package has no source (#123102)
Jason R. Coombs [Thu, 12 Sep 2024 19:08:06 +0000 (15:08 -0400)] 
gh-123085: Fix issue in inferred caller when resources package has no source (#123102)

gh-123085: Fix issue in inferred caller when resources package has no source.

From importlib_resources 6.4.3 (python/importlib_resources#314).

13 months agogh-124013: remove _PyCompile_IsTopLevelAwait (#124014)
Irit Katriel [Thu, 12 Sep 2024 18:58:32 +0000 (19:58 +0100)] 
gh-124013: remove _PyCompile_IsTopLevelAwait (#124014)

13 months agogh-123923: Defer refcounting for `f_executable` in `_PyInterpreterFrame` (#123924)
Sam Gross [Thu, 12 Sep 2024 16:37:06 +0000 (12:37 -0400)] 
gh-123923: Defer refcounting for `f_executable` in `_PyInterpreterFrame` (#123924)

Use a `_PyStackRef` and defer the reference to `f_executable` when
possible. This avoids some reference count contention in the common case
of executing the same code object from multiple threads concurrently in
the free-threaded build.

13 months agoGH-123996: Explicitly mark 'self_or_null' as an array of size 1 to ensure that it...
Mark Shannon [Thu, 12 Sep 2024 14:32:45 +0000 (15:32 +0100)] 
GH-123996: Explicitly mark 'self_or_null' as an array of size 1 to ensure that it is kept in memory for calls (GH-124003)

13 months agogh-123994: Generate utf-16 file using little endian and BOM. (#123995)
Jason R. Coombs [Thu, 12 Sep 2024 14:14:46 +0000 (10:14 -0400)] 
gh-123994: Generate utf-16 file using little endian and BOM. (#123995)

13 months agogh-123968: Fix lower bound for `python -m random --float` (#123971)
Anders Kaseorg [Thu, 12 Sep 2024 13:54:18 +0000 (06:54 -0700)] 
gh-123968: Fix lower bound for `python -m random --float` (#123971)

13 months agogh-118577: Clarify that inspect.BoundArguments prefers to put values in args (GH...
Nice Zombies [Thu, 12 Sep 2024 12:03:32 +0000 (14:03 +0200)] 
gh-118577: Clarify that inspect.BoundArguments prefers to put values in args (GH-119936)

13 months agoDocs: Drop letter PDF (#123912)
Hugo van Kemenade [Thu, 12 Sep 2024 10:49:19 +0000 (13:49 +0300)] 
Docs: Drop letter PDF (#123912)

13 months agogh-111997: update what's new in 3.13 re C API for monitoring events (#123822)
Irit Katriel [Thu, 12 Sep 2024 10:32:57 +0000 (11:32 +0100)] 
gh-111997: update what's new in 3.13 re C API for monitoring events (#123822)

13 months agogh-123935: Fix typo in `_get_slots` in `dataclasses.py` (#123941)
sobolevn [Thu, 12 Sep 2024 07:29:06 +0000 (10:29 +0300)] 
gh-123935: Fix typo in `_get_slots` in `dataclasses.py` (#123941)

13 months agogh-116622: Switch test_stress_delivery_simultaneous from SIGUSR1 to SIGUSR2 (#123981)
Malcolm Smith [Thu, 12 Sep 2024 05:52:07 +0000 (06:52 +0100)] 
gh-116622: Switch test_stress_delivery_simultaneous from SIGUSR1 to SIGUSR2 (#123981)

Use SIGUSR1 instead of SIGUSR2 to improve reliability of signal stress test on Android.

13 months agogh-121735: Fix module-adjacent references in zip files (#123037)
Jason R. Coombs [Thu, 12 Sep 2024 02:33:07 +0000 (22:33 -0400)] 
gh-121735: Fix module-adjacent references in zip files (#123037)

* gh-116608: Apply style and compatibility changes from importlib_metadata.

* gh-121735: Ensure module-adjacent resources are loadable from a zipfile.

* gh-121735: Allow all modules to be processed by the ZipReader.

* Add blurb

* Remove update-zips script, unneeded.

* Remove unnecessary references to removed static fixtures.

* Remove zipdata fixtures, unused.

13 months agoFix "The Matrix" movie release year in `typing.rst` (#123965)
sobolevn [Wed, 11 Sep 2024 18:25:23 +0000 (21:25 +0300)] 
Fix "The Matrix" movie release year in `typing.rst` (#123965)

13 months agoUpdate Sphinx Lint and fix unnecessary parentheses in `:func:`s (#123960)
Hugo van Kemenade [Wed, 11 Sep 2024 18:05:15 +0000 (21:05 +0300)] 
Update Sphinx Lint and fix unnecessary parentheses in `:func:`s (#123960)

13 months agogh-123958: apply docstring removal optimization in ast_opt instead of codegen (#123959)
Irit Katriel [Wed, 11 Sep 2024 17:02:28 +0000 (18:02 +0100)] 
gh-123958: apply docstring removal optimization in ast_opt instead of codegen (#123959)

13 months agogh-123290: fix reference leaks in the error-branches of `_cursesmodule.c` (#123953)
Bénédikt Tran [Wed, 11 Sep 2024 15:49:33 +0000 (17:49 +0200)] 
gh-123290: fix reference leaks in the error-branches of `_cursesmodule.c` (#123953)

13 months agogh-108951: Document how to terminate an asyncio.TaskGroup (#123837)
Bénédikt Tran [Wed, 11 Sep 2024 15:43:24 +0000 (17:43 +0200)] 
gh-108951: Document how to terminate an asyncio.TaskGroup (#123837)

We don't want to add another API, since the recipe is straightforward and rarely needed.

The advantage is that we could backport this to the earliest Python version that has taskgroups (3.11, alas in security mode already, so we'll just do 3.12 and 3.13).

13 months agogh-119180: Documentation for PEP 649 and 749 (#122235)
Jelle Zijlstra [Wed, 11 Sep 2024 14:49:59 +0000 (07:49 -0700)] 
gh-119180: Documentation for PEP 649 and 749 (#122235)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
13 months agogh-123942: add missing test for docstring-handling code in ast_opt.c (#123943)
Irit Katriel [Wed, 11 Sep 2024 14:39:53 +0000 (15:39 +0100)] 
gh-123942: add missing test for docstring-handling code in ast_opt.c (#123943)

13 months agogh-123919: Fix null handling in `_freeze_module.c` (#123920)
sobolevn [Wed, 11 Sep 2024 13:37:35 +0000 (16:37 +0300)] 
gh-123919: Fix null handling in `_freeze_module.c` (#123920)

13 months agoFix invisible character typo (#123933)
Xie Yanbo [Wed, 11 Sep 2024 11:44:46 +0000 (19:44 +0800)] 
Fix invisible character typo (#123933)

Remove accidental addition of zero-width character (U+FEFF) reported by @jaraco:
- https://github.com/python/cpython/commit/c3f4a6b52418d9b9f091f864cb6340d0d5fc6966#commitcomment-146456562

13 months agogh-123811: test that round() can return signed zero (#123829)
Sergey B Kirpichev [Wed, 11 Sep 2024 09:21:05 +0000 (12:21 +0300)] 
gh-123811: test that round() can return signed zero (#123829)

13 months agogh-77894: Fix a crash when the GC breaks a loop containing a memoryview (GH-123898)
Serhiy Storchaka [Wed, 11 Sep 2024 09:05:46 +0000 (12:05 +0300)] 
gh-77894: Fix a crash when the GC breaks a loop containing a memoryview (GH-123898)

Now a memoryview object can only be cleared if there are no buffers
that refer it.

13 months agogh-123915: Ensure that Windows AMD64 and ARM64 release builds use different directori...
adang1345 [Tue, 10 Sep 2024 19:52:49 +0000 (15:52 -0400)] 
gh-123915: Ensure that Windows AMD64 and ARM64 release builds use different directories (GH-123918)

13 months agogh-123881: make compiler add the .generic_base base class without constructing AST...
Irit Katriel [Tue, 10 Sep 2024 16:16:00 +0000 (17:16 +0100)] 
gh-123881: make compiler add the .generic_base base class without constructing AST nodes (#123883)

13 months agogh-122239: Add actual count in unbalanced unpacking error message when possible ...
Tushar Sadhwani [Tue, 10 Sep 2024 15:07:30 +0000 (20:37 +0530)] 
gh-122239: Add actual count in unbalanced unpacking error message when possible (#122244)