pypy: support 3.8
This commit is contained in:
parent
13fc4f1ea9
commit
6b1afa4040
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -76,7 +76,7 @@ jobs:
|
|||
fail-fast: false # If one platform fails, allow the rest to keep testing.
|
||||
matrix:
|
||||
rust: [stable]
|
||||
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", pypy-3.6, pypy-3.7]
|
||||
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", pypy-3.6, pypy-3.7, pypy-3.8]
|
||||
platform:
|
||||
[
|
||||
{
|
||||
|
@ -110,6 +110,8 @@ jobs:
|
|||
# PyPy 3.7 on Windows doesn't release 32-bit builds any more
|
||||
- python-version: pypy-3.7
|
||||
platform: { os: "windows-latest", python-architecture: "x86" }
|
||||
- python-version: pypy-3.8
|
||||
platform: { os: "windows-latest", python-architecture: "x86" }
|
||||
include:
|
||||
# PyPy3.6 still runs on macos-10.15
|
||||
- rust: stable
|
||||
|
|
|
@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Support Python 3.10. [#1889](https://github.com/PyO3/pyo3/pull/1889)
|
||||
- Added optional `eyre` feature to convert `eyre::Report` into `PyErr`. [#1893](https://github.com/PyO3/pyo3/pull/1893)
|
||||
- Added optional `anyhow` feature to convert `anyhow::Error` into `PyErr`. [#1822](https://github.com/PyO3/pyo3/pull/1822)
|
||||
- Support PyPy 3.8. [#1948](https://github.com/PyO3/pyo3/pull/1948)
|
||||
|
||||
### Added
|
||||
|
||||
|
|
|
@ -361,7 +361,7 @@ pub struct PyDateTime_CAPI {
|
|||
pub TimeType: *mut PyTypeObject,
|
||||
pub DeltaType: *mut PyTypeObject,
|
||||
pub TZInfoType: *mut PyTypeObject,
|
||||
#[cfg(all(Py_3_7, not(PyPy)))]
|
||||
#[cfg(all(Py_3_7, any(not(PyPy), Py_3_8)))]
|
||||
pub TimeZone_UTC: *mut PyObject,
|
||||
pub Date_FromDate: unsafe extern "C" fn(
|
||||
year: c_int,
|
||||
|
@ -395,7 +395,7 @@ pub struct PyDateTime_CAPI {
|
|||
normalize: c_int,
|
||||
cls: *mut PyTypeObject,
|
||||
) -> *mut PyObject,
|
||||
#[cfg(all(Py_3_7, not(PyPy)))]
|
||||
#[cfg(all(Py_3_7, any(not(PyPy), Py_3_8)))]
|
||||
pub TimeZone_FromTimeZone:
|
||||
unsafe extern "C" fn(offset: *mut PyObject, name: *mut PyObject) -> *mut PyObject,
|
||||
|
||||
|
@ -451,7 +451,7 @@ pub static PyDateTimeAPI: _PyDateTimeAPI_impl = _PyDateTimeAPI_impl {
|
|||
///
|
||||
/// The type obtained by dereferencing this object is `&'static PyObject`. This may change in the
|
||||
/// future to be a more specific type representing that this is a `datetime.timezone` object.
|
||||
#[cfg(all(Py_3_7, not(PyPy)))]
|
||||
#[cfg(all(Py_3_7, any(not(PyPy), Py_3_8)))]
|
||||
pub static PyDateTime_TimeZone_UTC: _PyDateTime_TimeZone_UTC_impl = _PyDateTime_TimeZone_UTC_impl {
|
||||
inner: &PyDateTimeAPI,
|
||||
};
|
||||
|
@ -609,12 +609,12 @@ impl Deref for _PyDateTimeAPI_impl {
|
|||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
#[cfg(all(Py_3_7, not(PyPy)))]
|
||||
#[cfg(all(Py_3_7, any(not(PyPy), Py_3_8)))]
|
||||
pub struct _PyDateTime_TimeZone_UTC_impl {
|
||||
inner: &'static _PyDateTimeAPI_impl,
|
||||
}
|
||||
|
||||
#[cfg(all(Py_3_7, not(PyPy)))]
|
||||
#[cfg(all(Py_3_7, any(not(PyPy), Py_3_8)))]
|
||||
impl Deref for _PyDateTime_TimeZone_UTC_impl {
|
||||
type Target = crate::PyObject;
|
||||
|
||||
|
@ -661,7 +661,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(all(Py_3_7, not(PyPy)))]
|
||||
#[cfg(all(Py_3_7, any(not(PyPy), Py_3_8)))]
|
||||
fn test_utc_timezone() {
|
||||
Python::with_gil(|py| {
|
||||
let utc_timezone = PyDateTime_TimeZone_UTC.as_ref(py);
|
||||
|
|
Loading…
Reference in a new issue