Skip to content
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

Inline MQTT paho imports #29177

Merged
merged 5 commits into from Dec 2, 2019
Merged

Inline MQTT paho imports #29177

merged 5 commits into from Dec 2, 2019

Conversation

balloob
Copy link
Member

@balloob balloob commented Nov 28, 2019

Description:

Some integrations rely optionally on MQTT (ie. OwnTracks, MySensors). These could no longer be imported because the MQTT imports would fail (mqtt is only an after_dependencies).

Related issue (if applicable): fixes #28464

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@balloob balloob requested a review from a team as a code owner November 28, 2019 05:23
@probot-home-assistant probot-home-assistant bot added core integration: mqtt small-pr PRs with less than 30 lines. labels Nov 28, 2019
@project-bot project-bot bot added this to Needs review in Dev Nov 28, 2019
@probot-home-assistant
Copy link

Hey there @home-assistant/core, mind taking a look at this pull request as its been labeled with a integration (mqtt) you are listed as a codeowner for? Thanks!

@frenck
Copy link
Member

frenck commented Nov 28, 2019

Maybe we should explicitly add # pylint: disable=import-outside-toplevel to those lines?

This gives us the hint it was meant intentionally and makes enabling the rule in the future much easier.

@MartinHjelmare
Copy link
Member

@balloob
Copy link
Member Author

balloob commented Dec 1, 2019

Done & Done!

@MartinHjelmare MartinHjelmare moved this from Needs review to Review in progress in Dev Dec 1, 2019
@balloob
Copy link
Member Author

balloob commented Dec 1, 2019

Done!

Dev automation moved this from Review in progress to Reviewer approved Dec 2, 2019
@pvizeli
Copy link
Member

pvizeli commented Dec 2, 2019

Not sure if the better fix is to install also after_dependencies requirements. On docker, we have also most packages preinstall without getting an issue.

Now the mqtt after_dependencies work, but we need to make a list which integration can be an after_dependencies and there is no warranty that we don't run into the same issue on integration with different after_dependencies.

This PR feels not like a real bug fix. I can't approve this PR.

@MartinHjelmare
Copy link
Member

Yeah, it's not optimal.

@balloob
Copy link
Member Author

balloob commented Dec 2, 2019

We install after_dependencies during check config.

The camera integration has stream as an after_dependencies, which doesn't easily install on all operating systems.

I want to go ahead and merge this, so that OwnTracks and MySensors can be used again.

We can come up with a better solution in the future.

@balloob balloob merged commit ffaa0e5 into dev Dec 2, 2019
Dev automation moved this from Reviewer approved to Done Dec 2, 2019
@delete-merged-branch delete-merged-branch bot deleted the mqtt-imports branch December 2, 2019 19:32
@lock lock bot locked and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Dev
  
Done
Development

Successfully merging this pull request may close these issues.

Setup failed for owntracks: Unable to import component
5 participants