aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test
Commit message (Collapse)AuthorAge
* gh-132617: Fix `dict.update()` mutation check (gh-134815)Sam Gross11 hours
| | | | | | Use `ma_used` instead of `ma_keys->dk_nentries` for modification check so that we only check if the dictionary is modified, not if new keys are added to a different dictionary that shared the same keys object.
* gh-131798: JIT: replace _CHECK_METHOD_VERSION with ↵Nadeshiko Manju22 hours
| | | | | | _CHECK_FUNCTION_VERSION_INLINE (GH-135022) Signed-off-by: Manjusaka <me@manjusaka.me> Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* gh-67022: Document bytes/str inconsistency in email.header.decode_header() ↵Dan Lenski32 hours
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | and suggest email.headerregistry.HeaderRegistry as a sane alternative (#92900) * gh-67022: Document bytes/str inconsistency in email.header.decode_header() This function's possible return types have been surprising and error-prone for the entirety of its Python 3.x history. It can return either: 1. `typing.List[typing.Tuple[bytes, typing.Optional[str]]]` of length >1 2. or `typing.List[typing.Tuple[str, None]]`, of length exactly 1 This means that any user of this function must be prepared to accept either `bytes` or `str` for the first member of the 2-tuples it returns, which is a very surprising behavior in Python 3.x, particularly given that the second member of the tuple is supposed to represent the charset/encoding of the first member. This patch documents the behavior of this function, and adds test cases to demonstrate it. As discussed in bpo-22833, this cannot be changed in a backwards-compatible way, and some users of this function depend precisely on the existing behavior. Add warnings about obsolescence of 'email.header.decode_header' and 'email.header.make_header' functions. Recommend use of `email.headerregistry.HeaderRegistry` instead, as suggested in https://github.com/python/cpython/pull/92900#discussion_r1112472177
* gh-127319: Disable port reuse on HTTP, XMLRPC, and logging TCP servers ↵Jeremy Cline46 hours
| | | | | | | | | | | (GH-135405) Prior to issue #120485 these servers did not allow port reuse, which makes sense as the behavior of port reuse is surprising if you're not expecting it. It's unclear to me why these services were switched to allow port reuse, but I believe the desired behavior (unless subclasses opt in) is to not allow port reuse. See also: https://bugzilla.redhat.com/show_bug.cgi?id=2323170
* gh-135371: Fix asyncio introspection output to include internal coroutine ↵Pablo Galindo Salgado3 days
| | | | chains (#135436)
* gh-135368: Fix mocks on dataclass specs with `instance=True` (#135421)sobolevn3 days
| | | | | | | | | * gh-135368: Fix mocks on dataclass specs with `instance=True` * Extend dataclass mock_methods --------- Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* gh-135496: Fix f string exclamation mark error typo (#135495)GiGaGon3 days
|
* gh-135437: Account For Duplicate Names in _PyCode_SetUnboundVarCounts() ↵Eric Snow3 days
| | | | (gh-135438)
* gh-135462: Fix quadratic complexity in processing special input in ↵Serhiy Storchaka3 days
| | | | | | HTMLParser (GH-135464) End-of-file errors are now handled according to the HTML5 specs -- comments and declarations are automatically closed, tags are ignored.
* Revert "gh-135410: use a critical section around `StringIO.__next__` ↵Peter Bierma4 days
| | | | | (#135412)" (#135439) This reverts commit e6c3039cb39e68ae9af9ddcaca341c5af8f9cf23.
* gh-135429: Fix the argument mismatch in lsprof throw event (#135442)Tian Gao4 days
|
* gh-133390: Support SQL keyword completion for sqlite3 CLI (GH-133393) ↵Petr Viktorin5 days
| | | | | (GH-135292) Co-authored-by: Tan Long <tanloong@foxmail.com>
* gh-135410: use a critical section around `StringIO.__next__` (#135412)Peter Bierma5 days
|
* gh-134939: Add the concurrent.interpreters Module (gh-133958)Eric Snow5 days
| | | | | | PEP-734 has been accepted (for 3.14). (FTR, I'm opposed to putting this under the concurrent package, but doing so is the SC condition under which the module can land in 3.14.)
* GH-135379: Remove types from stack items in code generator. (GH-135384)Mark Shannon6 days
| | | | * Make casts explicit in the instruction definitions
* gh-135321: Always raise a correct exception for BINSTRING argument > ↵Justin Applegate6 days
| | | | | 0x7fffffff in pickle (GH-135322) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-135326: Test support of __index__ in random.getrandbits() (#135356)Serhiy Storchaka6 days
|
* gh-133967: Do not normalize locale name 'C.UTF-8' to 'en_US.UTF-8' (#135347)Serhiy Storchaka7 days
|
* gh-130077: Properly match full soft keywords in the parser (#135317)Pablo Galindo Salgado7 days
|
* gh-132969: Fix error/hang when shutdown(wait=False) and task exited ↵Ajay Kamdar7 days
| | | | | | | | | | | | | | | 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)
* gh-116738: Make _heapq module thread-safe (#135036)Alper7 days
| | | | | | | 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>
* gh-135001: Explicitly specify the encoding parameter value of ↵Wulian2338 days
| | | | `calendar.HTMLCalendar` as 'utf-8' (#135002)
* gh-131798: Optimize `_UNARY_INVERT` (GH-135222)Noam Cohen8 days
|
* gh-135276: Refresh `zipfile.Path` from zipp 3.23 (#135277)Jason R. Coombs8 days
| | | | Apply changes from zipp 3.23
* gh-134151 Fix `TypeError` in `email.utils.decode_params` when sorting RFC ↵Jiucheng(Oliver)9 days
| | | | | | 2231 continuations (#134687) - Fix sorting logic in `email.utils.decode_params` to handle None values. - Update tests for RFC 2231 continuation sorting.
* GH-131798: Type-propagate string/list/tuple slices (GH-134671)Amit Lavon9 days
|
* Revert "gh-133390: Support SQL keyword completion for sqlite3 CLI (#133393)" ↵Petr Viktorin10 days
| | | | | | temporarily (GH-135232) This reverts commit 62b3d2d443785c4ea5262edb4f9f7040440f9463, which broke buildbots
* GH-131798: Optimize away type(x) in the JIT when the result is known (GH-135194)Tomas R.10 days
|
* gh-133390: Support SQL keyword completion for sqlite3 CLI (#133393)Tan Long11 days
|
* gh-134891: Add PyUnstable_Unicode_GET_CACHED_HASH (GH-134892)Petr Viktorin11 days
|
* gh-134036: Update test_syntax for gh-133999 (#135204)Victor Stinner11 days
|
* gh-135120: Add test.support.subTests() (GH-135121)Serhiy Storchaka11 days
|
* gh-134036: Improve error messages for invalid `raise` statements (#134077)sobolevn11 days
|
* GH-132554: Fix tier2 `FOR_ITER` implementation and optimizations (GH-135137)Mark Shannon11 days
|
* gh-134155: fix AttributeError in email._header_value_parser.get_address ↵Sergey Miryanov11 days
| | | | | | | | (#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>
* gh-135166: Fix exception type expected by test.test_zstd (GH-135167)Weipeng Hong11 days
|
* gh-134938: Add set_pledged_input_size() to ZstdCompressor (GH-135010)Emma Smith12 days
|
* gh-135124: Change stdout errors in regrtest worker process (#135138)Victor Stinner12 days
| | | | | | | | | 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.
* gh-134889: Fix handling of a few opcodes when optimizing `LOAD_FAST` (#134958)mpage12 days
| | | 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.
* gh-126483: disable warnings filters mutation in concurrent test (GH-132694)Thomas Grainger13 days
| | | | | | 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.
* gh-135074: Fix exception messages in test.support module (GH-135076)Daniel Hollas13 days
|
* gh-134248 test_getallocatedblocks pre-check to ignore immortalized strings ↵tpburns13 days
| | | | | | | (#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.
* gh-135034: Normalize link targets in tarfile, add ↵Łukasz Langa14 days
| | | | | | | | | | | `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>
* gh-131884: Fix incorrect formatting in json.dumps() when using indent and ↵Roei Ben Artzi14 days
| | | | skipkeys=True (GH-132200)
* gh-135028: Increase parser MAXSTACK for nested parenthesis (#135031)Victor Stinner14 days
|
* gh-132813: Improve error messages for incorrect types and values of ↵Serhiy Storchaka2025-06-02
| | | | | | 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.
* gh-133454: Mark test_queue tests with many threads as bigmem (gh-134575)Serhiy Storchaka2025-06-02
| | | 50 producer and 50 consumer threads need more than 5GB of memory.
* gh-66234: Add flag to disable the use of mmap in dbm.gnu (GH-135005)Serhiy Storchaka2025-06-02
| | | | This may harm performance, but improve crash tolerance.
* gh-134908: Protect `textiowrapper_iternext` with critical section (gh-134910)Duane Griffin2025-06-02
| | | | The `textiowrapper_iternext` function called `_textiowrapper_writeflush`, but did not use a critical section, making it racy in free-threaded builds.
* gh-130999: Fix globals() poisoning in test_traceback (gh-135030)Łukasz Langa2025-06-02
|