-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
subclass support #64
subclass support #64
Conversation
pyo3cls/src/py_class.rs
Outdated
@@ -440,6 +440,10 @@ fn parse_attribute(attr: String) -> (HashMap<&'static str, syn::Ident>, | |||
flags.push(syn::Ident::from("_pyo3::typeob::PY_TYPE_FLAG_WEAKREF")); | |||
continue | |||
} | |||
"basetype" => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure this is a good name. Feels odd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree. maybe "subclass"?
guide/src/class.md
Outdated
@@ -61,6 +61,7 @@ python object that can be collector `PyGCProtocol` trait has to be implemented. | |||
* `weakref` - adds support for python weak references | |||
* `base=xxx.YYY` - use custom base class. It is not possible to call constructor | |||
of base class at the moment. `xxx.YYY`, `xxx` - module name, `YYY` class name. | |||
* `basetype` - adds subclass support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe something like "python classes can inherit from this class", otherwise it is not clear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you also add entry to CHANGELOG
Seem that some test cases are flaky. |
Yes, ref count related tests are flaky because Rust runs multiple tests in parallel. I will fix later |
Ref #15