Build and Push Docker Container / build-and-push (push) Successful in 2m25s
- Require Python 3.15 for the server and Python 3.14 for the CLI. - Match the server requirement to quart_common's Python 3.15 features. - Replace future annotations with native deferred evaluation. - Defer CLI command dependencies and QR imports on Python 3.15. - Enable argparse suggestions for mistyped CLI commands. - Remove the obsolete tomllib import fallback. - Update my_helpers and quart_common submodule references. - Lock test dependencies and exclude them from Docker installations. - Add regression coverage for lazy imports and deferred annotations. - Document runtime requirements and standalone CLI validation. - Validate 276 tests on Python 3.15 and 18 CLI tests on Python 3.14. BREAKING CHANGE: The server now requires Python 3.15+ and the standalone CLI requires Python 3.14+.
39 lines
1.6 KiB
Markdown
39 lines
1.6 KiB
Markdown
# NanoShare
|
|
Quart-based file sharing service with a desktop CLI and folder sync client.
|
|
|
|
## Python versions
|
|
- **Server: Python 3.15+**, matching the `quart_common` submodule's minimum.
|
|
`.python-version` and the Docker image select Python 3.15.
|
|
- **Standalone CLI: Python 3.14+**. Install with `uv tool install ./cli`.
|
|
|
|
## Modern Python features
|
|
- Native deferred annotations (Python 3.14, PEP 649/749) replace
|
|
`from __future__ import annotations` in application and CLI modules.
|
|
- The CLI uses Python 3.14's `argparse` command typo suggestions.
|
|
- Targeted `__lazy_modules__` declarations (Python 3.15, PEP 810) defer
|
|
command-specific CLI dependencies and QR/Pillow imports until needed.
|
|
Python 3.14 imports these normally. Server registration imports remain eager;
|
|
do not enable global lazy imports for the application.
|
|
|
|
## Development and tests
|
|
```bash
|
|
uv sync --locked
|
|
uv run --locked python -m pytest -q
|
|
```
|
|
|
|
The dev dependency group includes pytest, pytest-asyncio, and watchdog.
|
|
The Docker build excludes this group with `--no-dev`.
|
|
|
|
The complete suite includes `quart_common/tests` and requires Python 3.15.
|
|
For standalone CLI checks on Python 3.14, use a separate environment:
|
|
|
|
```bash
|
|
uv venv --python 3.14 /tmp/nanoshare-cli-py314
|
|
uv pip install --python /tmp/nanoshare-cli-py314/bin/python ./cli pytest
|
|
/tmp/nanoshare-cli-py314/bin/python -m pytest -q tests/test_nanoshare_cli.py
|
|
```
|
|
|
|
Regression tests in `tests/test_python_features.py` cover deferred annotations,
|
|
command suggestions, lazy help/completion imports, and QR rendering. Lazy import
|
|
checks are skipped on Python 3.14.
|