Commit graph

34551 commits

Author SHA1 Message Date
Petr Viktorin
75a1cbdd38
gh-140748: socket_helper.transient_internet: Unwrap UrlError.__cause__ (GH-140749) 2025-10-30 12:14:17 +01:00
Serhiy Storchaka
09b1f10ef7
gh-140481: Improve error message when trying to iterate a Tk widget, image or font (GH-140501) 2025-10-30 13:11:56 +02:00
Serhiy Storchaka
ad0a3f733b
gh-131927: Do not emit PEP 765 warnings in ast.parse() (GH-139642)
ast.parse() no longer emits syntax warnings for
return/break/continue in finally (see PEP-765) -- they are only
emitted during compilation.
2025-10-30 13:00:42 +02:00
Serhiy Storchaka
327dbbedff
gh-138162: Fix logging.LoggerAdapter with merge_extra=True and without the extra argument (GH-140511) 2025-10-30 12:52:02 +02:00
Donghee Na
c45e6e1bb3
gh-137821: Improve Argument Clinic definitions in the `_json` module (#140780) 2025-10-30 10:32:08 +00:00
Stan Ulbrych
dbe3950a76
gh-129117: Add unicodedata.isxidstart() function (#140269)
Expose `_PyUnicode_IsXidContinue/Start` in `unicodedata`:
add isxidstart() and isxidcontinue() functions.

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-30 10:18:12 +00:00
Stan Ulbrych
c74793c450
gh-140741: Fix test added in gh-140745 (#140760)
Commit
2025-10-29 16:10:58 +00:00
Mikhail Efimov
8706167474
gh-140576: Fixed crash produced by lexer in case of dedented zero byte (#140583) 2025-10-29 13:27:35 +00:00
Cody Maloney
6ff62ac4fb
gh-140082: Forward colorizing from libregrtest to unittest (#140083)
libregrtest redirects test output to a file as part of its operation.
When `unittest` checks to see if it should colorize with
`isatty(sys.stdout)` that fails resulting in no colorizing of the
unittest output.

Update `libregrtest` to set `FORCE_COLOR=1` when redirecting test output
so that unittest will do color printing.

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-29 13:33:44 +01:00
Victor Stinner
376559bf54
gh-140702: Log color and GHA env vars in test.pythoninfo (#140747) 2025-10-29 13:29:10 +01:00
Stan Ulbrych
d3aa5f689c
gh-140741: Fix profiling.sampling handling of error raised by target (#140745) 2025-10-29 11:38:28 +00:00
Mikhail Efimov
02202c117b
gh-140551: Fix dict crash if clear is called at lookup stage (#140558)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2025-10-29 14:36:23 +05:30
Russell Keith-Magee
9f8d005d29
gh-140702: Add test skip for Unix Datagram tests on iOS when on Github Actions (#140740)
Exposes the GITHUB_ACTIONS environment variable to iOS simulator test runs, and
uses this variable to skip a Unix Datagram socketserver test that is unreliable
in the iOS GitHub Actions environment.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-10-29 08:33:04 +00:00
Frost Ming
058bc182b9
gh-139940: Handle RuntimeError when attaching to a non-existing process in pdb. (#139941) 2025-10-28 23:12:12 -07:00
Victor Stinner
c6d4c79c9a
gh-140657: Don't rerun test_import single phase init test (GH-140712)
test_basic_multiple_interpreters_main_no_reset() leaks memory:
import_in_subinterp() is called with postcleanup=False.
2025-10-28 18:05:03 +01:00
Mikhail Efimov
88ad41fa34
gh-139951: Tests on tuple GC tracking (#140575) 2025-10-28 10:55:41 +01:00
Sergey Miryanov
d26686a7f8
GH-140590: Fix setstate for functools.partial C-module (GH-140671)
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
2025-10-28 10:28:32 +01:00
Serhiy Storchaka
364ae607d8
gh-140634: Fix a reference counting bug in os.sched_param.__reduce__() (GH-140667) 2025-10-27 21:42:32 +02:00
Ken Jin
a716091227
gh-140104: Set next_instr properly in the JIT during exceptions (GH-140233)
Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2025-10-27 18:26:47 +00:00
Cody Maloney
0f0a362768
gh-140607: Validate returned byte count in RawIOBase.read (#140611)
While `RawIOBase.readinto` should return a count of bytes between 0 and
the length of the given buffer, it is not required to. Add validation
inside RawIOBase.read() that the returned byte count is valid.

Co-authored-by: Shamil <ashm.tech@proton.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-27 18:06:46 +00:00
Stan Ulbrych
e03d8e4f50
gh-79922: Remove always false test skips in test_time (#136202) 2025-10-27 15:09:25 +00:00
Alper
9479a62a51
gh-116738: Use PyMutex for bz2 module (gh-140555)
The methods are already wrapped with a lock, which makes them thread-safe in
free-threaded build. This replaces `PyThread_acquire_lock` with `PyMutex` and
removes some macros and allocation handling code.

Also add a test for free-threading to ensure we aren't getting data races and
that the locking is working.
2025-10-27 09:52:30 -04:00
Brian Schubert
3dab11f888
gh-138944: Fix SyntaxError message for invalid syntax following valid import-as statement (#138945) 2025-10-26 22:35:21 +00:00
Bartosz Sławecki
06c779474c
gh-137568: Ignore startup file in test_dumb_terminal_exits_cleanly (GH-140295) 2025-10-26 10:48:03 -04:00
Sebastian Pipping
e34a5e3304
gh-140593: Fix a memory leak in function my_ElementDeclHandler of pyexpat (#140602)
Ensure that the memory allocated for the content model
passed to `my_ElementDeclHandler` is freed in all error
paths.
2025-10-26 13:45:32 +00:00
Bénédikt Tran
37827c1752
gh-133346: add tests for _colorize.Theme (#139687) 2025-10-26 12:07:31 +00:00
Stan Ulbrych
00026d19c2
gh-76007: Deprecate __version__ attribute in decimal (#140302)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-10-26 12:01:04 +01:00
Tapeline
4f8e7b5ac5
gh-136327: Fix inconsistent `TypeError` messages regarding invalid values after * and ** (#136395) 2025-10-24 19:12:49 +00:00
Barry Warsaw
b3c713a0af
gh-140482: Preserve and restore stty echo as a test environment (#140519)
gh-140482: Restore `stty echo` as a test environment
2025-10-24 11:07:08 -07:00
Mikhail Efimov
be5af997f3
gh-140517: fix leak in map_next in strict mode (#140543) 2025-10-24 21:29:16 +05:30
Jiseok CHOI
aa4b5a77f3
gh-136535: Tests: Correct Py_TPFLAGS_MANAGED_DICT in test_class.py (gh-136538) 2025-10-24 20:20:09 +09:00
sobolevn
92c0c45563
gh-138857: Improve error message for case outside of match (#138858)
* gh-138857: Improve error message for `case` outside of `match`

---------

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2025-10-24 11:20:54 +02:00
Tan Long
161b3064ef
gh-133390: sqlite3 CLI completion for tables, columns, indices, triggers, views, functions, schemata (GH-136101) 2025-10-24 08:26:36 +02:00
Victor Stinner
5d2edf72d2
gh-83714: Set os.statx().stx_mode to None if missing from stx_mask (#140484)
* Set stx_mode to None if STATX_TYPE|STATX_MODE is missing from
  stx_mask.
* Enhance os.statx() tests.
* statx_result structure: remove atime_sec, btime_sec, ctime_sec and
  mtime_sec members. Compute them on demand when stx_atime,
  stx_btime, stx_ctime and stx_mtime are read.
* Doc: fix statx members sorting.
2025-10-23 22:35:17 +02:00
Stan Ulbrych
95953b692d
gh-140471: Fix buffer overflow in AST node initialization with malformed _fields (#140506) 2025-10-23 15:35:21 +00:00
Bartosz Sławecki
1a3da2c070
gh-140438: properly run the asyncio REPL tests (#140298) 2025-10-23 20:53:23 +05:30
George Ogden
4d0849426f
gh-138774: use value to ast.unparse code when str is None in ast.Interpolation (#139415) 2025-10-23 13:56:05 +00:00
Maurycy Pawłowski-Wieroński
6be6f8ff59
gh-137627: Make csv.Sniffer.sniff() delimiter detection 1.6x faster (#137628)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-10-23 15:28:29 +03:00
Stan Ulbrych
aa9d0a61d5
gh-140474: Fix memory leak in array.array (GH-140478) 2025-10-23 05:49:27 -04:00
Bartosz Sławecki
b3b0d75069
gh-140253: Improve the syntax error from an ill-positioned double-star subpattern (#140254) 2025-10-22 21:29:14 +03:00
Stefano Rivera
76fea5596c
gh-130317: Fix SNaN broken tests on HP PA RISC (#140452)
While looking at #140028, I found some unrelated test regressions in the
3.14 cycle. These seem to all come from #130317. From what I can tell,
that made Python more correct than it was before. According to [0], HP PA
RISC uses 1 for SNaN and thus a 0 for QNaN.

[0]: https://grouper.ieee.org/groups/1788/email/msg03272.html
2025-10-22 18:36:12 +02:00
Jakob
d2f3cfd384
gh-140448: Default suggest_on_error to True in argparse.ArgumentParser (#140450) 2025-10-22 16:15:26 +00:00
Victor Stinner
7339cf7899
gh-83714: Use "stx_" prefix for all os.statx_result members (#140432)
Rename stx_birthtime to stx_btime, and rename stx_birthtime_ns to
stx_btime_ns.
2025-10-22 11:48:37 +02:00
Alper
b3a38438d8
gh-116738: Make _suggestions module thread-safe (gh-140321) 2025-10-22 09:14:48 +09:00
Russell Keith-Magee
29b38b7aae
gh-55258: Skip tests of stdout status on mobile platforms (#140401)
Skip tests of stdout status on mobile platforms.
2025-10-22 07:12:26 +08:00
Stan Ulbrych
02c1abfc54
gh-69528: Distinguish between file modes "wb+" and "rb+" (GH-137834)
Co-authored-by: Xiang Zhang <angwerzx@126.com>
2025-10-21 20:33:30 +03:00
David Ellis
95c257e2e6
gh-138764: annotationlib: Make call_annotate_function fallback to using VALUE annotations if both the requested format and VALUE_WITH_FAKE_GLOBALS are not implemented (#138803) 2025-10-21 15:57:43 +00:00
Mark Shannon
0c01090ad9
GH-139951: Fix major GC performance regression (GH-140262)
* Count number of actually tracked objects, instead of trackable objects. This ensures that untracking tuples has the desired effect of reducing GC overhead

* Do not track most untrackable tuples during creation. This prevents large numbers of small tuples causing execessive GCs.
2025-10-21 15:22:15 +01:00
Peter Bierma
71db05a12d
gh-140406: Fix memory leak upon __hash__ returning a non-integer (GH-140411) 2025-10-21 08:10:01 -04:00
Victor Stinner
fe4b60208e
gh-83714: Fix os.statx() tests on tmpfs: st_birthtime can be None (#140407) 2025-10-21 10:24:49 +00:00