Commit Graph

122861 Commits

Author SHA1 Message Date
Miss Islington (bot) ff58c3cb48
[3.13] gh-123022: Fix crash with `Py_Initialize` in background thread (GH-123052) (#123114)
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.
(cherry picked from commit d061ffea7b)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-08-17 20:38:02 +00:00
Miss Islington (bot) 6001deacb7
[3.13] GH-109975: Copyedit 3.13 What's New: Other Language Changes (GH-123086) (#123101)
GH-109975: Copyedit 3.13 What's New: Other Language Changes (GH-123086)
(cherry picked from commit d60b97a833)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-08-17 12:26:58 +00:00
Miss Islington (bot) 8d95102447
[3.13] fix typo in dis.rst (GH-121612) (#123095)
fix typo in dis.rst (GH-121612)
(cherry picked from commit e9287ea426)

Co-authored-by: mathysEthical <110499907+mathysEthical@users.noreply.github.com>
2024-08-17 09:11:33 +00:00
Miss Islington (bot) 2620c1543b
[3.13] gh-122519: Adding socket module shutdown() constants description (GH-122543) (#123093)
gh-122519: Adding socket module shutdown() constants description (GH-122543)
(cherry picked from commit 8a59deca59)

Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
2024-08-17 08:45:25 +00:00
Miss Islington (bot) 3ab8eafbd9
[3.13] mention pypy somewhat more prominently in the pyrepl section of whatsnew (GH-123063) (#123064) 2024-08-16 11:58:17 +00:00
Miss Islington (bot) 1f7071572e
[3.13] gh-122247: Move instruction instrumentation sanity check after tracing check (GH-122251) (GH-122812)
(cherry picked from commit 57d7c3e78f)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-08-16 12:01:40 +02:00
Miss Islington (bot) 7ee7558833
[3.13] gh-122584: Import mimalloc headers in a C++ context (GH-122587) (#123035)
gh-122584: Import mimalloc headers in a C++ context (GH-122587)
(cherry picked from commit 1dad23edbc)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
2024-08-16 01:49:17 -07:00
Miss Islington (bot) cf6d14b966
[3.13] gh-116622: Add Android test script (GH-121595) (#123061)
gh-116622: Add Android test script (GH-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.
(cherry picked from commit f84cce6f25)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2024-08-16 16:36:46 +08:00
Miss Islington (bot) 0dd89a7f40
[3.13] gh-116622: Android logging fixes (GH-122698) (#122719)
gh-116622: Android logging fixes (GH-122698)

Modifies the handling of stdout/stderr redirection on Android to accomodate
the rate and buffer size limits imposed by Android's logging infrastructure.
(cherry picked from commit b0c48b8fd8)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2024-08-16 16:07:42 +08:00
Miss Islington (bot) 69cf92fbca
[3.13] gh-116622: Don't expose `FICLONE` ioctl on Android (GH-122522) (#122539)
gh-116622: Don't expose `FICLONE` ioctl on Android (GH-122522)

Don't expose `FICLONE` ioctl on Android

(cherry picked from commit 06656e259b)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2024-08-16 16:07:27 +08:00
Miss Islington (bot) a604b2440f
[3.13] gh-123046: Fix regexp to catch cases where the module name is omitted from the weakref repr (GH-123047) (#123058)
gh-123046: Fix regexp to catch cases where the module name is omitted from the weakref repr (GH-123047)
(cherry picked from commit 786cac0c64)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: sobolevn <mail@sobolevn.me>
2024-08-16 07:41:49 +00:00
Miss Islington (bot) 5ac14eeea6
[3.13] gh-116608: Apply style and compatibility changes from importlib_resources. (GH-123028) (#123051)
gh-116608: Apply style and compatibility changes from importlib_metadata. (GH-123028)
(cherry picked from commit e913d2c87f)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-08-15 19:57:07 +00:00
Miss Islington (bot) 009f9efe65
[3.13] GH-109975: Copyedit 3.13 What's New: New Features (GH-122990) (#123032)
GH-109975: Copyedit 3.13 What's New: New Features (GH-122990)
(cherry picked from commit b106cf8d97)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2024-08-15 09:25:33 +00:00
Miss Islington (bot) 79452b135c
[3.13] gh-123005: Add version added in enum.Flag.__len__ (GH-123007) (#123026)
gh-123005: Add version added in enum.Flag.__len__ (GH-123007)
(cherry picked from commit 8e2dc7f380)

Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
2024-08-14 21:31:19 +00:00
Miss Islington (bot) 8644014a35
[3.13] gh-122965: Fix `reusable-change-detection.yml` on `workflow_dispatch` (GH-122966) (#123008)
gh-122965: Fix `reusable-change-detection.yml` on `workflow_dispatch` (GH-122966)
(cherry picked from commit 6ae942f412)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-08-14 16:20:40 +03:00
Russell Keith-Magee 31a962b1b3
[3.13] Revert use of --rerun in iOS testbed. (#122995)
Reverts the use of --rerun in iOS testing because it tries to create a subprocess on the rerun.
2024-08-14 02:03:18 +00:00
Miss Islington (bot) bfec6f319a
[3.13] Add a --rerun option to the iOS testbed. (GH-122992) (#122993)
Enable --rerun when running tests on iOS.
(cherry picked from commit ce39d3c6bd)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2024-08-14 00:41:37 +00:00
Miss Islington (bot) d218810e20
[3.13] GH-85633: Fix pathlib test failures on filesystems without world-write. (GH-122883) (#122979)
GH-85633: Fix pathlib test failures on filesystems without world-write. (GH-122883)

Replace `umask(0)` with `umask(0o002)` so the created files are not
world-writable, and replace `umask(0o022)` with `umask(0o026)` to check
that permissions for 'others' can still be set.
(cherry picked from commit 5f68511522)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2024-08-13 17:39:14 +00:00
Miss Islington (bot) 4aa0e795a9
[3.13] Fix `print` usage in `turtle` doctests (GH-122940) (#122977)
Fix `print` usage in `turtle` doctests (GH-122940)
(cherry picked from commit 901d94992e)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-08-13 17:03:36 +00:00
Miss Islington (bot) 7db7fcc0ef
[3.13] GH-109975: Copyedit 3.13 What's New: Release Highlights (GH-122958) (#122971)
GH-109975: Copyedit 3.13 What's New: Release Highlights (GH-122958)
(cherry picked from commit db6f5e1933)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-08-13 15:58:35 +01:00
Miss Islington (bot) fcc7c4ea66
[3.13] gh-122944: Fix incorrect prompt strings in the Python Tutorial (GH-122949) (#122954)
gh-122944: Fix incorrect prompt strings in the Python Tutorial (GH-122949)

In the REPL, top level comments are followed by a primary, not secondary prompt.
Fix the places in the in the tutorial that use the latter.
(cherry picked from commit be90648fb2)

Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
2024-08-12 18:56:36 +00:00
Miss Islington (bot) 55aede7342
[3.13] gh-122888: Fix crash on certain calls to str() (GH-122889) (#122947)
Fixes GH-122888
(cherry picked from commit 53ebb6232a)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-08-12 16:53:05 +00:00
Miss Islington (bot) 8b64ce4eb4
[3.13] gh-111051: [tests] Wait a second to support filesystems with low-resolution mtime (GH-121959) (GH-122114)
(cherry picked from commit cad11a2bdc)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-08-12 11:00:33 +00:00
Miss Islington (bot) d6d68cfd86
[3.13] gh-116622: Skip PosixPathTest.test_expanduser_pwd2 on platforms which don't support pwd.getpwall (GH-122521) (GH-122530)
(cherry picked from commit 8844197daa)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2024-08-12 13:37:03 +03:00
Miss Islington (bot) 59d0d335cf
[3.13] gh-122903: Honor directories in zipfile.Path.glob. (GH-122908) (#122926)
(cherry picked from commit 6aa35f3002)
2024-08-12 01:02:10 +00:00
Miss Islington (bot) 8c7348939d
[3.13] gh-122905: Sanitize names in zipfile.Path. (GH-122906) (#122922) 2024-08-11 20:35:04 -04:00
Miss Islington (bot) 1788eb786b
[3.13] gh-122701: Fix wording of raw strings/bytes in `lexical_analysis.rst` (GH-122702) (#122914)
gh-122701: Fix wording of raw strings/bytes in `lexical_analysis.rst` (GH-122702)
(cherry picked from commit ea70439bd2)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-11 21:20:07 +00:00
Miss Islington (bot) ee9818bdbb
[3.13] Docs: Standardise versionchanged text in weakref.rst (GH-122898) (#122911)
Docs: Standardise versionchanged text in weakref.rst (GH-122898)
(cherry picked from commit db8b83c2b0)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-08-11 20:57:19 +00:00
Miss Islington (bot) 7ca389cb54
[3.13] GH-120794: Use example paths with multiple parts in pathlib docs (GH-122887) (#122895)
GH-120794: Use example paths with multiple parts in pathlib docs (GH-122887)

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

(cherry picked from commit 363374cf69)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-10 21:41:14 +00:00
Miss Islington (bot) b62f8c9769
[3.13] gh-122868: Add more lower bounds for sphinxcontrib dependencies (GH-122891) (#122893)
gh-122868: Add more lower bounds for sphinxcontrib dependencies (GH-122891)
(cherry picked from commit 0959142e4d)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-10 21:10:22 +00:00
Miss Islington (bot) f28c3993e3
[3.13] gh-122868: Add lower bounds for sphinxcontrib dependencies (GH-122870) (#122871)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-09 22:36:23 +00:00
Miss Islington (bot) 42005c77a0
[3.13] gh-116622: Rename build variable MODULE_LDFLAGS back to LIBPYTHON (GH-122764) (GH-122842)
gh-116622: Rename build variable MODULE_LDFLAGS back to LIBPYTHON (GH-122764)

(LIBPYTHON was renamed MODULE_LDFLAGS in commit 7f5e3f04f.)
(cherry picked from commit 2f5c3b09e4)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2024-08-09 14:45:04 -07:00
Miss Islington (bot) 46f973f631
[3.13] gh-122255: Add black box tests in test_warnings (GH-122227) (GH-122818)
gh-122255: Add black box tests in test_warnings (GH-122227)

They are similar to white box tests for gh-86298 in test_importlib.
(cherry picked from commit fe13c9baf4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-08-09 14:33:56 -07:00
Miss Islington (bot) bcce4cc466
[3.13] gh-105376: Restore deprecated logging warn() method (GH-122775) (#122856)
gh-105376: Restore deprecated logging warn() method (GH-122775)

This reverts commit dcc028d924 and
commit 6c54e5d721.

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

(cherry picked from commit d3239976a8)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-08-09 17:15:30 +02:00
Miss Islington (bot) 013752c9f8
[3.13] gh-109218: Refactor tests for the complex() constructor (GH-119635) (GH-119795)
* Share common classes.
* Use exactly representable floats and exact tests.
* Check the sign of zero components.
* Remove duplicated tests (mostly left after merging int and long).
* Reorder tests in more consistent way.
* Test more error messages.
* Add tests for missed cases.
(cherry picked from commit bf098d4157)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-08-09 17:42:16 +03:00
Miss Islington (bot) 406f924dda
[3.13] gh-121874: Define audit-event open parameters consistently (GH-121883) (#121956)
Co-authored-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-08-09 14:35:49 +00:00
Peter Bierma e8fb088dba
[3.13] gh-122695: Fix double-free when using `gc.get_referents` with a freed `_asyncio.FutureIter` (#122837)
* Backport #122834 for 3.13
2024-08-09 19:36:36 +05:30
Miss Islington (bot) 60c44ed975
[3.13] gh-122661: Remove GNU make-specific directive from Doc/Makefile (GH-122662) (#122668)
Co-authored-by: Libor Martínek <libas@acco.cz>
2024-08-09 14:43:09 +03:00
Miss Islington (bot) 3ba75aeba9
[3.13] gh-122744: test_venv: ignore pip's complaint about missing ssl (GH-122776) (GH-122823)
(cherry picked from commit 0d9c123d1a)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-08-09 09:26:54 +02:00
Miss Islington (bot) 862bead237
[3.13] GH-118943: Remove regen-jit from the regen-all make target (GH-122840)
cherry picked from commit 8c9d1742de)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Co-authored-by: Éric <merwok@netwok.org>
2024-08-08 14:14:49 -07:00
Miss Islington (bot) 27a5292774
[3.13] GH-118943: Handle races when moving jit_stencils.h (GH-122709)
(cherry picked from commit 44659d3927)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-08-08 13:37:49 -07:00
Miss Islington (bot) 84c8cd0f3d
[3.13] gh-87320: In the code module, handle exceptions raised in sys.excepthook (GH-122456) (GH-122514)
Before, the exception caused by calling non-default sys.excepthook
in code.InteractiveInterpreter bubbled up to the caller, ending the REPL.
(cherry picked from commit bd3d31f380)

Co-authored-by: CF Bolz-Tereick <cfbolz@gmx.de>
2024-08-08 07:26:52 +00:00
Serhiy Storchaka 1fd1c6c738
[3.13] gh-118814: Fix the TypeVar constructor when name is passed by keyword (GH-122664) (GH-122806)
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.
(cherry picked from commit 540fcc62f5)
2024-08-08 09:49:21 +03:00
Miss Islington (bot) bc8368e9d0
[3.13] Docs: Change `remove` to `removes` for consistency (GH-121072) (#122790)
Docs: Change `remove` to `removes` for consistency (GH-121072)
(cherry picked from commit 967a4f1d18)

Co-authored-by: smij720 <122238526+smij720@users.noreply.github.com>
2024-08-07 16:18:08 +00:00
Miss Islington (bot) 59be613137
[3.13] gh-122511: Improve documentation for object identity of mutable/immutable types (GH-122512) (#122778)
gh-122511: Improve documentation for object identity of mutable/immutable types (GH-122512)
(cherry picked from commit 76bdeebef6)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-07 16:41:26 +01:00
Miss Islington (bot) 04d6de66c7
[3.13] Doc: cmdline.rst: Include -P and -R in usage (GH-122590) (#122783)
Doc: cmdline.rst: Include -P and -R in usage (GH-122590)

* ``-P``: safe path (https://docs.python.org/3/using/cmdline.htmlGH-cmdoption-P)
* ``-R``: hash randomization (https://docs.python.org/3/using/cmdline.htmlGH-cmdoption-R)
(cherry picked from commit c25898d51e)

Co-authored-by: Wim Jeantine-Glenn <hey@wimglenn.com>
2024-08-07 15:35:35 +00:00
Miss Islington (bot) 9fb6bfbef0
[3.13] gh-122581: Avoid data races when collecting parser statistics (GH-122694) (#122733)
gh-122581: Avoid data races when collecting parser statistics (GH-122694)
(cherry picked from commit ce0d66c8d2)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2024-08-07 18:29:03 +05:30
Miss Islington (bot) 5c161cb832
[3.13] gh-122728: Fix SystemError in PyEval_GetLocals() (GH-122735) (#122757)
gh-122728: Fix SystemError in PyEval_GetLocals() (GH-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().
(cherry picked from commit 4767a6e31c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-08-06 23:37:10 +02:00
Miss Islington (bot) e808146af1
[3.13] gh-122334: Fix test_embed failure when missing _ssl module (GH-122630) (#122647)
gh-122334: Fix test_embed failure when missing _ssl module (GH-122630)
(cherry picked from commit 50b3603751)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
Co-authored-by: Wulian233 <1055917385@qq.com>
2024-08-06 21:00:14 +02:00
Miss Islington (bot) 24d15f0cb0
[3.13] gh-121103: Update site module docs for free-threaded installs (GH-122737) (#122750)
gh-121103: Update site module docs for free-threaded installs (GH-122737)
(cherry picked from commit 1429651a06)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-08-06 18:57:02 +00:00