uiprotect 6.1.0__tar.gz → 6.3.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.

Potentially problematic release.


This version of uiprotect might be problematic. Click here for more details.

Files changed (37) hide show
  1. {uiprotect-6.1.0 → uiprotect-6.3.0}/PKG-INFO +2 -1
  2. {uiprotect-6.1.0 → uiprotect-6.3.0}/pyproject.toml +2 -1
  3. uiprotect-6.3.0/src/uiprotect/_compat.py +8 -0
  4. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/api.py +2 -1
  5. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/data/base.py +2 -1
  6. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/data/types.py +3 -1
  7. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/data/websocket.py +2 -1
  8. {uiprotect-6.1.0 → uiprotect-6.3.0}/LICENSE +0 -0
  9. {uiprotect-6.1.0 → uiprotect-6.3.0}/README.md +0 -0
  10. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/__init__.py +0 -0
  11. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/__main__.py +0 -0
  12. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/cli/__init__.py +0 -0
  13. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/cli/backup.py +0 -0
  14. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/cli/base.py +0 -0
  15. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/cli/cameras.py +0 -0
  16. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/cli/chimes.py +0 -0
  17. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/cli/doorlocks.py +0 -0
  18. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/cli/events.py +0 -0
  19. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/cli/lights.py +0 -0
  20. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/cli/liveviews.py +0 -0
  21. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/cli/nvr.py +0 -0
  22. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/cli/sensors.py +0 -0
  23. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/cli/viewers.py +0 -0
  24. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/data/__init__.py +0 -0
  25. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/data/bootstrap.py +0 -0
  26. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/data/convert.py +0 -0
  27. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/data/devices.py +0 -0
  28. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/data/nvr.py +0 -0
  29. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/data/user.py +0 -0
  30. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/exceptions.py +0 -0
  31. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/py.typed +0 -0
  32. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/release_cache.json +0 -0
  33. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/stream.py +0 -0
  34. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/test_util/__init__.py +0 -0
  35. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/test_util/anonymize.py +0 -0
  36. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/utils.py +0 -0
  37. {uiprotect-6.1.0 → uiprotect-6.3.0}/src/uiprotect/websocket.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: uiprotect
3
- Version: 6.1.0
3
+ Version: 6.3.0
4
4
  Summary: Python API for Unifi Protect (Unofficial)
5
5
  Home-page: https://github.com/uilibs/uiprotect
6
6
  Author: UI Protect Maintainers
@@ -27,6 +27,7 @@ Requires-Dist: orjson (>=3.9.15)
27
27
  Requires-Dist: packaging (>=23)
28
28
  Requires-Dist: pillow (>=10)
29
29
  Requires-Dist: platformdirs (>=4)
30
+ Requires-Dist: propcache (>=0.0.0)
30
31
  Requires-Dist: pydantic (>=1.10.17)
31
32
  Requires-Dist: pyjwt (>=2.6)
32
33
  Requires-Dist: rich (>=10)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "uiprotect"
3
- version = "6.1.0"
3
+ version = "6.3.0"
4
4
  description = "Python API for Unifi Protect (Unofficial)"
5
5
  authors = ["UI Protect Maintainers <ui@koston.org>"]
6
6
  readme = "README.md"
@@ -46,6 +46,7 @@ pyjwt = ">=2.6"
46
46
  yarl = ">=1.9"
47
47
  typer = ">=0.12.3"
48
48
  convertertools = ">=0.5.0"
49
+ propcache = ">=0.0.0"
49
50
 
50
51
  [tool.poetry.group.dev.dependencies]
51
52
  pytest = ">=7,<9"
@@ -0,0 +1,8 @@
1
+ """Compat for external lib versions."""
2
+
3
+ try:
4
+ from propcache.api import cached_property
5
+ except ImportError:
6
+ from propcache import cached_property
7
+
8
+ __all__ = ("cached_property",)
@@ -11,7 +11,7 @@ import sys
11
11
  import time
12
12
  from collections.abc import Callable
13
13
  from datetime import datetime, timedelta
14
- from functools import cached_property, partial
14
+ from functools import partial
15
15
  from http import HTTPStatus
16
16
  from http.cookies import Morsel, SimpleCookie
17
17
  from ipaddress import IPv4Address, IPv6Address
@@ -27,6 +27,7 @@ from aiohttp import CookieJar, client_exceptions
27
27
  from platformdirs import user_cache_dir, user_config_dir
28
28
  from yarl import URL
29
29
 
30
+ from ._compat import cached_property
30
31
  from .data import (
31
32
  NVR,
32
33
  Bootstrap,
@@ -6,7 +6,7 @@ import asyncio
6
6
  import logging
7
7
  from collections.abc import Callable
8
8
  from datetime import datetime, timedelta
9
- from functools import cache, cached_property
9
+ from functools import cache
10
10
  from ipaddress import IPv4Address
11
11
  from typing import TYPE_CHECKING, Any, NamedTuple, TypeVar
12
12
  from uuid import UUID
@@ -15,6 +15,7 @@ from convertertools import pop_dict_set_if_none, pop_dict_tuple
15
15
  from pydantic.v1 import BaseModel
16
16
  from pydantic.v1.fields import SHAPE_DICT, SHAPE_LIST, PrivateAttr
17
17
 
18
+ from .._compat import cached_property
18
19
  from ..exceptions import BadRequest, ClientError, NotAuthorized
19
20
  from ..utils import (
20
21
  asyncio_timeout,
@@ -2,7 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  import enum
4
4
  from collections.abc import Callable, Coroutine
5
- from functools import cache, cached_property
5
+ from functools import cache
6
6
  from typing import Any, Literal, Optional, TypeVar, Union
7
7
 
8
8
  from packaging.version import Version as BaseVersion
@@ -10,6 +10,8 @@ from pydantic.v1 import BaseModel, ConstrainedInt
10
10
  from pydantic.v1.color import Color as BaseColor
11
11
  from pydantic.v1.types import ConstrainedFloat, ConstrainedStr
12
12
 
13
+ from .._compat import cached_property
14
+
13
15
  KT = TypeVar("KT")
14
16
  VT = TypeVar("VT")
15
17
 
@@ -7,11 +7,12 @@ import enum
7
7
  import struct
8
8
  import zlib
9
9
  from dataclasses import dataclass
10
- from functools import cache, cached_property
10
+ from functools import cache
11
11
  from typing import TYPE_CHECKING, Any
12
12
 
13
13
  import orjson
14
14
 
15
+ from .._compat import cached_property
15
16
  from ..exceptions import WSDecodeError, WSEncodeError
16
17
  from .types import ProtectWSPayloadFormat
17
18
 
File without changes
File without changes