I upgraded my system from python 2 to python 3, and now when I run my code:
from cryptography.hazmat.backends import default_backend
I am getting this error
/usr/local/lib/python3.6/site-packages/paramiko/transport.py:33:
CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python
core team. Therefore, support for it is deprecated in cryptography and will be
removed in a future release.
How to resolve it?
on ubuntu
sudo apt-get upgrade docker-compose
docker-compose must be 2.X after that you need to refer old command to new command so do this
alias docker-compose='docker compose'
One of the solutions here suggests using
from cryptography.utils import CryptographyDeprecationWarning
That didn't work in my case, since importing the warning object caused the warning itself as well.
Although it's not an elegant solution (since "elegant" would be to upgrade Python), the following worked for me instead:
warnings.filterwarnings(action='ignore',message='Python 3.6 is no longer supported')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With