Skip to content

Commit

Permalink
Silence python3.6 cryptography deprecation warnings
Browse files Browse the repository at this point in the history
```
/opt/**********/st2/lib/python3.6/site-packages/st2client/shell.py:27: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography (40.0) will be the last to support Python 3.6.
  from cryptography.utils import CryptographyDeprecationWarning
```
in CLI and failing py3.6 unit tests
arm4b committed Nov 2, 2023
1 parent e77dd10 commit f7100f4
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -15,11 +15,11 @@

from __future__ import absolute_import

# Ignore CryptographyDeprecationWarning warnings which appear on older versions of Python 2.7
# Ignore CryptographyDeprecationWarning warnings which appear on Python 3.6
# TODO: Remove after dropping python3.6
import warnings
from cryptography.utils import CryptographyDeprecationWarning

warnings.filterwarnings("ignore", category=CryptographyDeprecationWarning)
warnings.filterwarnings("ignore", message="Python 3.6 is no longer supported")

import os
import sys
1 change: 1 addition & 0 deletions st2client/st2client/shell.py
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@
# Ignore CryptographyDeprecationWarning warnings which appear on Python 3.6
# TODO: Remove after dropping python3.6
import warnings

warnings.filterwarnings("ignore", message="Python 3.6 is no longer supported")

import os

0 comments on commit f7100f4

Please sign in to comment.