etingof / pyasn1-modules

ASN.1 modules for pyasn1 library
http://snmplabs.com/pyasn1/
BSD 2-Clause "Simplified" License
41 stars 45 forks source link

pyasn1-modules broken with pyasn1==0.1.9 #11

Closed rvandegrift closed 6 years ago

rvandegrift commented 6 years ago

The requirements.txt for pyasn1-modules 0.2.1 permits pyasn1<0.5.0. But with pyasn1==0.1.9:

>>> from pyasn1_modules.rfc2459 import Certificate
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/pyasn1_modules/rfc2459.py", line 20, in <module>
    from pyasn1.type import opentype
ImportError: cannot import name 'opentype'

Upgrading to pyasn==0.4.2 fixes the issue.

etingof commented 6 years ago

Thank you for raising this!

In pyasn1-modules 0.2.1 we have pyasn1>=0.4.1,<0.5.0 dependency which reads: pyasn1 version greater or equal to 0.4.1 and lesser than 0.5.0. That should not include 0.1.9, does it?

The working combination for pyasn1-modules 0.2.1 is to run upon pyasn1 0.4.1, not earlier versions.

Do you think there is a bug in the dependency statement?

rvandegrift commented 6 years ago

Ah I thought the comma meant or, which explains why I ended up with pyasn1 0.1.9. But now I can't reproduce in a clean venv, pip always upgrades pyasn1 to 0.4.2. So I don't know how I ended up with an incompatible version installed. Sorry!