docs/how-to/install.md gives this as the verify step:
uv run python -c "import nu; print(nu.__version__)"
It fails on a correctly installed tree:
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: module 'nu' has no attribute '__version__'
src/nu/__init__.py does not define __version__; the version lives only in pyproject.toml (version = "0.1.0").
This is the step a user runs to confirm the install worked, so it reads as a broken install rather than a broken doc.
Two ways to fix
Add the attribute (keeps the doc as written, and nu.__version__ is what people will reach for anyway):
# src/nu/__init__.py
from importlib.metadata import version as _version
__version__ = _version("nu")
Or change the doc to something that already works:
uv run python examples/basic.py # prints 42
The first seems better since the docs already promise the attribute, but the second is zero risk.
docs/how-to/install.mdgives this as the verify step:uv run python -c "import nu; print(nu.__version__)"It fails on a correctly installed tree:
src/nu/__init__.pydoes not define__version__; the version lives only inpyproject.toml(version = "0.1.0").This is the step a user runs to confirm the install worked, so it reads as a broken install rather than a broken doc.
Two ways to fix
Add the attribute (keeps the doc as written, and
nu.__version__is what people will reach for anyway):Or change the doc to something that already works:
uv run python examples/basic.py # prints 42The first seems better since the docs already promise the attribute, but the second is zero risk.