Skip to content

Commit

Permalink
Merge pull request #1217 from PyO3/remove-python-3-10-removals
Browse files Browse the repository at this point in the history
Remove symbols that are removed in python 3.10
  • Loading branch information
davidhewitt committed Oct 12, 2020
2 parents 579fdfc + 2c3ee2c commit 95cebd8
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 31 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Change `PyIterator` to be consistent with other native types: it is now used as `&PyIterator` instead of `PyIterator<'a>`. [#1176](https://github.com/PyO3/pyo3/pull/1176)

### Removed
- Remove unused `python3` feature. [#1209](https://github.com/PyO3/pyo3/pull/1209)
- Remove deprecated ffi definitions `PyUnicode_AsUnicodeCopy`, `PyUnicode_GetMax`, `_Py_CheckRecursionLimit`, `PyObject_AsCharBuffer`, `PyObject_AsReadBuffer`, `PyObject_CheckReadBuffer` and `PyObject_AsWriteBuffer`, which will be removed in Python 3.10. [#1217](https://github.com/PyO3/pyo3/pull/1217)
- Remove unused `python3` feature. [#1235](https://github.com/PyO3/pyo3/pull/1235)

## [0.12.3] - 2020-10-12
### Fixed
Expand Down
5 changes: 0 additions & 5 deletions src/ffi/ceval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ extern "C" {
fn _Py_CheckRecursiveCall(_where: *mut c_char) -> c_int;
}

#[cfg_attr(windows, link(name = "pythonXY"))]
extern "C" {
static mut _Py_CheckRecursionLimit: c_int;
}

// TODO: Py_EnterRecursiveCall etc.
#[cfg(Py_3_6)]
pub type _PyFrameEvalFunction =
Expand Down
20 changes: 0 additions & 20 deletions src/ffi/objectabstract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,26 +71,6 @@ extern "C" {
pub fn PyObject_SetItem(o: *mut PyObject, key: *mut PyObject, v: *mut PyObject) -> c_int;
pub fn PyObject_DelItemString(o: *mut PyObject, key: *const c_char) -> c_int;
pub fn PyObject_DelItem(o: *mut PyObject, key: *mut PyObject) -> c_int;
#[cfg_attr(PyPy, link_name = "PyPyObject_AsCharBuffer")]
pub fn PyObject_AsCharBuffer(
obj: *mut PyObject,
buffer: *mut *const c_char,
buffer_len: *mut Py_ssize_t,
) -> c_int;
#[cfg_attr(PyPy, link_name = "PyPyObject_CheckReadBuffer")]
pub fn PyObject_CheckReadBuffer(obj: *mut PyObject) -> c_int;
#[cfg_attr(PyPy, link_name = "PyPyObject_AsReadBuffer")]
pub fn PyObject_AsReadBuffer(
obj: *mut PyObject,
buffer: *mut *const c_void,
buffer_len: *mut Py_ssize_t,
) -> c_int;
#[cfg_attr(PyPy, link_name = "PyPyObject_AsWriteBuffer")]
pub fn PyObject_AsWriteBuffer(
obj: *mut PyObject,
buffer: *mut *mut c_void,
buffer_len: *mut Py_ssize_t,
) -> c_int;
}

#[cfg(not(Py_LIMITED_API))]
Expand Down
5 changes: 0 additions & 5 deletions src/ffi/unicodeobject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ extern "C" {
index: Py_ssize_t,
character: Py_UCS4,
) -> c_int;
#[cfg(not(Py_LIMITED_API))]
#[cfg_attr(PyPy, link_name = "PyPyUnicode_GetMax")]
pub fn PyUnicode_GetMax() -> Py_UNICODE;
#[cfg_attr(PyPy, link_name = "PyPyUnicode_Resize")]
pub fn PyUnicode_Resize(unicode: *mut *mut PyObject, length: Py_ssize_t) -> c_int;
#[cfg_attr(PyPy, link_name = "PyPyUnicode_FromEncodedObject")]
Expand Down Expand Up @@ -462,6 +459,4 @@ extern "C" {
pub fn PyUnicode_Format(format: *mut PyObject, args: *mut PyObject) -> *mut PyObject;
pub fn PyUnicode_Contains(container: *mut PyObject, element: *mut PyObject) -> c_int;
pub fn PyUnicode_IsIdentifier(s: *mut PyObject) -> c_int;
#[cfg(not(Py_LIMITED_API))]
pub fn PyUnicode_AsUnicodeCopy(unicode: *mut PyObject) -> *mut Py_UNICODE;
}

0 comments on commit 95cebd8

Please sign in to comment.