-
Notifications
You must be signed in to change notification settings - Fork 683
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
Allow slf: PyRef<Self>/PyRefMut<Self> in pymethods #419
Conversation
In general for the self type I think it's better if we had a trait (or maybe reuse extract) that is implemented for all three types instead of trying to guess the right method based on the string-representation of the type |
Codecov Report
@@ Coverage Diff @@
## master #419 +/- ##
==========================================
- Coverage 88.06% 87.99% -0.07%
==========================================
Files 83 65 -18
Lines 3593 3314 -279
==========================================
- Hits 3164 2916 -248
+ Misses 429 398 -31
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #419 +/- ##
==========================================
+ Coverage 87.66% 87.82% +0.16%
==========================================
Files 63 64 +1
Lines 3355 3385 +30
==========================================
+ Hits 2941 2973 +32
+ Misses 414 412 -2
Continue to review full report at Codecov.
|
Experimentally I introduced a new trait named |
I'll have to check if we already have the traits that can do what FromPyPointer does or with we can replace some other code with the new FromPyPointer, but otherwise it's looking good |
43349fa
to
9d01253
Compare
9d01253
to
ee6deca
Compare
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.
LGTM
Merging master should make travis ci pass again (or at least only fail for minimum nightly) |
It's invalid
ee6deca
to
c7d6c48
Compare
Now CI passed, thanks |
Looks like
and can be called like usual methods from python.
Resolves #356 (comment)
Currently only
slf: PyRef
is tested.Another concern is I observed an undesirable segfault when using
arg: PyRef<PyBytes>
in pymethod(though I'm not sure it's related to this PR