From 774bcc3f8371efb60f69919dfb6d1d651d65be256d50abef45e25d0e0312dd59 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 13 Jun 2022 06:38:29 +0000 Subject: [PATCH] Accepting request 981552 from home:gladiac:mailman3 - Remove Python 3.6 deprecation warning on openSUSE Leap. * Added remove_python_3_6_deprecation_warning.patch Note: This fixes the mailman:test OBS-URL: https://build.opensuse.org/request/show/981552 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cryptography?expand=0&rev=156 --- python-cryptography.changes | 6 ++++++ python-cryptography.spec | 3 +++ remove_python_3_6_deprecation_warning.patch | 17 +++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 remove_python_3_6_deprecation_warning.patch diff --git a/python-cryptography.changes b/python-cryptography.changes index b9784da..9a11875 100644 --- a/python-cryptography.changes +++ b/python-cryptography.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jun 9 16:08:17 UTC 2022 - Andreas Schneider + +- Remove Python 3.6 deprecation warning on openSUSE Leap. + * Added remove_python_3_6_deprecation_warning.patch + ------------------------------------------------------------------- Tue May 24 06:57:55 UTC 2022 - Dirk Müller diff --git a/python-cryptography.spec b/python-cryptography.spec index d31a81b..6bb469a 100644 --- a/python-cryptography.spec +++ b/python-cryptography.spec @@ -42,6 +42,9 @@ Source2: vendor.tar.zst Source3: cargo_config Source4: python-cryptography.keyring Patch2: skip_openssl_memleak_test.patch +%if 0%{?sle_version} && 0%{?sle_version} <= 150400 +Patch3: remove_python_3_6_deprecation_warning.patch +%endif BuildRequires: %{python_module cffi >= 1.12} BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools-rust} diff --git a/remove_python_3_6_deprecation_warning.patch b/remove_python_3_6_deprecation_warning.patch new file mode 100644 index 0000000..2ca106e --- /dev/null +++ b/remove_python_3_6_deprecation_warning.patch @@ -0,0 +1,17 @@ +Index: cryptography-37.0.2/src/cryptography/__init__.py +=================================================================== +--- cryptography-37.0.2.orig/src/cryptography/__init__.py 2022-06-09 18:07:46.169719315 +0200 ++++ cryptography-37.0.2/src/cryptography/__init__.py 2022-06-09 18:07:53.853613006 +0200 +@@ -18,12 +18,3 @@ __all__ = [ + "__author__", + "__copyright__", + ] +- +-if sys.version_info[:2] == (3, 6): +- warnings.warn( +- "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.", +- CryptographyDeprecationWarning, +- stacklevel=2, +- )