]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
14 months agogh-122688: Add more tests for var-positional parameters in Argument Clinic (GH-122900)
Serhiy Storchaka [Mon, 12 Aug 2024 13:52:48 +0000 (16:52 +0300)] 
gh-122688: Add more tests for var-positional parameters in Argument Clinic (GH-122900)

14 months agoFix typos in comments and test code (#122846) 121739/head
Xie Yanbo [Mon, 12 Aug 2024 04:16:41 +0000 (12:16 +0800)] 
Fix typos in comments and test code (#122846)

14 months agoRemove "print >>obj" exception hint for Python 2 (#122853)
Victor Stinner [Mon, 12 Aug 2024 04:12:14 +0000 (06:12 +0200)] 
Remove "print >>obj" exception hint for Python 2 (#122853)

14 months agogh-122903: Honor directories in zipfile.Path.glob. (#122908)
Jason R. Coombs [Mon, 12 Aug 2024 00:33:33 +0000 (20:33 -0400)] 
gh-122903: Honor directories in zipfile.Path.glob. (#122908)

14 months agogh-122905: Sanitize names in zipfile.Path. (#122906)
Jason R. Coombs [Sun, 11 Aug 2024 23:48:50 +0000 (19:48 -0400)] 
gh-122905: Sanitize names in zipfile.Path. (#122906)

Ported from zipp 3.19.1; ref jaraco/zipp#119.

14 months agogh-119180: annotationlib: Fix __all__, formatting (#122365)
Jelle Zijlstra [Sun, 11 Aug 2024 23:44:51 +0000 (16:44 -0700)] 
gh-119180: annotationlib: Fix __all__, formatting (#122365)

14 months agogh-119180: Improvements to ForwardRef.evaluate (#122210)
Jelle Zijlstra [Sun, 11 Aug 2024 23:42:57 +0000 (16:42 -0700)] 
gh-119180: Improvements to ForwardRef.evaluate (#122210)

Noticed some issues while writing documentation for this method.

14 months agoGH-73991: Rework `pathlib.Path.copytree()` into `copy()` (#122369)
Barney Gale [Sun, 11 Aug 2024 21:43:18 +0000 (22:43 +0100)] 
GH-73991: Rework `pathlib.Path.copytree()` into `copy()` (#122369)

Rename `pathlib.Path.copy()` to `_copy_file()` (i.e. make it private.)

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

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
14 months agogh-122701: Fix wording of raw strings/bytes in `lexical_analysis.rst` (#122702)
sobolevn [Sun, 11 Aug 2024 21:02:50 +0000 (00:02 +0300)] 
gh-122701: Fix wording of raw strings/bytes in `lexical_analysis.rst` (#122702)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
14 months agoDocs: Standardise versionchanged text in weakref.rst (#122898)
Rafael Fontenelle [Sun, 11 Aug 2024 20:40:11 +0000 (17:40 -0300)] 
Docs: Standardise versionchanged text in weakref.rst (#122898)

14 months agogh-122860: Remove unused macro `_Py_atomic_load_relaxed_int32` (#122861)
Sam Gross [Sun, 11 Aug 2024 17:15:02 +0000 (13:15 -0400)] 
gh-122860: Remove unused macro `_Py_atomic_load_relaxed_int32` (#122861)

14 months agogh-122858: Deprecate `asyncio.iscoroutinefunction` (#122875)
Wulian [Sun, 11 Aug 2024 16:35:51 +0000 (00:35 +0800)] 
gh-122858: Deprecate `asyncio.iscoroutinefunction` (#122875)

Deprecate `asyncio.iscoroutinefunction` in favor of `inspect.iscoroutinefunction`.

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
14 months agoGH-120974: make `_asyncio.all_tasks` thread safe (#122801)
Kumar Aditya [Sun, 11 Aug 2024 15:19:31 +0000 (20:49 +0530)] 
GH-120974: make `_asyncio.all_tasks` thread safe (#122801)

Make `_asyncio.all_tasks` thread safe, also changes state lock to use critical section.

14 months agoGH-120794: Use example paths with multiple parts in pathlib docs (#122887)
Barney Gale [Sat, 10 Aug 2024 21:21:17 +0000 (22:21 +0100)] 
GH-120794: Use example paths with multiple parts in pathlib docs (#122887)

In the documentation of `PosixPath` and `WindowsPath`, and their `Pure*`
equivalents, use example paths with multiple non-anchor parts.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
14 months agogh-122868: Add more lower bounds for sphinxcontrib dependencies (#122891)
Adam Turner [Sat, 10 Aug 2024 20:50:43 +0000 (21:50 +0100)] 
gh-122868: Add more lower bounds for sphinxcontrib dependencies (#122891)

14 months agogh-115808: Add ``is_none`` and ``is_not_none`` to ``operator`` (#115814)
Nico Mexis [Sat, 10 Aug 2024 19:16:34 +0000 (21:16 +0200)] 
gh-115808: Add ``is_none`` and ``is_not_none`` to ``operator`` (#115814)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
14 months agogh-122868: Add lower bounds for sphinxcontrib dependencies (#122870)
Adam Turner [Fri, 9 Aug 2024 22:18:46 +0000 (23:18 +0100)] 
gh-122868: Add lower bounds for sphinxcontrib dependencies (#122870)

* Docs: Add lower bounds for sphinxcontrib dependencies

* oops

14 months agogh-105376: Restore deprecated logging warn() method (#122775)
Victor Stinner [Fri, 9 Aug 2024 13:13:24 +0000 (15:13 +0200)] 
gh-105376: Restore deprecated logging warn() method (#122775)

This reverts commit dcc028d92428bd57358a5028ada2a53fc79fc365 and
commit 6c54e5d72166d012b52155cbf13af9e533290e06.

Keep the deprecated logging warn() method in Python 3.13.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
14 months agogh-111495: Fix refleaks in test_capi.test_eval tests (#122851)
Victor Stinner [Fri, 9 Aug 2024 09:47:00 +0000 (11:47 +0200)] 
gh-111495: Fix refleaks in test_capi.test_eval tests (#122851)

14 months agogh-122688: Fix support of var-positional parameter in Argument Clinic (GH-122689)
Serhiy Storchaka [Fri, 9 Aug 2024 09:22:41 +0000 (12:22 +0300)] 
gh-122688: Fix support of var-positional parameter in Argument Clinic (GH-122689)

* Parameters after the var-positional parameter are now keyword-only
  instead of positional-or-keyword.
* Correctly calculate min_kw_only.
* Raise errors for invalid combinations of the var-positional parameter
  with "*", "/" and deprecation markers.

14 months agogh-121268: Remove workarounds for non-IEEE 754 systems in cmath (#122716)
Sergey B Kirpichev [Fri, 9 Aug 2024 09:17:40 +0000 (12:17 +0300)] 
gh-121268: Remove workarounds for non-IEEE 754 systems in cmath (#122716)

As now building Python now requires support of IEEE 754 floating point
numbers.

15 months agogh-116622: Rename build variable MODULE_LDFLAGS back to LIBPYTHON (#122764)
Malcolm Smith [Thu, 8 Aug 2024 22:00:55 +0000 (23:00 +0100)] 
gh-116622: Rename build variable MODULE_LDFLAGS back to LIBPYTHON (#122764)

(LIBPYTHON was renamed MODULE_LDFLAGS in commit 7f5e3f04f.)

15 months agoGH-118943: Remove regen-jit from the regen-all make target (GH-122602)
Miro Hrončok [Thu, 8 Aug 2024 20:34:42 +0000 (22:34 +0200)] 
GH-118943: Remove regen-jit from the regen-all make target (GH-122602)

Co-authored-by: Éric <merwok@netwok.org>
15 months agogh-112301: Update documentation for configure options (``--disable-safety`` and ...
Nate Ohlson [Thu, 8 Aug 2024 19:35:00 +0000 (14:35 -0500)] 
gh-112301: Update documentation for configure options (``--disable-safety`` and ``--enable-slower-safety``) (#122758)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
15 months agogh-122835: Fix module name in ``test_typing`` (#122836)
Kirill Podoprigora [Thu, 8 Aug 2024 19:26:31 +0000 (22:26 +0300)] 
gh-122835: Fix module name in ``test_typing`` (#122836)

15 months agogh-122697: Fix free-threading memory leaks at shutdown (#122703)
Sam Gross [Thu, 8 Aug 2024 16:48:17 +0000 (12:48 -0400)] 
gh-122697: Fix free-threading memory leaks at shutdown (#122703)

We were not properly accounting for interpreter memory leaks at
shutdown and had two sources of leaks:

 * Objects that use deferred reference counting and were reachable via
   static types outlive the final GC. We now disable deferred reference
   counting on all objects if we are calling the GC due to interpreter
   shutdown.

 * `_PyMem_FreeDelayed` did not properly check for interpreter shutdown
   so we had some memory blocks that were enqueued to be freed, but
   never actually freed.

 * `_PyType_FinalizeIdPool` wasn't called at interpreter shutdown.

15 months agogh-122562: fix dump_symtable for ste_free and ste_child_free removal (#122825)
Irit Katriel [Thu, 8 Aug 2024 13:03:45 +0000 (14:03 +0100)] 
gh-122562: fix dump_symtable for ste_free and ste_child_free removal (#122825)

15 months agogh-111495: Add more tests on PyEval C APIs (#122789)
Victor Stinner [Thu, 8 Aug 2024 12:16:20 +0000 (14:16 +0200)] 
gh-111495: Add more tests on PyEval C APIs (#122789)

* Add Lib/test/test_capi/test_eval.py
* Add Modules/_testlimitedcapi/eval.c

15 months agoGH-120024: Tidy up case generator code a bit. (GH-122780)
Mark Shannon [Thu, 8 Aug 2024 09:57:59 +0000 (10:57 +0100)] 
GH-120024: Tidy up case generator code a bit. (GH-122780)

15 months agogh-122744: test_venv: ignore pip's complaint about missing ssl (GH-122776)
Petr Viktorin [Thu, 8 Aug 2024 09:20:58 +0000 (11:20 +0200)] 
gh-122744: test_venv: ignore pip's complaint about missing ssl (GH-122776)

15 months agoInternalDocs: Fix typo in link to instruction_sequence.c inside compiler docs (#122809)
Francisco Kurucz [Thu, 8 Aug 2024 08:19:10 +0000 (05:19 -0300)] 
InternalDocs: Fix typo in link to instruction_sequence.c inside compiler docs (#122809)

15 months agogh-122255: Add black box tests in test_warnings (GH-122227)
Serhiy Storchaka [Thu, 8 Aug 2024 07:35:47 +0000 (10:35 +0300)] 
gh-122255: Add black box tests in test_warnings (GH-122227)

They are similar to white box tests for gh-86298 in test_importlib.

15 months agogh-116263: Do not rollover empty files in RotatingFileHandler (GH-122788)
Serhiy Storchaka [Thu, 8 Aug 2024 06:48:11 +0000 (09:48 +0300)] 
gh-116263: Do not rollover empty files in RotatingFileHandler (GH-122788)

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().