]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
14 months agogh-111495: Add tests for PyTuple C API (#118757)
Sergey B Kirpichev [Mon, 26 Aug 2024 09:57:52 +0000 (12:57 +0300)] 
gh-111495: Add tests for PyTuple C API (#118757)

Co-authored-by: kalyanr <kalyan.ben10@live.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
14 months agoRewrite idlelib/Icons/README.txt (#123329)
Terry Jan Reedy [Mon, 26 Aug 2024 02:11:59 +0000 (22:11 -0400)] 
Rewrite idlelib/Icons/README.txt (#123329)

14 months agogh-123177: Fix prompt for wrapped lines in pyrepl (#123324)
Matt Wozniski [Sun, 25 Aug 2024 22:54:06 +0000 (18:54 -0400)] 
gh-123177: Fix prompt for wrapped lines in pyrepl (#123324)

When display lines above the cursor come from the cache, the first line
to not come from the cache may be a wrapped line, starting half way
through a logical line in the buffer. Detect and handle this case to
avoid accidentally drawing a stray prompt in the middle of a logical
line.

14 months agogh-82378: Document the difference between sys.tracebacklimit and the limit arguments...
CF Bolz-Tereick [Sun, 25 Aug 2024 22:50:43 +0000 (00:50 +0200)] 
gh-82378: Document the difference between sys.tracebacklimit and the limit arguments (#123286)

14 months agogh-123177: Deactivate line wrap for Apple Terminal via scape codes in the new REPL...
Pablo Galindo Salgado [Sun, 25 Aug 2024 21:38:49 +0000 (22:38 +0100)] 
gh-123177: Deactivate line wrap for Apple Terminal via scape codes in the new REPL (#123267)

14 months agogh-123297: Propagate LD_FLAGS to LDCXXSHARED in sysconfig (#123298)
Pablo Galindo Salgado [Sun, 25 Aug 2024 20:01:58 +0000 (21:01 +0100)] 
gh-123297: Propagate LD_FLAGS to LDCXXSHARED in sysconfig (#123298)

14 months agogh-122982: Extend the deprecation period for bool inversion by two years (#123306)
Kirill Podoprigora [Sun, 25 Aug 2024 19:24:44 +0000 (22:24 +0300)] 
gh-122982: Extend the deprecation period for bool inversion by two years (#123306)

14 months agoGH-73991: Add `pathlib.Path.move()` (#122073)
Barney Gale [Sun, 25 Aug 2024 15:51:51 +0000 (16:51 +0100)] 
GH-73991: Add `pathlib.Path.move()` (#122073)

Add a `Path.move()` method that moves a file or directory tree, and returns a new `Path` instance pointing to the target.

This method is similar to `shutil.move()`, except that it doesn't accept a *copy_function* argument, and it doesn't check whether the destination is an existing directory.

14 months agogh-123228: don't leak file descriptors in pyrepl test (#123302)
CF Bolz-Tereick [Sun, 25 Aug 2024 14:52:51 +0000 (16:52 +0200)] 
gh-123228: don't leak file descriptors in pyrepl test (#123302)

14 months agoGH-109975: Copyedit 3.13 What's New: Optimizations (#123301)
Adam Turner [Sun, 25 Aug 2024 13:17:46 +0000 (14:17 +0100)] 
GH-109975: Copyedit 3.13 What's New: Optimizations (#123301)

14 months agoGH-123299: Move ctypes What's New entry to 3.14 (#123300)
Adam Turner [Sun, 25 Aug 2024 00:41:44 +0000 (01:41 +0100)] 
GH-123299: Move ctypes What's New entry to 3.14 (#123300)

14 months agoRevert "GH-120754: Add a strace helper and test set of syscalls for o… (#123303)
Shantanu [Sat, 24 Aug 2024 21:54:31 +0000 (14:54 -0700)] 
Revert "GH-120754: Add a strace helper and test set of syscalls for o… (#123303)

Revert "GH-120754: Add a strace helper and test set of syscalls for open().read() (#121143)"

This reverts commit e38d0afe3548b856ccf0b05c01ed3eefc69cb3e7.

14 months agoGH-120754: Add a strace helper and test set of syscalls for open().read() (#121143)
Cody Maloney [Sat, 24 Aug 2024 20:42:41 +0000 (13:42 -0700)] 
GH-120754: Add a strace helper and test set of syscalls for open().read() (#121143)

14 months agoRemove comment from pystate created in 2003 (#123259)
Anthony Shaw [Sat, 24 Aug 2024 20:36:42 +0000 (06:36 +1000)] 
Remove comment from pystate created in 2003 (#123259)

14 months agogh-123228: fix return type for _ReadlineWrapper.get_line_buffer() (#123281)
Sergey B Kirpichev [Sat, 24 Aug 2024 15:46:05 +0000 (18:46 +0300)] 
gh-123228: fix return type for _ReadlineWrapper.get_line_buffer() (#123281)

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
14 months agoGH-122890: Fix low-level error handling in `pathlib.Path.copy()` (#122897)
Barney Gale [Sat, 24 Aug 2024 14:11:39 +0000 (15:11 +0100)] 
GH-122890: Fix low-level error handling in `pathlib.Path.copy()` (#122897)

Give unique names to our low-level FD copying functions, and try each one
in turn. Handle errors appropriately for each implementation:

- `fcntl.FICLONE`: suppress `EBADF`, `EOPNOTSUPP`, `ETXTBSY`, `EXDEV`
- `posix._fcopyfile`: suppress `EBADF`, `ENOTSUP`
- `os.copy_file_range`: suppress `ETXTBSY`, `EXDEV`
- `os.sendfile`: suppress `ENOTSOCK`

14 months agoGH-109975: Copyedit 3.13 What's New: Improved Modules (#123132)
Adam Turner [Sat, 24 Aug 2024 13:32:35 +0000 (15:32 +0200)] 
GH-109975: Copyedit 3.13 What's New: Improved Modules (#123132)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
14 months agoDocs: Fix Makefile syntax (#123287)
Adam Turner [Sat, 24 Aug 2024 12:57:38 +0000 (14:57 +0200)] 
Docs: Fix Makefile syntax (#123287)

14 months agogh-123243: Fix reference leak in `_decimal` (#123244)
neonene [Sat, 24 Aug 2024 04:07:01 +0000 (13:07 +0900)] 
gh-123243: Fix reference leak in `_decimal` (#123244)

14 months agogh-117376: Make `Py_DECREF` a macro in ceval.c in free-threaded build (#122975)
Sam Gross [Fri, 23 Aug 2024 19:36:14 +0000 (15:36 -0400)] 
gh-117376: Make `Py_DECREF` a macro in ceval.c in free-threaded build (#122975)

`Py_DECREF` and `PyStackRef_CLOSE` are now implemented as macros in the
free-threaded build in ceval.c. There are two motivations;

 * MSVC has problems inlining functions in ceval.c in the PGO build.

 * We will want to mark escaping calls in order to spill the stack
   pointer in ceval.c and we will want to do this around `_Py_Dealloc`
   (or `_Py_MergeZeroLocalRefcount` or `_Py_DecRefShared`), not around
   the entire `Py_DECREF` or `PyStackRef_CLOSE` call.

14 months agogh-123205: `Python/bytecodes.c`: Fix compiler warning (#123206)
Kirill Podoprigora [Fri, 23 Aug 2024 19:35:25 +0000 (22:35 +0300)] 
gh-123205: `Python/bytecodes.c`: Fix compiler warning (#123206)

Fix MSVC warning "conversion from '__int64' to 'int'"

14 months agoGH-73991: Disallow copying directory into itself via `pathlib.Path.copy()` (#122924)
Barney Gale [Fri, 23 Aug 2024 19:03:11 +0000 (20:03 +0100)] 
GH-73991: Disallow copying directory into itself via `pathlib.Path.copy()` (#122924)

14 months agogh-121404: more compiler_* -> codegen_*, class_body and comprehensions (#123262)
Irit Katriel [Fri, 23 Aug 2024 18:53:15 +0000 (19:53 +0100)] 
gh-121404: more compiler_* -> codegen_*, class_body and comprehensions (#123262)

14 months agoFix typo mentioning threads instead of tasks (#123203)
Kevin Evans [Fri, 23 Aug 2024 16:24:12 +0000 (09:24 -0700)] 
Fix typo mentioning threads instead of tasks (#123203)

14 months agogh-122272: Guarantee specifiers %F and %C for datetime.strftime to be 0-padded (GH...
blhsing [Fri, 23 Aug 2024 15:45:03 +0000 (23:45 +0800)] 
gh-122272: Guarantee specifiers %F and %C for datetime.strftime to be 0-padded (GH-122436)

14 months agoGH-122298: Restore printing of GC stats (GH-123261)
Mark Shannon [Fri, 23 Aug 2024 15:39:08 +0000 (16:39 +0100)] 
GH-122298: Restore printing of GC stats (GH-123261)

14 months agogh-123229: Fix valgrind warning by initializing the f-string buffers to 0 in the...
Pablo Galindo Salgado [Fri, 23 Aug 2024 12:33:45 +0000 (13:33 +0100)] 
gh-123229: Fix valgrind warning by initializing the f-string buffers to 0 in the tokenizer (#123263)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
14 months agoGH-123232: Fix "not specialized" stats (GH-123236)
Mark Shannon [Fri, 23 Aug 2024 09:46:03 +0000 (10:46 +0100)] 
GH-123232: Fix "not specialized" stats (GH-123236)

14 months agogh-121404: compiler_annassign --> codegen_annassign (#123245)
Irit Katriel [Fri, 23 Aug 2024 09:39:42 +0000 (10:39 +0100)] 
gh-121404: compiler_annassign --> codegen_annassign (#123245)

14 months agoGH-123040: Specialize shadowed `LOAD_ATTR`. (GH-123219)
Mark Shannon [Fri, 23 Aug 2024 09:22:35 +0000 (10:22 +0100)] 
GH-123040: Specialize shadowed `LOAD_ATTR`. (GH-123219)

14 months agogh-123213: Fixed xml.etree.ElementTree.Element.extend and assignment to no longer...
Bar Harel [Fri, 23 Aug 2024 09:12:58 +0000 (12:12 +0300)] 
gh-123213: Fixed xml.etree.ElementTree.Element.extend and assignment to no longer hide exceptions (GH-123214)

14 months agoGH-99108: Amend Modules/Setup (#123146)
Jonathan Protzenko [Fri, 23 Aug 2024 06:40:31 +0000 (23:40 -0700)] 
GH-99108: Amend Modules/Setup (#123146)

14 months agogh-122546: Relax SyntaxError check when raising errors on the new REPL (#123233)
Sergey B Kirpichev [Thu, 22 Aug 2024 23:25:33 +0000 (02:25 +0300)] 
gh-122546: Relax SyntaxError check when raising errors on the new REPL (#123233)

14 months agogh-123083: Fix a potential use-after-free in ``STORE_ATTR_WITH_HINT`` (gh-123092)
Donghee Na [Thu, 22 Aug 2024 14:49:09 +0000 (23:49 +0900)] 
gh-123083: Fix a potential use-after-free in ``STORE_ATTR_WITH_HINT`` (gh-123092)

14 months agogh-121404: remove redundant c_nestlevel. more compiler abstractions. more macro usage...
Irit Katriel [Thu, 22 Aug 2024 14:08:16 +0000 (15:08 +0100)] 
gh-121404: remove redundant c_nestlevel. more compiler abstractions. more macro usage consistency (#123225)

14 months agogh-123165: correct tests for `dis.dis(func, show_positions=True)` (#123220)
Bénédikt Tran [Thu, 22 Aug 2024 13:30:31 +0000 (15:30 +0200)] 
gh-123165: correct tests for `dis.dis(func, show_positions=True)` (#123220)

14 months agoGH-123197: Only count an instruction as deferred if it hasn't deopted first. (GH...
Mark Shannon [Thu, 22 Aug 2024 13:17:10 +0000 (14:17 +0100)] 
GH-123197: Only count an instruction as deferred if it hasn't deopted first. (GH-123222)

Only count an instruction as deferred if hasn't deopted first.

14 months agogh-122546: use same filename for different exceptions in new repl (#123217)
Sergey B Kirpichev [Thu, 22 Aug 2024 11:55:30 +0000 (14:55 +0300)] 
gh-122546: use same filename for different exceptions in new repl (#123217)

* gh-122546: use same filename for different exceptions in new repl

* +1

14 months agoGH-118093: Specialize calls to non-vectorcall classes as `CALL_NON_PY_GENERAL` (GH...
Brandt Bucher [Thu, 22 Aug 2024 10:50:55 +0000 (03:50 -0700)] 
GH-118093: Specialize calls to non-vectorcall classes as `CALL_NON_PY_GENERAL` (GH-123212)

Specialize classes without vectorcall as CALL_NON_PY_GENERAL

14 months agogh-122712: Test `CALL_ALLOC_AND_ENTER_INIT` handles reassignment of `__code__` (GH...
mpage [Thu, 22 Aug 2024 07:38:04 +0000 (00:38 -0700)] 
gh-122712: Test `CALL_ALLOC_AND_ENTER_INIT` handles reassignment of `__code__` (GH-122713)

14 months agogh-123142: Fix too wide source locations in tracebacks of exceptions from broken...
Irit Katriel [Wed, 21 Aug 2024 18:12:05 +0000 (19:12 +0100)] 
gh-123142: Fix too wide source locations in tracebacks of exceptions from broken iterables in comprehensions (#123173)

14 months agoGH-115776: Allow any fixed sized object to have inline values (GH-123192)
Mark Shannon [Wed, 21 Aug 2024 14:52:04 +0000 (15:52 +0100)] 
GH-115776: Allow any fixed sized object to have inline values (GH-123192)

14 months agogh-121404: split fblock handling into compiler_* and codegen_* parts (#123199)
Irit Katriel [Wed, 21 Aug 2024 14:48:56 +0000 (15:48 +0100)] 
gh-121404: split fblock handling into compiler_* and codegen_* parts (#123199)

14 months agogh-123165: make `dis` functions render positions on demand (#123168)
Bénédikt Tran [Wed, 21 Aug 2024 13:46:24 +0000 (15:46 +0200)] 
gh-123165: make `dis` functions render positions on demand (#123168)

14 months agoFix typos in comments (#123201)
Wulian [Wed, 21 Aug 2024 12:49:23 +0000 (20:49 +0800)] 
Fix typos in comments (#123201)

14 months agoGH-123197: Increment correct stat for CALL_KW (GH-123200)
Mark Shannon [Wed, 21 Aug 2024 11:52:28 +0000 (12:52 +0100)] 
GH-123197: Increment correct stat for CALL_KW (GH-123200)

14 months agoGH-123185: Check for `NULL` after calling `_PyEvalFramePushAndInit` (GH-123194)
Mark Shannon [Wed, 21 Aug 2024 11:44:56 +0000 (12:44 +0100)] 
GH-123185: Check for `NULL` after calling `_PyEvalFramePushAndInit` (GH-123194)

14 months agogh-85110: Preserve relative path in URL without netloc in urllib.parse.urlunsplit...
Serhiy Storchaka [Wed, 21 Aug 2024 07:17:38 +0000 (10:17 +0300)] 
gh-85110: Preserve relative path in URL without netloc in urllib.parse.urlunsplit() (GH-123179)

14 months agogh-123084: Turn `shutil.ExecError` into a deprecated alias of `RuntimeError` (#123125)
Peter Bierma [Wed, 21 Aug 2024 00:39:24 +0000 (20:39 -0400)] 
gh-123084: Turn `shutil.ExecError` into a deprecated alias of `RuntimeError` (#123125)

14 months agogh-122981: Fix inspect.getsource() for generated classes with Python base classes... 123156/head
Serhiy Storchaka [Tue, 20 Aug 2024 17:10:15 +0000 (20:10 +0300)] 
gh-122981: Fix inspect.getsource() for generated classes with Python base classes (GH-123001)

Look up __firstlineno__ only in the class' dict, without searching in
base classes.

14 months agoGH-118093: Make `CALL_ALLOC_AND_ENTER_INIT` suitable for tier 2. (GH-123140)
Mark Shannon [Tue, 20 Aug 2024 15:52:58 +0000 (16:52 +0100)] 
GH-118093: Make `CALL_ALLOC_AND_ENTER_INIT` suitable for tier 2. (GH-123140)

* Convert CALL_ALLOC_AND_ENTER_INIT to micro-ops such that tier 2 supports it

* Allow inexact arguments for CALL_ALLOC_AND_ENTER_INIT.

14 months agogh-123048: Fix missing source location in pattern matching code (#123167)
Irit Katriel [Tue, 20 Aug 2024 10:39:41 +0000 (11:39 +0100)] 
gh-123048: Fix missing source location in pattern matching code (#123167)

14 months agogh-122909: Pass ftp error strings to URLError constructor (#122913)
Jeremy Hylton [Tue, 20 Aug 2024 00:35:05 +0000 (20:35 -0400)] 
gh-122909: Pass ftp error strings to URLError constructor (#122913)

* pass the original string error message from the ftplib error to URLError()

* Update request.py

Change error string for ftp error to be consistent with other errors reported for ftp

* Add NEWS entry for change to urllib.request for ftp errors.

* Track the change in the ftp error message in the test.

14 months agogh-109975: Copyedit What's New in Python 3.13 (#123150)
Jelle Zijlstra [Mon, 19 Aug 2024 23:51:37 +0000 (16:51 -0700)] 
gh-109975: Copyedit What's New in Python 3.13 (#123150)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
14 months agogh-123149: Suppress verbose repr in new REPL (#123151)
James [Mon, 19 Aug 2024 19:04:38 +0000 (15:04 -0400)] 
gh-123149: Suppress verbose repr in new REPL (#123151)

14 months agogh-123123: Fix display of syntax errors covering multiple lines (#123131)
Pablo Galindo Salgado [Mon, 19 Aug 2024 15:09:03 +0000 (17:09 +0200)] 
gh-123123: Fix display of syntax errors covering multiple lines (#123131)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
14 months agogh-121404: rename functions to use codegen_* prefix. Use macros more consistently...
Irit Katriel [Mon, 19 Aug 2024 14:39:53 +0000 (15:39 +0100)] 
gh-121404: rename functions to use codegen_* prefix. Use macros more consistently. (#123139)

14 months agogh-121804: Always show error location for SyntaxError's in new repl (#121886)
Sergey B Kirpichev [Mon, 19 Aug 2024 14:19:23 +0000 (17:19 +0300)] 
gh-121804: Always show error location for SyntaxError's in new repl (#121886)

14 months agogh-121404: pass metadata to compiler_enter_scope (optionally) so that codegen functio...
Irit Katriel [Mon, 19 Aug 2024 10:49:42 +0000 (11:49 +0100)] 
gh-121404: pass metadata to compiler_enter_scope (optionally) so that codegen functions don't need to set it on the code unit (#123078)

14 months agogh-122081: fixed crash in decimal.IEEEContext() (#122082)
Sergey B Kirpichev [Mon, 19 Aug 2024 07:51:38 +0000 (10:51 +0300)] 
gh-122081: fixed crash in decimal.IEEEContext() (#122082)

* gh-122081: fixed crash in decimal.IEEEContext()

Now

$ ./configure CFLAGS=-DEXTRA_FUNCTIONALITY -q && make -s && \
     ./python -m test test_decimal

- PASS

* Apply suggestions from code review

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Update Misc/NEWS.d/next/Library/2024-07-21-10-45-24.gh-issue-122081.dNrYMq.rst

* Apply suggestions from code review

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
14 months agogh-123049: configparser: Allow to create the unnamed section from scratch. (#123077)
Pedro Lacerda [Sun, 18 Aug 2024 19:52:25 +0000 (16:52 -0300)] 
gh-123049: configparser: Allow to create the unnamed section from scratch. (#123077)

---------

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
14 months agogh-116789: Add more tests for `inspect.getmembers` (#116802)
sobolevn [Sun, 18 Aug 2024 15:42:56 +0000 (18:42 +0300)] 
gh-116789: Add more tests for `inspect.getmembers` (#116802)

14 months agogh-123110: correct note about _Bool in the struct module docs (GH-123111)
Sergey B Kirpichev [Sun, 18 Aug 2024 13:58:58 +0000 (16:58 +0300)] 
gh-123110: correct note about _Bool in the struct module docs (GH-123111)

14 months agogh-82378 fix sys.tracebacklimit in pyrepl, approach 2 (#123062)
CF Bolz-Tereick [Sun, 18 Aug 2024 11:28:23 +0000 (13:28 +0200)] 
gh-82378 fix sys.tracebacklimit in pyrepl, approach 2 (#123062)

Make sure that pyrepl uses the same logic for sys.tracebacklimit as both
the basic repl and the standard sys.excepthook

14 months agoDocs: Run ``latexmk`` in parallel when creating PDFs (#123113)
Adam Turner [Sat, 17 Aug 2024 20:58:06 +0000 (21:58 +0100)] 
Docs: Run ``latexmk`` in parallel when creating PDFs (#123113)

14 months agogh-123022: Fix crash with `Py_Initialize` in background thread (#123052)
Sam Gross [Sat, 17 Aug 2024 20:04:08 +0000 (16:04 -0400)] 
gh-123022: Fix crash with  `Py_Initialize` in background thread (#123052)

Check that the current default heap is initialized in
`_mi_os_get_aligned_hint` and `mi_os_claim_huge_pages`.

The mimalloc function `_mi_os_get_aligned_hint` assumes that there is an
initialized default heap. This is true for our main thread, but not for
background threads. The problematic code path is usually called during
initialization (i.e., `Py_Initialize`), but it may also be called if the
program allocates large amounts of memory in total.

The crash only affected the free-threaded build.

14 months agogh-122974: Suppress GCC array bound warnings in free-threaded build (#123071)
Sam Gross [Sat, 17 Aug 2024 20:03:50 +0000 (16:03 -0400)] 
gh-122974: Suppress GCC array bound warnings in free-threaded build (#123071)

GCC 11 and newer warn about the access to `unique_id` in non-debug builds
due to inlining the call on static non-heap types.

14 months agogh-123067: Fix quadratic complexity in parsing "-quoted cookie values with backslashe...
Serhiy Storchaka [Sat, 17 Aug 2024 13:30:52 +0000 (16:30 +0300)] 
gh-123067: Fix quadratic complexity in parsing "-quoted cookie values with backslashes (GH-123075)

This fixes CVE-2024-7592.

14 months agoGH-109975: Copyedit 3.13 What's New: Other Language Changes (#123086)
Adam Turner [Sat, 17 Aug 2024 12:09:42 +0000 (13:09 +0100)] 
GH-109975: Copyedit 3.13 What's New: Other Language Changes (#123086)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
14 months agogh-121477: mention new PyLong_*Bytes() functions in PyLong_FromString() (#121478)
Sergey B Kirpichev [Sat, 17 Aug 2024 09:13:31 +0000 (12:13 +0300)] 
gh-121477: mention new PyLong_*Bytes() functions in PyLong_FromString() (#121478)

* gh-121477: mention new PyLong_*Bytes() functions in PyLong_FromString()

* Update Doc/c-api/long.rst

---------

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
14 months agofix typo in dis.rst (#121612)
mathysEthical [Sat, 17 Aug 2024 08:50:58 +0000 (10:50 +0200)] 
fix typo in dis.rst (#121612)

14 months agoRemove unneeded verb in the phrase in sys.rst (#122718)
Rafael Fontenelle [Sat, 17 Aug 2024 08:48:31 +0000 (05:48 -0300)] 
Remove unneeded verb in the phrase in sys.rst (#122718)

14 months agogh-122519: Adding socket module shutdown() constants description (#122543)
Damien [Sat, 17 Aug 2024 08:29:23 +0000 (16:29 +0800)] 
gh-122519: Adding socket module shutdown() constants description (#122543)

14 months agogh-122681: remove m_atan2()/c_atan2() helpers (#122715)
Sergey B Kirpichev [Sat, 17 Aug 2024 08:18:16 +0000 (11:18 +0300)] 
gh-122681: remove m_atan2()/c_atan2() helpers (#122715)

14 months agogh-123087: ``Lib/test/test_unittest/testmock/testasync.py``: Replace usage of the...
Kirill Podoprigora [Sat, 17 Aug 2024 08:03:51 +0000 (11:03 +0300)] 
gh-123087: ``Lib/test/test_unittest/testmock/testasync.py``: Replace usage of the deprecated ``asyncio.iscoroutinefunction`` with the ``inspect.iscoroutinefunction`` (#123088)

asyncio.iscoroutinefunction -> inspect.iscoroutinefunction

14 months agoGH-120754: Disable buffering in Path.read_bytes (#122111)
Cody Maloney [Fri, 16 Aug 2024 20:52:41 +0000 (13:52 -0700)] 
GH-120754: Disable buffering in Path.read_bytes (#122111)

`Path.read_bytes()` is used to read a whole file. buffering /
BufferedIO is focused around making small, possibly interleaved,
read/write efficient which doesn't add value in this case.

On my Mac, running the benchmark:

```python
import pyperf
from pathlib import Path

def read_all(all_paths):
    for p in all_paths:
        p.read_bytes()

def read_file(path_obj):
    path_obj.read_bytes()

all_rst = list(Path("Doc").glob("**/*.rst"))
all_py = list(Path(".").glob("**/*.py"))
assert all_rst, "Should have found rst files"
assert all_py, "Should have found python source files"

runner = pyperf.Runner()
runner.bench_func("read_file_small", read_file, Path("Doc/howto/clinic.rst"))
runner.bench_func("read_file_large", read_file, Path("Doc/c-api/typeobj.rst"))
```

before:
```python
.....................
read_file_small: Mean +- std dev: 6.80 us +- 0.07 us
.....................
read_file_large: Mean +- std dev: 10.8 us +- 0.2 us
````

after:
```python
.....................
read_file_small: Mean +- std dev: 5.67 us +- 0.05 us
.....................
read_file_large: Mean +- std dev: 9.77 us +- 0.52 us
```

14 months agogh-118658: Return consistent types from `get_un/verified_chain` in `SSLObject` and...
Mateusz Nowak [Fri, 16 Aug 2024 20:27:44 +0000 (22:27 +0200)] 
gh-118658: Return consistent types from `get_un/verified_chain` in `SSLObject` and `SSLSocket` (#118669)

Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
14 months agoGH-118093: Specialize `CALL_KW` (GH-123006)
Mark Shannon [Fri, 16 Aug 2024 16:11:24 +0000 (17:11 +0100)] 
GH-118093: Specialize `CALL_KW` (GH-123006)

14 months agogh-121404: rename compiler_addop* to codegen_addop*, and replace direct usages by...
Irit Katriel [Fri, 16 Aug 2024 14:57:32 +0000 (15:57 +0100)] 
gh-121404: rename compiler_addop* to codegen_addop*, and replace direct usages by the macros (#123043)

14 months agomention pypy somewhat more prominently in the pyrepl section of whatsnew (#123063)
CF Bolz-Tereick [Fri, 16 Aug 2024 11:38:44 +0000 (13:38 +0200)] 
mention pypy somewhat more prominently in the pyrepl section of whatsnew (#123063)

14 months agogh-123046: Fix regexp to catch cases where the module name is omitted from the weakre...
Kirill Podoprigora [Fri, 16 Aug 2024 07:14:53 +0000 (10:14 +0300)] 
gh-123046: Fix regexp to catch cases where the module name is omitted from the weakref repr (#123047)

Co-authored-by: sobolevn <mail@sobolevn.me>
14 months agogh-116622: Add Android test script (#121595)
Malcolm Smith [Fri, 16 Aug 2024 05:00:29 +0000 (06:00 +0100)] 
gh-116622: Add Android test script (#121595)

Adds a script for running the test suite on Android emulator devices. Starting
with a fresh install of the Android Commandline tools; the script manages
installing other requirements, starting the emulator (if required), and
retrieving results from that emulator.

14 months agogh-116608: Apply style and compatibility changes from importlib_metadata. (#123028)
Jason R. Coombs [Thu, 15 Aug 2024 19:32:05 +0000 (15:32 -0400)] 
gh-116608: Apply style and compatibility changes from importlib_metadata. (#123028)

14 months agoAdd debug offsets for free threaded builds (#123041)
Pablo Galindo Salgado [Thu, 15 Aug 2024 18:42:41 +0000 (19:42 +0100)] 
Add debug offsets for free threaded builds (#123041)

14 months agoGH-121634: have `wasi.py` accept the host target triple as an argument (GH-123030)
Brett Cannon [Thu, 15 Aug 2024 17:30:08 +0000 (10:30 -0700)] 
GH-121634: have `wasi.py` accept the host target triple as an argument (GH-123030)

14 months agogh-117139: Garbage collector support for deferred refcounting (#122956)
Sam Gross [Thu, 15 Aug 2024 16:09:11 +0000 (12:09 -0400)] 
gh-117139: Garbage collector support for deferred refcounting (#122956)

The free-threaded GC now visits interpreter stacks to keep objects
that use deferred reference counting alive.

Interpreter frames are zero initialized in the free-threaded GC so
that the GC doesn't see garbage data. This is a temporary measure
until stack spilling around escaping calls is implemented.

Co-authored-by: Ken Jin <kenjin@python.org>
14 months agogh-122584: Import mimalloc headers in a C++ context (#122587)
Michael Droettboom [Thu, 15 Aug 2024 13:01:01 +0000 (09:01 -0400)] 
gh-122584: Import mimalloc headers in a C++ context (#122587)

14 months agogh-113190: Reenable non-debug interned string cleanup (GH-113601)
Eddie Elizondo [Thu, 15 Aug 2024 11:55:09 +0000 (07:55 -0400)] 
gh-113190: Reenable non-debug interned string cleanup (GH-113601)

14 months agogh-121404: split compiler's push/pop_inlined_comprehension_state into codegen and...
Irit Katriel [Thu, 15 Aug 2024 11:08:54 +0000 (12:08 +0100)] 
gh-121404: split compiler's push/pop_inlined_comprehension_state into codegen and compiler parts (#123021)

14 months agogh-99108: Inform HACL when explicit_bzero is unavailable (GH-123027)
Malcolm Smith [Thu, 15 Aug 2024 09:43:34 +0000 (10:43 +0100)] 
gh-99108: Inform HACL when explicit_bzero is unavailable (GH-123027)

Inform HACL whether explicit_bzero is available

14 months agoGH-109975: Copyedit 3.13 What's New: New Features (#122990)
Adam Turner [Thu, 15 Aug 2024 09:08:15 +0000 (10:08 +0100)] 
GH-109975: Copyedit 3.13 What's New: New Features (#122990)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
14 months agoGH-103484: Tell linkcheck to ignore debian manpage redirects (#123019)
Rafael Fontenelle [Wed, 14 Aug 2024 21:35:23 +0000 (18:35 -0300)] 
GH-103484: Tell linkcheck to ignore debian manpage redirects (#123019)

14 months agogh-112301: Add warning count to warning check tooling (#122711)
Nate Ohlson [Wed, 14 Aug 2024 21:03:53 +0000 (16:03 -0500)] 
gh-112301: Add warning count to warning check tooling (#122711)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
14 months agogh-123005: Add version added in enum.Flag.__len__ (GH-123007)
Damien [Wed, 14 Aug 2024 20:30:33 +0000 (04:30 +0800)] 
gh-123005: Add version added in enum.Flag.__len__ (GH-123007)

14 months agoGH-118093: Turn some DEOPT_IFs into EXIT_IFs (GH-122998)
Brandt Bucher [Wed, 14 Aug 2024 14:54:42 +0000 (07:54 -0700)] 
GH-118093: Turn some DEOPT_IFs into EXIT_IFs (GH-122998)

14 months agoGH-113464: Speed up JIT builds (GH-122839)
Brandt Bucher [Wed, 14 Aug 2024 14:53:46 +0000 (07:53 -0700)] 
GH-113464: Speed up JIT builds (GH-122839)

14 months agogh-122965: Fix `reusable-change-detection.yml` on `workflow_dispatch` (#122966)
sobolevn [Wed, 14 Aug 2024 12:05:39 +0000 (15:05 +0300)] 
gh-122965: Fix `reusable-change-detection.yml` on `workflow_dispatch` (#122966)

14 months agoGH-120024: Remove `CHECK_EVAL_BREAKER` macro. (GH-122968)
Mark Shannon [Wed, 14 Aug 2024 11:04:05 +0000 (12:04 +0100)] 
GH-120024: Remove `CHECK_EVAL_BREAKER` macro. (GH-122968)

* Factor some instructions into micro-ops to isolate CHECK_EVAL_BREAKER for escape analysis

* Eliminate CHECK_EVAL_BREAKER macro

14 months agoFix doctrees directory for the gettext builder (#122997)
Rafael Fontenelle [Wed, 14 Aug 2024 10:38:29 +0000 (07:38 -0300)] 
Fix doctrees directory for the gettext builder (#122997)

14 months ago gh-111178: Avoid calling long_hash from incompatible pointer type (GH-122972)
Bénédikt Tran [Wed, 14 Aug 2024 09:50:35 +0000 (11:50 +0200)] 
 gh-111178: Avoid calling long_hash from incompatible pointer type (GH-122972)

Make `long_hash` compatible with `hashfunc`.