lifx-async 4.9.0__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 (168) hide show
  1. {lifx_async-4.9.0 → lifx_async-5.0.0}/.github/workflows/ci.yml +4 -4
  2. {lifx_async-4.9.0 → lifx_async-5.0.0}/.github/workflows/docs.yml +3 -3
  3. {lifx_async-4.9.0 → lifx_async-5.0.0}/PKG-INFO +3 -2
  4. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/changelog.md +13 -0
  5. {lifx_async-4.9.0 → lifx_async-5.0.0}/pyproject.toml +8 -5
  6. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/api.py +34 -36
  7. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/devices/base.py +25 -22
  8. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/devices/hev.py +14 -18
  9. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/devices/light.py +15 -15
  10. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/devices/multizone.py +8 -12
  11. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/effects/base.py +11 -7
  12. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/effects/colorloop.py +4 -10
  13. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/effects/conductor.py +43 -46
  14. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/effects/pulse.py +4 -10
  15. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/network/connection.py +1 -1
  16. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/network/mdns/transport.py +4 -3
  17. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/network/transport.py +70 -63
  18. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_api/test_api_batch_errors.py +30 -53
  19. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_network/test_connection.py +9 -7
  20. {lifx_async-4.9.0 → lifx_async-5.0.0}/uv.lock +113 -6
  21. {lifx_async-4.9.0 → lifx_async-5.0.0}/.claude/settings.json +0 -0
  22. {lifx_async-4.9.0 → lifx_async-5.0.0}/.github/dependabot.yml +0 -0
  23. {lifx_async-4.9.0 → lifx_async-5.0.0}/.github/labeler.yml +0 -0
  24. {lifx_async-4.9.0 → lifx_async-5.0.0}/.github/workflows/pr-automation.yml +0 -0
  25. {lifx_async-4.9.0 → lifx_async-5.0.0}/.gitignore +0 -0
  26. {lifx_async-4.9.0 → lifx_async-5.0.0}/.pre-commit-config.yaml +0 -0
  27. {lifx_async-4.9.0 → lifx_async-5.0.0}/CLAUDE.md +0 -0
  28. {lifx_async-4.9.0 → lifx_async-5.0.0}/LICENSE +0 -0
  29. {lifx_async-4.9.0 → lifx_async-5.0.0}/README.md +0 -0
  30. {lifx_async-4.9.0 → lifx_async-5.0.0}/context7.json +0 -0
  31. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/api/colors.md +0 -0
  32. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/api/devices.md +0 -0
  33. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/api/effects.md +0 -0
  34. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/api/exceptions.md +0 -0
  35. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/api/high-level.md +0 -0
  36. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/api/index.md +0 -0
  37. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/api/network.md +0 -0
  38. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/api/protocol.md +0 -0
  39. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/api/themes.md +0 -0
  40. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/architecture/effects-architecture.md +0 -0
  41. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/architecture/overview.md +0 -0
  42. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/faq.md +0 -0
  43. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/getting-started/effects.md +0 -0
  44. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/getting-started/installation.md +0 -0
  45. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/getting-started/quickstart.md +0 -0
  46. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/getting-started/themes.md +0 -0
  47. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/index.md +0 -0
  48. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/migration/effect-api-changes.md +0 -0
  49. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/stylesheets/extra.css +0 -0
  50. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/user-guide/advanced-usage.md +0 -0
  51. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/user-guide/ceiling-lights.md +0 -0
  52. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/user-guide/effects-custom.md +0 -0
  53. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/user-guide/effects-troubleshooting.md +0 -0
  54. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/user-guide/protocol-deep-dive.md +0 -0
  55. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/user-guide/themes.md +0 -0
  56. {lifx_async-4.9.0 → lifx_async-5.0.0}/docs/user-guide/troubleshooting.md +0 -0
  57. {lifx_async-4.9.0 → lifx_async-5.0.0}/examples/01_simple_discovery.py +0 -0
  58. {lifx_async-4.9.0 → lifx_async-5.0.0}/examples/02_simple_control.py +0 -0
  59. {lifx_async-4.9.0 → lifx_async-5.0.0}/examples/03_waveforms.py +0 -0
  60. {lifx_async-4.9.0 → lifx_async-5.0.0}/examples/04_logging.py +0 -0
  61. {lifx_async-4.9.0 → lifx_async-5.0.0}/examples/06_pulse_effect.py +0 -0
  62. {lifx_async-4.9.0 → lifx_async-5.0.0}/examples/07_colorloop_effect.py +0 -0
  63. {lifx_async-4.9.0 → lifx_async-5.0.0}/examples/08_custom_effect.py +0 -0
  64. {lifx_async-4.9.0 → lifx_async-5.0.0}/examples/09_background_effect.py +0 -0
  65. {lifx_async-4.9.0 → lifx_async-5.0.0}/examples/10_find_specific_devices.py +0 -0
  66. {lifx_async-4.9.0 → lifx_async-5.0.0}/examples/11_matrix_basic.py +0 -0
  67. {lifx_async-4.9.0 → lifx_async-5.0.0}/examples/12_matrix_effects.py +0 -0
  68. {lifx_async-4.9.0 → lifx_async-5.0.0}/examples/13_matrix_large.py +0 -0
  69. {lifx_async-4.9.0 → lifx_async-5.0.0}/examples/14_mdns_discovery.py +0 -0
  70. {lifx_async-4.9.0 → lifx_async-5.0.0}/mkdocs.yml +0 -0
  71. {lifx_async-4.9.0 → lifx_async-5.0.0}/renovate.json +0 -0
  72. {lifx_async-4.9.0 → lifx_async-5.0.0}/scripts/mdns_probe.py +0 -0
  73. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/__init__.py +0 -0
  74. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/color.py +0 -0
  75. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/const.py +0 -0
  76. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/devices/__init__.py +0 -0
  77. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/devices/ceiling.py +0 -0
  78. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/devices/infrared.py +0 -0
  79. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/devices/matrix.py +0 -0
  80. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/effects/__init__.py +0 -0
  81. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/effects/const.py +0 -0
  82. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/effects/models.py +0 -0
  83. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/effects/state_manager.py +0 -0
  84. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/exceptions.py +0 -0
  85. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/network/__init__.py +0 -0
  86. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/network/discovery.py +0 -0
  87. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/network/mdns/__init__.py +0 -0
  88. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/network/mdns/discovery.py +0 -0
  89. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/network/mdns/dns.py +0 -0
  90. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/network/mdns/types.py +0 -0
  91. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/network/message.py +0 -0
  92. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/products/__init__.py +0 -0
  93. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/products/generator.py +0 -0
  94. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/products/quirks.py +0 -0
  95. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/products/registry.py +0 -0
  96. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/protocol/__init__.py +0 -0
  97. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/protocol/base.py +0 -0
  98. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/protocol/generator.py +0 -0
  99. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/protocol/header.py +0 -0
  100. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/protocol/models.py +0 -0
  101. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/protocol/packets.py +0 -0
  102. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/protocol/protocol_types.py +0 -0
  103. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/protocol/serializer.py +0 -0
  104. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/py.typed +0 -0
  105. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/theme/__init__.py +0 -0
  106. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/theme/canvas.py +0 -0
  107. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/theme/generators.py +0 -0
  108. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/theme/library.py +0 -0
  109. {lifx_async-4.9.0 → lifx_async-5.0.0}/src/lifx/theme/theme.py +0 -0
  110. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/__init__.py +0 -0
  111. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/conftest.py +0 -0
  112. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_api/__init__.py +0 -0
  113. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_api/test_api_apply_theme.py +0 -0
  114. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_api/test_api_batch_operations.py +0 -0
  115. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_api/test_api_discovery.py +0 -0
  116. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_api/test_api_organization.py +0 -0
  117. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_color.py +0 -0
  118. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/__init__.py +0 -0
  119. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/conftest.py +0 -0
  120. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/test_base.py +0 -0
  121. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/test_ceiling.py +0 -0
  122. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/test_hev.py +0 -0
  123. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/test_infrared.py +0 -0
  124. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/test_light.py +0 -0
  125. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/test_mac_address.py +0 -0
  126. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/test_matrix.py +0 -0
  127. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/test_multizone.py +0 -0
  128. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/test_state_ceiling.py +0 -0
  129. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/test_state_hev.py +0 -0
  130. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/test_state_infrared.py +0 -0
  131. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/test_state_light.py +0 -0
  132. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/test_state_management.py +0 -0
  133. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/test_state_matrix.py +0 -0
  134. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_devices/test_state_multizone.py +0 -0
  135. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_effects/__init__.py +0 -0
  136. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_effects/test_base.py +0 -0
  137. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_effects/test_capability_filtering.py +0 -0
  138. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_effects/test_colorloop.py +0 -0
  139. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_effects/test_integration.py +0 -0
  140. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_effects/test_models.py +0 -0
  141. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_effects/test_pulse.py +0 -0
  142. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_effects/test_state_manager.py +0 -0
  143. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_network/__init__.py +0 -0
  144. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_network/test_concurrent_requests.py +0 -0
  145. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_network/test_discovery_devices.py +0 -0
  146. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_network/test_discovery_errors.py +0 -0
  147. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_network/test_mdns/__init__.py +0 -0
  148. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_network/test_mdns/conftest.py +0 -0
  149. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_network/test_mdns/test_discovery.py +0 -0
  150. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_network/test_mdns/test_dns.py +0 -0
  151. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_network/test_mdns/test_transport.py +0 -0
  152. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_network/test_message.py +0 -0
  153. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_network/test_message_advanced.py +0 -0
  154. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_network/test_transport.py +0 -0
  155. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_products/test_product_generator.py +0 -0
  156. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_products/test_registry.py +0 -0
  157. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_protocol/test_generated.py +0 -0
  158. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_protocol/test_header.py +0 -0
  159. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_protocol/test_protocol_generator.py +0 -0
  160. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_protocol/test_serializer.py +0 -0
  161. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_theme/__init__.py +0 -0
  162. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_theme/conftest.py +0 -0
  163. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_theme/test_apply_theme.py +0 -0
  164. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_theme/test_canvas.py +0 -0
  165. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_theme/test_generators.py +0 -0
  166. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_theme/test_library.py +0 -0
  167. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_theme/test_theme.py +0 -0
  168. {lifx_async-4.9.0 → lifx_async-5.0.0}/tests/test_utils.py +0 -0
@@ -40,7 +40,7 @@ jobs:
40
40
  python-version: ${{ env.PYTHON_VERSION }}
41
41
 
42
42
  - name: Install uv
43
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7
43
+ uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7
44
44
  with:
45
45
  version: ${{ env.UV_VERSION }}
46
46
  python-version: ${{ env.PYTHON_VERSION }}
@@ -82,7 +82,7 @@ jobs:
82
82
  python-version: ${{ matrix.python-version }}
83
83
 
84
84
  - name: Install uv
85
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7
85
+ uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7
86
86
  with:
87
87
  version: ${{ env.UV_VERSION }}
88
88
  python-version: ${{ matrix.python-version }}
@@ -134,7 +134,7 @@ jobs:
134
134
  python-version: ${{ env.PYTHON_VERSION }}
135
135
 
136
136
  - name: Install uv
137
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7
137
+ uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7
138
138
  with:
139
139
  version: ${{ env.UV_VERSION }}
140
140
  python-version: ${{ env.PYTHON_VERSION }}
@@ -198,7 +198,7 @@ jobs:
198
198
  python-version: ${{ env.PYTHON_VERSION }}
199
199
 
200
200
  - name: Install uv
201
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7
201
+ uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7
202
202
  with:
203
203
  version: ${{ env.UV_VERSION }}
204
204
  python-version: ${{ env.PYTHON_VERSION }}
@@ -35,7 +35,7 @@ jobs:
35
35
  python-version: ${{ env.PYTHON_VERSION }}
36
36
 
37
37
  - name: Install uv
38
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7
38
+ uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7
39
39
  with:
40
40
  version: ${{ env.UV_VERSION }}
41
41
  python-version: ${{ env.PYTHON_VERSION }}
@@ -69,7 +69,7 @@ jobs:
69
69
  python-version: ${{ env.PYTHON_VERSION }}
70
70
 
71
71
  - name: Install uv
72
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7
72
+ uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7
73
73
  with:
74
74
  version: ${{ env.UV_VERSION }}
75
75
  python-version: ${{ env.PYTHON_VERSION }}
@@ -97,7 +97,7 @@ jobs:
97
97
  python-version: ${{ env.PYTHON_VERSION }}
98
98
 
99
99
  - name: Install uv
100
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7
100
+ uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7
101
101
  with:
102
102
  version: ${{ env.UV_VERSION }}
103
103
  python-version: ${{ env.PYTHON_VERSION }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lifx-async
3
- Version: 4.9.0
3
+ Version: 5.0.0
4
4
  Summary: A modern, type-safe, async Python library for controlling LIFX lights
5
5
  Author-email: Avi Miller <me@dje.li>
6
6
  Maintainer-email: Avi Miller <me@dje.li>
@@ -11,6 +11,7 @@ Classifier: Framework :: Pytest
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Natural Language :: English
13
13
  Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3.10
14
15
  Classifier: Programming Language :: Python :: 3.11
15
16
  Classifier: Programming Language :: Python :: 3.12
16
17
  Classifier: Programming Language :: Python :: 3.13
@@ -18,7 +19,7 @@ Classifier: Programming Language :: Python :: 3.14
18
19
  Classifier: Topic :: Software Development :: Libraries
19
20
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
21
  Classifier: Typing :: Typed
21
- Requires-Python: >=3.11
22
+ Requires-Python: >=3.10
22
23
  Description-Content-Type: text/markdown
23
24
 
24
25
  # lifx-async
@@ -2,6 +2,19 @@
2
2
 
3
3
  <!-- version list -->
4
4
 
5
+ ## v5.0.0 (2026-01-12)
6
+
7
+ ### Features
8
+
9
+ - Add Python 3.10 support
10
+ ([`7c39131`](https://github.com/Djelibeybi/lifx-async/commit/7c391314305bb856d8bbcd23a5e481b729a5ad04))
11
+
12
+ ### Breaking Changes
13
+
14
+ - Batch operations now raise first exception immediately (asyncio.gather behavior) instead of
15
+ collecting all exceptions into an ExceptionGroup (TaskGroup behavior).
16
+
17
+
5
18
  ## v4.9.0 (2025-12-30)
6
19
 
7
20
  ### Features
@@ -1,9 +1,9 @@
1
1
  [project]
2
2
  name = "lifx-async"
3
- version = "4.9.0"
3
+ version = "5.0.0"
4
4
  description = "A modern, type-safe, async Python library for controlling LIFX lights"
5
5
  readme = "README.md"
6
- requires-python = ">=3.11"
6
+ requires-python = ">=3.10"
7
7
  dependencies = []
8
8
  license = "UPL-1.0"
9
9
  license-files = ["LICENSE"]
@@ -19,6 +19,7 @@ classifiers = [
19
19
  "Intended Audience :: Developers",
20
20
  "Natural Language :: English",
21
21
  "Operating System :: OS Independent",
22
+ "Programming Language :: Python :: 3.10",
22
23
  "Programming Language :: Python :: 3.11",
23
24
  "Programming Language :: Python :: 3.12",
24
25
  "Programming Language :: Python :: 3.13",
@@ -31,7 +32,7 @@ classifiers = [
31
32
  [dependency-groups]
32
33
  dev = [
33
34
  "hatchling>=1.27.0",
34
- "lifx-emulator-core>=3.0.3",
35
+ "lifx-emulator-core>=3.1.0",
35
36
  "mkdocs-git-revision-date-localized-plugin>=1.4.7",
36
37
  "mkdocs-llmstxt>=0.4.0",
37
38
  "mkdocs-material>=9.6.22",
@@ -44,6 +45,7 @@ dev = [
44
45
  "pytest-sugar>=1.1.1",
45
46
  "pyyaml>=6.0.3",
46
47
  "ruff>=0.14.2",
48
+ "typing-extensions>=4.15.0",
47
49
  ]
48
50
 
49
51
  [build-system]
@@ -56,7 +58,7 @@ packages = ["src/lifx"]
56
58
  [tool.ruff]
57
59
  line-length = 88
58
60
  indent-width = 4
59
- target-version = "py311"
61
+ target-version = "py310"
60
62
 
61
63
  [tool.ruff.format]
62
64
  quote-style = "double"
@@ -72,10 +74,11 @@ ignore = []
72
74
  "src/lifx/{protocol,products}/generator.py" = ["E501"]
73
75
  "src/lifx/protocol/packets.py" = ["E501"]
74
76
  "src/lifx/products/registry.py" = ["E501"]
77
+ "benchmarks/*.py" = ["E501"]
75
78
 
76
79
  [tool.pyright]
77
80
  typeCheckingMode = "standard"
78
- pythonVersion = "3.11"
81
+ pythonVersion = "3.10"
79
82
  include = ["src"]
80
83
  exclude = [
81
84
  "**/__pycache__",
@@ -198,9 +198,7 @@ class DeviceGroup:
198
198
  await group.set_power(True, duration=1.0)
199
199
  ```
200
200
  """
201
- async with asyncio.TaskGroup() as tg:
202
- for light in self.lights:
203
- tg.create_task(light.set_power(on, duration))
201
+ await asyncio.gather(*(light.set_power(on, duration) for light in self.lights))
204
202
 
205
203
  async def set_color(self, color: HSBK, duration: float = 0.0) -> None:
206
204
  """Set color for all Light devices in the group.
@@ -218,9 +216,9 @@ class DeviceGroup:
218
216
  await group.set_color(HSBK.from_rgb(255, 0, 0), duration=2.0)
219
217
  ```
220
218
  """
221
- async with asyncio.TaskGroup() as tg:
222
- for light in self.lights:
223
- tg.create_task(light.set_color(color, duration))
219
+ await asyncio.gather(
220
+ *(light.set_color(color, duration) for light in self.lights)
221
+ )
224
222
 
225
223
  async def set_brightness(self, brightness: float, duration: float = 0.0) -> None:
226
224
  """Set brightness for all Light devices in the group.
@@ -238,9 +236,9 @@ class DeviceGroup:
238
236
  await group.set_brightness(0.5, duration=1.0)
239
237
  ```
240
238
  """
241
- async with asyncio.TaskGroup() as tg:
242
- for light in self.lights:
243
- tg.create_task(light.set_brightness(brightness, duration))
239
+ await asyncio.gather(
240
+ *(light.set_brightness(brightness, duration) for light in self.lights)
241
+ )
244
242
 
245
243
  async def pulse(
246
244
  self, color: HSBK, period: float = 1.0, cycles: float = 1.0
@@ -261,9 +259,9 @@ class DeviceGroup:
261
259
  await group.pulse(Colors.RED, period=1.0, cycles=1.0)
262
260
  ```
263
261
  """
264
- async with asyncio.TaskGroup() as tg:
265
- for light in self.lights:
266
- tg.create_task(light.pulse(color, period, cycles))
262
+ await asyncio.gather(
263
+ *(light.pulse(color, period, cycles) for light in self.lights)
264
+ )
267
265
 
268
266
  # Location and Group Organization Methods
269
267
 
@@ -280,14 +278,13 @@ class DeviceGroup:
280
278
  )
281
279
 
282
280
  # Fetch all location info concurrently
283
- tasks: dict[str, asyncio.Task[CollectionInfo | None]] = {}
284
- async with asyncio.TaskGroup() as tg:
285
- for device in self._devices:
286
- tasks[device.serial] = tg.create_task(device.get_location())
281
+ location_results = await asyncio.gather(
282
+ *(device.get_location() for device in self._devices)
283
+ )
287
284
 
288
- results: list[tuple[Device, CollectionInfo | None]] = []
289
- for device in self._devices:
290
- results.append((device, tasks[device.serial].result()))
285
+ results: list[tuple[Device, CollectionInfo | None]] = list(
286
+ zip(self._devices, location_results)
287
+ )
291
288
 
292
289
  # Group by location UUID
293
290
  for device, location_info in results:
@@ -332,15 +329,14 @@ class DeviceGroup:
332
329
  # Collect group info from all devices concurrently
333
330
  group_data: dict[str, list[tuple[Device, CollectionInfo]]] = defaultdict(list)
334
331
 
335
- tasks: dict[str, asyncio.Task[CollectionInfo | None]] = {}
336
- async with asyncio.TaskGroup() as tg:
337
- for device in self._devices:
338
- tasks[device.serial] = tg.create_task(device.get_group())
339
-
340
332
  # Fetch all group info concurrently
341
- results: list[tuple[Device, CollectionInfo | None]] = []
342
- for device in self._devices:
343
- results.append((device, tasks[device.serial].result()))
333
+ group_results = await asyncio.gather(
334
+ *(device.get_group() for device in self._devices)
335
+ )
336
+
337
+ results: list[tuple[Device, CollectionInfo | None]] = list(
338
+ zip(self._devices, group_results)
339
+ )
344
340
 
345
341
  # Group by group UUID
346
342
  for device, group_info in results:
@@ -712,18 +708,20 @@ class DeviceGroup:
712
708
  await group.apply_theme(evening, power_on=True, duration=1.0)
713
709
  ```
714
710
  """
715
- async with asyncio.TaskGroup() as tg:
711
+ await asyncio.gather(
716
712
  # Apply theme to all lights
717
- for light in self.lights:
718
- tg.create_task(light.apply_theme(theme, power_on, duration))
719
-
713
+ *(light.apply_theme(theme, power_on, duration) for light in self.lights),
720
714
  # Apply theme to all multizone lights
721
- for multizone in self.multizone_lights:
722
- tg.create_task(multizone.apply_theme(theme, power_on, duration))
723
-
715
+ *(
716
+ multizone.apply_theme(theme, power_on, duration)
717
+ for multizone in self.multizone_lights
718
+ ),
724
719
  # Apply theme to all matrix light devices
725
- for matrix in self.matrix_lights:
726
- tg.create_task(matrix.apply_theme(theme, power_on, duration))
720
+ *(
721
+ matrix.apply_theme(theme, power_on, duration)
722
+ for matrix in self.matrix_lights
723
+ ),
724
+ )
727
725
 
728
726
  def invalidate_metadata_cache(self) -> None:
729
727
  """Clear all cached location and group metadata.
@@ -9,7 +9,7 @@ import time
9
9
  import uuid
10
10
  from dataclasses import dataclass, field
11
11
  from math import floor, log10
12
- from typing import TYPE_CHECKING, Generic, Self, TypeVar, cast
12
+ from typing import TYPE_CHECKING, Generic, TypeVar, cast
13
13
 
14
14
  from lifx.const import (
15
15
  DEFAULT_MAX_RETRIES,
@@ -26,6 +26,8 @@ from lifx.protocol import packets
26
26
  from lifx.protocol.models import Serial
27
27
 
28
28
  if TYPE_CHECKING:
29
+ from typing_extensions import Self
30
+
29
31
  from lifx.devices import (
30
32
  CeilingLight,
31
33
  HevLight,
@@ -681,12 +683,13 @@ class Device(Generic[StateT]):
681
683
  async def _setup(self) -> None:
682
684
  """Populate device capabilities, state and metadata."""
683
685
  await self._ensure_capabilities()
684
- async with asyncio.TaskGroup() as tg:
685
- tg.create_task(self.get_host_firmware())
686
- tg.create_task(self.get_wifi_firmware())
687
- tg.create_task(self.get_label())
688
- tg.create_task(self.get_location())
689
- tg.create_task(self.get_group())
686
+ await asyncio.gather(
687
+ self.get_host_firmware(),
688
+ self.get_wifi_firmware(),
689
+ self.get_label(),
690
+ self.get_location(),
691
+ self.get_group(),
692
+ )
690
693
 
691
694
  async def get_mac_address(self) -> str:
692
695
  """Calculate and return the MAC address for this device."""
@@ -1669,21 +1672,21 @@ class Device(Generic[StateT]):
1669
1672
 
1670
1673
  # Fetch semi-static and volatile state in parallel
1671
1674
  # get_color returns color, power, and label in one request
1672
- async with asyncio.TaskGroup() as tg:
1673
- label_task = tg.create_task(self.get_label())
1674
- power_task = tg.create_task(self.get_power())
1675
- host_fw_task = tg.create_task(self.get_host_firmware())
1676
- wifi_fw_task = tg.create_task(self.get_wifi_firmware())
1677
- location_task = tg.create_task(self.get_location())
1678
- group_task = tg.create_task(self.get_group())
1679
-
1680
- # Extract results
1681
- label = label_task.result()
1682
- power = power_task.result()
1683
- host_firmware = host_fw_task.result()
1684
- wifi_firmware = wifi_fw_task.result()
1685
- location_info = location_task.result()
1686
- group_info = group_task.result()
1675
+ (
1676
+ label,
1677
+ power,
1678
+ host_firmware,
1679
+ wifi_firmware,
1680
+ location_info,
1681
+ group_info,
1682
+ ) = await asyncio.gather(
1683
+ self.get_label(),
1684
+ self.get_power(),
1685
+ self.get_host_firmware(),
1686
+ self.get_wifi_firmware(),
1687
+ self.get_location(),
1688
+ self.get_group(),
1689
+ )
1687
1690
 
1688
1691
  # Get MAC address (already calculated in get_host_firmware)
1689
1692
  mac_address = await self.get_mac_address()
@@ -119,10 +119,11 @@ class HevLight(Light):
119
119
  async def _setup(self) -> None:
120
120
  """Populate HEV light capabilities, state and metadata."""
121
121
  await super()._setup()
122
- async with asyncio.TaskGroup() as tg:
123
- tg.create_task(self.get_hev_config())
124
- tg.create_task(self.get_hev_cycle())
125
- tg.create_task(self.get_last_hev_result())
122
+ await asyncio.gather(
123
+ self.get_hev_config(),
124
+ self.get_hev_cycle(),
125
+ self.get_last_hev_result(),
126
+ )
126
127
 
127
128
  async def get_hev_cycle(self) -> HevCycleState:
128
129
  """Get current HEV cycle state.
@@ -413,12 +414,10 @@ class HevLight(Light):
413
414
  await super().refresh_state()
414
415
 
415
416
  # Fetch all HEV light state
416
- async with asyncio.TaskGroup() as tg:
417
- hev_cycle_task = tg.create_task(self.get_hev_cycle())
418
- hev_result_task = tg.create_task(self.get_last_hev_result())
419
-
420
- hev_cycle = hev_cycle_task.result()
421
- hev_result = hev_result_task.result()
417
+ hev_cycle, hev_result = await asyncio.gather(
418
+ self.get_hev_cycle(),
419
+ self.get_last_hev_result(),
420
+ )
422
421
 
423
422
  self._state.hev_cycle = hev_cycle
424
423
  self._state.hev_result = hev_result
@@ -440,14 +439,11 @@ class HevLight(Light):
440
439
 
441
440
  # Fetch semi-static and volatile state in parallel
442
441
  # get_color returns color, power, and label in one request
443
- async with asyncio.TaskGroup() as tg:
444
- hev_cycle_task = tg.create_task(self.get_hev_cycle())
445
- hev_config_task = tg.create_task(self.get_hev_config())
446
- hev_result_task = tg.create_task(self.get_last_hev_result())
447
-
448
- hev_cycle = hev_cycle_task.result()
449
- hev_config = hev_config_task.result()
450
- hev_result = hev_result_task.result()
442
+ hev_cycle, hev_config, hev_result = await asyncio.gather(
443
+ self.get_hev_cycle(),
444
+ self.get_hev_config(),
445
+ self.get_last_hev_result(),
446
+ )
451
447
 
452
448
  # Create state instance with HEV fields
453
449
  self._state = HevLightState.from_light_state(
@@ -964,19 +964,19 @@ class Light(Device[LightState]):
964
964
  # Fetch semi-static and volatile state in parallel
965
965
  # get_color returns color, power, and label in one request
966
966
  try:
967
- async with asyncio.TaskGroup() as tg:
968
- color_task = tg.create_task(self.get_color())
969
- host_fw_task = tg.create_task(self.get_host_firmware())
970
- wifi_fw_task = tg.create_task(self.get_wifi_firmware())
971
- location_task = tg.create_task(self.get_location())
972
- group_task = tg.create_task(self.get_group())
973
-
974
- # Extract results
975
- color, power, label = color_task.result()
976
- host_firmware = host_fw_task.result()
977
- wifi_firmware = wifi_fw_task.result()
978
- location_info = location_task.result()
979
- group_info = group_task.result()
967
+ (
968
+ (color, power, label),
969
+ host_firmware,
970
+ wifi_firmware,
971
+ location_info,
972
+ group_info,
973
+ ) = await asyncio.gather(
974
+ self.get_color(),
975
+ self.get_host_firmware(),
976
+ self.get_wifi_firmware(),
977
+ self.get_location(),
978
+ self.get_group(),
979
+ )
980
980
 
981
981
  # Get MAC address (already calculated in get_host_firmware)
982
982
  mac_address = await self.get_mac_address()
@@ -1003,7 +1003,7 @@ class Light(Device[LightState]):
1003
1003
 
1004
1004
  return self._state
1005
1005
 
1006
- except* LifxTimeoutError:
1006
+ except LifxTimeoutError:
1007
1007
  raise LifxTimeoutError(f"Error initializing state for {self.serial}")
1008
- except* LifxError:
1008
+ except LifxError:
1009
1009
  raise LifxError(f"Error initializing state for {self.serial}")
@@ -969,12 +969,10 @@ class MultiZoneLight(Light):
969
969
  """
970
970
  await super().refresh_state()
971
971
 
972
- async with asyncio.TaskGroup() as tg:
973
- zones_task = tg.create_task(self.get_all_color_zones())
974
- effect_task = tg.create_task(self.get_effect())
975
-
976
- zones = zones_task.result()
977
- effect = effect_task.result()
972
+ zones, effect = await asyncio.gather(
973
+ self.get_all_color_zones(),
974
+ self.get_effect(),
975
+ )
978
976
 
979
977
  self._state.zones = zones
980
978
  self._state.effect = effect.effect_type
@@ -994,12 +992,10 @@ class MultiZoneLight(Light):
994
992
  """
995
993
  light_state = await super()._initialize_state()
996
994
 
997
- async with asyncio.TaskGroup() as tg:
998
- zones_task = tg.create_task(self.get_all_color_zones())
999
- effect_task = tg.create_task(self.get_effect())
1000
-
1001
- zones = zones_task.result()
1002
- effect = effect_task.result()
995
+ zones, effect = await asyncio.gather(
996
+ self.get_all_color_zones(),
997
+ self.get_effect(),
998
+ )
1003
999
 
1004
1000
  self._state = MultiZoneLightState.from_light_state(
1005
1001
  light_state=light_state, zones=zones, effect=effect.effect_type
@@ -85,22 +85,26 @@ class LIFXEffect(ABC):
85
85
  if self.power_on:
86
86
  needs_power_on = False
87
87
 
88
- async def power_on_if_needed(light: Light) -> None:
89
- """Power on a single light if it's currently off."""
90
- nonlocal needs_power_on
88
+ async def power_on_if_needed(light: Light) -> bool:
89
+ """Power on a single light if it's currently off.
90
+
91
+ Returns True if the light was powered on.
92
+ """
91
93
  is_on = await light.get_power()
92
94
  if not is_on:
93
- needs_power_on = True
94
95
  # Get startup color for this light
95
96
  startup_color = await self.from_poweroff_hsbk(light)
96
97
  # Set color immediately, then power on
97
98
  await light.set_color(startup_color, duration=0)
98
99
  await light.set_power(True, duration=POWER_ON_TRANSITION_DURATION)
100
+ return True
101
+ return False
99
102
 
100
103
  # Power on all lights concurrently
101
- async with asyncio.TaskGroup() as tg:
102
- for light in self.participants:
103
- tg.create_task(power_on_if_needed(light))
104
+ results = await asyncio.gather(
105
+ *(power_on_if_needed(light) for light in self.participants)
106
+ )
107
+ needs_power_on = any(results)
104
108
 
105
109
  # Wait for power transition to complete if any lights were powered on
106
110
  if needs_power_on:
@@ -353,17 +353,11 @@ class EffectColorloop(LIFXEffect):
353
353
  )
354
354
 
355
355
  # Fetch colors for all lights concurrently
356
- colors: list[HSBK] = [None] * len(self.participants) # type: ignore
357
-
358
- async with asyncio.TaskGroup() as tg:
359
- for idx, light in enumerate(self.participants):
360
-
361
- async def fetch_and_store(index: int, device: Light) -> None:
362
- colors[index] = await get_color_for_light(device)
363
-
364
- tg.create_task(fetch_and_store(idx, light))
356
+ colors = await asyncio.gather(
357
+ *(get_color_for_light(light) for light in self.participants)
358
+ )
365
359
 
366
- return colors
360
+ return list(colors)
367
361
 
368
362
  async def from_poweroff_hsbk(self, _light: Light) -> HSBK:
369
363
  """Return startup color when light is powered off.