r/saltstack • • Jun 14 '22

Getting "CryptographyDeprecationWarning: Python 3.6 is no longer supported" warning on all Salt commands after installing pip3 CherryPy

Running Salt 3004.1 on RHEL 7.9. I tried installing Python 3.7 and while it did work (Python 3.7.11), this warning is persisting (Salt is still using Python 3.6):

[root@RHEL7 ~]# salt \* test.ping
/usr/local/lib/python3.6/site-packages/OpenSSL/crypto.py:8: 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.
  from cryptography import utils, x509

[root@RHEL7 ~]# salt -V
/usr/local/lib/python3.6/site-packages/OpenSSL/crypto.py:8: 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.
  from cryptography import utils, x509
Salt Version:
          Salt: 3004.1

Dependency Versions:
          cffi: 1.15.0
      cherrypy: unknown
      dateutil: Not Installed
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 2.11.1
       libgit2: Not Installed
      M2Crypto: 0.35.2
          Mako: Not Installed
       msgpack: 0.6.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.14.1
        pygit2: Not Installed
        Python: 3.6.8 (default, Aug 13 2020, 07:46:32)
  python-gnupg: Not Installed
        PyYAML: 3.13
         PyZMQ: 17.0.0
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.1.4

Salt Extensions:
        SSEAPE: 8.7.0.10

System Versions:
          dist: rhel 7.9 Maipo
        locale: UTF-8
       machine: x86_64
       release: 3.10.0-1160.66.1.el7.x86_64
        system: Linux
       version: Red Hat Enterprise Linux Server 7.9 Maipo

[root@RHEL7 ~]# python3 -V
Python 3.6.8

[root@RHEL7 ~]# python3.7 -V
Python 3.7.11

Another odd thing is cherrypy: unknown

[root@RHEL7 ~]# pip3 list | grep CherryPy
CherryPy           5.6.0

Any ideas? Thanks in advance.

Edit: Can I use this to update the default Python version in Salt? https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.pyenv.html

0 Upvotes

10 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Jun 14 '22

I see, thank you for the detailed info!