hacs / integration

HACS gives you a powerful UI to handle downloads of all your custom needs.
https://hacs.xyz
MIT License
4.87k stars 1.22k forks source link

Hacs #3785

Closed swetoast closed 2 weeks ago

swetoast commented 2 weeks ago

System Health details

-

Checklist

Describe the issue

hacs and python 3.12 breaks on latest verison of ha

Homeassistant version 2024.6.2 HACS Version 1.34.0

Reproduction steps

  1. upgrade to python 3.12 on ubuntu lts 20
  2. load in home assistant in a virtual enviroment
  3. update python to 3.12
  4. install hacs
  5. breakage ...

Debug logs

Running on Homeassistant Core

[Logger: homeassistant.util.loop
Source: util/loop.py:56
First occurred: June 13, 2024 at 16:39:48 (1 occurrences)
Last logged: June 13, 2024 at 16:39:48
Detected blocking call to import_module with args ('custom_components.hacs',) in /srv/homeassistant/lib/python3.12/site-packages/homeassistant/loader.py, line 1052: ComponentProtocol, importlib.import_module(self.pkg_path) inside the event loop Traceback (most recent call last): File "/srv/homeassistant/bin/hass", line 8, in <module> sys.exit(main()) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/lib/python3.12/asyncio/base_events.py", line 1987, in _run_once handle._run() File "/usr/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/setup.py", line 165, in async_setup_component result = await _async_setup_component(hass, domain, config) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/setup.py", line 320, in _async_setup_component component = await integration.async_get_component() File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/loader.py", line 1004, in async_get_component comp = self._get_component() File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/loader.py", line 1052, in _get_component ComponentProtocol, importlib.import_module(self.pkg_path) 
](url)

Logger: homeassistant.loader
Source: loader.py:1052
First occurred: June 13, 2024 at 16:39:48 (2 occurrences)
Last logged: June 13, 2024 at 16:39:48

Unexpected exception importing component custom_components.hacs
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/loader.py", line 1052, in _get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/util/loop.py", line 131, in protected_loop_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/homeassistant/.homeassistant/custom_components/hacs/__init__.py", line 12, in <module>
    from aiogithubapi import AIOGitHubAPIException, GitHub, GitHubAPI
  File "/srv/homeassistant/lib/python3.12/site-packages/aiogithubapi/__init__.py", line 20, in <module>
    from .device import GitHubDeviceAPI
  File "/srv/homeassistant/lib/python3.12/site-packages/aiogithubapi/device.py", line 14, in <module>
    from .client import GitHubClient
  File "/srv/homeassistant/lib/python3.12/site-packages/aiogithubapi/client.py", line 27, in <module>
    from .legacy.client import AIOGitHubAPIClient as LegacyAIOGitHubAPIClient
  File "/srv/homeassistant/lib/python3.12/site-packages/aiogithubapi/legacy/client.py", line 15, in <module>
    from ..helpers import async_call_api
  File "/srv/homeassistant/lib/python3.12/site-packages/aiogithubapi/helpers.py", line 8, in <module>
    from sigstore.verify import (
  File "/srv/homeassistant/lib/python3.12/site-packages/sigstore/verify/__init__.py", line 54, in <module>
    from sigstore.verify.models import (
  File "/srv/homeassistant/lib/python3.12/site-packages/sigstore/verify/models.py", line 30, in <module>
    from sigstore._internal.rekor import RekorClient
  File "/srv/homeassistant/lib/python3.12/site-packages/sigstore/_internal/rekor/__init__.py", line 19, in <module>
    from .client import RekorClient
  File "/srv/homeassistant/lib/python3.12/site-packages/sigstore/_internal/rekor/client.py", line 45, in <module>
    class RekorBundle(BaseModel):
  File "/srv/homeassistant/lib/python3.12/site-packages/pydantic/main.py", line 286, in __new__
    cls.__try_update_forward_refs__()
  File "/srv/homeassistant/lib/python3.12/site-packages/pydantic/main.py", line 807, in __try_update_forward_refs__
    update_model_forward_refs(cls, cls.__fields__.values(), cls.__config__.json_encoders, localns, (NameError,))
  File "/srv/homeassistant/lib/python3.12/site-packages/pydantic/typing.py", line 554, in update_model_forward_refs
    update_field_forward_refs(f, globalns=globalns, localns=localns)
  File "/srv/homeassistant/lib/python3.12/site-packages/pydantic/typing.py", line 520, in update_field_forward_refs
    field.type_ = evaluate_forwardref(field.type_, globalns, localns or None)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/pydantic/typing.py", line 66, in evaluate_forwardref
    return cast(Any, type_)._evaluate(globalns, localns, set())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'

### Diagnostics dump

Running on Homeassistant Core

[Logger: homeassistant.util.loop
Source: util/loop.py:56
First occurred: June 13, 2024 at 16:39:48 (1 occurrences)
Last logged: June 13, 2024 at 16:39:48
Detected blocking call to import_module with args ('custom_components.hacs',) in /srv/homeassistant/lib/python3.12/site-packages/homeassistant/loader.py, line 1052: ComponentProtocol, importlib.import_module(self.pkg_path) inside the event loop Traceback (most recent call last): File "/srv/homeassistant/bin/hass", line 8, in <module> sys.exit(main()) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/lib/python3.12/asyncio/base_events.py", line 1987, in _run_once handle._run() File "/usr/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/setup.py", line 165, in async_setup_component result = await _async_setup_component(hass, domain, config) File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/setup.py", line 320, in _async_setup_component component = await integration.async_get_component() File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/loader.py", line 1004, in async_get_component comp = self._get_component() File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/loader.py", line 1052, in _get_component ComponentProtocol, importlib.import_module(self.pkg_path) 
](url)

Logger: homeassistant.loader Source: loader.py:1052 First occurred: June 13, 2024 at 16:39:48 (2 occurrences) Last logged: June 13, 2024 at 16:39:48

Unexpected exception importing component custom_components.hacs Traceback (most recent call last): File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/loader.py", line 1052, in _get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/util/loop.py", line 131, in protected_loop_func return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "", line 995, in exec_module File "", line 488, in _call_with_frames_removed File "/home/homeassistant/.homeassistant/custom_components/hacs/init.py", line 12, in from aiogithubapi import AIOGitHubAPIException, GitHub, GitHubAPI File "/srv/homeassistant/lib/python3.12/site-packages/aiogithubapi/init.py", line 20, in from .device import GitHubDeviceAPI File "/srv/homeassistant/lib/python3.12/site-packages/aiogithubapi/device.py", line 14, in from .client import GitHubClient File "/srv/homeassistant/lib/python3.12/site-packages/aiogithubapi/client.py", line 27, in from .legacy.client import AIOGitHubAPIClient as LegacyAIOGitHubAPIClient File "/srv/homeassistant/lib/python3.12/site-packages/aiogithubapi/legacy/client.py", line 15, in from ..helpers import async_call_api File "/srv/homeassistant/lib/python3.12/site-packages/aiogithubapi/helpers.py", line 8, in from sigstore.verify import ( File "/srv/homeassistant/lib/python3.12/site-packages/sigstore/verify/init.py", line 54, in from sigstore.verify.models import ( File "/srv/homeassistant/lib/python3.12/site-packages/sigstore/verify/models.py", line 30, in from sigstore._internal.rekor import RekorClient File "/srv/homeassistant/lib/python3.12/site-packages/sigstore/_internal/rekor/init.py", line 19, in from .client import RekorClient File "/srv/homeassistant/lib/python3.12/site-packages/sigstore/_internal/rekor/client.py", line 45, in class RekorBundle(BaseModel): File "/srv/homeassistant/lib/python3.12/site-packages/pydantic/main.py", line 286, in new cls.try_update_forward_refs() File "/srv/homeassistant/lib/python3.12/site-packages/pydantic/main.py", line 807, in try_update_forward_refs update_model_forward_refs(cls, cls.fields.values(), cls.config.json_encoders, localns, (NameError,)) File "/srv/homeassistant/lib/python3.12/site-packages/pydantic/typing.py", line 554, in update_model_forward_refs update_field_forward_refs(f, globalns=globalns, localns=localns) File "/srv/homeassistant/lib/python3.12/site-packages/pydantic/typing.py", line 520, in update_field_forwardrefs field.type = evaluateforwardref(field.type, globalns, localns or None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/srv/homeassistant/lib/python3.12/site-packages/pydantic/typing.py", line 66, in evaluateforwardref return cast(Any, type)._evaluate(globalns, localns, set()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'

hacs-bot[bot] commented 2 weeks ago

Make sure you have read the issue guidelines and that you filled out the entire template.

If you have an issue identical to this, do not add comments like "same here", "i have this too", instead add a :+1: reaction to the issue description. Thanks! :+1:

ludeeus commented 2 weeks ago

You have too new requirements. Adhere to the core constrains file, or use container/OS installation.

swetoast commented 2 weeks ago

So best course of action is downgrade and wait for update ?

swetoast commented 2 weeks ago

Due to 2024.6.2 requiring python 3.12

b2un0 commented 6 days ago

same for me after upgrading to 2024.6.4 using https://github.com/linuxserver/docker-homeassistant