Add patch to remove match_hostname import
This commit is contained in:
parent
3d835c996d
commit
609d2e91be
19
python-gevent-py312.patch
Normal file
19
python-gevent-py312.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff -up gevent-22.10.2/src/gevent/_ssl3.py.py312 gevent-22.10.2/src/gevent/_ssl3.py
|
||||
--- gevent-22.10.2/src/gevent/_ssl3.py.py312 2022-10-31 12:53:52.000000000 -0600
|
||||
+++ gevent-22.10.2/src/gevent/_ssl3.py 2023-06-26 19:07:10.247869058 -0600
|
||||
@@ -50,7 +50,6 @@ from ssl import SSL_ERROR_WANT_READ
|
||||
from ssl import SSL_ERROR_WANT_WRITE
|
||||
from ssl import PROTOCOL_SSLv23
|
||||
from ssl import SSLObject
|
||||
-from ssl import match_hostname
|
||||
from ssl import CHANNEL_BINDING_TYPES
|
||||
from ssl import CERT_REQUIRED
|
||||
from ssl import DER_cert_to_PEM_cert
|
||||
@@ -680,6 +679,7 @@ class SSLSocket(socket):
|
||||
if not self.server_hostname:
|
||||
raise ValueError("check_hostname needs server_hostname "
|
||||
"argument")
|
||||
+ from ssl import match_hostname
|
||||
match_hostname(self.getpeercert(), self.server_hostname) # pylint:disable=deprecated-method
|
||||
|
||||
if hasattr(SSLObject, '_create'):
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
Name: python-%{modname}
|
||||
Version: 22.10.2
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: A coroutine-based Python networking library
|
||||
|
||||
License: MIT
|
||||
@ -13,6 +13,9 @@ Source0: %{pypi_source %{modname} %{version} tar.gz}
|
||||
|
||||
# Remove the usage of assertRaisesRegexp unit test alias removed in Python 3.12
|
||||
Patch: https://github.com/gevent/gevent/pull/1944.patch
|
||||
# Remove the import of match_hostname deprecated in 3.7 and removed in Python 3.12
|
||||
# https://github.com/gevent/gevent/pull/1963
|
||||
Patch: python-gevent-py312.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: c-ares-devel
|
||||
@ -34,10 +37,9 @@ Features include:
|
||||
|
||||
%package -n python3-%{modname}
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python3-%{modname}}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-Cython
|
||||
BuildRequires: python3-greenlet-devel >= 1.1.0
|
||||
BuildRequires: python3-greenlet-devel >= 2.0.0
|
||||
BuildRequires: python3-setuptools
|
||||
# For tests
|
||||
BuildRequires: python3-dns
|
||||
@ -98,6 +100,9 @@ cd src/gevent/tests && GEVENT_FILE=thread %__python3 -mgevent.tests test__*subpr
|
||||
%{python3_sitearch}/%{modname}*
|
||||
|
||||
%changelog
|
||||
* Tue Jun 27 2023 Orion Poplawski <orion@nwra.com> - 22.10.2-3
|
||||
- Add patch to remove match_hostname import
|
||||
|
||||
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 22.10.2-2
|
||||
- Rebuilt for Python 3.12
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user