From 4ff01ea2fa2d697f43d69e18d44e685580934666 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Tue, 24 Mar 2026 19:41:42 -0700 Subject: [PATCH] Stop looking for warnings we shouldn't be triggering These were only raised on Python 2.7 and 3.6, which are no longer supported. Related-Change: https://review.opendev.org/c/openstack/swift/+/748297 Related-Change: https://review.opendev.org/c/openstack/swift/+/783968 Related-Change: https://review.opendev.org/c/openstack/swift/+/839828 Change-Id: I2a7e608364c013f260ca596852dc0c141b72814e Signed-off-by: Tim Burke --- swift/__init__.py | 10 ---------- test/__init__.py | 14 -------------- 2 files changed, 24 deletions(-) diff --git a/swift/__init__.py b/swift/__init__.py index 280a902e39..b701bf2492 100644 --- a/swift/__init__.py +++ b/swift/__init__.py @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import warnings - __version__ = None # First, try to get our version out of PKG-INFO. If we're installed, @@ -45,11 +43,3 @@ if __version__ is None: _version_info = pbr.version.VersionInfo('swift') __version__ = _version_info.release_string() __canonical_version__ = _version_info.version_string() - - -warnings.filterwarnings('ignore', module='cryptography|OpenSSL', message=( - 'Python 2 is no longer supported by the Python core team. ' - 'Support for it is now deprecated in cryptography')) -warnings.filterwarnings('ignore', message=( - 'Python 3.6 is no longer supported by the Python core team. ' - 'Therefore, support for it is deprecated in cryptography')) diff --git a/test/__init__.py b/test/__init__.py index 155d6952e1..ca8b629b9c 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -19,20 +19,6 @@ import os from unittest.util import safe_repr -import warnings -warnings.filterwarnings('ignore', module='cryptography|OpenSSL', 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.')) -warnings.filterwarnings('ignore', module='cryptography|OpenSSL', 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 the next release.')) -warnings.filterwarnings('ignore', message=( - '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.')) - import unittest from eventlet.green import socket