Upgrade to PyO3 0.17
This commit is contained in:
parent
1e7bfbc3ce
commit
0f776b8e6d
|
@ -18,7 +18,7 @@ crate-type = ["cdylib"]
|
||||||
ahash = "0.8"
|
ahash = "0.8"
|
||||||
bincode = "1.3.2"
|
bincode = "1.3.2"
|
||||||
instant-segment = { version = "0.10", path = "../instant-segment", features = ["with-serde"] }
|
instant-segment = { version = "0.10", path = "../instant-segment", features = ["with-serde"] }
|
||||||
pyo3 = { version = "0.16", features = ["extension-module"] }
|
pyo3 = { version = "0.17.1", features = ["extension-module"] }
|
||||||
smartstring = "1"
|
smartstring = "1"
|
||||||
|
|
||||||
[package.metadata.maturin]
|
[package.metadata.maturin]
|
||||||
|
|
|
@ -5,13 +5,14 @@ use std::fs::File;
|
||||||
use std::io::{BufReader, BufWriter};
|
use std::io::{BufReader, BufWriter};
|
||||||
|
|
||||||
use pyo3::exceptions::PyValueError;
|
use pyo3::exceptions::PyValueError;
|
||||||
use pyo3::proc_macro::{pyclass, pymethods, pymodule};
|
|
||||||
use pyo3::types::{PyIterator, PyModule};
|
use pyo3::types::{PyIterator, PyModule};
|
||||||
|
use pyo3::{pyclass, pymethods, pymodule};
|
||||||
use pyo3::{PyErr, PyRef, PyRefMut, PyResult, Python};
|
use pyo3::{PyErr, PyRef, PyRefMut, PyResult, Python};
|
||||||
use smartstring::alias::String as SmartString;
|
use smartstring::alias::String as SmartString;
|
||||||
|
|
||||||
#[pymodule]
|
#[pymodule]
|
||||||
fn instant_segment(_: Python, m: &PyModule) -> PyResult<()> {
|
#[pyo3(name = "instant_segment")]
|
||||||
|
fn instant_segment_py(_: Python, m: &PyModule) -> PyResult<()> {
|
||||||
m.add_class::<Search>()?;
|
m.add_class::<Search>()?;
|
||||||
m.add_class::<Segmenter>()?;
|
m.add_class::<Segmenter>()?;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in New Issue