From 9c13bb441ee4eb88a100ed363fc431ec8fd30c43 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Tue, 29 Oct 2024 07:04:14 -0700 Subject: [PATCH 1/3] Make tokenizers optional for Python 3.13 compatibility Refs https://github.com/anthropics/anthropic-sdk-python/issues/718 --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1ccb9a45..e2442588 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,11 +14,9 @@ dependencies = [ "anyio>=3.5.0, <5", "distro>=1.7.0, <2", "sniffio", - "cached-property; python_version < '3.8'", - "tokenizers >= 0.13.0", "jiter>=0.4.0, <1", ] -requires-python = ">= 3.7" +requires-python = ">= 3.8" classifiers = [ "Typing :: Typed", "Intended Audience :: Developers", From 95a0139a05ea8b3ee85a25b70dbe5afb3519d136 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Tue, 29 Oct 2024 10:04:39 -0700 Subject: [PATCH 2/3] Add tokenizers as a dev-dependency Refs https://github.com/anthropics/anthropic-sdk-python/pull/719#issuecomment-2444823665 --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index e2442588..8eccd4a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,6 +61,7 @@ dev-dependencies = [ "importlib-metadata>=6.7.0", "boto3-stubs >= 1", "rich>=13.7.1", + 'tokenizers", ] [tool.rye.scripts] From 4ee5d0999bfe28550f0728f28db520ae5898f5b4 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Wed, 30 Oct 2024 17:38:14 -0700 Subject: [PATCH 3/3] Update pyproject.toml Co-authored-by: Peter Schilling --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8eccd4a8..3f51a93b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ dev-dependencies = [ "importlib-metadata>=6.7.0", "boto3-stubs >= 1", "rich>=13.7.1", - 'tokenizers", + "tokenizers", ] [tool.rye.scripts]