Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions .cspell.dict/cpython.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ cidx
cjkcodecs
CLASSDEREF
classdict
cleandoc
cmpop
CNOTAB
codedepth
Expand All @@ -61,6 +62,7 @@ dictbytype
DICTFLAG
dictoffset
distpoint
drvsize
dynload
elts
eooh
Expand All @@ -85,6 +87,7 @@ finalizers
firsttraceable
flowgraph
formatfloat
framesize
freelist
freevar
freevars
Expand All @@ -93,6 +96,7 @@ fsrc
getdict
getfunc
getiter
getlasti
getsets
getslice
globalgetvar
Expand Down Expand Up @@ -145,6 +149,7 @@ mbiencoder
mbstreamreader
mbstreamwriter
metavars
mimalloc
miscompiles
mult
multibytecodec
Expand Down Expand Up @@ -177,6 +182,9 @@ npools
nseen
NSIGNALS
numer
numdupes
numkwonly
numposorkw
nvars
obmalloc
opname
Expand All @@ -201,6 +209,7 @@ preds
preinitialized
pybuilddir
pycore
PYGC
pyinner
pydecimal
pyerrors
Expand All @@ -215,6 +224,7 @@ pystrcmp
PYTHONTRACEMALLOC
PYTHONUTF8
pythonw
pytime
PYTHREAD_NAME
recvd
releasebuffer
Expand Down Expand Up @@ -258,6 +268,8 @@ templatelib
testconsole
threadstate
ticketer
timespec
timeval
tmptype
tok_oldval
tstate
Expand Down
12 changes: 1 addition & 11 deletions Lib/test/test_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,6 @@ class A:
else:
self.fail("Failed to raise RecursionError")

@unittest.expectedFailure # TODO: RUSTPYTHON
def testForExceptionsRaisedInInstanceGetattr2(self):
# Tests for exceptions raised in instance_getattr2().

Expand Down Expand Up @@ -858,7 +857,7 @@ def __init__(self, arg):
pass


# from _testinternalcapi import has_inline_values # XXX: RUSTPYTHON
from _testinternalcapi import has_inline_values

Py_TPFLAGS_INLINE_VALUES = (1 << 2)
Py_TPFLAGS_MANAGED_DICT = (1 << 4)
Expand Down Expand Up @@ -886,14 +885,12 @@ class VarSizedSubclass(tuple):

class TestInlineValues(unittest.TestCase):

@unittest.expectedFailure # TODO: RUSTPYTHON; NameError: name 'has_inline_values' is not defined.
def test_no_flags_for_slots_class(self):
flags = NoManagedDict.__flags__
self.assertEqual(flags & Py_TPFLAGS_MANAGED_DICT, 0)
self.assertEqual(flags & Py_TPFLAGS_INLINE_VALUES, 0)
self.assertFalse(has_inline_values(NoManagedDict()))

@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: 0 != 4
def test_both_flags_for_regular_class(self):
for cls in (Plain, WithAttrs):
with self.subTest(cls=cls.__name__):
Expand All @@ -902,33 +899,28 @@ def test_both_flags_for_regular_class(self):
self.assertEqual(flags & Py_TPFLAGS_INLINE_VALUES, Py_TPFLAGS_INLINE_VALUES)
self.assertTrue(has_inline_values(cls()))

@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: 0 != 4
def test_managed_dict_only_for_varsized_subclass(self):
flags = VarSizedSubclass.__flags__
self.assertEqual(flags & Py_TPFLAGS_MANAGED_DICT, Py_TPFLAGS_MANAGED_DICT)
self.assertEqual(flags & Py_TPFLAGS_INLINE_VALUES, 0)
self.assertFalse(has_inline_values(VarSizedSubclass()))

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_has_inline_values(self):
c = Plain()
self.assertTrue(has_inline_values(c))
del c.__dict__
self.assertFalse(has_inline_values(c))

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_instances(self):
self.assertTrue(has_inline_values(Plain()))
self.assertTrue(has_inline_values(WithAttrs()))

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_inspect_dict(self):
for cls in (Plain, WithAttrs):
c = cls()
c.__dict__
self.assertTrue(has_inline_values(c))

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_update_dict(self):
d = { "e": 5, "f": 6 }
for cls in (Plain, WithAttrs):
Expand All @@ -945,7 +937,6 @@ def check_100(self, obj):
for i in range(100):
self.assertEqual(getattr(obj, f"a{i}"), i)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_many_attributes(self):
class C: pass
c = C()
Expand All @@ -956,7 +947,6 @@ class C: pass
c = C()
self.assertTrue(has_inline_values(c))

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_many_attributes_with_dict(self):
class C: pass
c = C()
Expand Down
13 changes: 0 additions & 13 deletions Lib/test/test_descr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,6 @@ class MyFrozenSet(frozenset):
with self.assertRaises(TypeError):
frozenset().__class__ = MyFrozenSet

@unittest.expectedFailure # TODO: RUSTPYTHON
@support.thread_unsafe
def test_slots(self):
# Testing __slots__...
Expand Down Expand Up @@ -1368,7 +1367,6 @@ class C2(D, W):
a.foo = 42
self.assertEqual(a.__dict__, {"foo": 42})

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_slots_special2(self):
# Testing __qualname__ and __classcell__ in __slots__
class Meta(type):
Expand Down Expand Up @@ -1940,7 +1938,6 @@ def __init__(self, foo):
self.assertEqual(b.foo, 3)
self.assertEqual(b.__class__, B)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_altmro(self):
# Testing mro() and overriding it...
class A(object):
Expand Down Expand Up @@ -2119,7 +2116,6 @@ def test_methods_in_c(self):
set_add.__get__(0)
self.assertEqual(cm.exception.args[0], expected_errmsg)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_special_method_lookup(self):
# The lookup of special methods bypasses __getattr__ and
# __getattribute__, but they still can be descriptors.
Expand Down Expand Up @@ -2680,7 +2676,6 @@ def __getclass(self):

dir(C()) # This used to segfault

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_supers(self):
# Testing super...

Expand Down Expand Up @@ -3349,7 +3344,6 @@ class NewClass:
self.assertEqual(NewClass.__doc__, 'object=None; type=NewClass')
self.assertEqual(NewClass().__doc__, 'object=NewClass instance; type=NewClass')

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_set_class(self):
# Testing __class__ assignment...
class C(object): pass
Expand Down Expand Up @@ -3824,7 +3818,6 @@ def test_uninitialized_modules(self):
m.foo = 1
self.assertEqual(m.__dict__, {"foo": 1})

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_funny_new(self):
# Testing __new__ returning something unexpected...
class C(object):
Expand Down Expand Up @@ -4235,7 +4228,6 @@ class X(object):
with self.assertRaises(TypeError):
X.__bases__ = type(None), O

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_mutable_bases_with_failing_mro(self):
# Testing mutable bases with failing mro...
class WorkOnce(type):
Expand Down Expand Up @@ -4476,7 +4468,6 @@ class D(C):
self.assertIsInstance(a, C) # Baseline
self.assertIsInstance(pa, C) # Test

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_proxy_super(self):
# Testing super() for a proxy object...
class Proxy(object):
Expand All @@ -4500,7 +4491,6 @@ def f(self):
p = Proxy(obj)
self.assertEqual(C.__dict__["f"](p), "B.f->C.f")

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_carloverre(self):
# Testing prohibition of Carlo Verre's hack...
try:
Expand Down Expand Up @@ -4533,7 +4523,6 @@ class C(B, A):
except TypeError:
self.fail("setattr through direct base types should be legal")

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_carloverre_multi_inherit_invalid(self):
class A(type):
def __setattr__(cls, key, value):
Expand Down Expand Up @@ -5900,7 +5889,6 @@ class B(A):
class C(B):
pass

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_reent_set_bases_tp_base_cycle(self):
"""
type_set_bases must check for an inheritance cycle not only through
Expand Down Expand Up @@ -6043,7 +6031,6 @@ def mro(cls):
class A(metaclass=M):
pass

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_disappearing_custom_mro(self):
"""
gh-92112: A custom mro() returning a result conflicting with
Expand Down
2 changes: 2 additions & 0 deletions Lib/test/test_gc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,7 @@ def test_something(self):
assert_python_ok("-c", source)


@unittest.expectedFailure # TODO: RUSTPYTHON; long_lived_total does not count untracked tuples
@unittest.skipUnless(Py_GIL_DISABLED, "requires free-threaded GC")
@unittest.skipIf(_testinternalcapi is None, "requires _testinternalcapi")
def test_tuple_untrack_counts(self):
Expand All @@ -1222,6 +1223,7 @@ def test_tuple_untrack_counts(self):
# Use n // 2 just in case some other objects were collected.
self.assertTrue(new_count - count > (n // 2))

@unittest.expectedFailure # TODO: RUSTPYTHON; tracked heap size is not generational
@requires_gil_enabled('need generational GC')
@unittest.skipIf(_testinternalcapi is None, "requires _testinternalcapi")
def test_heap_size(self):
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_inspect/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -4308,7 +4308,6 @@ def __init__(self, a):
self.assertEqual(self.signature(C.__new__, follow_wrapped=False),
varargs_signature)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_signature_on_class_with_wrapped_new(self):
with self.subTest('FunctionType'):
class C:
Expand Down
3 changes: 1 addition & 2 deletions Lib/test/test_monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,7 @@ def func():
)
self.assertEqual(events[0], ("throw", IndexError))

@unittest.expectedFailure # TODO: RUSTPYTHON; CALL_ALLOC_AND_ENTER_INIT specialization
@unittest.skipUnless(_testinternalcapi, "requires _testinternalcapi")
@requires_specialization_ft
def test_no_unwind_for_shim_frame(self):
Expand Down Expand Up @@ -1558,7 +1559,6 @@ class BranchRightOffsetRecorder(JumpOffsetRecorder):
class TestBranchAndJumpEvents(CheckEvents):
maxDiff = None

@unittest.expectedFailure # TODO: RUSTPYTHON; - bytecode layout differs from CPython
def test_loop(self):

def func():
Expand Down Expand Up @@ -1710,7 +1710,6 @@ async def foo():
('branch left', 'func', 12, 12)])


@unittest.expectedFailure # TODO: RUSTPYTHON; - bytecode layout differs from CPython
def test_match(self):

def func(v=1):
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_super.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@ def method(self):

self.assertEqual(C().method(), super)

@unittest.expectedFailure # TODO: RUSTPYTHON; TypeError: type 'super' is not an acceptable base type
def test_super_subclass___class__(self):
class mysuper(super):
pass
Expand Down
Loading
Loading