Skip to content

Pre-import more frontend deps to avoid importing when the event loop is running#112031

Merged
bdraco merged 12 commits into
devfrom
pre_import_more_frontend_deps
Mar 2, 2024
Merged

Pre-import more frontend deps to avoid importing when the event loop is running#112031
bdraco merged 12 commits into
devfrom
pre_import_more_frontend_deps

Conversation

@bdraco
Copy link
Copy Markdown
Member

@bdraco bdraco commented Mar 2, 2024

Proposed change

Pre-import more frontend deps to avoid importing when the event loop is running

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant home-assistant Bot added cla-signed core small-pr PRs with less than 30 lines. labels Mar 2, 2024
@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented Mar 2, 2024

I think it would be good to add a test that enumerates these and makes sure they don't get any requirements in the manifest

@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented Mar 2, 2024

I couldn't add file_upload to the list because of the janus requirement so I opened #112032 to remove it

@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented Mar 2, 2024

airzone test failure is unrelated

host = 'm.airzonecloud.com', port = 443, family = 0
type = <SocketKind.SOCK_STREAM: 1>, proto = 0
flags = <AddressInfo.AI_ADDRCONFIG: 32>

    def getaddrinfo(host, port, family=0, type=0, proto=0, flags=0):
        """Resolve host and port into list of address info entries.
    
        Translate the host/port argument into a sequence of 5-tuples that contain
        all the necessary arguments for creating a socket connected to that service.
        host is a domain name, a string representation of an IPv4/v6 address or
        None. port is a string service name such as 'http', a numeric port number or
        None. By passing None as the value of host and port, you can pass NULL to
        the underlying C API.
    
        The family, type and proto arguments can be optionally specified in order to
        narrow the list of addresses returned. Passing zero as a value for each of
        these arguments selects the full range of results.
        """
        # We override this function since we want to translate the numeric family
        # and socket type values to enum constants.
        addrlist = []
>       for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
E       SystemExit

Its failing on dev as well

@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented Mar 2, 2024

CI failure is from #112034

@bdraco bdraco marked this pull request as ready for review March 2, 2024 23:43
@bdraco bdraco requested a review from a team as a code owner March 2, 2024 23:43
@bdraco bdraco merged commit 0889713 into dev Mar 2, 2024
@bdraco bdraco deleted the pre_import_more_frontend_deps branch March 2, 2024 23:44
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed core small-pr PRs with less than 30 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants