-
-
Notifications
You must be signed in to change notification settings - Fork 442
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
Upgrade phone number field #178
Conversation
@@ -65,7 +65,7 @@ | |||
'two_factor', | |||
'example', | |||
|
|||
'debug_toolbar', | |||
# 'debug_toolbar', |
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.
Did you try uncommenting the middleware to see if it now works under Django 1.10?
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.
It doesn't. runserver ends with an error NoReverseMatch: u'djdt' is not a registered namespace
Seems like making it work should be part of another PR?
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.
With version 1.6 of Django Debug Toolbar that should be resolved, can you verify that you're on that version?
Anyway I think its best to separate it from this PR.
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.
I was on 1.6, the issue was that the app didn't include the djdt urls. I've fixed that in #179
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.
Overall LGTM. However one issue that might arise is that this might not work with wheel packages. As the setup.py
is not run on install (as far as I know), this would mean that the phonenumberlite
dependency would not be installed. See also wheel conditional dependencies.
'django-formtools', | ||
] | ||
if 'phonenumbers' not in [p[1] for p in pkgutil.iter_modules()]: | ||
install_requires.append('phonenumberslite>=7.0.9') |
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.
Can you change this to ...,<7.99
, assuming they semver, would prevent breaking changes.
'Django>=1.8', | ||
'django_otp>=0.3.4,<0.99', | ||
'qrcode>=4.0.0,<4.99', | ||
'django-phonenumber-field>=1.1.0,<1.99.0', |
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.
Can you change this to ...<1.99
instead; so to be consistent with the other version notations?
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.
On the note what @Bouke already mentioned: Wheels don't run setup.py thus this won't work as expected.
@Bouke @MarkusH I looked into the conditional dependencies on wheel, but that didn't seem like the right approach as it wouldn't install either by default which could cause this package to break. Instead I changed the |
2 similar comments
I'm trying to figure out the difference between |
2 similar comments
@MarkusH https://github.com/daviddrysdale/python-phonenumbers#memory-usage The last paragraph in that section describes the difference between packages. I'm not too familiar with I proposed this change as |
I've updated the dependency. As the default dependency library for django-phonenumber-field changed to phonenumberslite, there is no longer a need to replicate the dependency in this package. So I've taken it out. |
@Bouke Thanks! Could you release a version with that update? For what it's worth, I think it may have been dangerous (although unlikely to cause issues) to take out |
@Bouke
phonenumberfield
phonenumberslite
by default (taken from https://github.com/stefanfoulis/django-phonenumber-field/blob/1.1.0/setup.py#L7-L8)debug_toolbar
fromINSTALLED_APPS
as it errors before running the server on django 1.10 due to middleware missing (https://github.com/Bouke/django-two-factor-auth/blob/543687e872bfe7a3d6244f8c73fb9149e53a1df9/example/settings.py#L33)