Compare commits
1 Commits
Author | SHA256 | Date | |
---|---|---|---|
ad137a4072 |
BIN
cheroot-10.0.0.tar.gz
(Stored with Git LFS)
Normal file
BIN
cheroot-10.0.0.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
cheroot-10.0.1.tar.gz
(Stored with Git LFS)
BIN
cheroot-10.0.1.tar.gz
(Stored with Git LFS)
Binary file not shown.
@@ -1,72 +0,0 @@
|
||||
From 6d0a7403a6cdf4041d1a3f388dc60b2b95e5e857 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Radez <dradez@redhat.com>
|
||||
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(-)
|
||||
|
||||
Index: cheroot-10.0.1/cheroot/_compat.py
|
||||
===================================================================
|
||||
--- cheroot-10.0.1.orig/cheroot/_compat.py
|
||||
+++ cheroot-10.0.1/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'))
|
||||
Index: cheroot-10.0.1/cheroot/_compat.pyi
|
||||
===================================================================
|
||||
--- cheroot-10.0.1.orig/cheroot/_compat.pyi
|
||||
+++ cheroot-10.0.1/cheroot/_compat.pyi
|
||||
@@ -3,6 +3,7 @@ from typing import Any, ContextManager,
|
||||
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
|
||||
Index: cheroot-10.0.1/cheroot/test/test_ssl.py
|
||||
===================================================================
|
||||
--- cheroot-10.0.1.orig/cheroot/test/test_ssl.py
|
||||
+++ cheroot-10.0.1/cheroot/test/test_ssl.py
|
||||
@@ -17,7 +17,7 @@ import requests
|
||||
import trustme
|
||||
|
||||
from cheroot._compat import bton, ntob, ntou
|
||||
-from cheroot._compat import IS_ABOVE_OPENSSL10, IS_CI, IS_PYPY
|
||||
+from cheroot._compat import IS_ABOVE_OPENSSL10, IS_ABOVE_OPENSSL31, IS_CI, IS_PYPY
|
||||
from cheroot._compat import IS_LINUX, IS_MACOS, IS_WINDOWS
|
||||
from cheroot.server import HTTPServer, get_ssl_adapter_class
|
||||
from cheroot.testing import (
|
||||
@@ -597,8 +597,9 @@ def test_https_over_http_error(http_serv
|
||||
),
|
||||
).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]
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Index: cheroot-10.0.1/cheroot/test/conftest.py
|
||||
Index: cheroot-9.0.0/cheroot/test/conftest.py
|
||||
===================================================================
|
||||
--- cheroot-10.0.1.orig/cheroot/test/conftest.py
|
||||
+++ cheroot-10.0.1/cheroot/test/conftest.py
|
||||
--- cheroot-9.0.0.orig/cheroot/test/conftest.py
|
||||
+++ cheroot-9.0.0/cheroot/test/conftest.py
|
||||
@@ -9,7 +9,7 @@ import time
|
||||
|
||||
import pytest
|
||||
@@ -10,8 +10,8 @@ Index: cheroot-10.0.1/cheroot/test/conftest.py
|
||||
+from cheroot._compat import IS_MACOS, IS_WINDOWS, PLATFORM_ARCH # noqa: WPS436
|
||||
from cheroot.server import Gateway, HTTPServer
|
||||
from cheroot.testing import ( # noqa: F401 # pylint: disable=unused-import
|
||||
native_server,
|
||||
@@ -31,6 +31,9 @@ def http_request_timeout():
|
||||
native_server, wsgi_server,
|
||||
@@ -28,6 +28,9 @@ def http_request_timeout():
|
||||
if IS_WINDOWS:
|
||||
computed_timeout *= 10
|
||||
|
||||
|
@@ -2,11 +2,11 @@
|
||||
cheroot/test/test_server.py | 13 -------------
|
||||
1 file changed, 13 deletions(-)
|
||||
|
||||
Index: cheroot-10.0.1/cheroot/test/test_server.py
|
||||
Index: cheroot-9.0.0/cheroot/test/test_server.py
|
||||
===================================================================
|
||||
--- cheroot-10.0.1.orig/cheroot/test/test_server.py
|
||||
+++ cheroot-10.0.1/cheroot/test/test_server.py
|
||||
@@ -13,8 +13,6 @@ import pytest
|
||||
--- cheroot-9.0.0.orig/cheroot/test/test_server.py
|
||||
+++ cheroot-9.0.0/cheroot/test/test_server.py
|
||||
@@ -12,8 +12,6 @@ import pytest
|
||||
import requests
|
||||
import requests_unixsocket
|
||||
|
||||
@@ -15,7 +15,7 @@ Index: cheroot-10.0.1/cheroot/test/test_server.py
|
||||
from .._compat import bton, ntob
|
||||
from .._compat import IS_LINUX, IS_MACOS, IS_WINDOWS, SYS_PLATFORM
|
||||
from ..server import IS_UID_GID_RESOLVABLE, Gateway, HTTPServer
|
||||
@@ -410,13 +408,6 @@ if not IS_WINDOWS and not ISSUE511:
|
||||
@@ -380,13 +378,6 @@ if not IS_WINDOWS and not ISSUE511:
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -29,7 +29,7 @@ Index: cheroot-10.0.1/cheroot/test/test_server.py
|
||||
def resource_limit(request):
|
||||
"""Set the resource limit two times bigger then requested."""
|
||||
resource = pytest.importorskip(
|
||||
@@ -445,11 +436,6 @@ def resource_limit(request):
|
||||
@@ -415,11 +406,6 @@ def resource_limit(request):
|
||||
@pytest.fixture
|
||||
def many_open_sockets(request, resource_limit):
|
||||
"""Allocate a lot of file descriptors by opening dummy sockets."""
|
||||
|
@@ -5,30 +5,32 @@
|
||||
cheroot/test/test_ssl.py | 12 ++++++------
|
||||
4 files changed, 18 insertions(+), 18 deletions(-)
|
||||
|
||||
Index: cheroot-10.0.1/cheroot/ssl/builtin.py
|
||||
Index: cheroot-10.0.0/cheroot/ssl/builtin.py
|
||||
===================================================================
|
||||
--- cheroot-10.0.1.orig/cheroot/ssl/builtin.py
|
||||
+++ cheroot-10.0.1/cheroot/ssl/builtin.py
|
||||
@@ -25,10 +25,10 @@ except ImportError:
|
||||
--- cheroot-10.0.0.orig/cheroot/ssl/builtin.py
|
||||
+++ cheroot-10.0.0/cheroot/ssl/builtin.py
|
||||
@@ -25,11 +25,11 @@ except ImportError:
|
||||
except ImportError:
|
||||
DEFAULT_BUFFER_SIZE = -1
|
||||
|
||||
-from . import Adapter
|
||||
-from .. import errors
|
||||
-from .._compat import IS_ABOVE_OPENSSL10
|
||||
-from ..makefile import StreamReader, StreamWriter
|
||||
-from ..server import HTTPServer
|
||||
+from cheroot.ssl import Adapter
|
||||
+from cheroot import errors
|
||||
+from cheroot._compat import IS_ABOVE_OPENSSL10
|
||||
+from cheroot.makefile import StreamReader, StreamWriter
|
||||
+from cheroot.server import HTTPServer
|
||||
|
||||
generic_socket_error = OSError
|
||||
|
||||
def _assert_ssl_exc_contains(exc, *msgs):
|
||||
Index: cheroot-10.0.1/cheroot/test/conftest.py
|
||||
Index: cheroot-10.0.0/cheroot/test/conftest.py
|
||||
===================================================================
|
||||
--- cheroot-10.0.1.orig/cheroot/test/conftest.py
|
||||
+++ cheroot-10.0.1/cheroot/test/conftest.py
|
||||
@@ -9,15 +9,15 @@ import time
|
||||
--- cheroot-10.0.0.orig/cheroot/test/conftest.py
|
||||
+++ cheroot-10.0.0/cheroot/test/conftest.py
|
||||
@@ -9,12 +9,12 @@ import time
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -38,20 +40,17 @@ Index: cheroot-10.0.1/cheroot/test/conftest.py
|
||||
+from cheroot._compat import IS_MACOS, IS_WINDOWS # noqa: WPS436
|
||||
+from cheroot.server import Gateway, HTTPServer
|
||||
+from cheroot.testing import ( # noqa: F401 # pylint: disable=unused-import
|
||||
native_server,
|
||||
thread_and_wsgi_server,
|
||||
thread_and_native_server,
|
||||
wsgi_server,
|
||||
native_server, wsgi_server,
|
||||
)
|
||||
-from ..testing import get_server_client
|
||||
+from cheroot.testing import get_server_client
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
Index: cheroot-10.0.1/cheroot/test/test_server.py
|
||||
Index: cheroot-10.0.0/cheroot/test/test_server.py
|
||||
===================================================================
|
||||
--- cheroot-10.0.1.orig/cheroot/test/test_server.py
|
||||
+++ cheroot-10.0.1/cheroot/test/test_server.py
|
||||
--- cheroot-10.0.0.orig/cheroot/test/test_server.py
|
||||
+++ cheroot-10.0.0/cheroot/test/test_server.py
|
||||
@@ -13,11 +13,11 @@ import pytest
|
||||
import requests
|
||||
import requests_unixsocket
|
||||
@@ -69,10 +68,10 @@ Index: cheroot-10.0.1/cheroot/test/test_server.py
|
||||
ANY_INTERFACE_IPV4,
|
||||
ANY_INTERFACE_IPV6,
|
||||
EPHEMERAL_PORT,
|
||||
Index: cheroot-10.0.1/cheroot/test/test_ssl.py
|
||||
Index: cheroot-10.0.0/cheroot/test/test_ssl.py
|
||||
===================================================================
|
||||
--- cheroot-10.0.1.orig/cheroot/test/test_ssl.py
|
||||
+++ cheroot-10.0.1/cheroot/test/test_ssl.py
|
||||
--- cheroot-10.0.0.orig/cheroot/test/test_ssl.py
|
||||
+++ cheroot-10.0.0/cheroot/test/test_ssl.py
|
||||
@@ -16,11 +16,11 @@ import pytest
|
||||
import requests
|
||||
import trustme
|
||||
|
@@ -1,20 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 24 19:24:31 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add handle-openssl3-error-in-ssl-tests.patch:
|
||||
support openssl 3.2+
|
||||
- avoid deprecation warnings for 3.13
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 22 13:36:38 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Update to 10.0.1
|
||||
* Fixed a flaw where internally unhandled exceptions could crash the
|
||||
worker threads and eventually starve the server of its processing
|
||||
resources.
|
||||
* Fixed compatibility with Python 3.8 in the built-in TLS adapter that
|
||||
relies on :pypython:ssl.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 10 17:40:08 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package python-cheroot
|
||||
# spec file
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
@@ -26,7 +26,7 @@
|
||||
%bcond_with ringdisabled
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-%{pypi_name}
|
||||
Version: 10.0.1
|
||||
Version: 10.0.0
|
||||
Release: 0
|
||||
Summary: Pure-python HTTP server
|
||||
License: BSD-3-Clause
|
||||
@@ -40,8 +40,6 @@ Patch0: no-pypytools.patch
|
||||
Patch1: no-relative-imports.patch
|
||||
# PATCH-FIX-SUSE increase-tests-timeouts.patch alarrosa@suse.com Tests take longer to run in s390x
|
||||
Patch2: increase-tests-timeouts.patch
|
||||
# handle openssl3 error in ssl tests
|
||||
Patch3: handle-openssl3-error-in-ssl-tests.patch
|
||||
BuildRequires: %{python_module base >= 3.6}
|
||||
BuildRequires: %{python_module importlib-metadata if %python-base < 3.8}
|
||||
BuildRequires: %{python_module jaraco.functools}
|
||||
@@ -78,7 +76,7 @@ Requires: alts
|
||||
BuildRequires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
%endif
|
||||
# the package and distribution name is lowercase-cheroot,
|
||||
# but PyPI claims the name is capital-Cheroot
|
||||
@@ -117,7 +115,7 @@ donttest="(test_tls_client_auth and False-localhost-builtin)"
|
||||
donttest+=" or test_high_number_of_file_descriptor"
|
||||
# Openssl 3.2 test failures gh#cherrypy/cheroot#645
|
||||
donttest+=" or test_https_over_http_error"
|
||||
%pytest --pyargs cheroot $pytest_opts -k "not ($donttest)" -W ignore::DeprecationWarning -p no:unraisableexception
|
||||
%pytest --pyargs cheroot $pytest_opts -k "not ($donttest)"
|
||||
popd
|
||||
|
||||
%pre
|
||||
|
Reference in New Issue
Block a user