Skip to content

Commit

Permalink
Migrate Python module to PyO3 0.22.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pemistahl committed Jul 5, 2024
1 parent 88c0db4 commit 930149f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
maturin == 1.4.0
pytest == 8.0.2
maturin == 1.6.0
pytest == 8.2.2
4 changes: 2 additions & 2 deletions src/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use pyo3::types::PyType;
use regex::{Captures, Regex};

#[pymodule]
fn grex(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
fn grex(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_class::<RegExpBuilder>()?;
Ok(())
}
Expand Down Expand Up @@ -55,7 +55,7 @@ impl RegExpBuilder {
/// Raises:
/// ValueError: if `test_cases` is empty
#[classmethod]
fn from_test_cases(_cls: &PyType, test_cases: Vec<String>) -> PyResult<Self> {
fn from_test_cases(_cls: &Bound<PyType>, test_cases: Vec<String>) -> PyResult<Self> {
Self::new(test_cases)
}

Expand Down

0 comments on commit 930149f

Please sign in to comment.