Commit Graph

52991 Commits

Author SHA1 Message Date
Miss Islington (bot) 31fae8c94f
[3.13] gh-123228: fix return type for _ReadlineWrapper.get_line_buffer() (GH-123281) (#123293)
gh-123228: fix return type for _ReadlineWrapper.get_line_buffer() (GH-123281)
(cherry picked from commit ca18ff2a34)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
2024-08-24 16:11:17 +00:00
CF Bolz-Tereick 0955db1bd8
[3.13] gh-82378 fix sys.tracebacklimit in pyrepl, approach 2 (GH-123062) (#123252)
Make sure that pyrepl uses the same logic for sys.tracebacklimit as both
the basic repl and the standard sys.excepthook
(cherry picked from commit 63603bca35)
2024-08-23 12:59:08 +01:00
Miss Islington (bot) 95b4f9c9ad
[3.13] GH-120097: Make FrameLocalsProxy a mapping (GH-120101) (GH-120749)
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-08-23 10:26:03 +01:00
Miss Islington (bot) fda8aec625
[3.13] gh-122546: Relax SyntaxError check when raising errors on the new REPL (GH-123233) (#123247)
gh-122546: Relax SyntaxError check when raising errors on the new REPL (GH-123233)
(cherry picked from commit 4c3f0cbeae)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-08-23 00:32:11 +00:00
CF Bolz-Tereick 30eee22d3f
[3.13] gh-122478: Remove internal frames from tracebacks in REPL (GH-122528) (#123227)
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.
(cherry picked from commit e73e7a7abd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-08-22 23:58:05 +00:00
Sergey B Kirpichev 5271f8fead
[3.13] gh-122546: use same filename for different exceptions in new repl (GH-123217) (#123226) 2024-08-23 00:28:09 +01:00
Miss Islington (bot) 5148e03f0f
[3.13] GH-121723: Skip test_config_queue_handler_multiprocessing_context in emulated JIT CI (GH-122991)
(cherry picked from commit 7b8328b6b3)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-08-22 13:16:52 -07:00
Donghee Na 6cd67e413b
[3.13] gh-123083: Fix a potential use-after-free in ``STORE_ATTR_WITH… (#123235)
[3.13] gh-123083: Fix a potential use-after-free in ``STORE_ATTR_WITH_HINT`` (gh-123092)
(cherry picked from commit 297f2e093e)
2024-08-23 01:37:26 +09:00
Irit Katriel e4b91b7256
[3.13] gh-123142: Fix too wide source locations in tracebacks of exceptions from broken iterables in comprehensions (GH-123173). (#123209)
(cherry picked from commit ec89620e5e)
2024-08-22 10:22:39 +01:00
mpage 50a595b37f
[3.13] gh-122712: Guard against __code__ reassignment in CALL_ALLOC_AND_ENTER_INIT (GH-122713) (GH-123184) 2024-08-21 13:16:30 +01:00
Miss Islington (bot) 159db050f4
[3.13] gh-123048: Fix missing source location in pattern matching code (GH-123167) (#123169)
gh-123048: Fix missing source location in pattern matching code (GH-123167)
(cherry picked from commit bffed80230)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-08-20 11:13:43 +00:00
Miss Islington (bot) 98c7196977
[3.13] gh-123149: Suppress verbose repr in new REPL (GH-123151) (#123157)
gh-123149: Suppress verbose repr in new REPL (GH-123151)
(cherry picked from commit 833c58b81e)

Co-authored-by: James <snoopjedi@gmail.com>
2024-08-19 19:28:12 +00:00
Sergey B Kirpichev c8f4069ab1
[3.13] gh-121804: Always show error location for SyntaxError's in new repl (GH-121886) (#123148)
(cherry picked from commit 354d55eb1f)
2024-08-19 20:01:58 +01:00
Miss Islington (bot) 21399a0963
[3.13] gh-118658: Return consistent types from `get_un/verified_chain` in `SSLObject` and `SSLSocket` (GH-118669) (#123082)
gh-118658: Return consistent types from `get_un/verified_chain` in `SSLObject` and `SSLSocket` (GH-118669)
(cherry picked from commit 8ef358dae1)

Co-authored-by: Mateusz Nowak <nowak.mateusz@hotmail.com>
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
2024-08-19 10:39:28 -05:00
Miss Islington (bot) 0a02026a08
[3.13] gh-123123: Fix display of syntax errors covering multiple lines (GH-123131) (#123147)
gh-123123: Fix display of syntax errors covering multiple lines (GH-123131)
(cherry picked from commit 48856ead6a)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2024-08-19 15:35:47 +00:00
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) 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) 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) 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) 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) 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) 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
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) 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) 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) 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
Pradyun Gedam f0e5ebfcd5
[3.13] gh-122744: Bump bundled pip to 24.2 (#122746)
(cherry picked from commit 5b8a6c5186)

Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2024-08-06 18:50:12 +00:00
Miss Islington (bot) 4aaa4259b5
[3.13] gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) (#122484)
gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233)

GH-GH- 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.

GH-GH- Verify that email headers are well-formed

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

(cherry picked from commit 0976339818)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Bas Bloemsaat <bas@bloemsaat.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-08-06 19:06:41 +02:00
Miss Islington (bot) 35bf9c62b1
[3.13] Fix syntax in generate_re_casefix.py (GH-122699) (#122721)
This was broken in gh-97963.
(cherry picked from commit b72c748d7f)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-08-06 06:46:14 +00:00
Irit Katriel 545a328eae
[3.13] gh-122445: populate only modified fields in __static_attributes__ (#122446) (#122621)
gh-122445: populate only modified fields in __static_attributes__ (#122446)

(cherry picked from commit 498376d7a7)
2024-08-02 19:26:57 +01:00
Miss Islington (bot) b20893b5c2
[3.13] gh-122334: Fix crash when importing ssl after re-initialization (GH-122481) (#122614)
gh-122334: Fix crash when importing ssl after re-initialization (GH-122481)

* Fix crash when importing ssl after re-initialization
(cherry picked from commit 9fc1c992d6)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
2024-08-02 14:07:16 +00:00
Miss Islington (bot) 56435a88c4
[3.13] gh-121723: Relax constraints on queue objects for `logging.handlers.QueueHandler`. (GH-122154) (GH-122603)
(cherry picked from commit fb864c76cd)
2024-08-02 13:07:27 +01:00
Thomas Wouters e4a3e786a5 Python 3.13.0rc1 2024-07-31 20:18:39 +02:00
T. Wouters 9c1c9188df
[3.13] Update the expected bytecode magic number in test_importlib.test_util (#122513)
Update the expected bytecode magic number in test_importlib.test_util.
2024-07-31 20:03:22 +02:00
Petr Viktorin 8c8c43e1dc
[3.13] gh-120906: Support arbitrary hashable keys in FrameLocalsProxy (GH-122309) (#122488)
[3.13] gh-120906: Support arbitrary hashable keys in FrameLocalsProxy  (GH-122309)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
(cherry picked from commit 5912487938)
2024-07-31 09:31:44 +00:00
Miss Islington (bot) c21a36112a
[3.13] gh-122133: Rework pure Python socketpair tests to avoid use of importlib.reload. (GH-122493) (#122504)
gh-122133: Rework pure Python socketpair tests to avoid use of importlib.reload. (GH-122493)

(cherry picked from commit f071f01b7b)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-07-31 08:48:59 +00:00
Miss Islington (bot) a21317f07b
[3.13] GH-122482: Make About IDLE direct discussion to DPO (GH-122483) (#122485)
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.
(cherry picked from commit 29c04dfa27)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-07-30 22:54:01 +00:00
Miss Islington (bot) 7a90d94df7
[3.13] gh-119896: Fix CTRL-Z behavior in the new REPL on Windows (GH-122217) (#122451)
gh-119896: Fix CTRL-Z behavior in the new REPL on Windows (GH-122217)
(cherry picked from commit d1a1bca1f0)

Co-authored-by: Dino Viehland <dinoviehland@meta.com>
2024-07-30 12:34:22 -07:00
Miss Islington (bot) 1912f94f60
[3.13] gh-116402: Avoid readline in test_builtin TTY input tests (GH-122447) (GH-122472)
(cherry picked from commit 1d8e453907)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-30 17:21:17 +00:00
Miss Islington (bot) 202cfbfb7c
[3.13] gh-121474: Add threading.Barrier parties arg sanity check. (GH-121480) (GH-122444)
(cherry picked from commit d27a53fc02)

Co-authored-by: Clinton <pygeek@users.noreply.github.com>
2024-07-30 09:24:35 +00:00
Miss Islington (bot) 466bb0d7ea
[3.13] gh-122400: Handle ValueError in filecmp (GH-122401) (GH-122441)
(cherry picked from commit 3a9b2aae61)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-30 09:17:35 +00:00
Miss Islington (bot) a4c7eb54bd
[3.13] gh-105733: Soft-deprecate ctypes.ARRAY, rather than hard-deprecating it. (GH-122281) (GH-122440)
gh-105733: Soft-deprecate ctypes.ARRAY, rather than hard-deprecating it. (GH-122281)

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

Partially reverts 2211454fe2
(cherry picked from commit 3833d27f98)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-07-30 08:05:09 +00:00
Miss Islington (bot) a2c36ddd16
[3.13] gh-122420: Fix accounting for immortal interned strings in refleak.py (GH-122421) (GH-122430)
The `_PyUnicode_Intern*` functions already adjust the total refcount, so
we don't want to readjust it in refleak.py.
(cherry picked from commit ac8da34621)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-30 09:36:08 +02:00
Miss Islington (bot) b252317956
[3.13] gh-122133: Authenticate socket connection for `socket.socketpair()` fallback (GH-122134) (GH-122424)
Authenticate socket connection for `socket.socketpair()` fallback when the platform does not have a native `socketpair` C API.  We authenticate in-process using `getsocketname` and `getpeername` (thanks to Nathaniel J Smith for that suggestion).

(cherry picked from commit 78df1043db)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-07-30 03:40:02 +00:00
Serhiy Storchaka 9f6f8790ef
Revert "[3.13] gh-120713: Normalize year with century for datetime.strftime (GH-120820) (GH-121144)" (GH-122408)
This reverts commit 009618f112.
2024-07-29 21:55:28 +03:00
Eric Snow 10cf7d6d00
[3.13] gh-117482: Fix the Slot Wrapper Inheritance Tests (gh-122249)
The tests were only checking cases where the slot wrapper was present in the initial case.  They were missing when the slot wrapper was added in the additional initializations.  This fixes that.

(cherry-picked from commit 490e0ad83a, AKA gh-122248)
2024-07-29 10:25:02 -06:00
Kirill Podoprigora b5e8b10de7
[3.13] gh-122292: Split up ``Lib/test/test_ast.py`` into a couple of … (#122393)
[3.13] gh-122292: Split up ``Lib/test/test_ast.py`` into a couple of files (GH-122293)
(cherry picked from commit 9187484dd9)
2024-07-29 16:16:46 +02:00
Miss Islington (bot) c26dd270f7
[3.13] gh-122311: Fix some error messages in pickle (GH-122386) (GH-122387)
(cherry picked from commit 3b034d26eb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-07-29 12:27:14 +03:00
Miss Islington (bot) d113359341
[3.13] gh-122311: Add more tests for pickle (GH-122376) (GH-122377)
(cherry picked from commit bc93923a2d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-07-28 08:56:49 +00:00
Pablo Galindo Salgado c8f3c1daa4
[3.13] gh-122300: Preserve AST nodes for format specifiers with single elements (GH-122308) (#122364)
(cherry picked from commit db2d8b6db1)
2024-07-27 19:27:01 +00:00
Miss Islington (bot) 3648a945e4
[3.13] gh-122170: Handle ValueError raised by os.stat() in linecache (GH-122176) (GH-122348)
(cherry picked from commit 7a6d4ccf0e)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-27 10:54:49 +00:00
Miss Islington (bot) 6b9a5af72f
[3.13] gh-122332: Fix missing `NULL` check in `asyncio.Task.get_coro` (GH-122338) (#122344)
gh-122332: Fix missing `NULL` check in `asyncio.Task.get_coro` (GH-122338)
(cherry picked from commit c08696286f)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-07-27 12:36:50 +05:30
Russell Keith-Magee 7b35c50cd8
[3.13] gh-121832: Revert test skip introduced by GH-122150. (GH-122340) (#122342)
Revert test skip introduced by GH-122150.
(cherry picked from commit 863a92f2bc)
2024-07-27 11:00:42 +08:00
Miss Islington (bot) c79c515671
[3.13] gh-120831: Correct default minimum iOS version. (GH-122339) (#122341)
gh-120831: Correct default minimum iOS version. (GH-122339)

Correct default minimum iOS version.
(cherry picked from commit 4a2607c180)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2024-07-27 02:18:34 +00:00
Miss Islington (bot) 816a1572e5
[3.13] gh-122311: Fix typo in the pickle error formatting code (GH-122312) (GH-122314)
(cherry picked from commit 7c2921844f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-07-26 15:13:59 +00:00
Mark Shannon 9162da254a
[3.13] GH-122155: Fix cases generator to correctly compute 'peek' offset for error handling (GH-122158) (GH-122174) 2024-07-26 10:51:42 +01:00
Miss Islington (bot) aca41cfe99
[3.13] GH-121832: Assert that the version number of static builtin types is not changed by PyType_Modified (gh-122290)
Update datetime module and test_type_cache.py to not call PyType_Modified.

(cherry picked from commit e55b05f29e, AKA gh--122182)

Co-authored-by: Mark Shannon <mark@hotpy.org>
2024-07-25 17:34:01 +00:00
Miss Islington (bot) d1af4f5372
[3.13] gh-121913: Use str(exc) instead of exc.strerror in `asyncio.base_events` (GH-122269) (#122278)
gh-121913: Use str(exc) instead of exc.strerror in `asyncio.base_events` (GH-122269)
(cherry picked from commit 070f1e2e5b)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2024-07-25 12:20:40 +00:00
Miss Islington (bot) 984f8aaa2f
[3.13] gh-82951: Fix serializing by name in pickle protocols < 4 (GH-122149) (GH-122264)
Serializing objects with complex __qualname__ (such as unbound methods and
nested classes) by name no longer involves serializing parent objects by value
in pickle protocols < 4.
(cherry picked from commit dc07f65a53)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-07-25 13:44:55 +03:00
Miss Islington (bot) 977c799286
[3.13] gh-122187: Avoid TSan reported race in `run_udp_echo_server` (GH-122189) (#122263)
gh-122187: Avoid TSan reported race in `run_udp_echo_server` (GH-122189)

TSan doesn't fully recognize the synchronization via I/O, so ensure that
socket name is retrieved earlier and use a different socket for sending
the "STOP" message.
(cherry picked from commit 2f74b709b6)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-25 08:42:38 +00:00
Miss Islington (bot) 6933c4ace9
[3.13] gh-113785: csv: fields starting with escapechar are not quoted (GH-122110) (GH-122258)
(cherry picked from commit a3327dbfd4)

Co-authored-by: Mikołaj Kuranowski <mkuranowski@gmail.com>
2024-07-25 07:29:36 +00:00
Miss Islington (bot) 94db4cc5e6
[3.13] gh-122191: Fix test_warnings failure if run with -Werror (GH-122222) (GH-122256)
__spec__.loader is now required in the module globals (see gh-86298).
(cherry picked from commit 9b4fe9b718)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-07-25 07:28:33 +00:00
Serhiy Storchaka 4e7716554b
[3.13] gh-122087: Restore ismethoddescriptor() and isroutine() for partial objects (GH-122218)
Now they return False again.
2024-07-25 10:11:47 +03:00
Miss Islington (bot) ba3aa5a0ef
[3.13] GH-120754: Add more tests around seek + readall (GH-122103) (#122215)
GH-120754: Add more tests around seek + readall (GH-122103)

In the process of speeding up readall, A number of related tests
(ex. large file tests in test_zipfile) found problems with the
change I was making. This adds I/O tests to specifically test these
cases to help ensure they don't regress and hopefully make debugging
easier.

This is part of the improvements from
https://github.com/python/cpython/pull/121593GH-issuecomment-2222261986
(cherry picked from commit 9eb734111b)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2024-07-24 06:44:41 +00:00
Miss Islington (bot) 40cdec6a8a
[3.13] gh-122029: Log call events in sys.setprofile when it's a method with c function (GH-122072) (GH-122205)
gh-122029: Log call events in sys.setprofile when it's a method with c function (GH-122072)

Log call events in sys.setprofile when it is a method with a C function.
(cherry picked from commit e91ef13861)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-07-23 22:49:36 +00:00
Miss Islington (bot) 81f9339022
[3.13] gh-121832: Skip subinterpreter static type check on iOS to restore test suite. (GH-122150) (#122159)
gh-121832: Skip subinterpreter static type check on iOS to restore test suite. (GH-122150)
(cherry picked from commit 1bcc9eb862)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2024-07-23 22:48:02 +00:00
Eric Snow 8567a5e97d
[3.13] gh-122199: Skip test_slot_wrappers When Checking For Refleaks (gh-122202)
(cherry picked from commit 41a91bd67f, AKA gh-122200)
2024-07-23 21:53:39 +00:00
Miss Islington (bot) e0f540d413
[3.13] gh-117657: Skip tests that use threads after fork (GH-122194) (#122198)
These tests fail when run under thread sanitizer due to the use of fork
and threads.
(cherry picked from commit 64e221d7ad)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-23 21:00:21 +00:00
Miss Islington (bot) 1d601a1da1
[3.13] gh-117482: Expand Tests for Slot Wrappers of Inherited Slots of Static Builtin Types (gh-122195)
(cherry picked from commit 33d32faa58, AKA gh-122192)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2024-07-23 20:22:24 +00:00
Miss Islington (bot) 214b430faf
[3.13] gh-121973: Fix flaky test_pyrepl tests (GH-122140) (GH-122173)
This fixes the flakiness in:
* test_inspect_keeps_globals_from_inspected_file
* test_inspect_keeps_globals_from_inspected_module

The output already includes newlines. Adding newlines for every entry in
the output list introduces non-determinism because it added '\n' in
places where stdout is flushed or some buffer becomes full.

The regex also needed to be updated because pyrepl includes control
characters -- the visible output on each line doesn't immediately follow
a newline character.

(cherry picked from commit 2c1b1e7a07)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-23 15:57:24 +02:00
Miss Islington (bot) 7767534df9
[3.13] gh-122088: Copy the coroutine status of the underlying callable in `@warnings.deprecated` (GH-122086) (#122156)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-23 10:24:07 +00:00
Miss Islington (bot) 4892cc072a
[3.13] Refactor test_capi.test_long (GH-122113) (GH-122137)
Share common code for tests for PyLong_As*() functions.
(cherry picked from commit 69f2dc5c06)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2024-07-23 10:01:13 +03:00
Miss Islington (bot) f00ba7335a
[3.13] gh-99242 Ignore error when running regression tests under certain conditions. (GH-121663) (GH-121669)
(cherry picked from commit 0759cecd9d)

Co-authored-by: Bas Bloemsaat <bas@bloemsaat.com>
Co-authored-by: Kevin Diem <kg.diem@gmail.com>
2024-07-22 14:53:46 +02:00
Miss Islington (bot) 148beb6de9
[3.13] gh-121957: Emit audit events for `python -i` and `python -m asyncio` (GH-121958) (GH-122115)
Relatedly, emit the `cpython.run_startup` event from the Python version of
`PYTHONSTARTUP` handling.
(cherry picked from commit dc93d1125f)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-22 13:36:57 +02:00
Miss Islington (bot) bd5121b1c0
[3.13] gh-121988: Fix test hang when pyrepl is not available (GH-121990) (#122064)
gh-121988: Fix test hang when pyrepl is not available (GH-121990)

Also explicitly fail the test if we timeout while waiting for output so
that this failure mode is caught earlier.
(cherry picked from commit a09e215abf)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-20 14:32:41 +00:00
Miss Islington (bot) a6c1081cbe
[3.13] gh-122026: Fix identification of mismatched parentheses inside f-strings (GH-122028) (#122041) 2024-07-19 17:32:34 +00:00
Miss Islington (bot) 9a332f260d
[3.13] gh-120930: Remove extra blank occuring in wrapped encoded words in email headers (GH-121747) (GH-121963)
gh-120930: Remove extra blank occuring in wrapped encoded words in email headers (GH-121747)
(cherry picked from commit cecaceea31)

Co-authored-by: Matthieu Caneill <matthieucan@users.noreply.github.com>
2024-07-19 19:21:53 +02:00
Miss Islington (bot) e88114567f
[3.13] gh-122014: Account for abi_thread in test_sysconfig.test_user_similar (gh-122017) (#122039)
(cherry picked from commit 186b4d8ea2)

Co-authored-by: Karolina Surma <33810531+befeleme@users.noreply.github.com>
2024-07-19 17:13:41 +00:00
Miss Islington (bot) 963e97d901
[3.13] gh-59022: Added tests for `pkgutil.extend_path` (GH-121673) (GH-121951)
This adds tests for the documented behaviour of `pkgutil.extend_path`
regarding different argument types as well as for `*.pkg` files.
(cherry picked from commit 8f2532168b)

Co-authored-by: Andreas Stocker <andreas@stocker.co.it>
2024-07-19 16:35:51 +02:00
Miss Islington (bot) 58a84e58f4
[3.13] gh-121657: Additional `yield from` error test using lambda (GH-121722) (GH-121961)
(cherry picked from commit 1056f2bc20)

Co-authored-by: Gregor <36135323+gege-hoho@users.noreply.github.com>
2024-07-19 13:50:34 +02:00
Serhiy Storchaka a45d9051ed
[3.13] gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) (GH-122012)
(cherry picked from commit 1a0c7b9ba4)
2024-07-19 09:13:08 +00:00
Miss Islington (bot) 721a7dde11
[3.13] gh-120289: Disallow disable() and clear() in external timer to prevent use-after-free (GH-120297) (#121984)
gh-120289: Disallow disable() and clear() in external timer to prevent use-after-free (GH-120297)
(cherry picked from commit 1ab1778283)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-07-18 13:26:47 -07:00
Miss Islington (bot) 233ed46e6d
[3.13] gh-118934: Make PyEval_GetLocals return borrowed reference (GH-119769) (#121869)
gh-118934: Make PyEval_GetLocals return borrowed reference (GH-119769)
(cherry picked from commit e65cb4c6f0)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-07-19 01:38:28 +10:00
Thomas Wouters 567c38b4eb Python 3.13.0b4 2024-07-18 11:41:38 +02:00
Miss Islington (bot) 91e098f44d
[3.13] gh-120678: Guard against stdin.fileno() being unavailable (GH-121924) (#121929)
gh-120678: Guard against stdin.fileno() being unavailable (GH-121924)
(cherry picked from commit 19cbf8fd63)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-17 16:33:28 +00:00
Miss Islington (bot) 3d9692dbf8
[3.13] gh-120678: pyrepl: Include globals from modules passed with `-i` (GH-120904) (#121916)
(cherry picked from commit ac07451116)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-17 16:52:46 +02:00
Miss Islington (bot) 5a8e1373fe
[3.13] gh-78889: Stop IDLE Shell freezes from sys.stdout.shell.xyz (GH-121876) (#121911)
gh-78889: Stop IDLE Shell freezes from sys.stdout.shell.xyz (GH-121876)

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

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-07-17 14:10:13 +00:00
Miss Islington (bot) c6ef5aca61
[3.13] gh-119698: fix a special case in `symtable.Class.get_methods` (GH-121802) (#121909)
(cherry picked from commit 6682d91678)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-17 13:54:40 +00:00
Miss Islington (bot) 72cd53ea15
[3.13] gh-121863: Immortalize names in code objects to avoid crash (GH-121903) (GH-121904)
(cherry picked from commit cffad5c6ef)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-07-17 09:55:22 +00:00