]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
16 months agogh-65453: Docs - clarify AttributeError behaviour on PropertyMock (GH-121666)
Vlastimil Zíma [Thu, 18 Jul 2024 13:57:21 +0000 (15:57 +0200)] 
gh-65453: Docs - clarify AttributeError behaviour on PropertyMock (GH-121666)

Fixed at EuroPython 24 sprints.

16 months agogh-120930: Remove extra blank occuring in wrapped encoded words in email headers...
Matthieu Caneill [Thu, 18 Jul 2024 12:48:05 +0000 (14:48 +0200)] 
gh-120930: Remove extra blank occuring in wrapped encoded words in email headers (GH-121747)

16 months agogh-121657: Additional `yield from` error test using lambda (GH-121722)
Gregor [Thu, 18 Jul 2024 12:29:03 +0000 (14:29 +0200)] 
gh-121657: Additional `yield from` error test using lambda (GH-121722)

16 months agoGH-121784: Generate an error during code gen if a variable is marked `unused`, but...
Mark Shannon [Thu, 18 Jul 2024 11:49:24 +0000 (12:49 +0100)] 
GH-121784: Generate an error during code gen if a variable is marked `unused`, but is used and thus cached in a prior uop. (#121788)

* Reject uop definitions that declare values as 'unused' that are already cached by prior uops

* Track which variables are defined and only load from memory when needed

* Support explicit `flush` in macro definitions.

* Make sure stack is flushed in where needed.

16 months agoGH-120024: Use pointer for stack pointer (GH-121923)
Mark Shannon [Thu, 18 Jul 2024 11:47:21 +0000 (12:47 +0100)] 
GH-120024: Use pointer for stack pointer (GH-121923)

16 months agogh-121874: Define audit-event open parameters consistently (GH-121883)
Bernhard M. Wiedemann [Thu, 18 Jul 2024 10:05:39 +0000 (12:05 +0200)] 
gh-121874: Define audit-event open parameters consistently (GH-121883)

Use same names for parameters to avoid triggering a race-condition in Sphinx
that causes non-deterministic output.

16 months agogh-121921: Make bogus_code_obj.py crash the interpreter (#121922)
Jelle Zijlstra [Thu, 18 Jul 2024 08:02:08 +0000 (01:02 -0700)] 
gh-121921: Make bogus_code_obj.py crash the interpreter (#121922)

16 months agogh-121266: Remove Py_ALWAYS_INLINE in dictobject.c (#121493)
Victor Stinner [Thu, 18 Jul 2024 06:19:32 +0000 (08:19 +0200)] 
gh-121266: Remove Py_ALWAYS_INLINE in dictobject.c (#121493)

compare_unicode_generic(), compare_unicode_unicode() and
compare_generic() are callbacks used by do_lookup(). When enabling
assertions, it's not possible to inline these functions.

16 months agogh-121621: Move asyncio_running_loop to private struct (#121939)
Sam Gross [Wed, 17 Jul 2024 22:21:24 +0000 (18:21 -0400)] 
gh-121621: Move asyncio_running_loop to private struct (#121939)

This avoids changing the ABI and keeps the field in the private struct.

16 months agoAdd note about PYTHON_JIT environment variable to JIT README (GH-121635)
Savannah Ostrowski [Wed, 17 Jul 2024 22:17:47 +0000 (15:17 -0700)] 
Add note about PYTHON_JIT environment variable to JIT README (GH-121635)

16 months agogh-121266: Change dict check_lookup() return type to int (#121581)
Victor Stinner [Wed, 17 Jul 2024 19:52:19 +0000 (21:52 +0200)] 
gh-121266: Change dict check_lookup() return type to int (#121581)

16 months agogh-121528: Fix _PyObject_Init() assertion for stable ABI (#121725)
Victor Stinner [Wed, 17 Jul 2024 19:49:37 +0000 (21:49 +0200)] 
gh-121528: Fix _PyObject_Init() assertion for stable ABI (#121725)

Add _Py_IsImmortalLoose() function for assertions.

16 months agogh-121925: Fix uninitialized variables in `main.c` (#121926)
sobolevn [Wed, 17 Jul 2024 16:13:37 +0000 (19:13 +0300)] 
gh-121925: Fix uninitialized variables in `main.c` (#121926)

16 months agogh-120678: Guard against stdin.fileno() being unavailable (#121924)
Łukasz Langa [Wed, 17 Jul 2024 16:05:34 +0000 (18:05 +0200)] 
gh-120678: Guard against stdin.fileno() being unavailable (#121924)

16 months agogh-120678: pyrepl: Include globals from modules passed with `-i` (GH-120904)
Alex Waygood [Wed, 17 Jul 2024 14:18:42 +0000 (15:18 +0100)] 
gh-120678: pyrepl: Include globals from modules passed with `-i` (GH-120904)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
16 months agogh-78889: Stop IDLE Shell freezes from sys.stdout.shell.xyz (#121876)
Terry Jan Reedy [Wed, 17 Jul 2024 13:33:33 +0000 (09:33 -0400)] 
gh-78889: Stop IDLE Shell freezes from sys.stdout.shell.xyz (#121876)

Problem occurred when attribute xyz could not be pickled.
Since this is not trivial to selectively fix, block all
attributes (other than 'width').  IDLE does not access them
and they are private implementation details.

16 months agogh-119698: fix a special case in `symtable.Class.get_methods` (#121802)
Bénédikt Tran [Wed, 17 Jul 2024 13:27:35 +0000 (15:27 +0200)] 
gh-119698: fix a special case in `symtable.Class.get_methods` (#121802)

16 months agogh-121863: Immortalize names in code objects to avoid crash (GH-121903)
Petr Viktorin [Wed, 17 Jul 2024 09:31:28 +0000 (11:31 +0200)] 
gh-121863: Immortalize names in code objects to avoid crash (GH-121903)

16 months agogh-121849: Fix PyUnicodeWriter_WriteSubstring() crash if len=0 (#121896)
Victor Stinner [Wed, 17 Jul 2024 08:26:05 +0000 (10:26 +0200)] 
gh-121849: Fix PyUnicodeWriter_WriteSubstring() crash if len=0 (#121896)

Do nothing if start=end.

16 months agoRemove duplicate "it" in whatsnew 3.13 (#121580)
Rafael Fontenelle [Wed, 17 Jul 2024 07:31:21 +0000 (04:31 -0300)] 
Remove duplicate "it" in whatsnew 3.13 (#121580)

16 months agoFix Several Typos in Readme & Tests (#121559)
Michael [Wed, 17 Jul 2024 07:24:35 +0000 (03:24 -0400)] 
Fix Several Typos in Readme & Tests (#121559)

16 months agogh-121834: Improve `complex` C-API docs (#121835)
sobolevn [Wed, 17 Jul 2024 07:01:28 +0000 (10:01 +0300)] 
gh-121834: Improve `complex` C-API docs (#121835)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
16 months agogh-121842: Improve coverage of `PyBytes_FromStringAndSize` (#121843)
sobolevn [Wed, 17 Jul 2024 07:00:07 +0000 (10:00 +0300)] 
gh-121842: Improve coverage of `PyBytes_FromStringAndSize` (#121843)

16 months agogh-121453: Update the `Doc/templates/download.html` download files size estimates...
Wulian233 [Wed, 17 Jul 2024 06:20:55 +0000 (14:20 +0800)] 
gh-121453: Update the `Doc/templates/download.html` download files size estimates and support download `.texi` format. (#121454)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
16 months agogh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH (#121872)
Bernhard M. Wiedemann [Wed, 17 Jul 2024 05:34:00 +0000 (07:34 +0200)] 
gh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH (#121872)

16 months agoGH-121583: Remove dependency from pystats.h to internal header file (GH-121587)
Michael Droettboom [Tue, 16 Jul 2024 22:38:29 +0000 (18:38 -0400)] 
GH-121583: Remove dependency from pystats.h to internal header file (GH-121587)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
16 months agogh-83648: Use versionadded in 'deprecated' description (GH-121877)
Zachary Ware [Tue, 16 Jul 2024 21:26:17 +0000 (16:26 -0500)] 
gh-83648: Use versionadded in 'deprecated' description (GH-121877)

16 months agoGH-120371: Add WASI SDK 22 support (GH-121870)
Brett Cannon [Tue, 16 Jul 2024 20:00:39 +0000 (13:00 -0700)] 
GH-120371: Add WASI SDK 22 support (GH-121870)

Required disabling stub functions now provided by wasi-libc.

16 months agogh-118934: Make PyEval_GetLocals return borrowed reference (#119769)
Tian Gao [Tue, 16 Jul 2024 19:17:47 +0000 (12:17 -0700)] 
gh-118934: Make PyEval_GetLocals return borrowed reference (#119769)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
16 months agogh-121860: Fix crash when materializing managed dict (#121866)
Sam Gross [Tue, 16 Jul 2024 18:58:36 +0000 (14:58 -0400)] 
gh-121860: Fix crash when materializing managed dict (#121866)

The object's inline values may be marked invalid if the materialized
dict was already initialized and then deleted.

16 months agogh-121130: Fix f-string format specifiers with debug expressions (#121150)
Pablo Galindo Salgado [Tue, 16 Jul 2024 18:57:22 +0000 (19:57 +0100)] 
gh-121130: Fix f-string format specifiers with debug expressions (#121150)

16 months agogh-121621: Move asyncio running loop to thread state (GH-121695)
Ken Jin [Tue, 16 Jul 2024 17:09:58 +0000 (01:09 +0800)] 
gh-121621: Move asyncio running loop to thread state (GH-121695)

16 months agogh-59022: Added tests for `pkgutil.extend_path` (#59022) (GH-121673)
Andreas Stocker [Tue, 16 Jul 2024 15:14:26 +0000 (17:14 +0200)] 
gh-59022: Added tests for `pkgutil.extend_path` (#59022) (GH-121673)

This adds tests for the documented behaviour of `pkgutil.extend_path`
regarding different argument types as well as for `*.pkg` files.

16 months agogh-121160: Add some tests for readline.set_history_length (GH-121326)
Petr Viktorin [Tue, 16 Jul 2024 14:09:08 +0000 (16:09 +0200)] 
gh-121160: Add some tests for readline.set_history_length (GH-121326)

16 months agogh-113993: Don't immortalize in PyUnicode_InternInPlace; keep immortalizing in other...
Petr Viktorin [Tue, 16 Jul 2024 13:36:21 +0000 (15:36 +0200)] 
gh-113993: Don't immortalize in PyUnicode_InternInPlace; keep immortalizing in other API (#121364)

* Switch PyUnicode_InternInPlace to _PyUnicode_InternMortal, clarify docs

* Document immortality in some functions that take `const char *`

This is PyUnicode_InternFromString;
PyDict_SetItemString, PyObject_SetAttrString;
PyObject_DelAttrString; PyUnicode_InternFromString;
and the PyModule_Add convenience functions.

Always point out a non-immortalizing alternative.

* Don't immortalize user-provided attr names in _ctypes

16 months agoGH-105879: Note exec/eval keyword change in What's New (GH-121831)
Alyssa Coghlan [Tue, 16 Jul 2024 13:24:45 +0000 (23:24 +1000)] 
GH-105879: Note exec/eval keyword change in What's New (GH-121831)

16 months agogh-113993: For string interning, do not rely on (or assert) _Py_IsImmortal (GH-121358)
Petr Viktorin [Tue, 16 Jul 2024 13:17:29 +0000 (15:17 +0200)] 
gh-113993: For string interning, do not rely on (or assert) _Py_IsImmortal (GH-121358)

Older stable ABI extensions are allowed to make immortal objects mortal.
Instead, use `_PyUnicode_STATE` (`interned` and `statically_allocated`).

16 months ago🧪🚑 Fix using `check_source` flags as bool (#121848)
Sviatoslav Sydorenko (Святослав Сидоренко) [Tue, 16 Jul 2024 12:50:30 +0000 (14:50 +0200)] 
🧪🚑 Fix using `check_source` flags as bool (#121848)

16 months agogh-120522: Revert "Add a `--with-app-store-compliance` configure option to patch...
Ned Deily [Tue, 16 Jul 2024 10:49:36 +0000 (06:49 -0400)] 
gh-120522: Revert "Add a `--with-app-store-compliance` configure option to patch out problematic code" (gh-120984) (#121844)

This reverts commit 48cd104b0cf05dad8958efa9cb9666c029ef9201 prior
to the release of 3.13.0b4 to allow for additional review time.

16 months agogh-120317: Lock around global state in the tokenize module (#120318)
Lysandros Nikolaou [Tue, 16 Jul 2024 09:35:57 +0000 (11:35 +0200)] 
gh-120317: Lock around global state in the tokenize module (#120318)

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
16 months agogh-121791: Check for `NULL` in `MethodDescriptor2_new` in `_testcapi` (#121792)
sobolevn [Tue, 16 Jul 2024 08:29:33 +0000 (11:29 +0300)] 
gh-121791: Check for `NULL` in `MethodDescriptor2_new` in `_testcapi` (#121792)

16 months agogh-85453: Fix 'timezone' vs. 'time zone' spelling issues in datetime.rst (#118449)
edson duarte [Tue, 16 Jul 2024 08:17:00 +0000 (05:17 -0300)] 
gh-85453: Fix 'timezone' vs. 'time zone' spelling issues in datetime.rst (#118449)

16 months agogh-120831: Increase the default minimum supported iOS version to 13.0 (#121250)
Russell Keith-Magee [Tue, 16 Jul 2024 04:23:35 +0000 (14:23 +1000)] 
gh-120831: Increase the default minimum supported iOS version to 13.0 (#121250)

Increases the default minimum iOS version to 13.0.

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
16 months agogh-121403: Add notes for PyList_GetXXX APIs about the need for init (gh-121626)
Donghee Na [Tue, 16 Jul 2024 01:16:41 +0000 (10:16 +0900)] 
gh-121403: Add notes for PyList_GetXXX APIs about the need for init (gh-121626)

16 months agogh-121295: Fix blocked console after interrupting a long paste (GH-121815)
Marta Gómez Macías [Mon, 15 Jul 2024 23:38:54 +0000 (01:38 +0200)] 
gh-121295: Fix blocked console after interrupting a long paste (GH-121815)

16 months agogh-121610: pyrepl - handle extending blocks when multi-statement blocks are pasted...
saucoide [Mon, 15 Jul 2024 23:33:57 +0000 (01:33 +0200)] 
gh-121610: pyrepl - handle extending blocks when multi-statement blocks are pasted (GH-121757)

console.compile with the "single" param throws an exception when
there are multiple statements, never allowing to adding newlines
to a pasted code block (gh-121610)

This add a few extra checks to allow extending when in an indented
block, and tests for a few examples

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
16 months agogh-121814: Only check f_trace_opcodes if Python frame exists (#121818)
Tian Gao [Mon, 15 Jul 2024 23:11:02 +0000 (16:11 -0700)] 
gh-121814: Only check f_trace_opcodes if Python frame exists (#121818)

Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
16 months agogh-121605: Fix test hang when pyrepl is not available (GH-121820)
Sam Gross [Mon, 15 Jul 2024 22:50:16 +0000 (18:50 -0400)] 
gh-121605: Fix test hang when pyrepl is not available (GH-121820)

The fallback repl does not support "exit" without parentheses, so the
test would hang until the timeout expired.

16 months agogh-121790: Fix interactive console initialization (#121793)
Milan Oberkirch [Mon, 15 Jul 2024 22:24:18 +0000 (00:24 +0200)] 
gh-121790: Fix interactive console initialization (#121793)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
16 months agogh-121794: Don't set `ob_tid` to zero in fast-path dealloc (#121799)
Sam Gross [Mon, 15 Jul 2024 21:50:10 +0000 (17:50 -0400)] 
gh-121794: Don't set `ob_tid` to zero in fast-path dealloc (#121799)

We should maintain the invariant that a zero `ob_tid` implies the
refcount fields are merged.

* Move the assignment in `_Py_MergeZeroLocalRefcount` to immediately
  before the refcount merge.
* Update `_PyTrash_thread_destroy_chain` to set `ob_ref_shared` to
  `_Py_REF_MERGED` when setting `ob_tid` to zero.

Also check this invariant with assertions in the GC in debug builds.
That uncovered a bug when running out of memory during GC.

16 months agogh-117657: Skip tests that fork with threads under TSan (#121599)
Sam Gross [Mon, 15 Jul 2024 20:43:51 +0000 (16:43 -0400)] 
gh-117657: Skip tests that fork with threads under TSan (#121599)

This avoids messages like:

  ThreadSanitizer: starting new threads after multi-threaded fork is not
  supported. Dying (set die_after_fork=0 to override)

16 months agogh-121245: Refactor site.register_readline() (GH-121659)
Sergey B Kirpichev [Mon, 15 Jul 2024 20:12:41 +0000 (23:12 +0300)] 
gh-121245: Refactor site.register_readline() (GH-121659)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
16 months agogh-76785: Expand How Interpreter Channels Handle Interpreter Finalization (gh-121805)
Eric Snow [Mon, 15 Jul 2024 19:43:59 +0000 (13:43 -0600)] 
gh-76785: Expand How Interpreter Channels Handle Interpreter Finalization (gh-121805)

See 6b98b274b6 for an explanation of the problem and solution.  Here I've applied the solution to channels.

16 months agogh-121359: make clean environment (no PYTHON* vars) for test_pyrepl.TestMain (GH...
Sergey B Kirpichev [Mon, 15 Jul 2024 19:21:49 +0000 (22:21 +0300)] 
gh-121359: make clean environment (no PYTHON* vars) for test_pyrepl.TestMain (GH-121672)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
16 months agogh-121546: Disable contextvar caching on free-threading build (GH-121740)
Ken Jin [Mon, 15 Jul 2024 18:57:58 +0000 (02:57 +0800)] 
gh-121546: Disable contextvar caching on free-threading build (GH-121740)

16 months agogh-76785: Expand How Interpreter Queues Handle Interpreter Finalization (gh-116431)
Eric Snow [Mon, 15 Jul 2024 18:49:23 +0000 (12:49 -0600)] 
gh-76785: Expand How Interpreter Queues Handle Interpreter Finalization (gh-116431)

Any cross-interpreter mechanism for passing objects between interpreters must be very careful to respect isolation, even when the object is effectively immutable (e.g. int, str).  Here this especially relates to when an interpreter sends one of its objects, and then is destroyed while the inter-interpreter machinery (e.g. queue) still holds a reference to the object.

When I added interpreters.Queue, I dealt with that case (using an atexit hook) by silently removing all items from the queue that were added by the finalizing interpreter.

Later, while working on concurrent.futures.InterpreterPoolExecutor (gh-116430), I noticed it was somewhat surprising when items were silently removed from the queue when the originating interpreter was destroyed.  (See my comment on that PR.)
 It took me a little while to realize what was going on.  I expect that users, which much less context than I have, would experience the same pain.

My approach, here, to improving the situation is to give users three options:

1. return a singleton (interpreters.queues.UNBOUND) from Queue.get() in place of each removed item
2. raise an exception (interpreters.queues.ItemInterpreterDestroyed) from Queue.get() in place of each removed item
3. existing behavior: silently remove each item (i.e. Queue.get() skips each one)

The default will now be (1), but users can still explicitly opt in any of them, including to the silent removal behavior.

The behavior for each item may be set with the corresponding Queue.put() call. and a queue-wide default may be set when the queue is created.  (This is the same as I did for "synconly".)

16 months agogh-118297: Make Sure All Pending Calls Run in _Py_FinishPendingCalls() (gh-118298)
Eric Snow [Mon, 15 Jul 2024 18:44:20 +0000 (12:44 -0600)] 
gh-118297: Make Sure All Pending Calls Run in _Py_FinishPendingCalls() (gh-118298)

16 months agogh-121746: Bind Alt+Enter to "accept" in the REPL (GH-121754)
Rodrigo Girão Serrão [Mon, 15 Jul 2024 17:47:56 +0000 (19:47 +0200)] 
gh-121746: Bind Alt+Enter to "accept" in the REPL (GH-121754)

16 months agogh-121785: Remove unused code from codecs.py (GH-121787)
Sebastian Rittau [Mon, 15 Jul 2024 17:18:37 +0000 (19:18 +0200)] 
gh-121785: Remove unused code from codecs.py (GH-121787)

It was only needed for non-Unicode Python builds,
which aren't supported anymore.

16 months agogh-84978: Add float.from_number() and complex.from_number() (GH-26827)
Serhiy Storchaka [Mon, 15 Jul 2024 16:07:00 +0000 (19:07 +0300)] 
gh-84978: Add float.from_number() and complex.from_number() (GH-26827)

They are alternate constructors which only accept numbers
(including objects with special methods __float__, __complex__
and __index__), but not strings.

16 months agogh-117765: Improve documentation for `mocker.patch.dict` (#121755)
Dominic H [Mon, 15 Jul 2024 07:14:17 +0000 (09:14 +0200)] 
gh-117765: Improve documentation for `mocker.patch.dict` (#121755)

16 months agofix outdated comments in asyncio (#121783)
Kumar Aditya [Mon, 15 Jul 2024 05:59:19 +0000 (11:29 +0530)] 
fix outdated comments in asyncio (#121783)

16 months agogh-57141: Make shallow argument to filecmp.dircmp keyword-only (#121767)
Jelle Zijlstra [Sun, 14 Jul 2024 22:53:32 +0000 (15:53 -0700)] 
gh-57141: Make shallow argument to filecmp.dircmp keyword-only (#121767)

It is our general practice to make new optional parameters keyword-only,
even if the existing parameters are all positional-or-keyword. Passing
this parameter as positional would look confusing and could be error-prone
if additional parameters are added in the future.

16 months agoGeneralize reusable Windows CI jobs (#121766)
Sviatoslav Sydorenko (Святослав Сидоренко) [Sun, 14 Jul 2024 21:22:35 +0000 (23:22 +0200)] 
Generalize reusable Windows CI jobs (#121766)

16 months agogh-121731: Fix mimalloc compile error on GNU/Hurd (#121732)
Samuel Thibault [Sun, 14 Jul 2024 16:50:25 +0000 (18:50 +0200)] 
gh-121731: Fix mimalloc compile error on GNU/Hurd (#121732)

16 months agogh-121621: Use PyMutex for writes to asyncio state (#121622)
Ken Jin [Sun, 14 Jul 2024 12:22:56 +0000 (20:22 +0800)] 
gh-121621: Use PyMutex for writes to asyncio state (#121622)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
16 months agogh-121660: Fix `ga_getitem` by explicitly checking for `NULL` result (#121661)
sobolevn [Sun, 14 Jul 2024 11:20:40 +0000 (14:20 +0300)] 
gh-121660: Fix `ga_getitem` by explicitly checking for `NULL` result (#121661)

16 months agoFix cache restoration for Hypothesis CI job (#121756)
Sviatoslav Sydorenko (Святослав Сидоренко) [Sun, 14 Jul 2024 11:00:32 +0000 (13:00 +0200)] 
Fix cache restoration for Hypothesis CI job (#121756)

16 months agogh-121749: Fix discrepancy in docs for `PyModule_AddObjectRef` (GH-121750)
Dominic H [Sun, 14 Jul 2024 10:11:10 +0000 (12:11 +0200)] 
gh-121749: Fix discrepancy in docs for `PyModule_AddObjectRef` (GH-121750)

16 months agogh-121698 Emscripten: Use updated WebAssembly type reflection proposal (GH-121699)
Hood Chatham [Sun, 14 Jul 2024 09:25:09 +0000 (11:25 +0200)] 
gh-121698 Emscripten: Use updated WebAssembly type reflection proposal (GH-121699)

16 months agogh-121700 Emscripten trampolines not quite right since #106219 (GH-121701)
Hood Chatham [Sun, 14 Jul 2024 09:24:09 +0000 (11:24 +0200)] 
gh-121700 Emscripten trampolines not quite right since #106219 (GH-121701)

16 months agogh-121562: optimized hex_from_char (#121563)
Bruno Lima [Sun, 14 Jul 2024 09:05:35 +0000 (06:05 -0300)] 
gh-121562: optimized hex_from_char (#121563)

Performance improvement to `float.fromhex`: use a lookup table
for computing the hexadecimal value of a character, in place of the
previous switch-case construct. Patch by Bruno Lima.

16 months agogh-64308: Remove TestProgram from the unittest docs (GH-121675)
Jan Musílek [Sun, 14 Jul 2024 08:57:12 +0000 (10:57 +0200)] 
gh-64308: Remove TestProgram from the unittest docs (GH-121675)

16 months agogh-121708: Improve test coverage for `unittest.util` (GH-121713)
Tomas R [Sun, 14 Jul 2024 08:08:47 +0000 (10:08 +0200)] 
gh-121708: Improve test coverage for `unittest.util` (GH-121713)

16 months agogh-120642: Move _PyCode_CODE() to the internal C API (#121644)
Victor Stinner [Sat, 13 Jul 2024 21:07:49 +0000 (23:07 +0200)] 
gh-120642: Move _PyCode_CODE() to the internal C API (#121644)

Move _PyCode_CODE() and _PyCode_NBYTES() macros to the internal C API
since they use _Py_CODEUNIT which is only part of the internal C API.

16 months agogh-73159 Added clarifications in multiprocessing docs on that objects are pickled...
Ulrik Södergren [Sat, 13 Jul 2024 20:07:40 +0000 (22:07 +0200)] 
gh-73159 Added clarifications in multiprocessing docs on that objects are pickled. (GH-121686)

Added explicit comments about that objects are pickled when transmitted via multiprocessing queues and pipes.

16 months agogh-121651: Fix pdb header test (#121724)
Tian Gao [Sat, 13 Jul 2024 18:55:22 +0000 (11:55 -0700)] 
gh-121651: Fix pdb header test (#121724)

16 months agogh-121652: Handle `allocate_weakref` returning NULL (#121653)
Sam Gross [Sat, 13 Jul 2024 16:07:52 +0000 (12:07 -0400)] 
gh-121652: Handle `allocate_weakref` returning NULL (#121653)

The `allocate_weakref` may return NULL when out of memory. We need to
handle that case and propagate the error.

16 months agogh-121711: Set `-m asyncio` return_code to 1 for ENOTTY (#121714)
Milan Oberkirch [Sat, 13 Jul 2024 15:17:24 +0000 (17:17 +0200)] 
gh-121711: Set `-m asyncio` return_code to 1 for ENOTTY (#121714)

Set return_code to 1 for ENOTTY

16 months agogh-121657: Display correct error message for yield from outside of a function (GH...
Gregor [Sat, 13 Jul 2024 15:14:39 +0000 (17:14 +0200)] 
gh-121657: Display correct error message for yield from outside of a function (GH-121680)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
16 months agogh-120452: improve documentation about private name mangling (#120451)
Bénédikt Tran [Sat, 13 Jul 2024 14:45:18 +0000 (16:45 +0200)] 
gh-120452: improve documentation about private name mangling (#120451)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
16 months agogh-120823: Fix doc for ftplib.FTP.retrbinary() (GH-121697)
mirelagrigoras [Sat, 13 Jul 2024 14:16:26 +0000 (16:16 +0200)] 
gh-120823: Fix doc for ftplib.FTP.retrbinary() (GH-121697)

Co-authored-by: Mirela Andreea GRIGORAS <magrigoras@bitdefender.com>
16 months agogh-121605: Increase timeout in test_pyrepl.run_repl (#121606)
Sam Gross [Sat, 13 Jul 2024 13:54:28 +0000 (09:54 -0400)] 
gh-121605: Increase timeout in test_pyrepl.run_repl (#121606)

We also need to close the `slave_fd` earlier so that reading from
`master_fd` won't block forever when the subprocess finishes.

16 months agogh-121671: Increase test coverage of `ast.get_docstring` (GH-121674)
Tomas R [Sat, 13 Jul 2024 12:59:15 +0000 (14:59 +0200)] 
gh-121671: Increase test coverage of `ast.get_docstring` (GH-121674)

Increase test coverage for `ast.get_docstring`

16 months agogh-96765: Update ConfigParser.read() docs with multi-file read example (#121664)
Timon Viola [Sat, 13 Jul 2024 12:47:05 +0000 (14:47 +0200)] 
gh-96765: Update ConfigParser.read() docs with multi-file read example (#121664)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
16 months agogh-121499: Fix multi-line history rendering in the REPL (#121531)
Pablo Galindo Salgado [Sat, 13 Jul 2024 10:54:10 +0000 (12:54 +0200)] 
gh-121499: Fix multi-line history rendering in the REPL (#121531)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
16 months agogh-121609: Fix pasting of characters containing unicode character joiner (#121667)
Marta Gómez Macías [Sat, 13 Jul 2024 10:44:18 +0000 (12:44 +0200)] 
gh-121609: Fix pasting of characters containing unicode character joiner (#121667)

16 months agogh-121153: Fix some errors with use of _PyLong_CompactValue() (GH-121154)
Serhiy Storchaka [Sat, 13 Jul 2024 10:40:44 +0000 (13:40 +0300)] 
gh-121153: Fix some errors with use of _PyLong_CompactValue() (GH-121154)

* The result has type Py_ssize_t, not intptr_t.
* Type cast between unsigned and signdet integer types should be explicit.
* Downcasting should be explicit.
* Fix integer overflow check in sum().

16 months agogh-99242 Ignore error when running regression tests under certain conditions. (GH...
Bas Bloemsaat [Sat, 13 Jul 2024 09:52:08 +0000 (11:52 +0200)] 
gh-99242 Ignore error when running regression tests under certain conditions. (GH-121663)

Co-Authored-By: Kevin Diem <kg.diem@gmail.com>
16 months agogh-121497: Make Pyrepl respect correctly the history with input hook set (#121498)
Pablo Galindo Salgado [Sat, 13 Jul 2024 09:42:14 +0000 (11:42 +0200)] 
gh-121497: Make Pyrepl respect correctly the history with input hook set (#121498)

16 months agogh-95144: Improve error message of `... in None` (GH-119888)
Zachary Ware [Fri, 12 Jul 2024 16:34:17 +0000 (11:34 -0500)] 
gh-95144: Improve error message of `... in None` (GH-119888)

16 months agoUpdate retroactive comments from GH-117741 (segfault in `FutureIter_dealloc`) (GH...
Savannah Ostrowski [Fri, 12 Jul 2024 08:34:30 +0000 (01:34 -0700)] 
Update retroactive comments from GH-117741 (segfault in `FutureIter_dealloc`) (GH-121638)

Address comments

16 months agogh-121103: Put free-threaded libraries in `lib/python3.14t` (#121293)
Sam Gross [Thu, 11 Jul 2024 20:21:37 +0000 (16:21 -0400)] 
gh-121103: Put free-threaded libraries in `lib/python3.14t` (#121293)

On POSIX systems, excluding macOS framework installs, the lib directory
for the free-threaded build now includes a "t" suffix to avoid conflicts
with a co-located default build installation.

16 months agogh-117482: Fix Builtin Types Slot Wrappers (gh-121602)
Eric Snow [Thu, 11 Jul 2024 20:20:14 +0000 (14:20 -0600)] 
gh-117482: Fix Builtin Types Slot Wrappers (gh-121602)

When builtin static types are initialized for a subinterpreter, various "tp" slots have already been inherited (for the main interpreter).  This was interfering with the logic in add_operators() (in Objects/typeobject.c), causing a wrapper to get created when it shouldn't.  This change fixes that by preserving the original data from the static type struct and checking that.

16 months agogh-121332: Make AST node constructor check _attributes instead of hardcoding attribut...
Jelle Zijlstra [Thu, 11 Jul 2024 14:34:53 +0000 (07:34 -0700)] 
gh-121332: Make AST node constructor check _attributes instead of hardcoding attributes (#121334)

16 months agogh-121592: Make select.poll() and related objects thread-safe (#121594)
Sam Gross [Thu, 11 Jul 2024 14:21:09 +0000 (10:21 -0400)] 
gh-121592: Make select.poll() and related objects thread-safe (#121594)

This makes select.poll() and kqueue() objects thread-safe in the
free-threaded build. Note that calling close() concurrently with other
functions is still not thread-safe due to races on file descriptors
(gh-121544).

16 months agogh-121615: Improve `module.rst` C-API docs with better error descriptions (#121616)
sobolevn [Thu, 11 Jul 2024 08:57:22 +0000 (11:57 +0300)] 
gh-121615: Improve `module.rst` C-API docs with better error descriptions (#121616)

16 months agogh-121450: Make inline breakpoints use the most recent pdb instance (#121451)
Tian Gao [Thu, 11 Jul 2024 02:54:27 +0000 (19:54 -0700)] 
gh-121450: Make inline breakpoints use the most recent pdb instance (#121451)

16 months agogh-121554: remove unnecessary internal functions in compile.c (#121555)
Irit Katriel [Wed, 10 Jul 2024 22:48:37 +0000 (23:48 +0100)] 
gh-121554: remove unnecessary internal functions in compile.c (#121555)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
16 months agogh-119786: fix broken links in docs and comment (#121601)
Irit Katriel [Wed, 10 Jul 2024 21:59:14 +0000 (22:59 +0100)] 
gh-119786: fix broken links in docs and comment (#121601)