duckhaven-cli 0.1.1__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/CHANGELOG.md +6 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/PKG-INFO +2 -4
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/pyproject.toml +1 -4
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/_version.py +2 -2
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/commands/auth.py +2 -5
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/config.py +1 -6
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/output/__init__.py +2 -2
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/.gitignore +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/LICENSE +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/README.md +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/__init__.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/commands/__init__.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/commands/admin.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/commands/api.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/commands/catalog.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/commands/dbt.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/commands/grant.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/commands/health.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/commands/profile.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/commands/query.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/commands/saved.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/commands/session.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/context.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/errors.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/execute.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/introspect.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/main.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/repl.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/resolve.py +0 -0
- {duckhaven_cli-0.1.1 → duckhaven_cli-0.2.0}/src/dh/rest.py +0 -0
|
@@ -6,6 +6,12 @@ All notable changes to `duckhaven-cli` are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.2.0] - 2026-09-09
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Drop support for Python 3.10; the minimum supported version is now 3.11.
|
|
14
|
+
|
|
9
15
|
## [0.1.1] - 2026-09-09
|
|
10
16
|
|
|
11
17
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: duckhaven-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: dh — the command-line interface for DuckHaven
|
|
5
5
|
Project-URL: Homepage, https://github.com/tamasmrtn/duckhaven-clients
|
|
6
6
|
Project-URL: Source, https://github.com/tamasmrtn/duckhaven-clients
|
|
@@ -13,7 +13,6 @@ Classifier: Environment :: Console
|
|
|
13
13
|
Classifier: Intended Audience :: Developers
|
|
14
14
|
Classifier: Intended Audience :: System Administrators
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
@@ -21,11 +20,10 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
21
20
|
Classifier: Topic :: Database
|
|
22
21
|
Classifier: Topic :: Utilities
|
|
23
22
|
Classifier: Typing :: Typed
|
|
24
|
-
Requires-Python: >=3.
|
|
23
|
+
Requires-Python: >=3.11
|
|
25
24
|
Requires-Dist: click>=8.0
|
|
26
25
|
Requires-Dist: duckhaven-sql-connector>=0.4.1
|
|
27
26
|
Requires-Dist: httpx>=0.28
|
|
28
|
-
Requires-Dist: tomli>=2.0; python_version < '3.11'
|
|
29
27
|
Requires-Dist: typer>=0.15
|
|
30
28
|
Description-Content-Type: text/markdown
|
|
31
29
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name = "duckhaven-cli"
|
|
3
3
|
description = "dh — the command-line interface for DuckHaven"
|
|
4
4
|
readme = "README.md"
|
|
5
|
-
requires-python = ">=3.
|
|
5
|
+
requires-python = ">=3.11"
|
|
6
6
|
license = "Apache-2.0"
|
|
7
7
|
license-files = ["LICENSE"]
|
|
8
8
|
authors = [{ name = "DuckHaven" }]
|
|
@@ -13,7 +13,6 @@ classifiers = [
|
|
|
13
13
|
"Intended Audience :: Developers",
|
|
14
14
|
"Intended Audience :: System Administrators",
|
|
15
15
|
"Programming Language :: Python :: 3",
|
|
16
|
-
"Programming Language :: Python :: 3.10",
|
|
17
16
|
"Programming Language :: Python :: 3.11",
|
|
18
17
|
"Programming Language :: Python :: 3.12",
|
|
19
18
|
"Programming Language :: Python :: 3.13",
|
|
@@ -31,8 +30,6 @@ dependencies = [
|
|
|
31
30
|
# The SQL execution path (sessions, statements, polling, row pagination) is the
|
|
32
31
|
# connector's, not a second implementation of it.
|
|
33
32
|
"duckhaven-sql-connector>=0.4.1",
|
|
34
|
-
# tomllib is stdlib only from 3.11; the workspace floor is 3.10.
|
|
35
|
-
"tomli>=2.0; python_version < '3.11'",
|
|
36
33
|
]
|
|
37
34
|
dynamic = ["version"]
|
|
38
35
|
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.
|
|
22
|
-
__version_tuple__ = version_tuple = (0,
|
|
21
|
+
__version__ = version = '0.2.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 2, 0)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import math
|
|
6
|
-
|
|
7
|
-
# `datetime.UTC` is 3.11+, and this package supports 3.10. Importing it here
|
|
8
|
-
# broke every test that loads the app, on the one interpreter leg that checks.
|
|
9
|
-
from datetime import datetime, timedelta, timezone
|
|
6
|
+
from datetime import UTC, datetime, timedelta
|
|
10
7
|
|
|
11
8
|
import typer
|
|
12
9
|
|
|
@@ -198,7 +195,7 @@ def _warn_if_expiring(cli, expires_at: str | None) -> None:
|
|
|
198
195
|
moment = datetime.fromisoformat(expires_at.replace("Z", "+00:00"))
|
|
199
196
|
except ValueError: # pragma: no cover - the server sends ISO-8601
|
|
200
197
|
return
|
|
201
|
-
left = moment - datetime.now(tz=moment.tzinfo or
|
|
198
|
+
left = moment - datetime.now(tz=moment.tzinfo or UTC)
|
|
202
199
|
if left <= timedelta(0):
|
|
203
200
|
cli.note("This token has expired. Run `dh auth login` to get a new one.")
|
|
204
201
|
elif left <= _EXPIRY_WARNING:
|
|
@@ -16,17 +16,12 @@ from __future__ import annotations
|
|
|
16
16
|
|
|
17
17
|
import os
|
|
18
18
|
import stat
|
|
19
|
-
import
|
|
19
|
+
import tomllib
|
|
20
20
|
from dataclasses import dataclass, replace
|
|
21
21
|
from pathlib import Path
|
|
22
22
|
|
|
23
23
|
from dh.errors import ConfigError
|
|
24
24
|
|
|
25
|
-
if sys.version_info >= (3, 11): # pragma: no cover - exercised by the 3.11+ matrix legs
|
|
26
|
-
import tomllib
|
|
27
|
-
else: # pragma: no cover - exercised by the 3.10 matrix leg
|
|
28
|
-
import tomli as tomllib
|
|
29
|
-
|
|
30
25
|
#: Every profile field, in the order they are written back out.
|
|
31
26
|
FIELDS = ("host", "token", "workspace", "catalog", "agent")
|
|
32
27
|
|
|
@@ -15,13 +15,13 @@ import io
|
|
|
15
15
|
import json
|
|
16
16
|
import os
|
|
17
17
|
import sys
|
|
18
|
-
from enum import
|
|
18
|
+
from enum import StrEnum
|
|
19
19
|
from typing import Any, TextIO
|
|
20
20
|
|
|
21
21
|
from dh.errors import DhError
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
class Format(
|
|
24
|
+
class Format(StrEnum):
|
|
25
25
|
JSON = "json"
|
|
26
26
|
TABLE = "table"
|
|
27
27
|
CSV = "csv"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|