From bc0d83c9e98ee16ededed473b5fd3d505d23270d8bef26952f56a7eceaa24422 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 28 Oct 2024 22:02:07 +0000 Subject: [PATCH] - add ignore-pyopenssl-warnings.patch * Support for Python 3.6 has been deprecated and will be removed Fields in classes. If the field function is used to define a - Use the sign and verify methods when they are available in cryptography instead of the deprecated methods signer and OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-josepy?expand=0&rev=31 --- ignore-pyopenssl-warnings.patch | 29 +++++++++++++++++++++++++++++ python-josepy.changes | 13 +++++++++---- python-josepy.spec | 8 ++++---- 3 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 ignore-pyopenssl-warnings.patch diff --git a/ignore-pyopenssl-warnings.patch b/ignore-pyopenssl-warnings.patch new file mode 100644 index 0000000..f465e8c --- /dev/null +++ b/ignore-pyopenssl-warnings.patch @@ -0,0 +1,29 @@ +From 350410fc1d38c4ac8422816b6865ac8cd9c60fc7 Mon Sep 17 00:00:00 2001 +From: Alex Gaynor +Date: Thu, 5 Sep 2024 16:24:32 -0400 +Subject: [PATCH] Ignore warning that CSRs are deprecated in pyOpenSSL (#185) + +Without this, pyca/cryptography's downstream tests currently fail. + +The actual warning is being addressed in #182 +--- + pyproject.toml | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 4e2009fb..2af02b11 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -96,7 +96,11 @@ disallow_untyped_defs = true + + [tool.pytest.ini_options] + # We also ignore our own deprecation warning about dropping Python 3.7 support. +-filterwarnings = ["error", "ignore:Python 3.7 support will be dropped:DeprecationWarning"] ++filterwarnings = [ ++ "error", ++ "ignore:Python 3.7 support will be dropped:DeprecationWarning", ++ "ignore:CSR support in pyOpenSSL is deprecated:DeprecationWarning", ++] + norecursedirs = "*.egg .eggs dist build docs .tox" + + # Isort tooling configuration diff --git a/python-josepy.changes b/python-josepy.changes index 2ab151f..81c0c50 100644 --- a/python-josepy.changes +++ b/python-josepy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Oct 28 22:01:54 UTC 2024 - Dirk Müller + +- add ignore-pyopenssl-warnings.patch + ------------------------------------------------------------------- Wed Nov 29 09:34:59 UTC 2023 - ecsos @@ -23,7 +28,7 @@ Thu Apr 7 07:20:14 UTC 2022 - Markéta Machová * PGP keys used to sign the packages we upload to PyPI changed. (python-josepy.keyring refreshed) * Dropped support for cryptography<1.5. - * Support for Python 3.6 has been deprecated and will be removed + * Support for Python 3.6 has been deprecated and will be removed in the next scheduled release. ------------------------------------------------------------------- @@ -34,7 +39,7 @@ Tue Oct 5 19:12:28 UTC 2021 - ecsos types from the inline types annotations when josepy is installed as a dependency in a Python project. * Added a field function to assist in adding type annotations for - Fields in classes. If the field function is used to define a + Fields in classes. If the field function is used to define a Field in a JSONObjectWithFields based class without a type annotation, an error will be raised. * josepy's tests can no longer be imported under the name josepy, @@ -104,8 +109,8 @@ Thu May 3 09:57:33 UTC 2018 - ecsos@opensuse.org - update to 1.1.0 - Deprecated support for Python 2.6 and 3.3. - - Use the sign and verify methods when they are available in - cryptography instead of the deprecated methods signer and + - Use the sign and verify methods when they are available in + cryptography instead of the deprecated methods signer and verifier. ------------------------------------------------------------------- diff --git a/python-josepy.spec b/python-josepy.spec index 90cc6fb..fdadd3e 100644 --- a/python-josepy.spec +++ b/python-josepy.spec @@ -1,7 +1,7 @@ # -# spec file +# spec file for package python-josepy # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,8 +25,8 @@ Summary: JOSE protocol implementation in Python License: Apache-2.0 URL: https://github.com/certbot/josepy Source0: https://files.pythonhosted.org/packages/source/j/%{libname}/%{libname}-%{version}.tar.gz -#Source1: https://files.pythonhosted.org/packages/source/j/%%{libname}/%%{libname}-%%{version}.tar.gz.asc Source2: %{name}.keyring +Patch1: https://github.com/certbot/josepy/commit/350410fc1d38c4ac8422816b6865ac8cd9c60fc7.patch#/ignore-pyopenssl-warnings.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module coverage >= 4.0} BuildRequires: %{python_module cryptography >= 1.5} @@ -50,7 +50,7 @@ JOSE protocol implementation in Python using cryptography. It is used by the certbot project. Formerly Let's Encrypt project. %prep -%setup -q -n %{libname}-%{version} +%autosetup -p1 -n %{libname}-%{version} %build %pyproject_wheel