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

Reinstate our old virtual env check in favor of pip #12932

Merged
merged 1 commit into from Mar 5, 2018

Conversation

Projects
None yet
7 participants
@balloob
Copy link
Member

commented Mar 5, 2018

Description:

We were importing a method from pip to check for virtual environments. This had the unintended consequence of importing a whole load of pip into memory for a 2 line function!

We've had a similar function in Home Assistant before which I've reinstated in favor of importing pip.

Old method: https://github.com/home-assistant/home-assistant/blob/c532a28a98cb796244634eec5db9de367ab15f1d/homeassistant/util/environment.py

CC @MartinHjelmare

Related issue (if applicable): fixes #11493

@balloob balloob requested a review from home-assistant/core as a code owner Mar 5, 2018

@balloob balloob merged commit 38af04c into dev Mar 5, 2018

6 checks passed

WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.0002%) to 94.023%
Details
hound No violations found. Woof!

@balloob balloob deleted the dont-import-pip branch Mar 5, 2018

@MartinHjelmare

This comment has been minimized.

Copy link
Member

commented Mar 6, 2018

Why does this solve #11493?

@balloob

This comment has been minimized.

Copy link
Member Author

commented Mar 6, 2018

Because we no longer import pip. Pip vendorizes requests, means requests was loaded twice. This somehow managed to conflict with requests cache. User in chat conformed it works.

@triDcontrols

This comment has been minimized.

Copy link

commented Mar 8, 2018

still new to this, i'm running 64.3, how do I import this change to the install?

@arsaboo

This comment has been minimized.

Copy link
Contributor

commented Mar 8, 2018

If you are not running dev (which is not recommended, if you are just starting off with HA), wait for the next release @triDcontrols. 0.65 should be out this weekend.

@happyleavesaoc

This comment has been minimized.

Copy link
Collaborator

commented Mar 8, 2018

Oh, very interesting. I was going crazy trying to figure out why requests_cache was acting up only with HASS

@balloob balloob referenced this pull request Mar 9, 2018

Merged

0.65 #12995

@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.