Skip to content

Commit 1ea2f29

Browse files
authored
Upgrade to pyo3 ^0.17.0, set version to v0.9.0 (#8)
* Drop python 3.6 * Upgrade to pyo3 ^0.17.0 * Set version to v0.9.0 * Drop python 3.6 from CI * Format
1 parent 9846ac3 commit 1ea2f29

File tree

6 files changed

+57
-67
lines changed

6 files changed

+57
-67
lines changed

Cargo.lock

Lines changed: 46 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[package]
22
name = "spacy-alignments"
3-
version = "0.8.6"
3+
version = "0.9.0"
44
authors = ["Explosion <[email protected]>"]
55
edition = "2018"
66

77
[dependencies]
88
tokenizations = "0.4.2"
99

1010
[dependencies.pyo3]
11-
version = "^0.15.0"
11+
version = "^0.17.0"
1212
features = ["extension-module"]
1313

1414
[lib]

azure-pipelines.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ jobs:
1616
- job: 'Test'
1717
strategy:
1818
matrix:
19-
Python36Linux:
20-
imageName: 'ubuntu-20.04'
21-
python.version: '3.6'
2219
Python37Windows:
2320
imageName: 'windows-latest'
2421
python.version: '3.7'

setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ classifiers =
2020
Programming Language :: Rust
2121
Programming Language :: Python
2222
Programming Language :: Python :: 3
23-
Programming Language :: Python :: 3.6
2423
Programming Language :: Python :: 3.7
2524
Programming Language :: Python :: 3.8
2625
Programming Language :: Python :: 3.9
@@ -30,7 +29,7 @@ classifiers =
3029
[options]
3130
zip_safe = false
3231
include_package_data = true
33-
python_requires = >=3.6
32+
python_requires = >=3.7
3433
setup_requires =
3534
setuptools-rust
3635

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name="spacy-alignments",
10-
version="0.8.6",
10+
version="0.9.0",
1111
packages=["spacy_alignments", "spacy_alignments.tests"],
1212
rust_extensions=[RustExtension("spacy_alignments.tokenizations")],
1313
)

src/lib.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ use pyo3::prelude::*;
33
use tokenizations::{get_alignments, get_charmap, Alignment, CharMap};
44

55
#[pymodule]
6-
fn tokenizations(_py: Python, m: &PyModule) -> PyResult<()> {
7-
m.add("__version__", "0.8.3")?;
6+
#[pyo3(name = "tokenizations")]
7+
fn tokenizations_(_py: Python, m: &PyModule) -> PyResult<()> {
8+
m.add("__version__", "0.9.0")?;
89

9-
#[pyfn(m, "get_alignments")]
10+
#[pyfn(m)]
11+
#[pyo3(name = "get_alignments")]
1012
pub fn get_alignments_py(
1113
_py: Python,
1214
a: Vec<&str>,
@@ -15,7 +17,8 @@ fn tokenizations(_py: Python, m: &PyModule) -> PyResult<()> {
1517
Ok(get_alignments(&a, &b))
1618
}
1719

18-
#[pyfn(m, "get_charmap")]
20+
#[pyfn(m)]
21+
#[pyo3(name = "get_charmap")]
1922
pub fn get_charmap_py(_py: Python, a: &str, b: &str) -> PyResult<(CharMap, CharMap)> {
2023
Ok(get_charmap(a, b))
2124
}

0 commit comments

Comments
 (0)