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

Fix flanker dependency package version to maintain py2 support #28

Closed

Conversation

punkrokk
Copy link
Contributor

Fixes: #27 - See issue for details

@punkrokk punkrokk changed the title Fix tld package version to maintain py2 support Fix flanker dependency -> tld package version to maintain py2 support Dec 10, 2019
@punkrokk punkrokk changed the title Fix flanker dependency -> tld package version to maintain py2 support Fix flanker dependency package version to maintain py2 support Dec 10, 2019
@arm4b arm4b added the bug label Dec 10, 2019
CHANGES.md Outdated Show resolved Hide resolved
Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Thanks for the fix!

@punkrokk
Copy link
Contributor Author

Thanks for approving. LMK what else is needed to get this merged. @blag ?

@blag
Copy link
Contributor

blag commented Dec 11, 2019

NAK. This just buries the fix in a separate package. Instead, I think it's cleaner and easier to simply specify a Python 2.7-only dependency along with a general dependency in requirements.txt, like so:

tld<0.11; python_version < '3.0'
tld

When installed in an environment with Python < 3.0, it will limit tld to 0.10 or 0.10.x. When installed in an environment with Python >= 3.0, it will install any version of tld.

@punkrokk @armab What do you think of that?

Sources:

Edit: I should also add that this works because flanker currently doesn't even partially pin its version of tld. If that project ever does pin the tld version that doesn't overlap with <0.10, then this will break. However, Python 2.7 is dead-dead in less than a month, so I don't think it's a huge deal.

Copy link
Contributor

@blag blag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAK

@punkrokk
Copy link
Contributor Author

punkrokk commented Dec 11, 2019 via email

@arm4b
Copy link
Member

arm4b commented Dec 11, 2019

Same here, nice trick I didn't know about.

Thanks @blag!

@blag blag mentioned this pull request Dec 11, 2019
@blag
Copy link
Contributor

blag commented Dec 12, 2019

Closing in favor of #29.

@blag blag closed this Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flanker dependencies break sensors with py2
3 participants