Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0e52994
Align more parser/SyntaxError messages with CPython 3.14.5
JamesClarke7283 May 29, 2026
535a19d
Fix wasm32_without_js link error: declare host fns as `env` imports
JamesClarke7283 May 29, 2026
3f5db72
Lib/test: drop now-passing expectedFailure markers
JamesClarke7283 May 29, 2026
dc533ce
codegen: align star/double-comma display errors with CPython
JamesClarke7283 May 31, 2026
6f6883e
Lib: un-mark test_pdb_closure as an expected failure
JamesClarke7283 Aug 14, 2026
e7b0fe3
compiler: align 36 more SyntaxError messages with CPython 3.14
JamesClarke7283 Aug 14, 2026
de9d772
Align the remaining runtime error messages with CPython
JamesClarke7283 Aug 14, 2026
cd9c530
sqlite3: fix set_authorizer and align its error messages with CPython
JamesClarke7283 Aug 14, 2026
1d0049b
hashlib: report CPython's argument errors for the hash constructors
JamesClarke7283 Aug 14, 2026
1ac3912
stdlib: align remaining module error messages with CPython 3.14
JamesClarke7283 Aug 16, 2026
77b4c7e
vm: align builtin and runtime error messages with CPython 3.14
JamesClarke7283 Aug 16, 2026
af94627
Lib/test: drop expectedFailure markers that now pass
JamesClarke7283 Aug 16, 2026
93b0351
Fix CI failures from the rebase: macOS/wasm builds, clippy, str.count
JamesClarke7283 Aug 16, 2026
adc4d3a
Fix the remaining CI failures: getaddrinfo port types, macOS clippy
JamesClarke7283 Aug 16, 2026
61bafa0
Fix the last two clippy-only CI failures (macOS, Windows)
JamesClarke7283 Aug 17, 2026
dda93ea
Fix the last Windows clippy failures
JamesClarke7283 Aug 17, 2026
9653df7
array: allow clippy::use_self on the c_ulong conversion for Windows
JamesClarke7283 Aug 17, 2026
57842eb
Code review: close the remaining argument-error gaps in bytes/bytearray
JamesClarke7283 Aug 17, 2026
f79a1d7
expandtabs: convert tabsize with the clinic int converter
JamesClarke7283 Aug 18, 2026
f919d3b
derive: let a function declare its own __text_signature__
JamesClarke7283 Aug 18, 2026
2fc41df
vm: park the overlap test's workers detached
JamesClarke7283 Aug 19, 2026
20a111f
winsound: drop the imports the host_env move left behind
JamesClarke7283 Aug 19, 2026
acce4ce
Code review: fix six error-message defects found against CPython 3.14.7
JamesClarke7283 Aug 19, 2026
88231c8
Merge branch 'main' into align-aug-assign-delete-set-dict-errors
JamesClarke7283 Sep 2, 2026
54dbd95
ci: retrigger after the macOS runner's toolchain download failed
JamesClarke7283 Sep 2, 2026
0db2af0
Name the callee at the bindings that take keywords, and let list.appe…
JamesClarke7283 Sep 2, 2026
43eec46
Declare CPython's text signature on every method that binds FuncArgs …
JamesClarke7283 Sep 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cspell.dict/rustpython.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cfgs
cfunction
miri
py
pyarg
Expand Down
5 changes: 4 additions & 1 deletion Lib/_pydatetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -2326,7 +2326,10 @@ def __sub__(self, other):
if myoff == otoff:
return base
if myoff is None or otoff is None:
raise TypeError("cannot mix naive and timezone-aware time")
# RUSTPYTHON: _pydatetime is the only implementation here, so use
# the message CPython's C _datetime raises rather than this one's.
raise TypeError(
"can't subtract offset-naive and offset-aware datetimes")
return base + otoff - myoff

def __hash__(self):
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_ast/test_ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@ def test_replace_reject_unknown_instance_fields(self):
self.assertIs(node.ctx, context)
self.assertRaises(AttributeError, getattr, node, 'unknown')

@unittest.expectedFailure # TODO: RUSTPYTHON; Wrong error message
@unittest.expectedFailure # TODO: RUSTPYTHON; needs non-string keyword keys to reach the callee instead of being rejected by the call itself
def test_replace_non_str_kwarg(self):
node = ast.Name(id="x")
errmsg = "got an unexpected keyword argument <object object"
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_asyncgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -1835,7 +1835,6 @@ async def run():
res = self.loop.run_until_complete(run())
self.assertEqual(res, [i * 2 for i in range(1, 10)])

@unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: __aiter__
def test_async_gen_expression_incorrect(self):
async def ag():
yield 42
Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,8 +988,6 @@ def test_eval_builtins_mapping(self):
ns = {'__builtins__': types.MappingProxyType({})}
self.assertRaisesRegex(NameError, "name 'superglobal' is not defined",
eval, code, ns)

@unittest.expectedFailure # TODO: RUSTPYTHON; wrong error message
def test_exec_builtins_mapping_import(self):
code = compile("import foo.bar", "test", "exec")
ns = {'__builtins__': types.MappingProxyType({})}
Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_bytes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2013,7 +2013,6 @@ def __index__(self):
self.assertEqual(instance.ba[0], ord("?"), "Assigned bytearray not altered")
self.assertEqual(instance.new_ba, bytearray(0x180), "Wrong object altered")

@unittest.expectedFailure # TODO: RUSTPYTHON; TypeError: unexpected type Evil
def test_search_methods_reentrancy_raises_buffererror(self):
# gh-142560: Raise BufferError if buffer mutates during search arg conversion.
class Evil:
Expand Down Expand Up @@ -2063,7 +2062,6 @@ def __length_hint__(self):

self.assertRaises(ValueError, float, bytearray())

@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: BufferError not raised by hex
def test_hex_use_after_free(self):
# Prevent UAF in bytearray.hex(sep) with re-entrant sep.__len__.
# Regression test for https://github.com/python/cpython/issues/143195.
Expand Down
4 changes: 0 additions & 4 deletions Lib/test/test_coroutines.py
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,6 @@ async def test3():
self.assertEqual(buffer, [i for i in range(1, 21)] +
['what?', 'end'])

@unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: __aiter__
def test_for_2(self):
tup = (1, 2, 3)
refs_before = sys.getrefcount(tup)
Expand All @@ -1620,7 +1619,6 @@ async def foo():

self.assertEqual(sys.getrefcount(tup), refs_before)

@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: "that does not implement __anext__" does not match "'async for' requires an iterator with __anext__ method, got I"
def test_for_3(self):
class I:
def __aiter__(self):
Expand All @@ -1641,7 +1639,6 @@ async def foo():

self.assertEqual(sys.getrefcount(aiter), refs_before)

@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: "async for' received an invalid object.*__anext__.*tuple" does not match "'tuple' object is not an iterator"
def test_for_4(self):
class I:
def __aiter__(self):
Expand Down Expand Up @@ -1789,7 +1786,6 @@ async def foo():
run_async(foo())
self.assertEqual(CNT, 0)

@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: "an invalid object from __anext__" does not match "'F' object is not an iterator"
def test_for_11(self):
class F:
def __aiter__(self):
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_descr.py
Original file line number Diff line number Diff line change
Expand Up @@ -4084,7 +4084,6 @@ def test_ipow_exception_text(self):
y = x ** 2
self.assertIn('unsupported operand type(s) for **', str(cm.exception))

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_pow_wrapper_error_messages(self):
self.assertRaisesRegex(TypeError,
'expected 1 or 2 arguments, got 0',
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,6 @@ class Shenanigans:
self.assertEqual(holds_reference.ref['data'], 42)
self.assertEqual(holds_reference.attr, "whatever")

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_unhashable_key(self):
d = {'a': 1}
key = [1, 2, 3]
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -3036,7 +3036,6 @@ class ThirdFailedStrEnum(StrEnum):
one = '1'
two = b'2', 'ascii', 9

@unittest.expectedFailure # TODO: RUSTPYTHON; fails on encoding testing : TypeError: Expected type 'str' but 'builtin_function_or_method' found
def test_custom_strenum(self):
class CustomStrEnum(str, Enum):
pass
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,6 @@ def test_errno_ENOTDIR(self):
os.listdir(__file__)
self.assertEqual(cm.exception.errno, errno.ENOTDIR, cm.exception)

@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: None != 'Exception ignored while calling dealloca[83 chars]200>'
def test_unraisable(self):
# Issue #22836: PyErr_WriteUnraisable() should give sensible reports
class BrokenDel:
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_extcall.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
... False
True

>>> id(1, **{'foo': 1}) # TODO: RUSTPYTHON # doctest:+EXPECTED_FAILURE
>>> id(1, **{'foo': 1})
Traceback (most recent call last):
...
TypeError: id() takes no keyword arguments
Expand Down
3 changes: 0 additions & 3 deletions Lib/test/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@ def test_with_an_underscore_and_a_comma_in_format_specifier(self):
with self.assertRaisesRegex(ValueError, error_msg):
'{:._,f}'.format(1.1)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_better_error_message_format(self):
# https://bugs.python.org/issue20524
for value in [12j, 12, 12.0, "12"]:
Expand All @@ -551,7 +550,6 @@ def test_better_error_message_format(self):
with self.assertRaisesRegex(ValueError, err):
eval("f'xx{value:{bad_format_spec}}yy'")

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_unicode_in_error_message(self):
str_err = re.escape(
"Invalid format specifier '%ЫйЯЧ' for object of type 'str'")
Expand Down Expand Up @@ -615,7 +613,6 @@ def test_negative_zero(self):
self.assertEqual(f"{-0.:x>z6.1f}", "xxx0.0")
self.assertEqual(f"{-0.:🖤>z6.1f}", "🖤🖤🖤0.0") # multi-byte fill char

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_specifier_z_error(self):
error_msg = re.compile("Invalid format specifier '.*z.*'")
with self.assertRaisesRegex(ValueError, error_msg):
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_fstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,6 @@ def test_nested_fstrings(self):
self.assertEqual(f'{f"{0}"*3}', '000')
self.assertEqual(f'{f"{y}"*3}', '555')

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_invalid_string_prefixes(self):
single_quote_cases = ["fu''",
"uf''",
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -2729,7 +2729,7 @@ def printsolution(self, x):

Our ill-behaved code should be invoked during GC:

>>> with support.catch_unraisable_exception() as cm: # TODO: RUSTPYTHON # doctest: +EXPECTED_FAILURE
>>> with support.catch_unraisable_exception() as cm:
... g = f()
... next(g)
... gen_repr = repr(g)
Expand Down Expand Up @@ -2847,7 +2847,7 @@ def printsolution(self, x):
... raise RuntimeError(message)
... invoke("del failed")
...
>>> with support.catch_unraisable_exception() as cm: # TODO: RUSTPYTHON # doctest: +EXPECTED_FAILURE
>>> with support.catch_unraisable_exception() as cm:
... leaker = Leaker()
... del_repr = repr(type(leaker).__del__)
... del leaker
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_hashlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ def test_clinic_signature(self):
self._hashlib.new(digest_name, data=b'')
self._hashlib.new(digest_name, string=b'')

@unittest.expectedFailure # TODO: RUSTPYTHON; duplicate positional/keyword arg error message differs
@unittest.skipIf(get_fips_mode(), "skip in FIPS mode")
def test_clinic_signature_errors(self):
nomsg = b''
Expand Down
12 changes: 10 additions & 2 deletions Lib/test/test_json/test_scanstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,19 @@ def test_bad_escapes(self):
with self.assertRaises(self.JSONDecodeError, msg=s):
scanstring(s, 1, True)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_overflow(self):
with self.assertRaises(OverflowError):
self.json.decoder.scanstring("xxx", sys.maxsize+1)


class TestPyScanstring(TestScanstring, PyTest): pass
class TestPyScanstring(TestScanstring, PyTest):
# TODO: RUSTPYTHON; the pure-Python scanner reports Unterminated string
# instead of OverflowError for out-of-range indices
@unittest.expectedFailure
def test_overflow(self):
with self.assertRaises(OverflowError):
self.json.decoder.scanstring("xxx", sys.maxsize+1)


class TestCScanstring(TestScanstring, CTest): pass
class TestCScanstring(TestScanstring, CTest): pass
2 changes: 0 additions & 2 deletions Lib/test/test_lzma.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def test_simple_bad_args(self):
lzd.decompress(empty)
self.assertRaises(EOFError, lzd.decompress, b"quux")

@unittest.expectedFailure # TODO: RUSTPYTHON; lzma.LZMAError: Failed to initialize encoder
def test_bad_filter_spec(self):
self.assertRaises(TypeError, LZMACompressor, filters=[b"wobsite"])
self.assertRaises(ValueError, LZMACompressor, filters=[{"xyzzy": 3}])
Expand Down Expand Up @@ -675,7 +674,6 @@ def test_init_bad_preset(self):
with self.assertRaises(ValueError):
LZMAFile(BytesIO(COMPRESSED_XZ), preset=3)

@unittest.expectedFailure # TODO: RUSTPYTHON; lzma.LZMAError: Failed to initialize encoder
def test_init_bad_filter_spec(self):
with self.assertRaises(TypeError):
LZMAFile(BytesIO(), "w", filters=[b"wobsite"])
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_marshal.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,6 @@ def test_loads_reject_unicode_strings(self):
unicode_string = 'T'
self.assertRaises(TypeError, marshal.loads, unicode_string)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_bad_reader(self):
class BadReader(io.BytesIO):
def readinto(self, buf):
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_mmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,6 @@ def __index__(self):
self.assertEqual(m.madvise(mmap.MADV_NORMAL, 0, Number()), None)
self.assertEqual(m.madvise(mmap.MADV_NORMAL, 0, size), None)

@unittest.expectedFailureIf(sys.platform in ("linux", "win32"), "TODO: RUSTPYTHON")
def test_resize_up_anonymous_mapping(self):
"""If the mmap is backed by the pagefile ensure a resize up can happen
and that the original data is still in place
Expand Down
6 changes: 3 additions & 3 deletions Lib/test/test_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1960,12 +1960,12 @@ def test_pdb_run_with_incorrect_argument():
"""Testing run and runeval with incorrect first argument.

>>> pti = PdbTestInput(['continue',])
>>> with pti: # TODO: RUSTPYTHON # doctest: +EXPECTED_FAILURE
>>> with pti:
... pdb_invoke('run', lambda x: x)
Traceback (most recent call last):
TypeError: exec() arg 1 must be a string, bytes or code object

>>> with pti: # TODO: RUSTPYTHON # doctest: +EXPECTED_FAILURE
>>> with pti:
... pdb_invoke('runeval', lambda x: x)
Traceback (most recent call last):
TypeError: eval() arg 1 must be a string, bytes or code object
Expand Down Expand Up @@ -2806,7 +2806,7 @@ def test_pdb_closure():
... g = 3
... import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace()

>>> with PdbTestInput([ # TODO: RUSTPYTHON # doctest: +NORMALIZE_WHITESPACE +EXPECTED_FAILURE
>>> with PdbTestInput([ # doctest: +NORMALIZE_WHITESPACE
... 'k',
... 'g',
... 'y = y',
Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_plistlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1137,8 +1137,6 @@ def test_dump_aware_datetime_without_aware_datetime_option(self):
msg = "can't subtract offset-naive and offset-aware datetimes"
with self.assertRaisesRegex(TypeError, msg):
plistlib.dumps(dt, fmt=plistlib.FMT_BINARY, aware_datetime=False)

@unittest.expectedFailure # TODO: RUSTPYTHON; Wrong error message
def test_dump_utc_aware_datetime_without_aware_datetime_option(self):
dt = datetime.datetime(2345, 6, 7, 8, tzinfo=datetime.UTC)
msg = "can't subtract offset-naive and offset-aware datetimes"
Expand Down
3 changes: 0 additions & 3 deletions Lib/test/test_posix.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,6 @@ def test_fstat(self):
finally:
fp.close()

@unittest.expectedFailure # TODO: RUSTPYTHON
@unittest.skipUnless(hasattr(posix, 'stat'),
'test needs posix.stat()')
@unittest.skipUnless(os.stat in os.supports_follow_symlinks,
Expand Down Expand Up @@ -2043,8 +2042,6 @@ def test_scheduler_allow_none(self):
path, args = self.NOOP_PROGRAM[0], self.NOOP_PROGRAM
pid = self.spawn_func(path, args, os.environ, scheduler=None)
support.wait_process(pid, exitcode=0)

@unittest.expectedFailure # TODO: RUSTPYTHON; Wrong error message
@support.subTests("scheduler", [object(), 1, [1, 2]])
def test_scheduler_wrong_type(self, scheduler):
path, args = self.NOOP_PROGRAM[0], self.NOOP_PROGRAM
Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_pydoc/test_pydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1605,12 +1605,10 @@ def test_bound_builtin_method_noargs(self):
self.assertEqual(self._get_summary_line(''.lower),
"lower() method of builtins.str instance")

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_unbound_builtin_method_o(self):
self.assertEqual(self._get_summary_line(set.add),
"add(self, object, /) unbound builtins.set method")

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_bound_builtin_method_o(self):
self.assertEqual(self._get_summary_line(set().add),
"add(object, /) method of builtins.set instance")
Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -1006,8 +1006,6 @@ def testSocketError(self):
raise socket.herror
with self.assertRaises(OSError, msg=msg % 'socket.gaierror'):
raise socket.gaierror

@unittest.expectedFailure # TODO: RUSTPYTHON; error message format differs
def testSendtoErrors(self):
# Testing that sendto doesn't mask failures. See #10169.
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_sqlite3/test_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ def progress(status, remaining, total):
self.assertEqual(len(journal), 1)
self.assertEqual(journal[0], 0)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_non_callable_progress(self):
with self.assertRaises(TypeError) as cm:
with memory_database() as bck:
Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_sqlite3/test_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,11 @@ def test_sqlite_row_index(self):
with self.assertRaises(IndexError):
row[complex()] # index must be int or string

@unittest.expectedFailure # TODO: RUSTPYTHON; TypeError: can't delete attribute
def test_delete_connection_row_factory(self):
# gh-149738: deleting row_factory should raise an exception
with self.assertRaises(AttributeError):
del self.con.row_factory

@unittest.expectedFailure # TODO: RUSTPYTHON; TypeError: can't delete attribute
def test_delete_connection_text_factory(self):
# gh-149738: deleting text_factory should raise an exception
with self.assertRaises(AttributeError):
Expand Down
5 changes: 5 additions & 0 deletions Lib/test/test_sqlite3/test_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def test_authorizer_invalid_signature(self):
# Tests for checking that callback context mutations do not crash.
# Regression tests for https://github.com/python/cpython/issues/142830.

@unittest.skip("TODO: RUSTPYTHON; re-entrant Connection use from a callback deadlocks on the connection lock")
@unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: 'NoneType' object has no attribute 'exc_type'
@with_tracebacks(ZeroDivisionError, regex="hello world")
def test_authorizer_concurrent_mutation_in_call(self):
Expand All @@ -177,6 +178,7 @@ def handler(*a, **kw):
self.cx.set_authorizer(handler)
self.assert_not_authorized(self.cx.execute, "select * from test")

@unittest.skip("TODO: RUSTPYTHON; re-entrant Connection use from a callback deadlocks on the connection lock")
@with_tracebacks(OverflowError)
def test_authorizer_concurrent_mutation_with_overflown_value(self):
_testcapi = import_helper.import_module("_testcapi")
Expand Down Expand Up @@ -312,6 +314,7 @@ def test_progress_handler_invalid_signature(self):
# Tests for checking that callback context mutations do not crash.
# Regression tests for https://github.com/python/cpython/issues/142830.

@unittest.skip("TODO: RUSTPYTHON; re-entrant Connection use from a callback deadlocks on the connection lock")
@unittest.skip("TODO: RUSTPYTHON; Timeout after 10 minutes")
@with_tracebacks(ZeroDivisionError, regex="hello world")
def test_progress_handler_concurrent_mutation_in_call(self):
Expand All @@ -324,6 +327,7 @@ def handler(*a, **kw):
self.cx.set_progress_handler(handler, 1)
self.assert_interrupted(self.cx.execute, "select * from test")

@unittest.skip("TODO: RUSTPYTHON; re-entrant Connection use from a callback deadlocks on the connection lock")
def test_progress_handler_concurrent_mutation_in_conversion(self):
self.cx.execute("create table if not exists test(a number)")

Expand Down Expand Up @@ -493,6 +497,7 @@ def test_trace_handler_invalid_signature(self):
# Tests for checking that callback context mutations do not crash.
# Regression tests for https://github.com/python/cpython/issues/142830.

@unittest.skip("TODO: RUSTPYTHON; re-entrant Connection use from a callback deadlocks on the connection lock")
@unittest.skip("TODO: RUSTPYTHON; Timeout after 10 minutes")
@with_tracebacks(ZeroDivisionError, regex="hello world")
def test_trace_callback_concurrent_mutation_in_call(self):
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_str.py
Original file line number Diff line number Diff line change
Expand Up @@ -2672,7 +2672,6 @@ def test_check_encoding_errors(self):
proc = assert_python_failure('-X', 'dev', '-c', code)
self.assertEqual(proc.rc, 10, proc)

@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: "str expected at most 3 arguments, got 4" does not match "expected at most 3 arguments, got 4"
def test_str_invalid_call(self):
# too many args
with self.assertRaisesRegex(TypeError, r"str expected at most 3 arguments, got 4"):
Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_structseq.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,6 @@ def test_copy_replace_all_fields_visible(self):
copy.replace(t, error=-1)
with self.assertRaisesRegex(TypeError, 'unexpected field name'):
copy.replace(t, user=1, error=-1)

@unittest.expectedFailure # TODO: RUSTPYTHON; Wrong error message
def test_copy_replace_with_invisible_fields(self):
assert time.struct_time.n_unnamed_fields == 0
assert time.struct_time.n_sequence_fields < time.struct_time.n_fields
Expand Down
Loading