pybluetti 0.2.7__tar.gz → 0.2.8__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.
Files changed (29) hide show
  1. {pybluetti-0.2.7 → pybluetti-0.2.8}/CHANGELOG.md +4 -0
  2. {pybluetti-0.2.7 → pybluetti-0.2.8}/PKG-INFO +1 -1
  3. {pybluetti-0.2.7 → pybluetti-0.2.8}/pyproject.toml +1 -1
  4. {pybluetti-0.2.7 → pybluetti-0.2.8}/src/pybluetti/__init__.py +4 -3
  5. pybluetti-0.2.8/tests/test_package.py +11 -0
  6. pybluetti-0.2.7/tests/test_package.py +0 -7
  7. {pybluetti-0.2.7 → pybluetti-0.2.8}/.github/workflows/publish.yml +0 -0
  8. {pybluetti-0.2.7 → pybluetti-0.2.8}/.github/workflows/tests.yml +0 -0
  9. {pybluetti-0.2.7 → pybluetti-0.2.8}/.gitignore +0 -0
  10. {pybluetti-0.2.7 → pybluetti-0.2.8}/LICENSE +0 -0
  11. {pybluetti-0.2.7 → pybluetti-0.2.8}/README.md +0 -0
  12. {pybluetti-0.2.7 → pybluetti-0.2.8}/scripts/lint +0 -0
  13. {pybluetti-0.2.7 → pybluetti-0.2.8}/scripts/setup +0 -0
  14. {pybluetti-0.2.7 → pybluetti-0.2.8}/scripts/test +0 -0
  15. {pybluetti-0.2.7 → pybluetti-0.2.8}/scripts/typecheck +0 -0
  16. {pybluetti-0.2.7 → pybluetti-0.2.8}/src/pybluetti/client.py +0 -0
  17. {pybluetti-0.2.7 → pybluetti-0.2.8}/src/pybluetti/const.py +0 -0
  18. {pybluetti-0.2.7 → pybluetti-0.2.8}/src/pybluetti/exceptions.py +0 -0
  19. {pybluetti-0.2.7 → pybluetti-0.2.8}/src/pybluetti/models.py +0 -0
  20. {pybluetti-0.2.7 → pybluetti-0.2.8}/src/pybluetti/product_client.py +0 -0
  21. {pybluetti-0.2.7 → pybluetti-0.2.8}/src/pybluetti/py.typed +0 -0
  22. {pybluetti-0.2.7 → pybluetti-0.2.8}/src/pybluetti/unify_response.py +0 -0
  23. {pybluetti-0.2.7 → pybluetti-0.2.8}/src/pybluetti/websocket.py +0 -0
  24. {pybluetti-0.2.7 → pybluetti-0.2.8}/tests/__init__.py +0 -0
  25. {pybluetti-0.2.7 → pybluetti-0.2.8}/tests/test_const.py +0 -0
  26. {pybluetti-0.2.7 → pybluetti-0.2.8}/tests/test_exceptions.py +0 -0
  27. {pybluetti-0.2.7 → pybluetti-0.2.8}/tests/test_product_client.py +0 -0
  28. {pybluetti-0.2.7 → pybluetti-0.2.8}/tests/test_unify_response.py +0 -0
  29. {pybluetti-0.2.7 → pybluetti-0.2.8}/tests/test_websocket.py +0 -0
@@ -1,3 +1,7 @@
1
+ # 0.2.8
2
+
3
+ - `pybluetti.__version__` is read from the installed package's metadata, so it matches the released version. It had said `0.1.1` since that release.
4
+
1
5
  # 0.2.7
2
6
 
3
7
  - Every request now has a timeout of 10 seconds (`REQUEST_TIMEOUT` in `client.py`), set in `Bluetti._request()` and so on all four calls of `ProductClient`. There was none, so the session's own applied, and aiohttp's default for that is five minutes: when the gateway accepted a status request and never answered it, each `get_device_status()` held its caller for 300 s. In `bluetti-home-assistant`, which retries a timeout once and keeps the last values through two failed polls, that made one poll take ten minutes and left the entities on values up to half an hour old before they went unavailable (bluetti-community/bluetti-home-assistant#78). A request that runs out of time raises `TimeoutError`, as it did before after the five minutes, so a caller that already handles it needs no change. A caller that set a longer limit on its own session no longer gets it for these requests.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pybluetti
3
- Version: 0.2.7
3
+ Version: 0.2.8
4
4
  Summary: Async Python client for the BLUETTI cloud API - device discovery, state, and control.
5
5
  Project-URL: Homepage, https://github.com/bluetti-community/pybluetti
6
6
  Project-URL: Used by, https://github.com/bluetti-community/bluetti-home-assistant
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "pybluetti"
7
- version = "0.2.7"
7
+ version = "0.2.8"
8
8
  description = "Async Python client for the BLUETTI cloud API - device discovery, state, and control."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -6,10 +6,11 @@ https://github.com/bluetti-official/bluetti-home-assistant's
6
6
  custom_components/bluetti/api/, the same way
7
7
  https://github.com/pyenphase/pyenphase backs the enphase_envoy Home Assistant
8
8
  integration. Fully async, including the websocket push-update transport
9
- (`aiohttp`'s native websocket client, no dedicated threads). Wiring
10
- bluetti-home-assistant to depend on this package is a separate follow-up.
9
+ (`aiohttp`'s native websocket client, no dedicated threads).
11
10
  """
12
11
 
12
+ from importlib.metadata import version
13
+
13
14
  from .client import Bluetti
14
15
  from .const import Method
15
16
  from .exceptions import ApplicationRuntimeException, HttpStatusException
@@ -18,7 +19,7 @@ from .product_client import ProductClient
18
19
  from .unify_response import UnifyResponse
19
20
  from .websocket import StompClient
20
21
 
21
- __version__ = "0.1.1"
22
+ __version__ = version("pybluetti")
22
23
 
23
24
  __all__ = [
24
25
  "ApplicationRuntimeException",
@@ -0,0 +1,11 @@
1
+ """The package's own metadata."""
2
+
3
+ from importlib.metadata import version
4
+
5
+ import pybluetti
6
+
7
+
8
+ def test_version_is_the_installed_packages() -> None:
9
+ # Hard-coded, it stayed at 0.1.1 through every release after that one.
10
+ assert pybluetti.__version__ == version("pybluetti")
11
+ assert pybluetti.__version__ != "0.1.1"
@@ -1,7 +0,0 @@
1
- """Placeholder test so CI has something to run before code is migrated in."""
2
-
3
- import pybluetti
4
-
5
-
6
- def test_package_is_importable_and_versioned() -> None:
7
- assert pybluetti.__version__ == "0.1.1"
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