-
Notifications
You must be signed in to change notification settings - Fork 787
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
Complete abi3 support #1152
Complete abi3 support #1152
Changes from 6 commits
4004620
62a175e
d2a10b6
c2f10e2
1941f4d
e0f75f8
4cd6d4c
3b61df2
80e2497
71a7b1a
4325a59
e8936be
0709a02
679326e
117f60b
a009c23
d6c9435
0bc2393
7a4c5e2
5bfb467
4d5c208
3cb0b11
afc2d10
d0c2ebf
1b2d267
517af8c
2ec1c3b
870914d
a2dc4c1
ba10560
c87a59c
c07e1aa
2a85c17
7644d67
9d85591
4862f56
869a5e2
1985578
e33e58f
d8c8c17
e615ce8
c22dd6c
0fde737
20a93ed
140790b
398369f
d42dbda
877667a
137196d
aabad7c
0665c02
9e34835
5060379
2923b4d
4298435
ba6f0ec
265db33
781bb9f
90a825d
f74b649
eb8ff15
6627658
16ad3bf
95bec25
eb0e6f6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -205,7 +205,7 @@ or by `self_.into_super()` as `PyRef<Self::BaseClass>`. | |
```rust | ||
# use pyo3::prelude::*; | ||
|
||
#[pyclass] | ||
#[pyclass(subclass)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like a breaking change that needs to go in the CHANGELOG, and possibly other guide documentation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I agree. |
||
struct BaseClass { | ||
val1: usize, | ||
} | ||
|
@@ -222,7 +222,7 @@ impl BaseClass { | |
} | ||
} | ||
|
||
#[pyclass(extends=BaseClass)] | ||
#[pyclass(extends=BaseClass, subclass)] | ||
struct SubClass { | ||
val2: usize, | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,19 @@ | |
//! For more information check [buffer protocol](https://docs.python.org/3/c-api/buffer.html) | ||
//! c-api | ||
use crate::callback::IntoPyCallbackOutput; | ||
use crate::{ | ||
ffi::{self, PyBufferProcs}, | ||
PyCell, PyClass, PyRefMut, | ||
}; | ||
use crate::{ffi, PyCell, PyClass, PyRefMut}; | ||
use std::os::raw::c_int; | ||
|
||
#[cfg(Py_LIMITED_API)] | ||
#[derive(Clone, Default)] | ||
pub struct PyBufferProcs { | ||
pub bf_getbuffer: Option<ffi::getbufferproc>, | ||
pub bf_releasebuffer: Option<ffi::releasebufferproc>, | ||
} | ||
|
||
#[cfg(not(Py_LIMITED_API))] | ||
pub use ffi::PyBufferProcs; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure we need any of the changes in this file... in |
||
/// Buffer protocol interface | ||
/// | ||
/// For more information check [buffer protocol](https://docs.python.org/3/c-api/buffer.html) | ||
|
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.
Should we create an issue to investigate this PyPy behaviour in a follow-up? Seems like a potential bug.