Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/home-assistant/core.git. Pull mirroring updated .
  1. Jul 20, 2022
  2. Jul 19, 2022
    • Marc Mueller's avatar
      Update pyupgrade to 2.37.2 (#75456) · 503e8864
      Marc Mueller authored
      503e8864
    • Teemu R's avatar
      Bump python-miio to 0.5.12 (#75415) · e4f6f738
      Teemu R authored
      * Bump python-miio to 0.5.12
      
      * Fix imports
      e4f6f738
    • Marc Mueller's avatar
      Update mypy to 0.971 (#75450) · e02a2452
      Marc Mueller authored
      e02a2452
    • J. Nick Koston's avatar
      Avoid converting discovery_info dataclasses to dict that will be thrown away... · 32311f24
      J. Nick Koston authored
      Avoid converting discovery_info dataclasses to dict that will be thrown away in config flows (#75451)
      
      * Avoid converting BluetoothServiceInfo to a dict for default discovery
      
      Fixes
      ```
      2022-07-19 09:46:48.303 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
      Traceback (most recent call last):
        File "/Users/bdraco/home-assistant/homeassistant/helpers/discovery_flow.py", line 74, in _async_process_pending_flows
          await gather_with_concurrency(
        File "/Users/bdraco/home-assistant/homeassistant/util/async_.py", line 201, in gather_with_concurrency
          return await gather(
        File "/Users/bdraco/home-assistant/homeassistant/util/async_.py", line 199, in sem_task
          return await task
        File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 222, in async_init
          flow, result = await task
        File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 249, in _async_init
          result = await self._async_handle_step(flow, flow.init_step, data, init_done)
        File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 359, in _async_handle_step
          result: FlowResult = await getattr(flow, method)(user_input)
        File "/Users/bdraco/home-assistant/homeassistant/config_entries.py", line 1484, in async_step_bluetooth
          return await self.async_step_discovery(dataclasses.asdict(discovery_info))
        File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py", line 1239, in asdict
          return _asdict_inner(obj, dict_factory)
        File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py", line 1246, in _asdict_inner
          value = _asdict_inner(getattr(obj, f.name), dict_factory)
        File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py", line 1280, in _asdict_inner
          return copy.deepcopy(obj)
        File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 172, in deepcopy
          y = _reconstruct(x, memo, *rv)
        File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 271, in _reconstruct
          state = deepcopy(state, memo)
        File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 146, in deepcopy
          y = copier(x, memo)
        File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 231, in _deepcopy_dict
          y[deepcopy(key, memo)] = deepcopy(value, memo)
        File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 161, in deepcopy
          rv = reductor(4)
      TypeError: Cannot pickle Objective-C objects
      ```
      
      * Avoid converting BluetoothServiceInfo to a dict for default discovery
      
      Fixes
      ```
      2022-07-19 09:46:48.303 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
      Traceback (most recent call last):
        File "/Users/bdraco/home-assistant/homeassistant/helpers/discovery_flow.py", line 74, in _async_process_pending_flows
          await gather_with_concurrency(
        File "/Users/bdraco/home-assistant/homeassistant/util/async_.py", line 201, in gather_with_concurrency
          return await gather(
        File "/Users/bdraco/home-assistant/homeassistant/util/async_.py", line 199, in sem_task
          return await task
        File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 222, in async_init
          flow, result = await task
        File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 249, in _async_init
          result = await self._async_handle_step(flow, flow.init_step, data, init_done)
        File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 359, in _async_handle_step
          result: FlowResult = await getattr(flow, method)(user_input)
        File "/Users/bdraco/home-assistant/homeassistant/config_entries.py", line 1484, in async_step_bluetooth
          return await self.async_step_discovery(dataclasses.asdict(discovery_info))
        File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py", line 1239, in asdict
          return _asdict_inner(obj, dict_factory)
        File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py", line 1246, in _asdict_inner
          value = _asdict_inner(getattr(obj, f.name), dict_factory)
        File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/dataclasses.py", line 1280, in _asdict_inner
          return copy.deepcopy(obj)
        File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 172, in deepcopy
          y = _reconstruct(x, memo, *rv)
        File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 271, in _reconstruct
          state = deepcopy(state, memo)
        File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 146, in deepcopy
          y = copier(x, memo)
        File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 231, in _deepcopy_dict
          y[deepcopy(key, memo)] = deepcopy(value, memo)
        File "/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/copy.py", line 161, in deepcopy
          rv = reductor(4)
      TypeError: Cannot pickle Objective-C objects
      ```
      32311f24
    • Marc Mueller's avatar
      Improve debouncer typing (#75436) · 5ae5ae53
      Marc Mueller authored
      5ae5ae53
Loading