feat!: adopt Python 3.14 and 3.15 language features
Build and Push Docker Container / build-and-push (push) Successful in 2m25s
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+.
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
from __future__ import annotations
|
||||
# Python 3.15 defers command-specific imports; 3.14 imports them normally.
|
||||
__lazy_modules__ = [
|
||||
"nanoshare_client.app",
|
||||
"nanoshare_client.auth",
|
||||
"nanoshare_client.client",
|
||||
"nanoshare_client.completion",
|
||||
"nanoshare_client.sync",
|
||||
"nanoshare_client.table",
|
||||
"nanoshare_client.watch",
|
||||
]
|
||||
|
||||
import argparse
|
||||
import json
|
||||
@@ -120,7 +129,11 @@ def _add_common(parser: argparse.ArgumentParser) -> None:
|
||||
parser.add_argument('--node', default=DEFAULT_NODE, help='NanoShare node name.')
|
||||
|
||||
def main(argv: list[str] | None = None) -> int:
|
||||
parser = argparse.ArgumentParser(prog='nanoshare', description='NanoShare CLI and folder sync client.')
|
||||
parser = argparse.ArgumentParser(
|
||||
prog='nanoshare',
|
||||
description='NanoShare CLI and folder sync client.',
|
||||
suggest_on_error=True,
|
||||
)
|
||||
sub = parser.add_subparsers(dest='command', required=True)
|
||||
|
||||
login = sub.add_parser('login', help='Login via browser and write CLI config.')
|
||||
|
||||
Reference in New Issue
Block a user