File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3977,7 +3977,6 @@ class WithCorrectSuper(CorrectSuper):
39773977 # that we create internally.
39783978 self .assertEqual (CorrectSuper .args , ["default" , "default" ])
39793979
3980- @unittest .skip ("TODO: RUSTPYTHON; Crash - static type name must be already interned but async_generator_wrapped_value is not" )
39813980 def test_original_class_is_gced (self ):
39823981 # gh-135228: Make sure when we replace the class with slots=True, the original class
39833982 # gets garbage collected.
Original file line number Diff line number Diff line change @@ -556,7 +556,6 @@ def test_stripid(self):
556556 self .assertEqual (stripid ("<type 'exceptions.Exception'>" ),
557557 "<type 'exceptions.Exception'>" )
558558
559- @unittest .skip ("TODO: RUSTPYTHON; Panic" )
560559 def test_builtin_with_more_than_four_children (self ):
561560 """Tests help on builtin object which have more than four child classes.
562561
Original file line number Diff line number Diff line change @@ -818,4 +818,5 @@ pub(crate) fn init(ctx: &'static Context) {
818818 PyAsyncGenASend :: extend_class ( ctx, ctx. types . async_generator_asend ) ;
819819 PyAsyncGenAThrow :: extend_class ( ctx, ctx. types . async_generator_athrow ) ;
820820 PyAnextAwaitable :: extend_class ( ctx, ctx. types . anext_awaitable ) ;
821+ PyAsyncGenWrappedValue :: extend_class ( ctx, ctx. types . async_generator_wrapped_value ) ;
821822}
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ use crate::{
55 builtin_func:: { PyNativeFunction , PyNativeMethod } ,
66 descriptor:: PyMethodDescriptor ,
77 } ,
8+ class:: PyClassDef ,
89 function:: { IntoPyNativeFn , PyNativeFn } ,
910} ;
1011
@@ -331,3 +332,10 @@ impl Py<HeapMethodDef> {
331332
332333#[ pyclass]
333334impl HeapMethodDef { }
335+
336+ pub ( crate ) fn init ( ctx : & ' static Context ) {
337+ // TODO: Should we extend the class instead of interning only the name?
338+ // HeapMethodDef::extend_class(ctx, ctx.types.method_def);
339+
340+ let _ = ctx. intern_str ( HeapMethodDef :: NAME ) ;
341+ }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ mod builtin;
55mod either;
66mod fspath;
77mod getset;
8- mod method;
8+ pub ( crate ) mod method;
99mod number;
1010mod protocol;
1111mod time;
Original file line number Diff line number Diff line change @@ -266,5 +266,8 @@ impl TypeZoo {
266266 template:: init ( context) ;
267267 descriptor:: init ( context) ;
268268 crate :: stdlib:: _typing:: init ( context) ;
269+
270+ // RustPython specific
271+ crate :: function:: method:: init ( context) ;
269272 }
270273}
You can’t perform that action at this time.
0 commit comments