HAP-python 4.9.2__tar.gz → 5.0.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.
Files changed (53) hide show
  1. hap_python-5.0.0/AUTHORS +6 -0
  2. {hap_python-4.9.2 → hap_python-5.0.0}/HAP_python.egg-info/PKG-INFO +12 -12
  3. {hap_python-4.9.2 → hap_python-5.0.0}/HAP_python.egg-info/SOURCES.txt +1 -1
  4. {hap_python-4.9.2 → hap_python-5.0.0}/HAP_python.egg-info/requires.txt +3 -1
  5. hap_python-5.0.0/MANIFEST.in +1 -0
  6. {hap_python-4.9.2 → hap_python-5.0.0}/PKG-INFO +12 -12
  7. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/accessory.py +3 -1
  8. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/accessory_driver.py +8 -3
  9. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/camera.py +390 -308
  10. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/characteristic.py +1 -0
  11. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/const.py +4 -4
  12. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/encoder.py +1 -0
  13. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/hap_crypto.py +1 -0
  14. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/hap_handler.py +11 -5
  15. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/hap_protocol.py +1 -0
  16. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/iid_manager.py +1 -0
  17. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/loader.py +1 -0
  18. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/state.py +2 -1
  19. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/tlv.py +2 -1
  20. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/util.py +9 -3
  21. {hap_python-4.9.2 → hap_python-5.0.0}/pyproject.toml +53 -1
  22. {hap_python-4.9.2 → hap_python-5.0.0}/setup.cfg +0 -3
  23. {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_accessory.py +9 -11
  24. {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_accessory_driver.py +49 -67
  25. {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_camera.py +3 -1
  26. {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_characteristic.py +1 -0
  27. {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_encoder.py +1 -0
  28. {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_hap_crypto.py +0 -1
  29. {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_hap_handler.py +15 -15
  30. {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_hap_protocol.py +20 -24
  31. {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_hap_server.py +8 -13
  32. {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_iid_manager.py +1 -0
  33. {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_loader.py +1 -0
  34. {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_service.py +18 -12
  35. {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_state.py +23 -14
  36. {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_util.py +1 -0
  37. hap_python-4.9.2/MANIFEST.in +0 -2
  38. hap_python-4.9.2/setup.py +0 -68
  39. {hap_python-4.9.2 → hap_python-5.0.0}/HAP_python.egg-info/dependency_links.txt +0 -0
  40. {hap_python-4.9.2 → hap_python-5.0.0}/HAP_python.egg-info/top_level.txt +0 -0
  41. {hap_python-4.9.2 → hap_python-5.0.0}/LICENSE +0 -0
  42. {hap_python-4.9.2 → hap_python-5.0.0}/README.md +0 -0
  43. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/__init__.py +0 -0
  44. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/hap_event.py +0 -0
  45. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/hap_server.py +0 -0
  46. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/hsrp.py +0 -0
  47. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/params.py +0 -0
  48. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/resources/characteristics.json +0 -0
  49. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/resources/services.json +0 -0
  50. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/resources/snapshot.jpg +0 -0
  51. {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/service.py +0 -0
  52. {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_hsrp.py +0 -0
  53. {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_tlv.py +0 -0
@@ -0,0 +1,6 @@
1
+ cdce8p
2
+ jslay88
3
+ Ivan Kalchev <ikalchev> - Maintainer of the library
4
+ Lee Marlow <lmarlow>
5
+ Matthew Schinckel <schinckel>
6
+ Miroslav Kudrnac <mkudrnac>
@@ -1,30 +1,29 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: HAP-python
3
- Version: 4.9.2
3
+ Version: 5.0.0
4
4
  Summary: HomeKit Accessory Protocol implementation in python
5
- Home-page: https://github.com/ikalchev/HAP-python
6
- License: Apache License 2.0
5
+ Author: Ivan Kalchev
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Source, https://github.com/ikalchev/HAP-python
7
8
  Project-URL: Bug Reports, https://github.com/ikalchev/HAP-python/issues
8
9
  Project-URL: Documentation, http://hap-python.readthedocs.io/en/latest/
9
- Project-URL: Source, https://github.com/ikalchev/HAP-python/tree/master
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Intended Audience :: End Users/Desktop
13
- Classifier: License :: OSI Approved :: Apache Software License
14
13
  Classifier: Natural Language :: English
15
14
  Classifier: Operating System :: OS Independent
16
- Classifier: Programming Language :: Python :: 3.5
17
- Classifier: Programming Language :: Python :: 3.6
18
- Classifier: Programming Language :: Python :: 3.7
19
- Classifier: Programming Language :: Python :: 3.8
20
15
  Classifier: Programming Language :: Python :: 3.9
21
16
  Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
22
20
  Classifier: Topic :: Home Automation
23
21
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
- Requires-Python: >=3.7
22
+ Requires-Python: >=3.9
25
23
  Description-Content-Type: text/markdown
26
24
  License-File: LICENSE
27
- Requires-Dist: async_timeout
25
+ License-File: AUTHORS
26
+ Requires-Dist: async_timeout; python_version < "3.11"
28
27
  Requires-Dist: cryptography
29
28
  Requires-Dist: chacha20poly1305-reuseable
30
29
  Requires-Dist: orjson>=3.7.2
@@ -33,6 +32,7 @@ Requires-Dist: h11
33
32
  Provides-Extra: qrcode
34
33
  Requires-Dist: base36; extra == "qrcode"
35
34
  Requires-Dist: pyqrcode; extra == "qrcode"
35
+ Dynamic: license-file
36
36
 
37
37
  [![PyPI version](https://badge.fury.io/py/HAP-python.svg)](https://badge.fury.io/py/HAP-python) [![Build Status](https://github.com/ikalchev/HAP-python/workflows/CI/badge.svg)](https://github.com/ikalchev/HAP-python) [![codecov](https://codecov.io/gh/ikalchev/HAP-python/branch/master/graph/badge.svg)](https://codecov.io/gh/ikalchev/HAP-python) [![Python Versions](https://img.shields.io/pypi/pyversions/HAP-python.svg)](https://pypi.python.org/pypi/HAP-python/) [![Documentation Status](https://readthedocs.org/projects/hap-python/badge/?version=latest)](http://hap-python.readthedocs.io/en/latest/?badge=latest) [![Downloads](https://pepy.tech/badge/hap-python)](https://pepy.tech/project/hap-python)
38
38
  # HAP-python
@@ -1,9 +1,9 @@
1
+ AUTHORS
1
2
  LICENSE
2
3
  MANIFEST.in
3
4
  README.md
4
5
  pyproject.toml
5
6
  setup.cfg
6
- setup.py
7
7
  HAP_python.egg-info/PKG-INFO
8
8
  HAP_python.egg-info/SOURCES.txt
9
9
  HAP_python.egg-info/dependency_links.txt
@@ -1,10 +1,12 @@
1
- async_timeout
2
1
  cryptography
3
2
  chacha20poly1305-reuseable
4
3
  orjson>=3.7.2
5
4
  zeroconf>=0.36.2
6
5
  h11
7
6
 
7
+ [:python_version < "3.11"]
8
+ async_timeout
9
+
8
10
  [QRCode]
9
11
  base36
10
12
  pyqrcode
@@ -0,0 +1 @@
1
+ recursive-include pyhap/resources *
@@ -1,30 +1,29 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: HAP-python
3
- Version: 4.9.2
3
+ Version: 5.0.0
4
4
  Summary: HomeKit Accessory Protocol implementation in python
5
- Home-page: https://github.com/ikalchev/HAP-python
6
- License: Apache License 2.0
5
+ Author: Ivan Kalchev
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Source, https://github.com/ikalchev/HAP-python
7
8
  Project-URL: Bug Reports, https://github.com/ikalchev/HAP-python/issues
8
9
  Project-URL: Documentation, http://hap-python.readthedocs.io/en/latest/
9
- Project-URL: Source, https://github.com/ikalchev/HAP-python/tree/master
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Intended Audience :: End Users/Desktop
13
- Classifier: License :: OSI Approved :: Apache Software License
14
13
  Classifier: Natural Language :: English
15
14
  Classifier: Operating System :: OS Independent
16
- Classifier: Programming Language :: Python :: 3.5
17
- Classifier: Programming Language :: Python :: 3.6
18
- Classifier: Programming Language :: Python :: 3.7
19
- Classifier: Programming Language :: Python :: 3.8
20
15
  Classifier: Programming Language :: Python :: 3.9
21
16
  Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
22
20
  Classifier: Topic :: Home Automation
23
21
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
- Requires-Python: >=3.7
22
+ Requires-Python: >=3.9
25
23
  Description-Content-Type: text/markdown
26
24
  License-File: LICENSE
27
- Requires-Dist: async_timeout
25
+ License-File: AUTHORS
26
+ Requires-Dist: async_timeout; python_version < "3.11"
28
27
  Requires-Dist: cryptography
29
28
  Requires-Dist: chacha20poly1305-reuseable
30
29
  Requires-Dist: orjson>=3.7.2
@@ -33,6 +32,7 @@ Requires-Dist: h11
33
32
  Provides-Extra: qrcode
34
33
  Requires-Dist: base36; extra == "qrcode"
35
34
  Requires-Dist: pyqrcode; extra == "qrcode"
35
+ Dynamic: license-file
36
36
 
37
37
  [![PyPI version](https://badge.fury.io/py/HAP-python.svg)](https://badge.fury.io/py/HAP-python) [![Build Status](https://github.com/ikalchev/HAP-python/workflows/CI/badge.svg)](https://github.com/ikalchev/HAP-python) [![codecov](https://codecov.io/gh/ikalchev/HAP-python/branch/master/graph/badge.svg)](https://codecov.io/gh/ikalchev/HAP-python) [![Python Versions](https://img.shields.io/pypi/pyversions/HAP-python.svg)](https://pypi.python.org/pypi/HAP-python/) [![Documentation Status](https://readthedocs.org/projects/hap-python/badge/?version=latest)](http://hap-python.readthedocs.io/en/latest/?badge=latest) [![Downloads](https://pepy.tech/badge/hap-python)](https://pepy.tech/project/hap-python)
38
38
  # HAP-python
@@ -1,4 +1,5 @@
1
1
  """Module for the Accessory classes."""
2
+
2
3
  import itertools
3
4
  import logging
4
5
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Optional
@@ -207,7 +208,8 @@ class Accessory:
207
208
  int(self.driver.state.pincode.replace(b"-", b""), 10) & 0x7FFFFFFF
208
209
  ) # pincode
209
210
 
210
- encoded_payload = base36.dumps(payload).upper() # pylint: disable=possibly-used-before-assignment
211
+ # pylint: disable-next=possibly-used-before-assignment
212
+ encoded_payload = base36.dumps(payload).upper()
211
213
  encoded_payload = encoded_payload.rjust(9, "0")
212
214
 
213
215
  return "X-HM://" + encoded_payload + self.driver.state.setup_id
@@ -15,6 +15,7 @@ one Accessory in it). If so, a task is created to send the event to the subscrib
15
15
  terminates the call chain and concludes the publishing process from the Characteristic,
16
16
  the Characteristic does not block waiting for the actual send to happen.
17
17
  """
18
+
18
19
  import asyncio
19
20
  import base64
20
21
  from collections import defaultdict
@@ -212,7 +213,7 @@ class AccessoryDriver:
212
213
  advertised_address=None,
213
214
  interface_choice=None,
214
215
  async_zeroconf_instance=None,
215
- zeroconf_server=None
216
+ zeroconf_server=None,
216
217
  ):
217
218
  """
218
219
  Initialize a new AccessoryDriver object.
@@ -323,7 +324,7 @@ class AccessoryDriver:
323
324
  and os.name != "nt"
324
325
  ):
325
326
  logger.debug("Setting child watcher")
326
- watcher = asyncio.SafeChildWatcher() # pylint: disable=deprecated-class
327
+ watcher = asyncio.SafeChildWatcher() # pylint: disable=deprecated-class
327
328
  watcher.attach_loop(self.loop)
328
329
  asyncio.set_child_watcher(watcher)
329
330
  else:
@@ -647,7 +648,11 @@ class AccessoryDriver:
647
648
  mode="w", dir=temp_dir, delete=False
648
649
  ) as file_handle:
649
650
  tmp_filename = file_handle.name
650
- logger.debug("Created temp persist file '%s' named '%s'", file_handle, tmp_filename)
651
+ logger.debug(
652
+ "Created temp persist file '%s' named '%s'",
653
+ file_handle,
654
+ tmp_filename,
655
+ )
651
656
  self.encoder.persist(file_handle, self.state)
652
657
  if (
653
658
  os.name == "nt"