release(text-splitters): 0.3.11 (#32770)

Fixes #32747

SpaCy integration test fixture was trying to use pip to download the
SpaCy language model (`en_core_web_sm`), but uv-managed environments
don't include pip by default. Fail test if not installed as opposed to
downloading.
This commit is contained in:
Mason Daugherty
2025-08-31 18:00:05 -05:00
committed by GitHub
parent b42dac5fe6
commit 6b5fdfb804
3 changed files with 28 additions and 19 deletions

View File

@@ -20,7 +20,18 @@ def spacy() -> Any:
import spacy
except ImportError:
pytest.skip("Spacy not installed.")
spacy.cli.download("en_core_web_sm") # type: ignore[attr-defined,operator,unused-ignore]
# Check if en_core_web_sm model is available
try:
spacy.load("en_core_web_sm")
except OSError:
pytest.skip(
"en_core_web_sm model not installed. Install with: "
"uv add --group test_integration "
"https://github.com/explosion/spacy-models/releases/download/"
"en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl"
)
return spacy