CuriousLearner / django-phone-verify

A Django app to support phone number verification using security code / One-Time-Password (OTP) sent via SMS.
https://www.sanyamkhurana.com/django-phone-verify/
GNU General Public License v3.0
257 stars 61 forks source link

Dependency error with twilio #69

Open vlntsolo opened 2 years ago

vlntsolo commented 2 years ago

Is there any way not to include twilio/nexmo dependencies? Twilio has strict version, which breaks my environment.

There are incompatible versions in the resolved dependencies:
  pyjwt<3,>=2 (from djangorestframework-simplejwt==4.7.2->-r /tmp/pipenv6rgd0e3brequirements/pipenv-c9i29072-constraints.txt (line 2))
  pyjwt==1.7.1 (from twilio==6.62.1->django-phone-verify==2.0.1->-r /tmp/pipenv6rgd0e3brequirements/pipenv-c9i29072-constraints.txt (line 15))
  pyjwt>=1.7.1 (from django-phone-verify==2.0.1->-r /tmp/pipenv6rgd0e3brequirements/pipenv-c9i29072-constraints.txt (line 15))
  pyjwt[crypto]>=1.6.4 (from nexmo==2.5.2->django-phone-verify==2.0.1->-r /tmp/pipenv6rgd0e3brequirements/pipenv-c9i29072-constraints.txt (line 15))
CuriousLearner commented 2 years ago

Hi @vlntsolo

We use twilio>=6.21.0. So, any version above that will suffice.

Can you paste the whole log while installing the package?

vlntsolo commented 2 years ago

Hi, @CuriousLearner . Here it goes:

Installing django-phone-verify...
Adding django-phone-verify to Pipfile's [packages]...
✔ Installation Succeeded 
Pipfile.lock (d98d88) out of date, updating to (f81cdf)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✘ Locking Failed! 
[ResolutionFailure]:   File "/home/valentine/.local/lib/python3.9/site-packages/pipenv/resolver.py", line 741, in _main
[ResolutionFailure]:       resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages, dev)
[ResolutionFailure]:   File "/home/valentine/.local/lib/python3.9/site-packages/pipenv/resolver.py", line 702, in resolve_packages
[ResolutionFailure]:       results, resolver = resolve(
[ResolutionFailure]:   File "/home/valentine/.local/lib/python3.9/site-packages/pipenv/resolver.py", line 684, in resolve
[ResolutionFailure]:       return resolve_deps(
[ResolutionFailure]:   File "/home/valentine/.local/lib/python3.9/site-packages/pipenv/utils.py", line 1395, in resolve_deps
[ResolutionFailure]:       results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
[ResolutionFailure]:   File "/home/valentine/.local/lib/python3.9/site-packages/pipenv/utils.py", line 1108, in actually_resolve_deps
[ResolutionFailure]:       resolver.resolve()
[ResolutionFailure]:   File "/home/valentine/.local/lib/python3.9/site-packages/pipenv/utils.py", line 833, in resolve
[ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: Could not find a version that matches pyjwt<3,==1.7.1,>=1.6.4,>=1.7.1,>=2 (from django-phone-verify==2.0.1->-r /tmp/pipenv1ebmvztxrequirements/pipenv-sdhho3u8-constraints.txt (line 20))
Tried: 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.3, 0.2.3, 0.3.0, 0.3.0, 0.3.1, 0.3.1, 0.3.2, 0.3.2, 0.4.0, 0.4.0, 0.4.1, 0.4.1, 0.4.2, 0.4.2, 0.4.3, 0.4.3, 1.0.0, 1.0.0, 1.0.1, 1.0.1, 1.1.0, 1.1.0, 1.3.0, 1.3.0, 1.4.0, 1.4.0, 1.4.1, 1.4.1, 1.4.2, 1.4.2, 1.5.0, 1.5.0, 1.5.1, 1.5.1, 1.5.2, 1.5.2, 1.5.3, 1.5.3, 1.6.0, 1.6.0, 1.6.1, 1.6.1, 1.6.3, 1.6.3, 1.6.4, 1.6.4, 1.7.0, 1.7.0, 1.7.1, 1.7.1, 2.0.0, 2.0.0, 2.0.1, 2.0.1, 2.1.0, 2.1.0
Skipped pre-versions: 2.0.0a1, 2.0.0a1, 2.0.0a2, 2.0.0a2
There are incompatible versions in the resolved dependencies:
  pyjwt<3,>=2 (from djangorestframework-simplejwt==4.8.0->-r /tmp/pipenv1ebmvztxrequirements/pipenv-sdhho3u8-constraints.txt (line 19))
  pyjwt==1.7.1 (from twilio==6.63.2->django-phone-verify==2.0.1->-r /tmp/pipenv1ebmvztxrequirements/pipenv-sdhho3u8-constraints.txt (line 20))
  pyjwt>=1.7.1 (from django-phone-verify==2.0.1->-r /tmp/pipenv1ebmvztxrequirements/pipenv-sdhho3u8-constraints.txt (line 20))
  pyjwt[crypto]>=1.6.4 (from nexmo==2.5.2->django-phone-verify==2.0.1->-r /tmp/pipenv1ebmvztxrequirements/pipenv-sdhho3u8-constraints.txt (line 20))

Installing with pipenv. Looks like it's more twilio dependency issue than django-phone-verify. Would be great to have "light" installation option to have django-phone-verify installed without twilio and nexmo.

CuriousLearner commented 2 years ago

Sure,

I'll look into this!

Thanks!