Mark Shannon
c87b5b2cb6
GH-135379: Remove types from stack items in code generator. (GH-135384)
...
* Make casts explicit in the instruction definitions
2025-06-11 15:52:25 +01:00
Justin Applegate
2b8b4774d2
gh-135321: Always raise a correct exception for BINSTRING argument > 0x7fffffff in pickle (GH-135322)
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-06-11 10:15:12 +00:00
Serhiy Storchaka
5ae669fc4e
gh-135326: Test support of __index__ in random.getrandbits() ( #135356 )
2025-06-10 18:51:08 -07:00
Serhiy Storchaka
0f866cbfef
gh-133967: Do not normalize locale name 'C.UTF-8' to 'en_US.UTF-8' ( #135347 )
2025-06-10 13:38:32 +00:00
Pablo Galindo Salgado
ff2b5f40c2
gh-130077: Properly match full soft keywords in the parser ( #135317 )
2025-06-10 14:19:03 +01:00
Ajay Kamdar
598aa7cc98
gh-132969: Fix error/hang when shutdown(wait=False) and task exited abnormally (GH-133222)
...
When shutdown is called with wait=False, the executor thread keeps running
even after the ProcessPoolExecutor's state is reset. The executor then tries
to replenish the worker processes pool resulting in an error and a potential hang
when it comes across a worker that has died. Fixed the issue by having
_adjust_process_count() return without doing anything if the ProcessPoolExecutor's
state has been reset.
Added unit tests to validate two scenarios:
max_workers < num_tasks (exception)
max_workers > num_tasks (exception + hang)
2025-06-10 13:28:31 +02:00
Alper
a58026a5e3
gh-116738: Make _heapq module thread-safe ( #135036 )
...
Use critical sections to make heapq methods that update the heap thread-safe when the GIL is disabled.
---------
Co-authored-by: mpage <mpage@meta.com>
2025-06-09 10:57:29 -07:00
Wulian233
f90483e13a
gh-135001: Explicitly specify the encoding parameter value of calendar.HTMLCalendar as 'utf-8' ( #135002 )
2025-06-09 15:40:09 +02:00
Noam Cohen
b150b6aca7
gh-131798: Optimize _UNARY_INVERT (GH-135222)
2025-06-09 18:33:18 +08:00
Jason R. Coombs
8d6eb0c262
gh-135276: Refresh zipfile.Path from zipp 3.23 ( #135277 )
...
Apply changes from zipp 3.23
2025-06-08 19:20:20 +00:00
Jiucheng(Oliver)
bcb6b45cb8
gh-134151 Fix TypeError in email.utils.decode_params when sorting RFC 2231 continuations ( #134687 )
...
- Fix sorting logic in `email.utils.decode_params` to handle None values.
- Update tests for RFC 2231 continuation sorting.
2025-06-08 09:13:21 +02:00
Amit Lavon
8fdbbf8b18
GH-131798: Type-propagate string/list/tuple slices (GH-134671)
2025-06-07 14:08:44 -07:00
Petr Viktorin
24069fbca8
Revert "gh-133390: Support SQL keyword completion for sqlite3 CLI ( #133393 )" temporarily (GH-135232)
...
This reverts commit 62b3d2d443 ,
which broke buildbots
2025-06-07 08:56:43 +00:00
Tomas R.
46151648ca
GH-131798: Optimize away type(x) in the JIT when the result is known (GH-135194)
2025-06-06 16:44:43 -07:00
Tan Long
62b3d2d443
gh-133390: Support SQL keyword completion for sqlite3 CLI ( #133393 )
2025-06-06 16:52:41 +02:00
Petr Viktorin
e413e26719
gh-134891: Add PyUnstable_Unicode_GET_CACHED_HASH (GH-134892)
2025-06-06 15:51:00 +02:00
Victor Stinner
82415acf62
gh-134036: Update test_syntax for gh-133999 ( #135204 )
2025-06-06 12:22:14 +00:00
Serhiy Storchaka
6ef06fad84
gh-135120: Add test.support.subTests() (GH-135121)
2025-06-06 13:52:48 +02:00
sobolevn
0d9ccc87a2
gh-134036: Improve error messages for invalid raise statements ( #134077 )
2025-06-06 01:51:06 +01:00
Mark Shannon
b90ecea9e6
GH-132554: Fix tier2 FOR_ITER implementation and optimizations (GH-135137)
2025-06-05 18:53:57 +01:00
Sergey Miryanov
d9cad074d5
gh-134155: fix AttributeError in email._header_value_parser.get_address ( #134194 )
...
Append the defect to defects instead of to the parse tree.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-05 13:28:11 -04:00
Weipeng Hong
1b55e12766
gh-135166: Fix exception type expected by test.test_zstd (GH-135167)
2025-06-05 17:00:07 +01:00
Emma Smith
4b44b3409a
gh-134938: Add set_pledged_input_size() to ZstdCompressor (GH-135010)
2025-06-05 14:31:49 +03:00
Victor Stinner
3d396ab759
gh-135124: Change stdout errors in regrtest worker process ( #135138 )
...
Set sys.stdout encoder error handler to backslashreplace in regrtest
workers to avoid UnicodeEncodeError when printing a traceback
or any other non-encodable character.
Move the code from the Regrtest class to setup_process().
Call setup_process() earlier, before displaying regrtest headers.
2025-06-05 11:17:03 +02:00
mpage
6b77af257c
gh-134889: Fix handling of a few opcodes when optimizing LOAD_FAST ( #134958 )
...
We were incorrectly handling a few opcodes that leave their operands on the stack. Treat all of these conservatively; assume that they always leave operands on the stack.
2025-06-04 16:07:58 -07:00
Thomas Grainger
40c8be0008
gh-126483: disable warnings filters mutation in concurrent test (GH-132694)
...
The `test_ssl_in_multiple_threads` test failed because `test_check_hostname_idn()`
modified the global warnings filters via `warnings_helper.check_no_resource_warning()`.
Only check for warnings when the context aware warnings feature is enabled, which makes
the warnings filter context-local and thread-safe.
2025-06-04 09:00:25 -04:00
Daniel Hollas
bc00ce941e
gh-135074: Fix exception messages in test.support module (GH-135076)
2025-06-04 14:58:34 +02:00
tpburns
54ca55978e
gh-134248 test_getallocatedblocks pre-check to ignore immortalized strings ( #134871 )
...
When sanity checking against gettotalrefcount(), we exclude the blocks for
immortalized strings since their references are not tracked/reported. This
now matches refleak.py's book-keeping using the same functions.
2025-06-03 18:00:25 +02:00
Łukasz Langa
3612d8f517
gh-135034: Normalize link targets in tarfile, add os.path.realpath(strict='allow_missing') ( #135037 )
...
Addresses CVEs 2024-12718, 2025-4138, 2025-4330, and 2025-4517.
Signed-off-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-06-03 12:42:11 +02:00
Roei Ben Artzi
ec12559eba
gh-131884: Fix incorrect formatting in json.dumps() when using indent and skipkeys=True (GH-132200)
2025-06-03 10:40:25 +03:00
Victor Stinner
6e80f11eb5
gh-135028: Increase parser MAXSTACK for nested parenthesis ( #135031 )
2025-06-03 08:40:45 +02:00
Serhiy Storchaka
df98a47a61
gh-132813: Improve error messages for incorrect types and values of csv.Dialog attributes (GH-133241)
...
Make them similar to PyArg_Parse error messages, mention None as
a possible value, show a wrong type and the string length.
2025-06-02 23:35:41 +03:00
Serhiy Storchaka
7a79f52d83
gh-133454: Mark test_queue tests with many threads as bigmem (gh-134575)
...
50 producer and 50 consumer threads need more than 5GB of memory.
2025-06-02 23:25:32 +03:00
Serhiy Storchaka
0cec424af5
gh-66234: Add flag to disable the use of mmap in dbm.gnu (GH-135005)
...
This may harm performance, but improve crash tolerance.
2025-06-02 21:08:26 +03:00
Duane Griffin
44fb7c361c
gh-134908: Protect textiowrapper_iternext with critical section (gh-134910)
...
The `textiowrapper_iternext` function called `_textiowrapper_writeflush`, but did not
use a critical section, making it racy in free-threaded builds.
2025-06-02 17:22:41 +00:00
Łukasz Langa
055827528f
gh-130999: Fix globals() poisoning in test_traceback (gh-135030)
2025-06-02 16:57:08 +02:00
Pieter Eendebak
26a1cd4e8c
gh-123471: make concurrent iteration over itertools.cycle safe under free-threading ( #131212 )
...
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-06-02 20:13:32 +05:30
Duane Griffin
b6237c3602
gh-117852: fix argument checking of async_generator.athrow ( #134868 )
...
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-06-02 20:04:26 +05:30
Sergey B Kirpichev
9c72658e49
gh-130662: Accept leading zeros in precision/width for Decimal's formatting ( #132549 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-06-02 15:30:52 +02:00
Sergey B Kirpichev
5bc2d99126
gh-130662: Accept leading zeros in precision/width for Fraction's formatting ( #130663 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-06-02 15:28:20 +02:00
devdanzin
baccfdb3d4
gh-130999: Avoid exiting the new REPL when there are non-string candidates for suggestions (gh-131001)
2025-06-02 13:04:59 +02:00
Sergey B Kirpichev
5f61cde80a
gh-132908: Add math.isnormal/issubnormal() functions (GH132935)
2025-06-02 13:38:05 +03:00
Bénédikt Tran
ee65ebdb50
gh-134978: deprecate string keyword parameter for hash function constructors ( #134979 )
2025-06-02 10:25:50 +02:00
Andrea-Oliveri
f806463e16
gh-134004: Added the reorganize() methods to dbm.sqlite, dbm.dumb and shelve (GH-134028)
...
They are similar to the same named method in dbm.gnu.
2025-06-01 15:30:04 +03:00
Serhiy Storchaka
b595237166
gh-132983: Minor fixes and clean up for the _zstd module (GH-134930)
2025-06-01 11:22:15 +03:00
Itamar Oren
f58873e4b2
gh-134954: Hard-cap max file descriptors in subprocess test fd_status ( #134955 )
...
* Hard-cap max file descriptors in subprocess test fd_status
On some systems, `SC_OPEN_MAX` may return a very large value (i.e. 10**30), leading to the subprocess test timing out (or run forever).
Prevent this situation by applying a hard cap on how many file descriptors are checked.
* Fix typo in usage docstring
s/fd_stats/fd_status/
2025-05-31 07:29:03 -07:00
CF Bolz-Tereick
895119ec24
skip test for sys._stdlib_dir if that is not present ( #134973 )
2025-05-31 13:46:22 +02:00
CF Bolz-Tereick
af0d3268d9
Skip test as cpython_only that checks whether setattr interns the attribute or not ( #134972 )
...
Skip test that checks whether setattr interns the attribute or not
The details of when a string is being interned or not is implementation
dependent.
2025-05-31 13:38:05 +02:00
Bénédikt Tran
379d0bc956
gh-134696: fix hashlib tests for FIPS-only BLAKE-2 buildbot ( #134968 )
2025-05-31 12:48:34 +02:00
Serhiy Storchaka
ad39f01788
gh-108885: Use subtests for doctest examples run by unittest (GH-134890)
...
Run each example as a subtest in unit tests synthesized by
doctest.DocFileSuite() and doctest.DocTestSuite().
Add the doctest.DocTestRunner.report_skip() method.
2025-05-31 13:01:46 +03:00