From ab7121b53e173f148ce5b5bfab2dc0df01a0e7bd Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Wed, 27 Dec 2023 20:47:55 +0100 Subject: [PATCH] Bump minimum python version to 3.8 --- bindings/python/CHANGELOG.md | 1 + bindings/python/Cargo.toml | 2 +- bindings/python/pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bindings/python/CHANGELOG.md b/bindings/python/CHANGELOG.md index 50f49d51..a519cb58 100644 --- a/bindings/python/CHANGELOG.md +++ b/bindings/python/CHANGELOG.md @@ -8,6 +8,7 @@ ### Breaking Changes +- Minimum Python version is now 3.8. - Due to using binary search, there are some slight differences at the edges of chunks where the algorithm was a little greedier before. If two candidates would tokenize to the same amount of tokens that fit within the capacity, it will now choose the shorter text. Due to the nature of of tokenizers, this happens more often with whitespace at the end of a chunk, and rarely effects users who have set `trim_chunks=true`. It is a tradeoff, but would have made the binary search code much more complicated to keep the exact same behavior. ## v0.2.4 diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 5ec436c7..20a9061d 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -14,7 +14,7 @@ name = "semantic_text_splitter" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.20.0", features = ["abi3-py37"] } +pyo3 = { version = "0.20.0", features = ["abi3-py38"] } text-splitter = { version = "0.5.0", features = ["tiktoken-rs", "tokenizers"] } tiktoken-rs = "0.5.8" tokenizers = { version = "0.15.0", default_features = false, features = [ diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml index 03fffc71..d165f476 100644 --- a/bindings/python/pyproject.toml +++ b/bindings/python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "semantic-text-splitter" -requires-python = ">=3.7" +requires-python = ">=3.8" classifiers = [ "Programming Language :: Rust", "Programming Language :: Python :: Implementation :: CPython",