avios-cli 0.2.0__tar.gz → 0.2.1__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.
- {avios_cli-0.2.0 → avios_cli-0.2.1}/CHANGELOG.md +9 -1
- {avios_cli-0.2.0 → avios_cli-0.2.1}/PKG-INFO +1 -1
- {avios_cli-0.2.0 → avios_cli-0.2.1}/src/avios/__init__.py +1 -1
- {avios_cli-0.2.0 → avios_cli-0.2.1}/src/avios/session.py +9 -3
- {avios_cli-0.2.0 → avios_cli-0.2.1}/tests/test_session.py +10 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/.editorconfig +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/.github/dependabot.yml +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/.github/workflows/ci.yml +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/.github/workflows/publish.yml +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/.gitignore +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/.pre-commit-config.yaml +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/.python-version +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/CONTRIBUTING.md +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/LICENSE +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/README.md +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/SECURITY.md +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/docs/dashboard.svg +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/pyproject.toml +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/scripts/screenshot.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/src/avios/auth.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/src/avios/cli.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/src/avios/client.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/src/avios/config.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/src/avios/endpoints.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/src/avios/models.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/src/avios/tui/__init__.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/src/avios/tui/app.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/src/avios/tui/art.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/src/avios/tui/styles.tcss +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/src/avios/tui/widgets.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/tests/conftest.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/tests/fixtures/balance.json +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/tests/fixtures/transactions.json +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/tests/test_auth.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/tests/test_cli.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/tests/test_client.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/tests/test_models.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/tests/test_tui.py +0 -0
- {avios_cli-0.2.0 → avios_cli-0.2.1}/uv.lock +0 -0
|
@@ -6,6 +6,13 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.2.1] - 2026-07-27
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- An expired session made avios.com hang the request, surfacing as a confusing
|
|
13
|
+
"read operation timed out". Request timeouts are now treated as an expired
|
|
14
|
+
session with a clear "run `avios login` again" message.
|
|
15
|
+
|
|
9
16
|
## [0.2.0] - 2026-07-24
|
|
10
17
|
|
|
11
18
|
### Added
|
|
@@ -120,7 +127,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
120
127
|
- Reward-flight **availability** search is not yet implemented (needs a British
|
|
121
128
|
Airways capture).
|
|
122
129
|
|
|
123
|
-
[Unreleased]: https://github.com/alexechoi/avios-cli/compare/v0.2.
|
|
130
|
+
[Unreleased]: https://github.com/alexechoi/avios-cli/compare/v0.2.1...HEAD
|
|
131
|
+
[0.2.1]: https://github.com/alexechoi/avios-cli/compare/v0.2.0...v0.2.1
|
|
124
132
|
[0.2.0]: https://github.com/alexechoi/avios-cli/compare/v0.1.6...v0.2.0
|
|
125
133
|
[0.1.6]: https://github.com/alexechoi/avios-cli/compare/v0.1.5...v0.1.6
|
|
126
134
|
[0.1.5]: https://github.com/alexechoi/avios-cli/compare/v0.1.4...v0.1.5
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: avios-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: A CLI and TUI for avios.com — view your Avios balance and transactions from the terminal.
|
|
5
5
|
Project-URL: Homepage, https://github.com/alexechoi/avios-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/alexechoi/avios-cli
|
|
@@ -111,10 +111,16 @@ class Session:
|
|
|
111
111
|
"""GET ``path`` and return parsed JSON.
|
|
112
112
|
|
|
113
113
|
A redirect to the auth gateway (301/302) or a 401 means the session is no
|
|
114
|
-
longer valid, surfaced as :class:`SessionExpired`.
|
|
114
|
+
longer valid, surfaced as :class:`SessionExpired`. avios.com also *hangs*
|
|
115
|
+
requests from an expired session, so a timeout is treated the same way.
|
|
115
116
|
"""
|
|
116
|
-
|
|
117
|
-
|
|
117
|
+
try:
|
|
118
|
+
with self.client() as client:
|
|
119
|
+
response = client.get(path)
|
|
120
|
+
except httpx.TimeoutException as exc:
|
|
121
|
+
raise SessionExpired(
|
|
122
|
+
"Request timed out — your session has probably expired. Run `avios login` again."
|
|
123
|
+
) from exc
|
|
118
124
|
if response.status_code in (301, 302, 401):
|
|
119
125
|
raise SessionExpired("Session expired. Run `avios login` again.")
|
|
120
126
|
response.raise_for_status()
|
|
@@ -84,3 +84,13 @@ def test_get_json_raises_on_expired_session(settings: Settings, status: int) ->
|
|
|
84
84
|
session.save_cookies(AVIOS_COOKIE)
|
|
85
85
|
with pytest.raises(SessionExpired):
|
|
86
86
|
session.get_json("/manage-avios/api/user/current/balance")
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def test_get_json_timeout_is_session_expired(settings: Settings) -> None:
|
|
90
|
+
def handler(request: httpx.Request) -> httpx.Response:
|
|
91
|
+
raise httpx.ReadTimeout("read timed out", request=request)
|
|
92
|
+
|
|
93
|
+
session = _session(settings, httpx.MockTransport(handler))
|
|
94
|
+
session.save_cookies(AVIOS_COOKIE)
|
|
95
|
+
with pytest.raises(SessionExpired, match="timed out"):
|
|
96
|
+
session.get_json("/shell/api/users/current/accounts")
|
|
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
|
|
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
|