]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
15 months agogh-120782: Update datetime test for static type immutability (#122800)
neonene [Thu, 8 Aug 2024 04:35:06 +0000 (13:35 +0900)] 
gh-120782: Update datetime test for static type immutability (#122800)

15 months agogh-122247: Move instruction instrumentation sanity check after tracing check (#122251)
Tian Gao [Thu, 8 Aug 2024 04:30:14 +0000 (21:30 -0700)] 
gh-122247: Move instruction instrumentation sanity check after tracing check (#122251)

15 months agogh-105201: Add PyIter_NextItem() (#122331)
Erlend E. Aasland [Wed, 7 Aug 2024 22:47:15 +0000 (00:47 +0200)] 
gh-105201: Add PyIter_NextItem() (#122331)

Return -1 and set an exception on error; return 0 if the iterator is
exhausted, and return 1 if the next item was fetched successfully.

Prefer this API to PyIter_Next(), which requires the caller to use
PyErr_Occurred() to differentiate between iterator exhaustion and errors.

Co-authered-by: Irit Katriel <iritkatriel@yahoo.com>
15 months agogh-118814: Fix the TypeVar constructor when name is passed by keyword (GH-122664)
Serhiy Storchaka [Wed, 7 Aug 2024 20:30:10 +0000 (23:30 +0300)] 
gh-118814: Fix the TypeVar constructor when name is passed by keyword (GH-122664)

Fix _PyArg_UnpackKeywordsWithVararg for the case when argument for
positional-or-keyword parameter is passed by keyword.
There was only one such case in the stdlib -- the TypeVar constructor.

15 months agogh-122478: Remove internal frames from tracebacks in REPL (GH-122528)
Serhiy Storchaka [Wed, 7 Aug 2024 20:20:57 +0000 (23:20 +0300)] 
gh-122478: Remove internal frames from tracebacks in REPL (GH-122528)

Frames of methods in code and codeop modules was show with non-default
sys.excepthook.

Save correct tracebacks in sys.last_traceback and update __traceback__
attribute of sys.last_value and sys.last_exc.

15 months agogh-118761: Improve import time of `pprint` (#122725)
Hugo van Kemenade [Wed, 7 Aug 2024 19:46:54 +0000 (22:46 +0300)] 
gh-118761: Improve import time of `pprint` (#122725)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
15 months agoRemove dead code in the RE parser (GH-122796)
Serhiy Storchaka [Wed, 7 Aug 2024 19:44:18 +0000 (22:44 +0300)] 
Remove dead code in the RE parser (GH-122796)

15 months agogh-122798: Make tests for warnings in the re module more strict (GH-122799)
Serhiy Storchaka [Wed, 7 Aug 2024 19:43:49 +0000 (22:43 +0300)] 
gh-122798: Make tests for warnings in the re module more strict (GH-122799)

* Test warning messages.
* Test stack level for re.compile() and re.findall().

15 months agogh-118926: Spill deferred references to stack in cases generator (#122748)
Sam Gross [Wed, 7 Aug 2024 17:23:53 +0000 (13:23 -0400)] 
gh-118926: Spill deferred references to stack in cases generator (#122748)

This automatically spills the results from `_PyStackRef_FromPyObjectNew`
to the in-memory stack so that the deferred references are visible to
the GC before we make any possibly escaping call.

Co-authored-by: Ken Jin <kenjin@python.org>
15 months agoDocs: Change `remove` to `removes` for consistency (#121072)
smij720 [Wed, 7 Aug 2024 15:30:00 +0000 (08:30 -0700)] 
Docs: Change `remove` to `removes` for consistency (#121072)

15 months agoBump types-setuptools to 71.1.0.20240726 in /Tools (#122551)
dependabot[bot] [Wed, 7 Aug 2024 15:20:37 +0000 (16:20 +0100)] 
Bump types-setuptools to 71.1.0.20240726 in /Tools (#122551)

15 months agogh-100256: Skip inaccessible registry keys in the WinAPI mimetype implementation...
Lucas Esposito [Wed, 7 Aug 2024 15:07:26 +0000 (17:07 +0200)] 
gh-100256: Skip inaccessible registry keys in the WinAPI mimetype implementation (GH-122047)

15 months agoDoc: cmdline.rst: Include -P and -R in usage (#122590)
Wim Jeantine-Glenn [Wed, 7 Aug 2024 15:01:44 +0000 (10:01 -0500)] 
Doc: cmdline.rst: Include -P and -R in usage (#122590)

* ``-P``: safe path (https://docs.python.org/3/using/cmdline.html#cmdoption-P)
* ``-R``: hash randomization (https://docs.python.org/3/using/cmdline.html#cmdoption-R)

15 months agogh-122759: Remove `assert` from `RERAISE` error handling (#122760)
sobolevn [Wed, 7 Aug 2024 14:25:25 +0000 (17:25 +0300)] 
gh-122759: Remove `assert` from `RERAISE` error handling (#122760)

15 months agogh-122511: Improve documentation for object identity of mutable/immutable types ...
Bénédikt Tran [Wed, 7 Aug 2024 13:40:19 +0000 (15:40 +0200)] 
gh-122511: Improve documentation for object identity of mutable/immutable types (#122512)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
15 months agogh-117139: Fix an incorrect borrow in bytecodes.c (#122318)
Sam Gross [Wed, 7 Aug 2024 13:36:19 +0000 (09:36 -0400)] 
gh-117139: Fix an incorrect borrow in bytecodes.c (#122318)

`_PyDict_SetItem_Take2` steals both the key (i.e., `sub`) and the value.

15 months agogh-121151: argparse: Fix wrapping of long usage text of arguments inside a mutually...
Ali Hamdan [Wed, 7 Aug 2024 13:20:38 +0000 (15:20 +0200)] 
gh-121151: argparse: Fix wrapping of long usage text of arguments inside a mutually exclusive groups (GH-121159)

15 months agogh-79846: Make ssl.create_default_context() ignore invalid certificates (GH-91740)
pukkandan [Wed, 7 Aug 2024 08:30:30 +0000 (14:00 +0530)] 
gh-79846: Make ssl.create_default_context() ignore invalid certificates (GH-91740)

An error in one certificate should not cause the whole thing to fail.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
15 months agoFix typos in comments and docstring (#122720)
Xie Yanbo [Wed, 7 Aug 2024 06:39:16 +0000 (14:39 +0800)] 
Fix typos in comments and docstring (#122720)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
15 months agoGH-73991: Rework `pathlib.Path.rmtree()` into `delete()` (#122368)
Barney Gale [Wed, 7 Aug 2024 00:34:44 +0000 (01:34 +0100)] 
GH-73991: Rework `pathlib.Path.rmtree()` into `delete()` (#122368)

Rename `pathlib.Path.rmtree()` to `delete()`, and add support for deleting
non-directories. This simplifies the interface for users, and nicely
complements the upcoming `move()` and `copy()` methods (which will also
accept any type of file.)

15 months agogh-122571: Remove duplicate definition of PY_BUILTIN_HASHLIB_HASHES in configure...
Jonathan Protzenko [Tue, 6 Aug 2024 23:31:39 +0000 (16:31 -0700)] 
gh-122571: Remove duplicate definition of PY_BUILTIN_HASHLIB_HASHES in configure.ac (#122572)

The redefinition in confdefs.h can cause issues with the
AX_CHECK_COMPILE_FLAG macro.

15 months agogh-122728: Fix SystemError in PyEval_GetLocals() (#122735)
Victor Stinner [Tue, 6 Aug 2024 21:01:44 +0000 (23:01 +0200)] 
gh-122728: Fix SystemError in PyEval_GetLocals() (#122735)

Fix PyEval_GetLocals() to avoid SystemError ("bad argument to
internal function"). Don't redefine the 'ret' variable in the if
block.

Add an unit test on PyEval_GetLocals().

15 months agogh-122744: Bump bundled pip to 24.2 (#122745)
Pradyun Gedam [Tue, 6 Aug 2024 18:38:33 +0000 (19:38 +0100)] 
gh-122744: Bump bundled pip to 24.2 (#122745)

Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
15 months agogh-122417: Implement per-thread heap type refcounts (#122418)
Sam Gross [Tue, 6 Aug 2024 18:36:57 +0000 (14:36 -0400)] 
gh-122417: Implement per-thread heap type refcounts (#122418)

The free-threaded build partially stores heap type reference counts in
distributed manner in per-thread arrays. This avoids reference count
contention when creating or destroying instances.

Co-authored-by: Ken Jin <kenjin@python.org>
15 months agogh-121103: Update site module docs for free-threaded installs (#122737)
Sam Gross [Tue, 6 Aug 2024 18:34:34 +0000 (14:34 -0400)] 
gh-121103: Update site module docs for free-threaded installs (#122737)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
15 months agoFix duplicated words 'begins with a' in pathlib docstring (#122732)
Виталий Дмитриев [Tue, 6 Aug 2024 17:38:33 +0000 (20:38 +0300)] 
Fix duplicated words 'begins with a' in pathlib docstring (#122732)

15 months agogh-112301: Add macOS warning tracking tooling (#122211)
Nate Ohlson [Tue, 6 Aug 2024 17:26:37 +0000 (12:26 -0500)] 
gh-112301: Add macOS warning tracking tooling (#122211)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
15 months agogh-120104: IDLE: Fix padding in config and search dialogs (#120107)
Serhiy Storchaka [Tue, 6 Aug 2024 16:45:53 +0000 (19:45 +0300)] 
gh-120104: IDLE: Fix padding in config and search dialogs (#120107)

15 months agoGH-120024: Move three more escaping calls out of conditional statements (GH-122734)
Mark Shannon [Tue, 6 Aug 2024 13:14:52 +0000 (14:14 +0100)] 
GH-120024: Move three more escaping calls out of conditional statements (GH-122734)

15 months agogh-122058: `Lib/inspect`: Update docstrings for `isfunction`, `isgenerator`, `isframe...
Kirill Podoprigora [Tue, 6 Aug 2024 12:47:31 +0000 (15:47 +0300)] 
gh-122058: `Lib/inspect`: Update docstrings for `isfunction`, `isgenerator`, `isframe`, `iscode`. (#122059)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
15 months agogh-122681: merge m_atan2() and c_atan2() helper functions (#122682)
Sergey B Kirpichev [Tue, 6 Aug 2024 12:43:13 +0000 (15:43 +0300)] 
gh-122681: merge m_atan2() and c_atan2() helper functions (#122682)

15 months agogh-122686: bump hypothesis from 6.104.2 to 6.108.10 in Tools (#122729)
Sergey B Kirpichev [Tue, 6 Aug 2024 12:37:07 +0000 (15:37 +0300)] 
gh-122686: bump hypothesis from 6.104.2 to 6.108.10 in Tools (#122729)

This drops attrs pinning.

15 months agoGH-120024: Refactor code generators to uses classes for emitting code. (GH-122730)
Mark Shannon [Tue, 6 Aug 2024 12:04:33 +0000 (13:04 +0100)] 
GH-120024: Refactor code generators to uses classes for emitting code. (GH-122730)

15 months agogh-122581: Avoid data races when collecting parser statistics (#122694)
Lysandros Nikolaou [Tue, 6 Aug 2024 11:29:57 +0000 (13:29 +0200)] 
gh-122581: Avoid data races when collecting parser statistics (#122694)

15 months agoGH-120024: Refactor code a bit so that escaping calls can be wrapped in spill code...
Mark Shannon [Tue, 6 Aug 2024 07:40:39 +0000 (08:40 +0100)] 
GH-120024: Refactor code a bit so that escaping calls can be wrapped in spill code in code generator (GH-122693)

15 months agoFix syntax in generate_re_casefix.py (#122699)
Jelle Zijlstra [Tue, 6 Aug 2024 06:16:29 +0000 (23:16 -0700)] 
Fix syntax in generate_re_casefix.py (#122699)

This was broken in gh-97963.

15 months agogh-122595: Add more error checks in the compiler (GH-122596)
Serhiy Storchaka [Tue, 6 Aug 2024 05:59:44 +0000 (08:59 +0300)] 
gh-122595: Add more error checks in the compiler (GH-122596)

15 months agogh-122704: Fix reference leak in Modules/_pickle.c (GH-122705)
Kirill Podoprigora [Tue, 6 Aug 2024 05:57:36 +0000 (08:57 +0300)] 
gh-122704: Fix reference leak in Modules/_pickle.c (GH-122705)

15 months agogh-116622: Android logging fixes (#122698)
Malcolm Smith [Tue, 6 Aug 2024 04:28:58 +0000 (05:28 +0100)] 
gh-116622: Android logging fixes (#122698)

Modifies the handling of stdout/stderr redirection on Android to accomodate
the rate and buffer size limits imposed by Android's logging infrastructure.

15 months agogh-122686: Pin attrs package (for Hypothesis workflow) (#122687)
Sergey B Kirpichev [Tue, 6 Aug 2024 03:56:50 +0000 (06:56 +0300)] 
gh-122686: Pin attrs package (for Hypothesis workflow) (#122687)

Co-authored-by: Victor Stinner <vstinner@python.org>
15 months agoGH-118943: Handle races when moving jit_stencils.h (GH-120690)
Miro Hrončok [Mon, 5 Aug 2024 23:10:40 +0000 (01:10 +0200)] 
GH-118943: Handle races when moving jit_stencils.h (GH-120690)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
15 months agoGH-122616: Simplify LOAD_ATTR_WITH_HINT and STORE_ATTR_WITH_HINT (GH-122620)
Mark Shannon [Mon, 5 Aug 2024 15:27:48 +0000 (16:27 +0100)] 
GH-122616: Simplify LOAD_ATTR_WITH_HINT and STORE_ATTR_WITH_HINT (GH-122620)

15 months agogh-122459: Optimize pickling by name objects without __module__ (GH-122460)
Serhiy Storchaka [Mon, 5 Aug 2024 13:21:32 +0000 (16:21 +0300)] 
gh-122459: Optimize pickling by name objects without __module__ (GH-122460)

15 months agogh-121367: [doc] BUILD_TUPLE arg can be 0 (#122663)
Irit Katriel [Mon, 5 Aug 2024 09:17:55 +0000 (10:17 +0100)] 
gh-121367: [doc] BUILD_TUPLE arg can be 0 (#122663)

15 months agobuild(deps-dev): bump mypy from 1.10.1 to 1.11.1 in /Tools (#122550)
dependabot[bot] [Mon, 5 Aug 2024 09:03:14 +0000 (09:03 +0000)] 
build(deps-dev): bump mypy from 1.10.1 to 1.11.1 in /Tools (#122550)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
15 months agogh-122573: Require Python 3.10 or newer for Windows builds (GH-122574)
Jonathan Protzenko [Sun, 4 Aug 2024 23:22:51 +0000 (16:22 -0700)] 
gh-122573: Require Python 3.10 or newer for Windows builds (GH-122574)

Match statements in tooling require a more recent Python. Tools/cases_generator/*.py (and `Tools/jit/*.py` in 3.13+).

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
15 months agoAdd `3.13` and remove `3.7` in Azure Pipelines (#122670)
Damien [Sun, 4 Aug 2024 16:57:20 +0000 (00:57 +0800)] 
Add `3.13` and remove `3.7` in Azure Pipelines (#122670)

15 months agogh-122661: Remove GNU make-specific directive from Doc/Makefile (#122662)
Libor Martínek [Sun, 4 Aug 2024 14:02:29 +0000 (14:02 +0000)] 
gh-122661: Remove GNU make-specific directive from Doc/Makefile (#122662)

15 months agogh-122637: fix tanh(±0+infj) and tanh(±0+nanj) to return ±0+nanj (#122638)
Sergey B Kirpichev [Sun, 4 Aug 2024 09:05:30 +0000 (12:05 +0300)] 
gh-122637: fix tanh(±0+infj) and tanh(±0+nanj) to return ±0+nanj (#122638)

As per C11 DR#471, ctanh (0 + i NaN) and ctanh (0 + i Inf) should return
0 + i NaN (with "invalid" exception in the second case).  This has
corresponding implications for ctan(z), as its errors and special cases
are handled as if the operation is implemented by -i*ctanh(i*z).
This patch fixes cmath's code to do same.

Glibs patch: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=d15e83c5f5231d971472b5ffc9219d54056ca0f1

15 months agogh-121889: cmath.acosh(0+nanj) returns nan+pi/2j (#121892)
Sergey B Kirpichev [Sun, 4 Aug 2024 08:53:17 +0000 (11:53 +0300)] 
gh-121889: cmath.acosh(0+nanj) returns nan+pi/2j (#121892)

As per C11 DR#471 (adjusted resolution accepted for C17), cacosh (0 +
iNaN) should return NaN ± i pi/2, not NaN + iNaN.  This patch
fixes cmath's code to do same.

15 months agogh-122623: Improve `c-api/bytearray.rst` with error handling info (#122624)
sobolevn [Sat, 3 Aug 2024 21:55:47 +0000 (00:55 +0300)] 
gh-122623: Improve `c-api/bytearray.rst` with error handling info (#122624)

15 months agoGH-121970: Fix ``gettext`` for audit events (#122651)
Adam Turner [Sat, 3 Aug 2024 16:41:26 +0000 (17:41 +0100)] 
GH-121970: Fix ``gettext`` for audit events (#122651)

15 months agogh-109408: Remove ``.azure-pipelines/pr.yml`` (#122643)
Adam Turner [Sat, 3 Aug 2024 15:11:48 +0000 (16:11 +0100)] 
gh-109408: Remove ``.azure-pipelines/pr.yml`` (#122643)

This no longer does anything useful, beyond wasting Azure resources.

15 months agoDoc: Grammar fix in ``library/ssl.rst``, 'Verifying certificates' (#122646)
scottwoodall [Sat, 3 Aug 2024 13:24:29 +0000 (09:24 -0400)] 
Doc: Grammar fix in ``library/ssl.rst``, 'Verifying certificates' (#122646)

15 months agogh-122334: Fix test_embed failure when missing _ssl module (GH-122630)
neonene [Sat, 3 Aug 2024 13:15:26 +0000 (22:15 +0900)] 
gh-122334: Fix test_embed failure when missing _ssl module (GH-122630)

Co-authored-by: Wulian233 <1055917385@qq.com>
15 months agoGH-109408: Stop running patchcheck in CI (#109895)
Adam Turner [Sat, 3 Aug 2024 11:52:21 +0000 (12:52 +0100)] 
GH-109408: Stop running patchcheck in CI (#109895)

15 months agogh-122613: Document PyLong_GetInfo() (part of Limited API) (GH-#122280)
Sergey B Kirpichev [Sat, 3 Aug 2024 11:20:10 +0000 (14:20 +0300)] 
gh-122613: Document PyLong_GetInfo() (part of Limited API) (GH-#122280)

15 months agoDoc: Improve wording of ``os.path.commonpath()`` (#122627)
Matth-M [Sat, 3 Aug 2024 11:18:59 +0000 (12:18 +0100)] 
Doc: Improve wording of ``os.path.commonpath()`` (#122627)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
15 months agogh-122313: Clean up deep recursion guarding code in the compiler (GH-122640)
Serhiy Storchaka [Sat, 3 Aug 2024 09:45:45 +0000 (12:45 +0300)] 
gh-122313: Clean up deep recursion guarding code in the compiler (GH-122640)

Add ENTER_RECURSIVE and LEAVE_RECURSIVE macros in ast.c, ast_opt.c and
symtable.c. Remove VISIT_QUIT macro in symtable.c.

The current recursion depth counter only needs to be updated during
normal execution -- all functions should just return an error code
if an error occurs.

15 months agogh-122560: add test that comprehension loop var appears only in one scope of the...
Irit Katriel [Fri, 2 Aug 2024 22:56:51 +0000 (23:56 +0100)] 
gh-122560: add test that comprehension loop var appears only in one scope of the symtable (#122582)

15 months agogh-122527: Fix a crash on deallocation of `PyStructSequence` (GH-122577)
Sam Gross [Fri, 2 Aug 2024 16:11:44 +0000 (12:11 -0400)] 
gh-122527: Fix a crash on deallocation of `PyStructSequence` (GH-122577)

The `PyStructSequence` destructor would crash if it was deallocated after
its type's dictionary was cleared by the GC, because it couldn't compute
the "real size" of the instance. This could occur with relatively
straightforward code in the free-threaded build or with a reference
cycle involving the type in the default build, due to differing orders
in which `tp_clear()` was called.

Account for the non-sequence fields in `tp_basicsize` and use that,
along with `Py_SIZE()`, to compute the "real" size of a
`PyStructSequence` in the dealloc function. This avoids the accesses to
the type's dictionary during dealloc, which were unsafe.

15 months agoGH-117224: Move the body of a few large-ish micro-ops into helper functions (GH-122601)
Mark Shannon [Fri, 2 Aug 2024 15:31:17 +0000 (16:31 +0100)] 
GH-117224: Move the body of a few large-ish micro-ops into helper functions (GH-122601)

15 months agogh-122445: populate only modified fields in __static_attributes__ (#122446)
Irit Katriel [Fri, 2 Aug 2024 14:40:42 +0000 (15:40 +0100)] 
gh-122445: populate only modified fields in __static_attributes__ (#122446)

15 months agogh-122334: Fix crash when importing ssl after re-initialization (#122481)
neonene [Fri, 2 Aug 2024 13:36:20 +0000 (22:36 +0900)] 
gh-122334: Fix crash when importing ssl after re-initialization (#122481)

* Fix crash when importing ssl after re-initialization

15 months agogh-120974: Make asyncio `swap_current_task` safe in free-threaded build (#122317)
Sam Gross [Fri, 2 Aug 2024 13:32:08 +0000 (09:32 -0400)] 
gh-120974: Make asyncio `swap_current_task` safe in free-threaded build (#122317)

* gh-120974: Make asyncio `swap_current_task` safe in free-threaded build

15 months agogh-121723: Relax constraints on queue objects for `logging.handlers.QueueHandler...
Bénédikt Tran [Fri, 2 Aug 2024 11:16:32 +0000 (13:16 +0200)] 
gh-121723: Relax constraints on queue objects for `logging.handlers.QueueHandler`. (GH-122154)

15 months agoUpdate PyObject_Del() documentation (#122597)
Victor Stinner [Fri, 2 Aug 2024 10:13:33 +0000 (12:13 +0200)] 
Update PyObject_Del() documentation (#122597)

Replace PyMem_Del() with PyMem_Free().

15 months agogh-122188: Remove _imp.pyc_magic_number (GH-122503)
Serhiy Storchaka [Fri, 2 Aug 2024 10:12:19 +0000 (13:12 +0300)] 
gh-122188: Remove _imp.pyc_magic_number (GH-122503)

_imp.pyc_magic_number_token should be enough.

15 months agogh-122544: Change OS image in readthedocs.yml to ubuntu-24.04 (#122568)
Damien [Fri, 2 Aug 2024 06:09:27 +0000 (14:09 +0800)] 
gh-122544: Change OS image in readthedocs.yml to ubuntu-24.04 (#122568)

15 months agogh-120083: Add IDLE Hovertip foreground color needed for recent macOS (#120605)
John Riggles [Fri, 2 Aug 2024 03:02:43 +0000 (23:02 -0400)] 
gh-120083: Add IDLE Hovertip foreground color needed for recent macOS (#120605)

On recent versions of macOS (sometime between Catalina and Sonoma 14.5), the default Hovertip foreground color changed from black to white, thereby matching the background. This might be a matter of matching the white foreground of the dark-mode text. The unreadable result is shown here (#120083 (comment)).

The foreground and background colors were made parameters so we can pass different colors for future additional hovertips in IDLE.
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
15 months agoFixes typo in idlelib/idle_test/example_stub.pyi (#122520)
Jonathon Vandezande [Fri, 2 Aug 2024 01:31:37 +0000 (21:31 -0400)] 
Fixes typo in idlelib/idle_test/example_stub.pyi (#122520)

---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
15 months agogh-122562: Remove ste_free and ste_child_free from symtable (#122563)
Jelle Zijlstra [Thu, 1 Aug 2024 23:28:25 +0000 (16:28 -0700)] 
gh-122562: Remove ste_free and ste_child_free from symtable (#122563)

15 months agoGH-118095: Add tier two support for BINARY_SUBSCR_GETITEM (GH-120793)
Mark Shannon [Thu, 1 Aug 2024 23:19:05 +0000 (00:19 +0100)] 
GH-118095: Add tier two support for BINARY_SUBSCR_GETITEM (GH-120793)

15 months agoReplace PyObject_Del with PyObject_Free (#122453)
Victor Stinner [Thu, 1 Aug 2024 12:12:33 +0000 (14:12 +0200)] 
Replace PyObject_Del with PyObject_Free (#122453)

PyObject_Del() is just a alias to PyObject_Free() kept for backward
compatibility. Use directly PyObject_Free() instead.

15 months agogh-122555: Remove removed functions from `Doc/data/refcounts.dat` (#122556)
Bénédikt Tran [Thu, 1 Aug 2024 10:26:09 +0000 (12:26 +0200)] 
gh-122555: Remove removed functions from `Doc/data/refcounts.dat` (#122556)

15 months agogh-122384: Mark strings from Download page for translation (#122385)
Rafael Fontenelle [Thu, 1 Aug 2024 09:25:16 +0000 (06:25 -0300)] 
gh-122384: Mark strings from Download page for translation (#122385)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
15 months agoGH-122155: Track local variables between pops and pushes in cases generator (GH-122286)
Mark Shannon [Thu, 1 Aug 2024 08:27:26 +0000 (09:27 +0100)] 
GH-122155: Track local variables between pops and pushes in cases generator (GH-122286)

15 months agoFix typos in docs, error messages and comments (#122502)
jianghuyiyuan [Thu, 1 Aug 2024 00:26:09 +0000 (09:26 +0900)] 
Fix typos in docs, error messages and comments (#122502)

Signed-off-by: jianghuyiyuan <shuangcui@live.com>
15 months agogh-116622: Don't expose `FICLONE` ioctl on Android (#122522)
Malcolm Smith [Thu, 1 Aug 2024 00:23:10 +0000 (01:23 +0100)] 
gh-116622: Don't expose `FICLONE` ioctl on Android (#122522)

Don't expose `FICLONE` ioctl on Android

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
15 months agogh-116622: Skip PosixPathTest.test_expanduser_pwd2 on platforms which don't support...
Malcolm Smith [Wed, 31 Jul 2024 18:35:10 +0000 (19:35 +0100)] 
gh-116622: Skip PosixPathTest.test_expanduser_pwd2 on platforms which don't support pwd.getpwall (GH-122521)

15 months agogh-87320: In the code module, handle exceptions raised in sys.excepthook (GH-122456) 122501/head
CF Bolz-Tereick [Wed, 31 Jul 2024 10:33:29 +0000 (12:33 +0200)] 
gh-87320: In the code module, handle exceptions raised in sys.excepthook (GH-122456)

Before, the exception caused by calling non-default sys.excepthook
in code.InteractiveInterpreter bubbled up to the caller, ending the REPL.

15 months agoMove change detection to separate workflow in CI (#122336)
Sviatoslav Sydorenko (Святослав Сидоренко) [Wed, 31 Jul 2024 08:32:16 +0000 (10:32 +0200)] 
Move change detection to separate workflow in CI (#122336)

15 months agogh-122133: Rework pure Python socketpair tests to avoid use of importlib.reload....
Russell Keith-Magee [Wed, 31 Jul 2024 08:24:15 +0000 (16:24 +0800)] 
gh-122133: Rework pure Python socketpair tests to avoid use of importlib.reload. (#122493)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
15 months agoDocs: bump Sphinx to 8.0 and update constraints (#122496)
Hugo van Kemenade [Wed, 31 Jul 2024 07:02:08 +0000 (10:02 +0300)] 
Docs: bump Sphinx to 8.0 and update constraints (#122496)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
16 months agogh-121381 Remove subprocess._USE_VFORK escape hatch (#121383)
Cody Maloney [Wed, 31 Jul 2024 01:39:54 +0000 (18:39 -0700)] 
gh-121381 Remove subprocess._USE_VFORK escape hatch (#121383)

This flag was added as an escape hatch in gh-91401 and backported to
Python 3.10. The flag broke at some point between its addition and now.
As there is currently no publicly known environments that require this,
remove it rather than work on fixing it.

This leaves the flag in the subprocess module to not break code which
may have used / checked the flag itself.

discussion: https://discuss.python.org/t/subprocess-use-vfork-escape-hatch-broken-fix-or-remove/56915/2

16 months agogh-116622: Fix testPyObjectPrintOSError on Android (#122487)
Malcolm Smith [Wed, 31 Jul 2024 00:21:43 +0000 (01:21 +0100)] 
gh-116622: Fix testPyObjectPrintOSError on Android (#122487)

Adds extra handling for way BSD/Android return errors from calls to fwrite.

16 months agoGH-122482: Make About IDLE direct discussion to DPO (#122483)
Terry Jan Reedy [Tue, 30 Jul 2024 22:29:52 +0000 (18:29 -0400)] 
GH-122482: Make About IDLE direct discussion to DPO (#122483)

Currently, idle-dev@python.org and idle-dev mailing list
serve to collect spam (90+%).  Change About IDLE to direct
discussions to discuss.python.org.  Users are already
doing so.

16 months agogh-121650: Encode newlines in headers, and verify headers are sound (GH-122233)
Petr Viktorin [Tue, 30 Jul 2024 22:19:48 +0000 (00:19 +0200)] 
gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233)

## Encode header parts that contain newlines

Per RFC 2047:

> [...] these encoding schemes allow the
> encoding of arbitrary octet values, mail readers that implement this
> decoding should also ensure that display of the decoded data on the
> recipient's terminal will not cause unwanted side-effects

It seems that the "quoted-word" scheme is a valid way to include
a newline character in a header value, just like we already allow
undecodable bytes or control characters.
They do need to be properly quoted when serialized to text, though.

## Verify that email headers are well-formed

This should fail for custom fold() implementations that aren't careful
about newlines.

Co-authored-by: Bas Bloemsaat <bas@bloemsaat.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
16 months ago gh-120906: Support arbitrary hashable keys in FrameLocalsProxy (GH-122309)
Petr Viktorin [Tue, 30 Jul 2024 22:11:00 +0000 (00:11 +0200)] 
 gh-120906: Support arbitrary hashable keys in FrameLocalsProxy  (GH-122309)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
16 months agogh-112301: Add argument aliases and tee compiler output for check warnings (GH-122465)
Nate Ohlson [Tue, 30 Jul 2024 19:49:15 +0000 (14:49 -0500)] 
gh-112301: Add argument aliases and tee compiler output for check warnings (GH-122465)

Also remove superfluous shebang from the warning check script

16 months agoRemove outdated note about instance methods from datamodel.rst (#122471)
Thomas Grainger [Tue, 30 Jul 2024 19:42:25 +0000 (20:42 +0100)] 
Remove outdated note about instance methods from datamodel.rst (#122471)

16 months agogh-122188: Move magic number to its own file (#122243)
Michael Droettboom [Tue, 30 Jul 2024 19:31:05 +0000 (15:31 -0400)] 
gh-122188: Move magic number to its own file (#122243)

* gh-122188: Move magic number to its own file

* Add versionadded directive

* Do work in C

* Integrate launcher.c

* Make _pyc_magic_number private

* Remove metadata

* Move sys.implementation -> _imp

* Modernize comment

* Move _RAW_MAGIC_NUMBER to the C side as well

* _pyc_magic_number -> pyc_magic_number

* Remove unused import

* Update docs

* Apply suggestions from code review

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* Fix typo in tests

---------

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
16 months agogh-117657: Avoid race in `PAUSE_ADAPTIVE_COUNTER` in free-threaded build (#122190)
Sam Gross [Tue, 30 Jul 2024 17:53:47 +0000 (13:53 -0400)] 
gh-117657: Avoid race in `PAUSE_ADAPTIVE_COUNTER` in free-threaded build (#122190)

The adaptive counter doesn't do anything currently in the free-threaded
build and TSan reports a data race due to concurrent modifications to
the counter.

16 months agogh-116402: Avoid readline in test_builtin TTY input tests (GH-122447)
Łukasz Langa [Tue, 30 Jul 2024 16:57:19 +0000 (18:57 +0200)] 
gh-116402: Avoid readline in test_builtin TTY input tests (GH-122447)

16 months agogh-121946: Temporarily switch to llvm-17 in TSan CI again (GH-122466)
Sam Gross [Tue, 30 Jul 2024 15:30:52 +0000 (11:30 -0400)] 
gh-121946: Temporarily switch to llvm-17 in TSan CI again (GH-122466)

The Ubuntu package for llvm-18 is broken

16 months agogh-119896: Fix CTRL-Z behavior in the new REPL on Windows (GH-122217)
Dino Viehland [Tue, 30 Jul 2024 12:03:52 +0000 (05:03 -0700)] 
gh-119896: Fix CTRL-Z behavior in the new REPL on Windows (GH-122217)

16 months agogh-121474: Add threading.Barrier parties arg sanity check. (GH-121480)
Clinton [Tue, 30 Jul 2024 08:53:07 +0000 (04:53 -0400)] 
gh-121474: Add threading.Barrier parties arg sanity check. (GH-121480)

16 months agogh-122400: Handle ValueError in filecmp (GH-122401)
Bénédikt Tran [Tue, 30 Jul 2024 08:50:30 +0000 (10:50 +0200)] 
gh-122400: Handle ValueError in filecmp (GH-122401)

16 months agogh-105733: Soft-deprecate ctypes.ARRAY, rather than hard-deprecating it. (GH-122281)
Petr Viktorin [Tue, 30 Jul 2024 07:37:58 +0000 (09:37 +0200)] 
gh-105733: Soft-deprecate ctypes.ARRAY, rather than hard-deprecating it. (GH-122281)

Soft-deprecate ctypes.ARRAY, rather than hard-deprecating it.

Partially reverts 2211454fe210637ed7fabda12690dac6cc9a8149

16 months agoGH-121970: Extract ``audit_events`` into a new extension (#122325)
Adam Turner [Tue, 30 Jul 2024 03:49:00 +0000 (04:49 +0100)] 
GH-121970: Extract ``audit_events`` into a new extension (#122325)