lifx-async 4.9.0__tar.gz → 5.0.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.
Files changed (169) hide show
  1. {lifx_async-4.9.0 → lifx_async-5.0.1}/.github/workflows/ci.yml +4 -4
  2. {lifx_async-4.9.0 → lifx_async-5.0.1}/.github/workflows/docs.yml +3 -3
  3. {lifx_async-4.9.0 → lifx_async-5.0.1}/PKG-INFO +3 -2
  4. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/changelog.md +21 -0
  5. {lifx_async-4.9.0 → lifx_async-5.0.1}/pyproject.toml +8 -5
  6. lifx_async-5.0.1/scripts/test_multiversion.py +227 -0
  7. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/api.py +34 -36
  8. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/const.py +18 -0
  9. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/devices/base.py +25 -22
  10. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/devices/hev.py +14 -18
  11. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/devices/light.py +15 -15
  12. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/devices/multizone.py +8 -12
  13. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/effects/base.py +11 -7
  14. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/effects/colorloop.py +6 -12
  15. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/effects/conductor.py +43 -46
  16. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/effects/pulse.py +4 -10
  17. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/network/connection.py +7 -6
  18. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/network/mdns/transport.py +6 -5
  19. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/network/transport.py +77 -65
  20. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_api/test_api_apply_theme.py +2 -1
  21. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_api/test_api_batch_errors.py +30 -53
  22. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_network/test_connection.py +9 -7
  23. {lifx_async-4.9.0 → lifx_async-5.0.1}/uv.lock +113 -6
  24. {lifx_async-4.9.0 → lifx_async-5.0.1}/.claude/settings.json +0 -0
  25. {lifx_async-4.9.0 → lifx_async-5.0.1}/.github/dependabot.yml +0 -0
  26. {lifx_async-4.9.0 → lifx_async-5.0.1}/.github/labeler.yml +0 -0
  27. {lifx_async-4.9.0 → lifx_async-5.0.1}/.github/workflows/pr-automation.yml +0 -0
  28. {lifx_async-4.9.0 → lifx_async-5.0.1}/.gitignore +0 -0
  29. {lifx_async-4.9.0 → lifx_async-5.0.1}/.pre-commit-config.yaml +0 -0
  30. {lifx_async-4.9.0 → lifx_async-5.0.1}/CLAUDE.md +0 -0
  31. {lifx_async-4.9.0 → lifx_async-5.0.1}/LICENSE +0 -0
  32. {lifx_async-4.9.0 → lifx_async-5.0.1}/README.md +0 -0
  33. {lifx_async-4.9.0 → lifx_async-5.0.1}/context7.json +0 -0
  34. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/api/colors.md +0 -0
  35. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/api/devices.md +0 -0
  36. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/api/effects.md +0 -0
  37. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/api/exceptions.md +0 -0
  38. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/api/high-level.md +0 -0
  39. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/api/index.md +0 -0
  40. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/api/network.md +0 -0
  41. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/api/protocol.md +0 -0
  42. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/api/themes.md +0 -0
  43. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/architecture/effects-architecture.md +0 -0
  44. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/architecture/overview.md +0 -0
  45. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/faq.md +0 -0
  46. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/getting-started/effects.md +0 -0
  47. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/getting-started/installation.md +0 -0
  48. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/getting-started/quickstart.md +0 -0
  49. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/getting-started/themes.md +0 -0
  50. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/index.md +0 -0
  51. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/migration/effect-api-changes.md +0 -0
  52. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/stylesheets/extra.css +0 -0
  53. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/user-guide/advanced-usage.md +0 -0
  54. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/user-guide/ceiling-lights.md +0 -0
  55. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/user-guide/effects-custom.md +0 -0
  56. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/user-guide/effects-troubleshooting.md +0 -0
  57. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/user-guide/protocol-deep-dive.md +0 -0
  58. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/user-guide/themes.md +0 -0
  59. {lifx_async-4.9.0 → lifx_async-5.0.1}/docs/user-guide/troubleshooting.md +0 -0
  60. {lifx_async-4.9.0 → lifx_async-5.0.1}/examples/01_simple_discovery.py +0 -0
  61. {lifx_async-4.9.0 → lifx_async-5.0.1}/examples/02_simple_control.py +0 -0
  62. {lifx_async-4.9.0 → lifx_async-5.0.1}/examples/03_waveforms.py +0 -0
  63. {lifx_async-4.9.0 → lifx_async-5.0.1}/examples/04_logging.py +0 -0
  64. {lifx_async-4.9.0 → lifx_async-5.0.1}/examples/06_pulse_effect.py +0 -0
  65. {lifx_async-4.9.0 → lifx_async-5.0.1}/examples/07_colorloop_effect.py +0 -0
  66. {lifx_async-4.9.0 → lifx_async-5.0.1}/examples/08_custom_effect.py +0 -0
  67. {lifx_async-4.9.0 → lifx_async-5.0.1}/examples/09_background_effect.py +0 -0
  68. {lifx_async-4.9.0 → lifx_async-5.0.1}/examples/10_find_specific_devices.py +0 -0
  69. {lifx_async-4.9.0 → lifx_async-5.0.1}/examples/11_matrix_basic.py +0 -0
  70. {lifx_async-4.9.0 → lifx_async-5.0.1}/examples/12_matrix_effects.py +0 -0
  71. {lifx_async-4.9.0 → lifx_async-5.0.1}/examples/13_matrix_large.py +0 -0
  72. {lifx_async-4.9.0 → lifx_async-5.0.1}/examples/14_mdns_discovery.py +0 -0
  73. {lifx_async-4.9.0 → lifx_async-5.0.1}/mkdocs.yml +0 -0
  74. {lifx_async-4.9.0 → lifx_async-5.0.1}/renovate.json +0 -0
  75. {lifx_async-4.9.0 → lifx_async-5.0.1}/scripts/mdns_probe.py +0 -0
  76. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/__init__.py +0 -0
  77. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/color.py +0 -0
  78. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/devices/__init__.py +0 -0
  79. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/devices/ceiling.py +0 -0
  80. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/devices/infrared.py +0 -0
  81. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/devices/matrix.py +0 -0
  82. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/effects/__init__.py +0 -0
  83. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/effects/const.py +0 -0
  84. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/effects/models.py +0 -0
  85. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/effects/state_manager.py +0 -0
  86. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/exceptions.py +0 -0
  87. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/network/__init__.py +0 -0
  88. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/network/discovery.py +0 -0
  89. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/network/mdns/__init__.py +0 -0
  90. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/network/mdns/discovery.py +0 -0
  91. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/network/mdns/dns.py +0 -0
  92. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/network/mdns/types.py +0 -0
  93. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/network/message.py +0 -0
  94. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/products/__init__.py +0 -0
  95. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/products/generator.py +0 -0
  96. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/products/quirks.py +0 -0
  97. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/products/registry.py +0 -0
  98. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/protocol/__init__.py +0 -0
  99. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/protocol/base.py +0 -0
  100. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/protocol/generator.py +0 -0
  101. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/protocol/header.py +0 -0
  102. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/protocol/models.py +0 -0
  103. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/protocol/packets.py +0 -0
  104. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/protocol/protocol_types.py +0 -0
  105. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/protocol/serializer.py +0 -0
  106. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/py.typed +0 -0
  107. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/theme/__init__.py +0 -0
  108. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/theme/canvas.py +0 -0
  109. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/theme/generators.py +0 -0
  110. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/theme/library.py +0 -0
  111. {lifx_async-4.9.0 → lifx_async-5.0.1}/src/lifx/theme/theme.py +0 -0
  112. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/__init__.py +0 -0
  113. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/conftest.py +0 -0
  114. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_api/__init__.py +0 -0
  115. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_api/test_api_batch_operations.py +0 -0
  116. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_api/test_api_discovery.py +0 -0
  117. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_api/test_api_organization.py +0 -0
  118. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_color.py +0 -0
  119. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/__init__.py +0 -0
  120. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/conftest.py +0 -0
  121. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/test_base.py +0 -0
  122. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/test_ceiling.py +0 -0
  123. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/test_hev.py +0 -0
  124. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/test_infrared.py +0 -0
  125. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/test_light.py +0 -0
  126. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/test_mac_address.py +0 -0
  127. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/test_matrix.py +0 -0
  128. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/test_multizone.py +0 -0
  129. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/test_state_ceiling.py +0 -0
  130. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/test_state_hev.py +0 -0
  131. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/test_state_infrared.py +0 -0
  132. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/test_state_light.py +0 -0
  133. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/test_state_management.py +0 -0
  134. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/test_state_matrix.py +0 -0
  135. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_devices/test_state_multizone.py +0 -0
  136. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_effects/__init__.py +0 -0
  137. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_effects/test_base.py +0 -0
  138. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_effects/test_capability_filtering.py +0 -0
  139. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_effects/test_colorloop.py +0 -0
  140. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_effects/test_integration.py +0 -0
  141. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_effects/test_models.py +0 -0
  142. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_effects/test_pulse.py +0 -0
  143. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_effects/test_state_manager.py +0 -0
  144. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_network/__init__.py +0 -0
  145. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_network/test_concurrent_requests.py +0 -0
  146. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_network/test_discovery_devices.py +0 -0
  147. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_network/test_discovery_errors.py +0 -0
  148. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_network/test_mdns/__init__.py +0 -0
  149. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_network/test_mdns/conftest.py +0 -0
  150. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_network/test_mdns/test_discovery.py +0 -0
  151. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_network/test_mdns/test_dns.py +0 -0
  152. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_network/test_mdns/test_transport.py +0 -0
  153. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_network/test_message.py +0 -0
  154. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_network/test_message_advanced.py +0 -0
  155. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_network/test_transport.py +0 -0
  156. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_products/test_product_generator.py +0 -0
  157. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_products/test_registry.py +0 -0
  158. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_protocol/test_generated.py +0 -0
  159. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_protocol/test_header.py +0 -0
  160. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_protocol/test_protocol_generator.py +0 -0
  161. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_protocol/test_serializer.py +0 -0
  162. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_theme/__init__.py +0 -0
  163. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_theme/conftest.py +0 -0
  164. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_theme/test_apply_theme.py +0 -0
  165. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_theme/test_canvas.py +0 -0
  166. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_theme/test_generators.py +0 -0
  167. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_theme/test_library.py +0 -0
  168. {lifx_async-4.9.0 → lifx_async-5.0.1}/tests/test_theme/test_theme.py +0 -0
  169. {lifx_async-4.9.0 → lifx_async-5.0.1}/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.1
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,27 @@
2
2
 
3
3
  <!-- version list -->
4
4
 
5
+ ## v5.0.1 (2026-01-14)
6
+
7
+ ### Bug Fixes
8
+
9
+ - Handle asyncio.TimeoutError on Python 3.10
10
+ ([`4438bc4`](https://github.com/Djelibeybi/lifx-async/commit/4438bc45f19f477b585c6af8cf8cbaf5e9341d14))
11
+
12
+
13
+ ## v5.0.0 (2026-01-12)
14
+
15
+ ### Features
16
+
17
+ - Add Python 3.10 support
18
+ ([`7c39131`](https://github.com/Djelibeybi/lifx-async/commit/7c391314305bb856d8bbcd23a5e481b729a5ad04))
19
+
20
+ ### Breaking Changes
21
+
22
+ - Batch operations now raise first exception immediately (asyncio.gather behavior) instead of
23
+ collecting all exceptions into an ExceptionGroup (TaskGroup behavior).
24
+
25
+
5
26
  ## v4.9.0 (2025-12-30)
6
27
 
7
28
  ### Features
@@ -1,9 +1,9 @@
1
1
  [project]
2
2
  name = "lifx-async"
3
- version = "4.9.0"
3
+ version = "5.0.1"
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__",
@@ -0,0 +1,227 @@
1
+ #!/usr/bin/env python3
2
+ """Multi-version Python test runner.
3
+
4
+ This script runs the test suite against multiple Python versions to catch
5
+ version-specific issues (like the asyncio.TimeoutError vs TimeoutError
6
+ difference between Python 3.10 and 3.11+) before pushing to GitHub.
7
+
8
+ Usage:
9
+ # Run tests on all supported versions (default)
10
+ uv run scripts/test_multiversion.py
11
+
12
+ # Run tests on specific versions only
13
+ uv run scripts/test_multiversion.py --versions 3.10 3.14
14
+
15
+ # Run with verbose pytest output
16
+ uv run scripts/test_multiversion.py -v
17
+
18
+ # Run specific test file/pattern
19
+ uv run scripts/test_multiversion.py -- tests/test_network/
20
+
21
+ # Quick mode: skip coverage
22
+ uv run scripts/test_multiversion.py --quick
23
+ """
24
+
25
+ from __future__ import annotations
26
+
27
+ import argparse
28
+ import subprocess # nosec B404 - subprocess needed for running uv/pytest
29
+ import sys
30
+ import time
31
+ from dataclasses import dataclass
32
+
33
+ # Python versions supported by this project (from pyproject.toml)
34
+ SUPPORTED_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"]
35
+
36
+ # Default: test all supported versions
37
+ DEFAULT_VERSIONS = SUPPORTED_VERSIONS
38
+
39
+
40
+ @dataclass
41
+ class TestResult:
42
+ """Result of running tests on a specific Python version."""
43
+
44
+ version: str
45
+ success: bool
46
+ duration: float
47
+ output: str
48
+
49
+
50
+ def check_python_available(version: str) -> bool:
51
+ """Check if a Python version is available via uv."""
52
+ result = subprocess.run( # nosec B603 B607 - trusted uv command
53
+ ["uv", "python", "find", version],
54
+ capture_output=True,
55
+ text=True,
56
+ )
57
+ return result.returncode == 0
58
+
59
+
60
+ def run_tests(
61
+ version: str,
62
+ pytest_args: list[str],
63
+ verbose: bool = False,
64
+ quick: bool = False,
65
+ ) -> TestResult:
66
+ """Run pytest on a specific Python version using uv."""
67
+ start_time = time.time()
68
+
69
+ cmd = [
70
+ "uv",
71
+ "run",
72
+ "--python",
73
+ version,
74
+ "--isolated", # Use isolated environment to avoid conflicts
75
+ "pytest",
76
+ ]
77
+
78
+ # Add coverage unless in quick mode
79
+ if not quick:
80
+ cmd.extend(["--cov=lifx", "--cov-report=term-missing:skip-covered"])
81
+
82
+ # Add verbosity
83
+ if verbose:
84
+ cmd.append("-v")
85
+ else:
86
+ cmd.append("-q")
87
+
88
+ # Add any additional pytest arguments
89
+ cmd.extend(pytest_args)
90
+
91
+ # Ignore animation tests (uncommitted module with known issues)
92
+ cmd.extend(["--ignore=tests/test_animation"])
93
+
94
+ print(f"\n{'=' * 60}")
95
+ print(f"Running tests on Python {version}")
96
+ print(f"{'=' * 60}")
97
+ print(f"Command: {' '.join(cmd)}\n")
98
+
99
+ result = subprocess.run( # nosec B603 - trusted uv/pytest command
100
+ cmd,
101
+ capture_output=not verbose, # Show output in real-time if verbose
102
+ text=True,
103
+ cwd=subprocess.run( # nosec B603 B607 - trusted git command
104
+ ["git", "rev-parse", "--show-toplevel"],
105
+ capture_output=True,
106
+ text=True,
107
+ ).stdout.strip(),
108
+ )
109
+
110
+ duration = time.time() - start_time
111
+
112
+ output = ""
113
+ if not verbose:
114
+ output = result.stdout + result.stderr
115
+
116
+ return TestResult(
117
+ version=version,
118
+ success=result.returncode == 0,
119
+ duration=duration,
120
+ output=output,
121
+ )
122
+
123
+
124
+ def main() -> int:
125
+ """Run tests across multiple Python versions."""
126
+ parser = argparse.ArgumentParser(
127
+ description="Run tests across multiple Python versions",
128
+ formatter_class=argparse.RawDescriptionHelpFormatter,
129
+ epilog=__doc__,
130
+ )
131
+ parser.add_argument(
132
+ "--versions",
133
+ nargs="+",
134
+ default=None,
135
+ help=f"Python versions to test (default: all supported: {SUPPORTED_VERSIONS})",
136
+ )
137
+ parser.add_argument(
138
+ "-v",
139
+ "--verbose",
140
+ action="store_true",
141
+ help="Verbose pytest output",
142
+ )
143
+ parser.add_argument(
144
+ "--quick",
145
+ action="store_true",
146
+ help="Quick mode: skip coverage for faster execution",
147
+ )
148
+ parser.add_argument(
149
+ "pytest_args",
150
+ nargs="*",
151
+ help="Additional arguments to pass to pytest",
152
+ )
153
+
154
+ args = parser.parse_args()
155
+
156
+ # Determine which versions to test
157
+ if args.versions:
158
+ versions = args.versions
159
+ else:
160
+ versions = DEFAULT_VERSIONS
161
+
162
+ # Validate versions
163
+ for version in versions:
164
+ if version not in SUPPORTED_VERSIONS:
165
+ print(
166
+ f"Warning: {version} is not in supported versions {SUPPORTED_VERSIONS}"
167
+ )
168
+
169
+ # Check availability
170
+ available_versions = []
171
+ missing_versions = []
172
+ for version in versions:
173
+ if check_python_available(version):
174
+ available_versions.append(version)
175
+ else:
176
+ missing_versions.append(version)
177
+
178
+ if missing_versions:
179
+ print(f"Missing Python versions: {missing_versions}")
180
+ print("Install with: uv python install " + " ".join(missing_versions))
181
+ if not available_versions:
182
+ return 1
183
+
184
+ print(f"Testing on Python versions: {available_versions}")
185
+
186
+ # Run tests
187
+ results: list[TestResult] = []
188
+ for version in available_versions:
189
+ result = run_tests(
190
+ version,
191
+ args.pytest_args,
192
+ verbose=args.verbose,
193
+ quick=args.quick,
194
+ )
195
+ results.append(result)
196
+
197
+ if not args.verbose:
198
+ # Show last few lines of output for quick feedback
199
+ lines = result.output.strip().split("\n")
200
+ for line in lines[-10:]:
201
+ print(line)
202
+
203
+ # Summary
204
+ print(f"\n{'=' * 60}")
205
+ print("SUMMARY")
206
+ print(f"{'=' * 60}")
207
+
208
+ all_passed = True
209
+ for result in results:
210
+ status = "✓ PASSED" if result.success else "✗ FAILED"
211
+ print(f"Python {result.version}: {status} ({result.duration:.1f}s)")
212
+ if not result.success:
213
+ all_passed = False
214
+
215
+ if missing_versions:
216
+ print(f"\nSkipped (not installed): {missing_versions}")
217
+
218
+ if all_passed:
219
+ print("\n✓ All tests passed across all Python versions!")
220
+ return 0
221
+ else:
222
+ print("\n✗ Some tests failed. Check output above for details.")
223
+ return 1
224
+
225
+
226
+ if __name__ == "__main__":
227
+ sys.exit(main())
@@ -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.
@@ -1,5 +1,7 @@
1
1
  # lifx-async constants
2
2
 
3
+ import asyncio
4
+ import sys
3
5
  import uuid
4
6
  from typing import Final
5
7
 
@@ -109,3 +111,19 @@ PROTOCOL_URL: Final[str] = (
109
111
  PRODUCTS_URL: Final[str] = (
110
112
  "https://raw.githubusercontent.com/LIFX/products/refs/heads/master/products.json"
111
113
  )
114
+
115
+ # ============================================================================
116
+ # Python Version Compatibility
117
+ # ============================================================================
118
+
119
+ # On Python 3.10, asyncio.wait_for() raises asyncio.TimeoutError which is NOT
120
+ # a subclass of the built-in TimeoutError. In Python 3.11+, they are unified.
121
+ # Use this tuple with `except TIMEOUT_ERRORS:` to catch timeouts from asyncio
122
+ # operations on all supported Python versions.
123
+ if sys.version_info < (3, 11):
124
+ TIMEOUT_ERRORS: Final[tuple[type[BaseException], ...]] = (
125
+ TimeoutError,
126
+ asyncio.TimeoutError,
127
+ )
128
+ else:
129
+ TIMEOUT_ERRORS: Final[tuple[type[BaseException], ...]] = (TimeoutError,)
@@ -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(