问题描述
使用docker-compose -f up -d观察到以下错误:
/usr/local/lib/python2.7/dist-packages/cryptography/__init__.py:39: 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 a future release.
尝试了一种变通方法
pip install cryptography==2.4.2
但是此安装会有副作用吗?还是有任何功能无法使用?
解决方法
此警告已添加到cryptography 3.0中:
对Python 2的弃用支持。目前还没有时间表,实际上没有放弃对Python 2的支持,但是我们强烈建议所有用户升级其Python,因为Python 2不再获得Python核心团队的支持。
所以暂时没有副作用
,是的,在加密2.4和3.0之间添加了许多功能。它们全部记录在这里:https://cryptography.io/en/latest/changelog/。如果您使用的是来自PyPI的二进制轮子,那么您还将缺少针对OpenSSL的许多安全修复程序。