-
-
Notifications
You must be signed in to change notification settings - Fork 447
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
Update django-phonenumber-field dep and tox deps #272
Conversation
Codecov Report
@@ Coverage Diff @@
## master #272 +/- ##
=======================================
Coverage 96.52% 96.52%
=======================================
Files 39 39
Lines 1640 1640
Branches 116 116
=======================================
Hits 1583 1583
Misses 35 35
Partials 22 22 Continue to review full report at Codecov.
|
tox.ini
Outdated
@@ -39,9 +39,8 @@ deps = | |||
coverage | |||
|
|||
django-formtools | |||
django-phonenumber-field>=0.7.2,<0.99 | |||
django-phonenumber-field>=0.7.2,<2.99 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this match what's in setup.py?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, I had overlooked the lower bounds.
bec2106
to
808b976
Compare
tox.ini
Outdated
django_otp>=0.3.4,<0.99 | ||
phonenumbers>=7.0.9,<7.99 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phonenumbers
is a direct dependency, see also: https://github.com/Bouke/django-two-factor-auth/blob/0ec439604abebfd087f3bb282ec8cc2333777b29/two_factor/templatetags/two_factor.py#L3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. I have updated setup.py
to include the dep then, rather than dropping it from tox.ini
.
808b976
to
0c1d703
Compare
We install the phonenumbers package in
When we add a hard dependency on However... once this commit gets released, that package always hard depends on |
The question is somewhat moot, as once
I suggested a direct dependency on The memory footprint should be the same, the on disk size is 15M vs 50M, and download is 400K vs 3M (for wheels). I think the long term solution is to get |
It looks like in this PR, which appears released in version 2.1.0, django-phonenumber-field moves the dependency to extras_require and requires the developer to choose to install one or the other. Maybe django-two-factor-auth can take a similar approach? For what it's worth, I've been using phonenumberslite and it doesn't appear to me that the usage in templatetags/two_factor.py specifically requires one or the other. I could be wrong, however. |
@ryancausey that's probably the best route to go (other than fixing phonenumbers' awful packaging) We'd need a documentation update as well as updating the version of django-phonenumber-field that we require. |
Not sure if this was the right way to do it, but @craigloftus I created a PR against your fork that should do the trick. I also merged master into it since github was complaining that the branch was out of date. Let me know if you have feedback. |
@ryancausey I'd suggest you make a fresh PR and just reference this one in the description. |
Bumping the requirements to
django-phonenumber-field<2.99
and updating the deps in tox. I removedphonenumbers
from the tox deps as that is no longer a direct dependency.I've run this with tox locally with the exception of the py34 environment.