cisagov / cyhy-system

Cyber Hygiene system and overall documentation/issue tracking
Creative Commons Zero v1.0 Universal
6 stars 0 forks source link

cryptography Python package dropping support for Python 2 #16

Open jsf9k opened 3 years ago

jsf9k commented 3 years ago

🐛 Summary

The cryptography Python package will drop support for Python 2 in the next release. This package is used by paramiko, and it's unknown if paramiko will pin cryptography or not.

To reproduce

$ docker-compose up --detach
/usr/local/lib/python2.7/dist-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography.hazmat.backends import default_backend
Starting cyhy-mailer_mailer_1 ... done
mcdonnnj commented 3 years ago

The setup.py defines the cyhy-mailer helper script as: https://github.com/cisagov/cyhy-mailer/blob/59ec34362ae21735e710438c0125f5a4695b0e28/setup.py#L62 , the shebang for that file is https://github.com/cisagov/cyhy-mailer/blob/59ec34362ae21735e710438c0125f5a4695b0e28/cyhy/mailer/cli.py#L1 , and the Dockerfile installs it like so: https://github.com/cisagov/cyhy-mailer/blob/59ec34362ae21735e710438c0125f5a4695b0e28/Dockerfile#L17 So as far as I can tell, cyhy-mailer is running on Python 3 in the Docker image. I feel like the issue lies outside of this project. I believe that the installed version of docker-compose is currently running under Python 2. The version currently installed as such in production, 1.26.2, has a paramiko requirement.

jsf9k commented 3 years ago

I think @mcdonnnj is correct. Transferring this issue to cisagov/cyhy-system.

jsf9k commented 3 years ago

I deleted my incorrect speculation about cisagov/cyhy-mailer being the cause of this issue.