diff --git a/0001-handle-openssl3-error-in-ssl-tests.patch b/0001-handle-openssl3-error-in-ssl-tests.patch new file mode 100644 index 0000000000000000000000000000000000000000..8a26666b7edb22dc2ac30bc478e2b36195a42e1d --- /dev/null +++ b/0001-handle-openssl3-error-in-ssl-tests.patch @@ -0,0 +1,75 @@ +From 6d0a7403a6cdf4041d1a3f388dc60b2b95e5e857 Mon Sep 17 00:00:00 2001 +From: Dan Radez +Date: Tue, 2 Apr 2024 10:33:42 -0400 +Subject: [PATCH] handle openssl3 error in ssl tests + +Using OpenSSL 3, the expected error string caught in ssl tests has changed. +E AssertionError: assert 'wrong version number' in + '[SSL] record layer failure (_ssl.c:1000)' + +This is already handled for OpenSSL pre-1.1 and gte-1.1, adding handling +for OpenSSL 3+ + +Fixes: #645 +--- + cheroot/_compat.py | 2 ++ + cheroot/_compat.pyi | 1 + + cheroot/test/test_ssl.py | 7 ++++--- + 3 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/cheroot/_compat.py b/cheroot/_compat.py +index dbe5c6d2..edbfe28d 100644 +--- a/cheroot/_compat.py ++++ b/cheroot/_compat.py +@@ -8,9 +8,11 @@ import platform + try: + import ssl + IS_ABOVE_OPENSSL10 = ssl.OPENSSL_VERSION_INFO >= (1, 1) ++ IS_ABOVE_OPENSSL31 = ssl.OPENSSL_VERSION_INFO >= (3, 2) + del ssl + except ImportError: + IS_ABOVE_OPENSSL10 = None ++ IS_ABOVE_OPENSSL31 = None + + + IS_CI = bool(os.getenv('CI')) +diff --git a/cheroot/_compat.pyi b/cheroot/_compat.pyi +index 67d93cf6..785259d2 100644 +--- a/cheroot/_compat.pyi ++++ b/cheroot/_compat.pyi +@@ -3,6 +3,7 @@ from typing import Any, ContextManager, Optional, Type, Union + def suppress(*exceptions: Type[BaseException]) -> ContextManager[None]: ... + + IS_ABOVE_OPENSSL10: Optional[bool] ++IS_ABOVE_OPENSSL31: Optional[bool] + IS_CI: bool + IS_GITHUB_ACTIONS_WORKFLOW: bool + IS_PYPY: bool +diff --git a/cheroot/test/test_ssl.py b/cheroot/test/test_ssl.py +index 1900e20d..a084f4d4 100644 +--- a/cheroot/test/test_ssl.py ++++ b/cheroot/test/test_ssl.py +@@ -17,7 +17,7 @@ import requests + import trustme + + from .._compat import bton, ntob, ntou +-from .._compat import IS_ABOVE_OPENSSL10, IS_CI, IS_PYPY ++from .._compat import IS_ABOVE_OPENSSL10, IS_ABOVE_OPENSSL31, IS_CI, IS_PYPY + from .._compat import IS_LINUX, IS_MACOS, IS_WINDOWS + from ..server import HTTPServer, get_ssl_adapter_class + from ..testing import ( +@@ -597,8 +597,9 @@ def test_https_over_http_error(http_server, ip_addr): + ), + ).request('GET', '/') + expected_substring = ( +- 'wrong version number' if IS_ABOVE_OPENSSL10 +- else 'unknown protocol' ++ 'record layer failure' if IS_ABOVE_OPENSSL31 ++ else 'wrong version number' if IS_ABOVE_OPENSSL10 ++ else 'unknown protocol' + ) + assert expected_substring in ssl_err.value.args[-1] + +-- +2.44.0 + diff --git a/cheroot-10.0.1.tar.gz b/cheroot-10.0.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..088697ac395dd9aa702638df4b6dd374a167b142 Binary files /dev/null and b/cheroot-10.0.1.tar.gz differ diff --git a/cheroot-9.0.0.tar.gz b/cheroot-9.0.0.tar.gz deleted file mode 100644 index 3a18b643362432b02f82d4ea5493774a5d3a8929..0000000000000000000000000000000000000000 Binary files a/cheroot-9.0.0.tar.gz and /dev/null differ diff --git a/python-cheroot.spec b/python-cheroot.spec index 96e82db22a288b41d127eec792a849154ae29b91..7f57f8d3d4f0e30b52fca396114bdc3ced150cf5 100644 --- a/python-cheroot.spec +++ b/python-cheroot.spec @@ -1,15 +1,16 @@ -%define anolis_release 3 +%define anolis_release 1 %global pypi_name cheroot %bcond_with docs Summary: Highly-optimized, pure-python HTTP server Name: python-%{pypi_name} -Version: 9.0.0 +Version: 10.0.1 Release: %{anolis_release}%{?dist} License: BSD URL: https://github.com/cherrypy/cheroot -Source0: %{pypi_source} +Source0: https://files.pythonhosted.org/packages/source/c/cheroot/cheroot-10.0.1.tar.gz +Patch1: 0001-handle-openssl3-error-in-ssl-tests.patch BuildArch: noarch %description @@ -87,6 +88,10 @@ LANG=C.utf-8 %{__python3} -m pytest --ignore=build -W ignore::DeprecationWarning %endif %changelog +* Thu Sep 18 2025 wenyuzifang - 10.0.1-1 +- Updated to version 10.0.1 to fix xxxxxx +- Fix SSL test failures on OpenSSL 3+ by updating expected error messages for accurate compatibility + * Wed Apr 23 2025 mgb01105731 - 9.0.0-3 - Rebuild with python-requests-unixsocket 0.4.0