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

Is phonenumbers a required dependency? #581

Open
matthewhegarty opened this issue Jan 11, 2023 · 1 comment · May be fixed by #654
Open

Is phonenumbers a required dependency? #581

matthewhegarty opened this issue Jan 11, 2023 · 1 comment · May be fixed by #654

Comments

@matthewhegarty
Copy link

I am trying to remove the phonenumbers dependency, but it looks like it is required.

The documentation states:

This project uses django-phonenumber-field which requires either phonenumbers or phonenumberslite to be installed.

However the release notes for 1.14.0 say:

BREAKING: The phone capability moved to a plugins folder, so if you use that
capability and want to keep it, you should add two_factor.plugins.phonenumber
line in your INSTALLED_APPS setting.

When I have removed the import of phonenumbers from my requirements file, I get:

ModuleNotFoundError: No module named 'phonenumbers'

from the import on this line.

My settings have the following:

INSTALLED_APPS = [
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sessions",
    "django.contrib.messages",
    "django.contrib.humanize",
     ...
    "django_otp",
    "django_otp.plugins.otp_static",
    "django_otp.plugins.otp_totp",
    "two_factor",
    ...
]

Steps to Reproduce (for bugs)

Try to build project without the phonenumbers dependency.

Context

Trying to remove the phonenumbers dependency but cannot do so.

Your Environment

  • Python version: 3.10
  • Django version: 4.1.5
  • django-otp version: 1.1.3
  • django-two-factor-auth version: 1.14.0
@claudep
Copy link
Contributor

claudep commented Jan 11, 2023

Yes, completely isolating phone-related stuff is still WIP (#469). If you have ideas to contribute, feel free to suggest a patch.

@jpaniagualaconich jpaniagualaconich linked a pull request Sep 10, 2023 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants