forked from pool/python-cheroot
Accepting request 1036180 from devel:languages:python
- Remove python_module macro definition - Disable broken tests https://github.com/cherrypy/cheroot/issues/511 - Add no-relative-imports.patch to work around seriously broken system of imports. OBS-URL: https://build.opensuse.org/request/show/1036180 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cheroot?expand=0&rev=20
This commit is contained in:
88
no-relative-imports.patch
Normal file
88
no-relative-imports.patch
Normal file
@@ -0,0 +1,88 @@
|
||||
---
|
||||
cheroot/ssl/builtin.py | 10 +++++-----
|
||||
cheroot/test/conftest.py | 6 +++---
|
||||
cheroot/test/test_server.py | 8 ++++----
|
||||
cheroot/test/test_ssl.py | 12 ++++++------
|
||||
4 files changed, 18 insertions(+), 18 deletions(-)
|
||||
|
||||
--- a/cheroot/ssl/builtin.py
|
||||
+++ b/cheroot/ssl/builtin.py
|
||||
@@ -29,11 +29,11 @@ except ImportError:
|
||||
|
||||
import six
|
||||
|
||||
-from . import Adapter
|
||||
-from .. import errors
|
||||
-from .._compat import IS_ABOVE_OPENSSL10, suppress
|
||||
-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, suppress
|
||||
+from cheroot.makefile import StreamReader, StreamWriter
|
||||
+from cheroot.server import HTTPServer
|
||||
|
||||
if six.PY2:
|
||||
generic_socket_error = socket.error
|
||||
--- a/cheroot/test/conftest.py
|
||||
+++ b/cheroot/test/conftest.py
|
||||
@@ -12,11 +12,11 @@ import time
|
||||
|
||||
import pytest
|
||||
|
||||
-from ..server import Gateway, HTTPServer
|
||||
-from ..testing import ( # noqa: F401 # pylint: disable=unused-import
|
||||
+from cheroot.server import Gateway, HTTPServer
|
||||
+from cheroot.testing import ( # noqa: F401 # pylint: disable=unused-import
|
||||
native_server, wsgi_server,
|
||||
)
|
||||
-from ..testing import get_server_client
|
||||
+from cheroot.testing import get_server_client
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
--- a/cheroot/test/test_server.py
|
||||
+++ b/cheroot/test/test_server.py
|
||||
@@ -18,10 +18,10 @@ import six
|
||||
|
||||
from six.moves import queue, urllib
|
||||
|
||||
-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
|
||||
-from ..testing import (
|
||||
+from cheroot._compat import bton, ntob
|
||||
+from cheroot._compat import IS_LINUX, IS_MACOS, IS_WINDOWS, SYS_PLATFORM
|
||||
+from cheroot.server import IS_UID_GID_RESOLVABLE, Gateway, HTTPServer
|
||||
+from cheroot.testing import (
|
||||
ANY_INTERFACE_IPV4,
|
||||
ANY_INTERFACE_IPV6,
|
||||
EPHEMERAL_PORT,
|
||||
--- a/cheroot/test/test_ssl.py
|
||||
+++ b/cheroot/test/test_ssl.py
|
||||
@@ -21,11 +21,11 @@ import requests
|
||||
import six
|
||||
import trustme
|
||||
|
||||
-from .._compat import bton, ntob, ntou
|
||||
-from .._compat import IS_ABOVE_OPENSSL10, IS_CI, IS_PYPY
|
||||
-from .._compat import IS_LINUX, IS_MACOS, IS_WINDOWS
|
||||
-from ..server import HTTPServer, get_ssl_adapter_class
|
||||
-from ..testing import (
|
||||
+from cheroot._compat import bton, ntob, ntou
|
||||
+from cheroot._compat import IS_ABOVE_OPENSSL10, 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 (
|
||||
ANY_INTERFACE_IPV4,
|
||||
ANY_INTERFACE_IPV6,
|
||||
EPHEMERAL_PORT,
|
||||
@@ -33,7 +33,7 @@ from ..testing import (
|
||||
_get_conn_data,
|
||||
_probe_ipv6_sock,
|
||||
)
|
||||
-from ..wsgi import Gateway_10
|
||||
+from cheroot.wsgi import Gateway_10
|
||||
|
||||
|
||||
IS_GITHUB_ACTIONS_WORKFLOW = bool(os.getenv('GITHUB_WORKFLOW'))
|
||||
@@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 16 08:58:31 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Remove python_module macro definition
|
||||
- Disable broken tests https://github.com/cherrypy/cheroot/issues/511
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 11 16:26:15 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add no-relative-imports.patch to work around seriously broken
|
||||
system of imports.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 2 11:22:09 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define pypi_name cheroot
|
||||
%bcond_without python2
|
||||
%bcond_with ringdisabled
|
||||
@@ -36,6 +35,8 @@ Source: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{
|
||||
# PATCH-FIX-OPENSUSE no-pypytools.patch mcepl@suse.com
|
||||
# We don't have PyPy at all, so no need support for it
|
||||
Patch0: no-pypytools.patch
|
||||
# PATCH-FIX-UPSTREAM no-relative-imports.patch bsc#[0-9]+ mcepl@suse.com
|
||||
Patch1: no-relative-imports.patch
|
||||
BuildRequires: %{python_module jaraco.functools}
|
||||
BuildRequires: %{python_module more-itertools >= 2.6}
|
||||
BuildRequires: %{python_module setuptools >= 34.4}
|
||||
@@ -93,7 +94,7 @@ Cheroot is the pure-Python HTTP server used by CherryPy.
|
||||
%prep
|
||||
%autosetup -p1 -n cheroot-%{version} -p1
|
||||
# do not check coverage
|
||||
sed -i '/--cov/ d' pytest.ini
|
||||
sed -i -e '/--cov/ d' pytest.ini
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -113,8 +114,9 @@ pushd testclean
|
||||
%endif
|
||||
# test_tls_client_auth[...-False-localhost-builtin] fails ocassionally on server-side OBS
|
||||
donttest="(test_tls_client_auth and False-localhost-builtin)"
|
||||
# https://github.com/cherrypy/cheroot/issues/502
|
||||
donttest="$donttest or test_high_number_of_file_descriptors"
|
||||
# looks like there's a bug with pytest.mark.forked
|
||||
# https://github.com/cherrypy/cheroot/issues/511
|
||||
donttest+=" or test_high_number_of_file_descriptor"
|
||||
%pytest --pyargs cheroot $pytest_opts -k "not ($donttest)"
|
||||
popd
|
||||
|
||||
|
||||
Reference in New Issue
Block a user