You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace `PyType::attributes` (`PyRwLock<PyAttributes>`) with a `TypeNamespace`
enum. A type created while an interpreter is running holds a `PyDict`; the
types `Context::genesis` and `PyType::new_static` build keep the interned-key
`IndexMap`, since hashing a string needs a VM.
`type.__new__` binds `__classdictcell__` to the type's own namespace rather
than the namespace dict passed to it, so an annotation scope reads attribute
changes made after the class body ran. Removes the `expectedFailure` on
`test_type_params.TypeParamsClassScopeTest.test_modified_later`.
`PyGetSet` holds its class as a `PyRef<PyType>` instead of a non-owning
`PointerSlot`, and traverses it, because a namespace can outlive the type it
belongs to. `PointerSlot` and the `unsafe` on `Context::new_getset` are gone.
`subs_parameters` raises `TypeError` when `__typing_subst__` returns a
non-tuple in an unpack position, using the new
`PyType::fully_qualified_name` for the message. Removes the
`expectedFailure` on
`test_typing.GenericTests.test_return_non_tuple_while_unpacking`.
Assisted-by: Claude
Copy file name to clipboardExpand all lines: Lib/test/test_typing.py
-1Lines changed: 0 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5887,7 +5887,6 @@ class A:
5887
5887
withself.assertRaises(TypeError):
5888
5888
a[int]
5889
5889
5890
-
@unittest.expectedFailure# TODO: RUSTPYTHON; AssertionError: ".+__typing_subst__.+tuple.+int.*" does not match "'TypeAliasType' object is not subscriptable"
5891
5890
deftest_return_non_tuple_while_unpacking(self):
5892
5891
# GH-138497: GenericAlias objects didn't ensure that __typing_subst__ actually
0 commit comments