pypy: support EnvironmentError, OSError, WindowsError

This commit is contained in:
David Hewitt 2021-03-31 08:03:34 +01:00
parent 3663d3f37e
commit e035b2abcf
3 changed files with 6 additions and 6 deletions

View File

@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fix inability to add `#[text_signature]` to some `#[pyproto]` methods. [#1483](https://github.com/PyO3/pyo3/pull/1483) - Fix inability to add `#[text_signature]` to some `#[pyproto]` methods. [#1483](https://github.com/PyO3/pyo3/pull/1483)
- Fix use of Python argument for #[pymethods] inside macro expansions. [#1505](https://github.com/PyO3/pyo3/pull/1505) - Fix use of Python argument for #[pymethods] inside macro expansions. [#1505](https://github.com/PyO3/pyo3/pull/1505)
- Always use cross-compiling configuration if any of the environment variables are set. [#1514](https://github.com/PyO3/pyo3/pull/1514) - Always use cross-compiling configuration if any of the environment variables are set. [#1514](https://github.com/PyO3/pyo3/pull/1514)
- Support `EnvironmentError`, `IOError`, and `WindowsError` on PyPy. [#1533](https://github.com/PyO3/pyo3/pull/1533)
## [0.13.2] - 2021-02-12 ## [0.13.2] - 2021-02-12
### Packaging ### Packaging

View File

@ -274,11 +274,9 @@ impl_native_exception!(PyPermissionError, PyExc_PermissionError);
impl_native_exception!(PyProcessLookupError, PyExc_ProcessLookupError); impl_native_exception!(PyProcessLookupError, PyExc_ProcessLookupError);
impl_native_exception!(PyTimeoutError, PyExc_TimeoutError); impl_native_exception!(PyTimeoutError, PyExc_TimeoutError);
#[cfg(not(all(windows, PyPy)))]
impl_native_exception!(PyEnvironmentError, PyExc_EnvironmentError); impl_native_exception!(PyEnvironmentError, PyExc_EnvironmentError);
#[cfg(not(all(windows, PyPy)))]
impl_native_exception!(PyIOError, PyExc_IOError); impl_native_exception!(PyIOError, PyExc_IOError);
#[cfg(all(windows, not(PyPy)))] #[cfg(windows)]
impl_native_exception!(PyWindowsError, PyExc_WindowsError); impl_native_exception!(PyWindowsError, PyExc_WindowsError);
impl PyUnicodeDecodeError { impl PyUnicodeDecodeError {

View File

@ -283,11 +283,12 @@ extern "C" {
#[cfg_attr(PyPy, link_name = "PyPyExc_TimeoutError")] #[cfg_attr(PyPy, link_name = "PyPyExc_TimeoutError")]
pub static mut PyExc_TimeoutError: *mut PyObject; pub static mut PyExc_TimeoutError: *mut PyObject;
#[cfg(not(all(windows, PyPy)))] #[cfg_attr(PyPy, link_name = "PyPyExc_OSError")]
pub static mut PyExc_EnvironmentError: *mut PyObject; pub static mut PyExc_EnvironmentError: *mut PyObject;
#[cfg(not(all(windows, PyPy)))] #[cfg_attr(PyPy, link_name = "PyPyExc_OSError")]
pub static mut PyExc_IOError: *mut PyObject; pub static mut PyExc_IOError: *mut PyObject;
#[cfg(all(windows, not(PyPy)))] #[cfg(windows)]
#[cfg_attr(PyPy, link_name = "PyPyExc_OSError")]
pub static mut PyExc_WindowsError: *mut PyObject; pub static mut PyExc_WindowsError: *mut PyObject;
pub static mut PyExc_RecursionErrorInst: *mut PyObject; pub static mut PyExc_RecursionErrorInst: *mut PyObject;