pipenv: python3.7 posix broken on pipenv 2022.4.21
Getting this error. Looks like it is using python2 libs for Crypto. Reverted to 2022.4.8 and that works.
botstream Traceback (most recent call last):
botstream File "run.py", line 41, in <module>
botstream main()
botstream File "run.py", line 34, in main
botstream accounts = Accounts()
botstream File "/botstream-server/botstream/users/information.py", line 154, in __init__
botstream from simplecrypt import decrypt
botstream File "/usr/local/lib/python3.7/site-packages/simplecrypt/__init__.py", line 5, in <module>
botstream from Crypto.Random.random import getrandbits
botstream File "/usr/local/lib/python3.7/site-packages/Crypto/Random/__init__.py", line 28, in <module>
botstream from Crypto.Random import OSRNG
botstream File "/usr/local/lib/python3.7/site-packages/Crypto/Random/OSRNG/__init__.py", line 32, in <module>
botstream from Crypto.Random.OSRNG.posix import new
botstream File "/usr/local/lib/python3.7/site-packages/Crypto/Random/OSRNG/posix.py", line 66
botstream except IOError, e:
botstream ^
botstream SyntaxError: invalid syntax
❯ diff posix.py /Users/rwong/tmp/2022-04-22/bad/site-packages/Crypto/Random/OSRNG/posix.py [11:24:09]
32c32
< from .rng_base import BaseRNG
---
> from rng_base import BaseRNG
66c66
< except IOError as e:
---
> except IOError, e:
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 23 (11 by maintainers)
@mohsyed04 , pinned pipenv like so
pip install pipenv==2022.4.8
@whyboris or @wwwroth did you test with the newer pipenv and
--system
flag?@whyboris , @wwwroth , @heathwwoodson ^^^
@whyboris or @wwwroth, can you test without the
--system
flag with the pipenv version pin removed?@rwong2888 It really appears that the
--system
flag is the issue, but let me know if there is a way to extend my example to encounter the same thing. Check out the documented preferred way to build the docker image: https://pipenv.pypa.io/en/latest/basics/#pipenv-and-docker-containersI have a feeling you’re going to say that you need the system level installs because you are building a base docker image for consumption…
Disclaimer: I am just the co-fixer of the issue that arose.
@matteius
Crypto
should come frompycrypto
which is a dependency forsimplecrypt
.There are some separate issue reports about the
--system
flag you might want to look for. I will mark this as triage for someone to look into more.