File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -4987,7 +4987,6 @@ class Inside:
49874987 self .assertEqual (Y .__qualname__ , 'Y' )
49884988 self .assertEqual (Y .Inside .__qualname__ , 'Y.Inside' )
49894989
4990- @unittest .expectedFailure # TODO: RUSTPYTHON
49914990 def test_qualname_dict (self ):
49924991 ns = {'__qualname__' : 'some.name' }
49934992 tp = type ('Foo' , (), ns )
Original file line number Diff line number Diff line change @@ -1867,15 +1867,15 @@ impl Constructor for PyType {
18671867 ( metatype, base. to_owned ( ) , bases, base_is_type)
18681868 } ;
18691869
1870- let qualname = dict
1871- . pop_item ( identifier ! ( vm, __qualname__) . as_object ( ) , vm) ?
1870+ let mut attributes = dict. to_attributes ( vm) ;
1871+ let qualname = attributes
1872+ . shift_remove ( identifier ! ( vm, __qualname__) )
18721873 . map ( |obj| downcast_qualname ( obj, vm) )
18731874 . transpose ( ) ?
18741875 . unwrap_or_else ( || {
18751876 // If __qualname__ is not provided, we can use the name as default
18761877 name. clone ( ) . into_wtf8 ( )
18771878 } ) ;
1878- let mut attributes = dict. to_attributes ( vm) ;
18791879
18801880 // Check __doc__ for surrogates - raises UnicodeEncodeError during type creation
18811881 if let Some ( doc) = attributes. get ( identifier ! ( vm, __doc__) )
You can’t perform that action at this time.
0 commit comments