Suppress CryptographyDeprecationWarnings

Change-Id: Id123fb0f9173cf75916984d85bcf8c2d5eefaec2
This commit is contained in:
Tim Burke 2020-08-26 13:09:41 -07:00
parent 5de9f4f74d
commit 8ea227a0e5
2 changed files with 13 additions and 0 deletions

View File

@ -16,6 +16,7 @@
import os
import sys
import gettext
import warnings
import pkg_resources
@ -74,3 +75,9 @@ if (3, 0) <= sys.version_info[:2] <= (3, 5):
json.loads = JsonLoadsPatcher(json.loads)
del JsonLoadsPatcher
warnings.filterwarnings('ignore', module='cryptography', message=(
'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.'))

View File

@ -37,6 +37,12 @@ except ImportError:
return result
return result[:_MAX_LENGTH] + ' [truncated]...'
import warnings
warnings.filterwarnings('ignore', module='cryptography', message=(
'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.'))
from eventlet.green import socket
# make unittests pass on all locale