Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Ensure HomeAssistant can still restart when a library file is missing #46664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Feb 16, 2021

Proposed change

Fixes a problem were we cannot restart because we do not treat
missing library files the same as missing or non-importable
python files.

Fixes restart problem here (note that the underly python regression https://bugs.python.org/issue42580 still exists that uncovered this in the first place)
#45918 (comment)

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)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml

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
  • The code has been formatted using Black (black --fast 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.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

Fixes a problem were we cannot restart because we do not treat
missing library files the same as missing or non-importable
python files.
homeassistant/config.py Outdated Show resolved Hide resolved
homeassistant/config.py Outdated Show resolved Hide resolved
homeassistant/config.py Outdated Show resolved Hide resolved
homeassistant/config.py Outdated Show resolved Hide resolved
@bdraco
Copy link
Member Author

bdraco commented Feb 16, 2021

@OnFreund can you give this a try?

@OnFreund
Copy link
Contributor

thanks @bdraco. Will give it a try over the weekend (since it's only happening in my prod environment).

@emontnemery
Copy link
Contributor

LGTM

PS:
I'm confused about the reference to https://bugs.python.org/issue42580 though, that seems like a mistake on OPs side on calling ctypes.util.find_library("libc") where it should be ctypes.util.find_library("c"), same as here: #45918 (comment)

Or did Python previously have some magic to remove lib from the library name?

@bdraco
Copy link
Member Author

bdraco commented Feb 17, 2021

LGTM

PS:
I'm confused about the reference to bugs.python.org/issue42580 though, that seems like a mistake on OPs side on calling ctypes.util.find_library("libc") where it should be ctypes.util.find_library("c"), same as here: #45918 (comment)

Or did Python previously have some magic to remove lib from the library name?

It previously worked before python 3.9 so I think the magic was removed. I haven't actually tracked down the code change in cpython though.

@bdraco
Copy link
Member Author

bdraco commented Feb 17, 2021

commit 27ac19cca2c639caaf6fedf3632fe6beb265f24f
Author: Pablo Galindo <Pablogsal@gmail.com>
Date:   Thu Oct 8 19:31:19 2020 +0100

    bpo-41976: Fix the fallback to gcc of ctypes.util.find_library when using gcc>9 (GH-22598)

bisects to this commit in cpython

@bdraco
Copy link
Member Author

bdraco commented Feb 17, 2021

Also it looks like 3.8 and 3.7 will have the issue in the next release since https://bugs.python.org/issue41976 is backported

python/cpython#22598
python/cpython#22600
python/cpython#22601

@balloob balloob merged commit 500cb17 into home-assistant:dev Feb 20, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Feb 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.