python-amazon-echo 0.1.0__tar.gz → 0.1.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.
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/CHANGELOG.md +8 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/PKG-INFO +1 -1
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/pyproject.toml +1 -1
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/src/amazon_echo/__init__.py +1 -1
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/src/amazon_echo/client.py +2 -1
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/src/amazon_echo/const.py +1 -1
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/tests/test_client.py +9 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/tests/test_models.py +1 -1
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/.gitignore +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/LICENSE +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/README.md +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/src/amazon_echo/__main__.py +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/src/amazon_echo/auth.py +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/src/amazon_echo/exceptions.py +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/src/amazon_echo/local.py +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/src/amazon_echo/models.py +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/src/amazon_echo/push.py +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/src/amazon_echo/py.typed +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/tests/__init__.py +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/tests/conftest.py +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/tests/fixtures/automations.json +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/tests/fixtures/devices.json +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/tests/fixtures/graphql_endpoints.json +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/tests/fixtures/history.json +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/tests/fixtures/notifications.json +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/tests/fixtures/np_player.json +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/tests/test_auth.py +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/tests/test_local.py +0 -0
- {python_amazon_echo-0.1.0 → python_amazon_echo-0.1.1}/tests/test_push.py +0 -0
|
@@ -4,6 +4,14 @@ All notable changes to this project are documented here. The format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses
|
|
5
5
|
[Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [0.1.1] - 2026-11-16
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- A 401/403 within 60 s of system boot was treated as "rejected right after a
|
|
12
|
+
cookie refresh", because the cooldown started from `time.monotonic() == 0`.
|
|
13
|
+
Found by CI on a freshly booted runner.
|
|
14
|
+
|
|
7
15
|
## [0.1.0] - 2026-11-15
|
|
8
16
|
|
|
9
17
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: python-amazon-echo
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Async Python client for Amazon Echo / Alexa devices: state, settings, media, notifications, lists, HTTP/2 push and LAN discovery
|
|
5
5
|
Project-URL: Homepage, https://github.com/hudsonbrendon/python-amazon-echo
|
|
6
6
|
Project-URL: Repository, https://github.com/hudsonbrendon/python-amazon-echo
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "python-amazon-echo"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.1"
|
|
8
8
|
description = "Async Python client for Amazon Echo / Alexa devices: state, settings, media, notifications, lists, HTTP/2 push and LAN discovery"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -274,7 +274,8 @@ class AmazonEchoClient:
|
|
|
274
274
|
self._on_update = on_credentials_update
|
|
275
275
|
self._auth_lock = asyncio.Lock()
|
|
276
276
|
self._generation = 0
|
|
277
|
-
|
|
277
|
+
# -inf, not 0: time.monotonic() can be below the cooldown right after boot
|
|
278
|
+
self._last_exchange = float("-inf")
|
|
278
279
|
self._locale: str | None = None
|
|
279
280
|
self._devices: dict[str, Device] = {}
|
|
280
281
|
self._service_urls: dict[str, str] | None = None
|
|
@@ -1555,3 +1555,12 @@ async def test_call_feature_rejected(client, session):
|
|
|
1555
1555
|
await client.call_feature("e1", "power", "turnOn")
|
|
1556
1556
|
with pytest.raises(AmazonEchoResponseError, match="No response"):
|
|
1557
1557
|
await client.call_feature("e1", "power", "turnOn")
|
|
1558
|
+
|
|
1559
|
+
|
|
1560
|
+
async def test_cookie_refresh_works_right_after_boot(client, session, monkeypatch):
|
|
1561
|
+
"""A low monotonic clock (fresh boot) must not look like a recent refresh."""
|
|
1562
|
+
monkeypatch.setattr("amazon_echo.client.time.monotonic", lambda: 5.0)
|
|
1563
|
+
session.add("GET", "/api/x", FakeResponse(401), {"ok": 1})
|
|
1564
|
+
session.add("POST", "/auth/token", COOKIE_ANSWER)
|
|
1565
|
+
assert await client.request("GET", "/api/x") == {"ok": 1}
|
|
1566
|
+
assert len(session.sent("/auth/token")) == 1
|
|
@@ -7,7 +7,7 @@ from amazon_echo import Device, Notification, PushEvent
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
def test_public_api():
|
|
10
|
-
assert amazon_echo.__version__ == "0.1.
|
|
10
|
+
assert amazon_echo.__version__ == "0.1.1"
|
|
11
11
|
for name in amazon_echo.__all__:
|
|
12
12
|
assert hasattr(amazon_echo, name)
|
|
13
13
|
assert issubclass(
|
|
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
|