Package version
3.18.5
Package
lexical-graph
Python version
3.10, 3.11, 3.12 (CI)
Operating System
Linux
Description
As a stopgap for #468, we worked around nltk 3.10.3's pathsec hardlink check (CWE-59), which refuses to open uv-hardlinked NLTK data files and breaks sentence splitting. The workaround(s) currently in the codebase:
UV_LINK_MODE: copy in .github/workflows/lexical-graph-tests.yml
UV_LINK_MODE: copy in .github/workflows/byokg-rag-tests.yml
nltk<3.10.3 pin in lexical-graph/src/graphrag_toolkit/lexical_graph/requirements.txt,
These are intentional temporary measures. The proper fix belongs upstream, not in our code.
Revisit and remove the workarounds once upstream fix lands.
Steps to reproduce
On Linux, in a uv-created venv (uv hardlinks from its cache):
uv venv --seed .venv
uv pip install --python .venv/bin/python -e '.[test]' # resolves nltk 3.10.3
PYTHONPATH=src .venv/bin/python -m pytest tests/unit/indexing/extract/test_chunking.py
Error output / stack trace
Package version
3.18.5
Package
lexical-graph
Python version
3.10, 3.11, 3.12 (CI)
Operating System
Linux
Description
As a stopgap for #468, we worked around nltk 3.10.3's
pathsechardlink check (CWE-59), which refuses to openuv-hardlinked NLTK data files and breaks sentence splitting. The workaround(s) currently in the codebase:UV_LINK_MODE: copyin.github/workflows/lexical-graph-tests.ymlUV_LINK_MODE: copyin.github/workflows/byokg-rag-tests.ymlnltk<3.10.3pin inlexical-graph/src/graphrag_toolkit/lexical_graph/requirements.txt,These are intentional temporary measures. The proper fix belongs upstream, not in our code.
Revisit and remove the workarounds once upstream fix lands.
nltkpin fromrequirements.txt(if present), or widen it to allow the fixed nltk range.UV_LINK_MODE: copyfrom both test workflows (verify CI still green).test_chunking.py::TestChunkingBasicBehaviortests pass with the fixed nltk on auv-based Linux install.Steps to reproduce
Error output / stack trace