Skip to content
Open
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
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- '3.12'
- '3.13'
- '3.14'
- '3.15'
- pypy3.11
include:
- python-version: 3.14t
Expand Down Expand Up @@ -70,6 +71,7 @@ jobs:
- '3.12'
- '3.13'
- '3.14'
- '3.15'
include:
- python-version: 3.14t
allocator: mimalloc
Expand Down Expand Up @@ -111,6 +113,8 @@ jobs:
- '3.13'
- '3.14'
- '3.14t'
- '3.15'
- '3.15t'

env:
UV_PYTHON: ${{ matrix.python-version }}
Expand Down
73 changes: 15 additions & 58 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ pem = "=3.0"
percent-encoding = "=2.3"
pin-project-lite = "=0.2"
pkcs8 = { version = "=0.11", features = ["encryption", "pkcs5"] }
pyo3 = { version = "=0.27", features = ["anyhow", "bytes", "extension-module", "generate-import-lib"] }
pyo3-log = { version = "=0.13", git = "https://github.com/gi0baro/pyo3-log.git", branch = "pyo3-027" }
pyo3 = { version = "=0.29", features = ["anyhow", "bytes", "extension-module", "generate-import-lib"] }
pyo3-log = { version = "=0.13.4" }
rustls-pemfile = "2.2"
serde = { version = "1.0.228", features = ["derive"] }
socket2 = { version = "=0.6", features = ["all"] }
Expand All @@ -64,7 +64,7 @@ tokio-tungstenite = "=0.29"
tokio-util = { version = "0.7", features = ["codec", "rt"] }

[build-dependencies]
pyo3-build-config = "=0.27"
pyo3-build-config = "=0.29"

[features]
jemalloc = ["dep:tikv-jemallocator"]
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ lint = [
]
test = [
'httpx~=0.28',
'pytest~=8.3',
'pytest-asyncio~=0.26',
'pytest~=9.0',
'pytest-asyncio~=1.3',
'sniffio~=1.3',
'websockets~=15.0',
'websockets~=16.0',
]

all = [
Expand Down
5 changes: 4 additions & 1 deletion src/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ impl CallbackScheduler {
impl CallbackScheduler {
#[inline]
pub(crate) fn schedule<T>(&self, py: Python, watcher: Py<T>) {
let cbarg = (watcher,).into_pyobject(py).unwrap().into_ptr();
let cbarg = (watcher.into_bound(py).into_any(),)
.into_pyobject(py)
.unwrap()
.into_ptr();
let sched = self.schedule_fn.get().unwrap().as_ptr();

unsafe {
Expand Down
4 changes: 2 additions & 2 deletions src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl SockAddr {
}
}

#[pyclass(frozen, module = "granian._granian")]
#[pyclass(frozen, module = "granian._granian", from_py_object)]
#[derive(Clone)]
pub struct ListenerSpec {
inp: (String, u16, i32),
Expand All @@ -58,7 +58,7 @@ pub struct ListenerSpec {
}

#[cfg(unix)]
#[pyclass(frozen, module = "granian._granian")]
#[pyclass(frozen, module = "granian._granian", from_py_object)]
#[derive(Clone)]
pub struct UnixListenerSpec {
inp: (String, i32),
Expand Down
2 changes: 1 addition & 1 deletion src/rsgi/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::{

const RSGI_PROTO_VERSION: &str = "1.6";

#[pyclass(frozen, module = "granian._granian")]
#[pyclass(frozen, module = "granian._granian", from_py_object)]
#[derive(Clone)]
pub(crate) struct RSGIHeaders {
inner: HeaderMap,
Expand Down
Loading