Skip to content
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

Upgrade to PyO3 0.23 #454

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: workflow_dispatch

env:
MATURIN_VERSION: 1.7.4
PY_ALL: 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10
PY_ALL: 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10

jobs:
wheels:
Expand All @@ -23,13 +23,13 @@ jobs:
platform: linux
target: x86_64
manylinux: auto
interpreter: pypy3.8 pypy3.9 pypy3.10
interpreter: pypy3.9 pypy3.10
- os: macos
target: x86_64
interpreter: pypy3.8 pypy3.9 pypy3.10
interpreter: pypy3.9 pypy3.10
- os: macos
target: aarch64
interpreter: 3.8 3.9 pypy3.8 pypy3.9 pypy3.10
interpreter: 3.9 pypy3.9 pypy3.10
- os: ubuntu
platform: linux
target: aarch64
Expand All @@ -44,7 +44,7 @@ jobs:
manylinux: musllinux_1_1
- os: windows
target: x86_64
interpreter: pypy3.8 pypy3.9 pypy3.10
interpreter: pypy3.9 pypy3.10
exclude:
- os: windows
target: aarch64
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, macos-14, windows-latest]
manylinux: [auto]
interpreter: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
interpreter: ["3.9", "3.10", "3.11", "3.12", "3.13"]
include:
- os: ubuntu-latest
platform: linux
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

env:
MATURIN_VERSION: 1.7.4
PY_ALL: 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10
PY_ALL: 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10

jobs:
sdist:
Expand Down Expand Up @@ -46,13 +46,13 @@ jobs:
platform: linux
target: x86_64
manylinux: auto
interpreter: pypy3.8 pypy3.9 pypy3.10
interpreter: pypy3.9 pypy3.10
- os: macos
target: x86_64
interpreter: pypy3.8 pypy3.9 pypy3.10
interpreter: pypy3.9 pypy3.10
- os: macos
target: aarch64
interpreter: pypy3.8 pypy3.9 pypy3.10
interpreter: pypy3.9 pypy3.10
- os: ubuntu
platform: linux
target: aarch64
Expand All @@ -67,7 +67,7 @@ jobs:
manylinux: musllinux_1_1
- os: windows
target: x86_64
interpreter: pypy3.8 pypy3.9 pypy3.10
interpreter: pypy3.9 pypy3.10
exclude:
- os: windows
target: aarch64
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
manylinux: [auto]
interpreter: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
interpreter: ["3.9", "3.10", "3.11", "3.12", "3.13"]
include:
- os: ubuntu-latest
platform: linux
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
Expand Down Expand Up @@ -50,7 +49,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
Expand Down Expand Up @@ -81,7 +79,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
Expand Down
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ pem = "=3.0"
percent-encoding = "=2.3"
pin-project = "1.1"
pkcs8 = { version = "=0.10", features = ["encryption", "pkcs5"] }
pyo3 = { version = "=0.22", features = ["anyhow", "extension-module", "generate-import-lib"] }
pyo3-log = "=0.11"
pyo3 = { version = "=0.23", features = ["anyhow", "extension-module", "generate-import-lib"] }
pyo3-log = "=0.12"
rustls-pemfile = "2.2"
socket2 = { version = "0.5", features = ["all"] }
tls-listener = { version = "=0.10", features = ["rustls"] }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ You might test the effect such optimizations cause over your application and dec

Granian is currently under active development.

Granian is compatible with Python 3.8 and above versions.
Granian is compatible with Python 3.9 and above versions.

## License

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ classifiers = [
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
Expand All @@ -32,7 +31,7 @@ dynamic = [
'version',
]

requires-python = '>=3.8'
requires-python = '>=3.9'
dependencies = [
'click>=8.0.0',
'uvloop>=0.18.0; sys_platform != "win32" and platform_python_implementation == "CPython"',
Expand Down
12 changes: 6 additions & 6 deletions src/asgi/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ pub(crate) struct CallbackWatcherHTTP {
#[pyo3(get)]
proto: Py<HTTPProtocol>,
#[pyo3(get)]
scope: PyObject,
scope: Py<PyDict>,
}

impl CallbackWatcherHTTP {
pub fn new(py: Python, proto: HTTPProtocol, scope: Bound<PyDict>) -> Self {
Self {
proto: Py::new(py, proto).unwrap(),
scope: scope.into_py(py),
scope: scope.unbind(),
}
}
}
Expand All @@ -62,7 +62,7 @@ impl CallbackWatcherHTTP {
}

fn err(&self, err: Bound<PyAny>) {
callback_impl_done_err!(self, &PyErr::from_value_bound(err));
callback_impl_done_err!(self, &PyErr::from_value(err));
}
}

Expand All @@ -71,14 +71,14 @@ pub(crate) struct CallbackWatcherWebsocket {
#[pyo3(get)]
proto: Py<WebsocketProtocol>,
#[pyo3(get)]
scope: PyObject,
scope: Py<PyDict>,
}

impl CallbackWatcherWebsocket {
pub fn new(py: Python, proto: WebsocketProtocol, scope: Bound<PyDict>) -> Self {
Self {
proto: Py::new(py, proto).unwrap(),
scope: scope.into_py(py),
scope: scope.unbind(),
}
}
}
Expand All @@ -90,7 +90,7 @@ impl CallbackWatcherWebsocket {
}

fn err(&self, err: Bound<PyAny>) {
callback_impl_done_err!(self, &PyErr::from_value_bound(err));
callback_impl_done_err!(self, &PyErr::from_value(err));
}
}

Expand Down
Loading
Loading