question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

phonenumberslite fallback not working as intended

See original GitHub issue
$ pip list | grep phonenumber
django-phonenumber-field (1.0.0)
phonenumbers (7.2.8)

$ grep phonenumber requirements.txt 
django-phonenumber-field~=1.1.0

$ pip install -Ur requirements.txt
[...]
Installing collected packages: phonenumberslite, django-phonenumber-field
  Running setup.py install for phonenumberslite ... done
  Found existing installation: django-phonenumber-field 1.0.0
    Uninstalling django-phonenumber-field-1.0.0:
      Successfully uninstalled django-phonenumber-field-1.0.0
Successfully installed django-phonenumber-field-1.1.0 phonenumberslite-7.2.8

So the full phonenumbers was already installed, but pip ended up installing phonenumberslite anyway. And now it’s a bit of a mess, need to fix things manually (remove both phonenumberslite and phonenumbers and reinstall one of them).

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vstoykovcommented, Jun 10, 2016

Probably will be better to remove phonenumbers/phonenumberslite from install_requires and add them in extras_require. Then the installation to be:

pip install django-phonenumber-field[full]

or

pip install django-phonenumber-field[lite]

By this way anybody can set this to it’s requirements.txt file or just use django-phonenumber-field without any extra and specify which package of phonenumbers they require.

I know that phonenumbers is a requirement for this package to work but there will be cases that one group of users will want the lite version and the others may want full version for other reasons.

What do you think about that?

P.S. Django is also a requirement but is not listed in install requires 😉

0reactions
stefanfouliscommented, Oct 29, 2018

in 2.1.0 we removed the hardcoded dependecy to phonenumbers. Now can choose yourself which one to manually install.

Read more comments on GitHub >

github_iconTop Results From Across the Web

django-phonenumber-field - PyPI
PhoneNumberInternationalFallbackWidget, a form widget that uses national numbers unless an international number is entered.
Read more >
Django: undefined template variable renders as context dump
My template is using a mandatory 'title' context variable and an optional 'note' template variable. Rendering {{ title }} works fine, but ...
Read more >
Flask-Security Documentation
Flask-Security allows you to quickly add common security mechanisms to your Flask application. They include: 1. Session based authentication.
Read more >
python-flask-security-too(1) - Arch manual pages
These are not sufficient for a complete application - other packages are required ... Change password does not work if a user registers...
Read more >
https://git.kosmos.fr/projects/KFO/repos/pretix/ra...
... 'Intended Audience :: Developers', 'Intended Audience :: Other Audience', ... https://github.com/sass/libsass/issues/3053 is fixed 'django-otp==0.7.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found