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
1 change: 0 additions & 1 deletion Lib/test/test_dataclasses/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3977,7 +3977,6 @@ class WithCorrectSuper(CorrectSuper):
# that we create internally.
self.assertEqual(CorrectSuper.args, ["default", "default"])

@unittest.skip("TODO: RUSTPYTHON; Crash - static type name must be already interned but async_generator_wrapped_value is not")
def test_original_class_is_gced(self):
# gh-135228: Make sure when we replace the class with slots=True, the original class
# gets garbage collected.
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_pydoc/test_pydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@ def test_stripid(self):
self.assertEqual(stripid("<type 'exceptions.Exception'>"),
"<type 'exceptions.Exception'>")

@unittest.skip("TODO: RUSTPYTHON; Panic")
def test_builtin_with_more_than_four_children(self):
"""Tests help on builtin object which have more than four child classes.

Expand Down
1 change: 1 addition & 0 deletions crates/vm/src/builtins/asyncgenerator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,4 +818,5 @@ pub(crate) fn init(ctx: &'static Context) {
PyAsyncGenASend::extend_class(ctx, ctx.types.async_generator_asend);
PyAsyncGenAThrow::extend_class(ctx, ctx.types.async_generator_athrow);
PyAnextAwaitable::extend_class(ctx, ctx.types.anext_awaitable);
PyAsyncGenWrappedValue::extend_class(ctx, ctx.types.async_generator_wrapped_value);
}
8 changes: 8 additions & 0 deletions crates/vm/src/function/method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::{
builtin_func::{PyNativeFunction, PyNativeMethod},
descriptor::PyMethodDescriptor,
},
class::PyClassDef,
function::{IntoPyNativeFn, PyNativeFn},
};

Expand Down Expand Up @@ -331,3 +332,10 @@ impl Py<HeapMethodDef> {

#[pyclass]
impl HeapMethodDef {}

pub(crate) fn init(ctx: &'static Context) {
// TODO: Should we extend the class instead of interning only the name?
// HeapMethodDef::extend_class(ctx, ctx.types.method_def);

let _ = ctx.intern_str(HeapMethodDef::NAME);
}
2 changes: 1 addition & 1 deletion crates/vm/src/function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod builtin;
mod either;
mod fspath;
mod getset;
mod method;
pub(crate) mod method;
mod number;
mod protocol;
mod time;
Expand Down
3 changes: 3 additions & 0 deletions crates/vm/src/types/zoo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,5 +266,8 @@ impl TypeZoo {
template::init(context);
descriptor::init(context);
crate::stdlib::_typing::init(context);

// RustPython specific
crate::function::method::init(context);
}
}
Loading