Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-curio for openSUSE:Factory checked in at 2023-09-22 21:47:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-curio (Old) and /work/SRC/openSUSE:Factory/.python-curio.new.1770 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-curio" Fri Sep 22 21:47:11 2023 rev:13 rq:1112585 version:1.6 Changes: -------- --- /work/SRC/openSUSE:Factory/python-curio/python-curio.changes 2023-04-22 22:02:32.317961934 +0200 +++ /work/SRC/openSUSE:Factory/.python-curio.new.1770/python-curio.changes 2023-09-22 21:48:02.610231267 +0200 @@ -1,0 +2,5 @@ +Wed Sep 20 12:56:27 UTC 2023 - OndÅej Súkup <mimi...@gmail.com> + +- add py312.patch to fix python3.12 compatibility + +------------------------------------------------------------------- New: ---- py312.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-curio.spec ++++++ --- /var/tmp/diff_new_pack.yULd4B/_old 2023-09-22 21:48:03.658269314 +0200 +++ /var/tmp/diff_new_pack.yULd4B/_new 2023-09-22 21:48:03.658269314 +0200 @@ -25,6 +25,7 @@ URL: https://github.com/dabeaz/curio Source: https://github.com/dabeaz/curio/archive/%{version}.tar.gz#/curio-%{version}.tar.gz Patch0: make-tests-reproducible.patch +Patch1: py312.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} ++++++ py312.patch ++++++ >From a5590bb04de3f1f201fd1fd0ce9cfe5825db80ac Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <hug...@users.noreply.github.com> Date: Sun, 10 Sep 2023 21:38:09 +0300 Subject: [PATCH 1/2] Add support for Python 3.12 --- curio/channel.py | 13 ++++++++++--- curio/ssl.py | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/curio/channel.py b/curio/channel.py index 230427fb..2a54952b 100644 --- a/curio/channel.py +++ b/curio/channel.py @@ -28,9 +28,16 @@ # Authentication parameters (copied from multiprocessing) AUTH_MESSAGE_LENGTH = mpc.MESSAGE_LENGTH # 20 -CHALLENGE = mpc.CHALLENGE # b'#CHALLENGE#' -WELCOME = mpc.WELCOME # b'#WELCOME#' -FAILURE = mpc.FAILURE # b'#FAILURE#' +try: + # Python 3.12+ + CHALLENGE = mpc._CHALLENGE # b'#CHALLENGE#' + WELCOME = mpc._WELCOME # b'#WELCOME#' + FAILURE = mpc._FAILURE # b'#FAILURE#' +except AttributeError: + # Python 3.7-3.11 + CHALLENGE = mpc.CHALLENGE # b'#CHALLENGE#' + WELCOME = mpc.WELCOME # b'#WELCOME#' + FAILURE = mpc.FAILURE # b'#FAILURE#' diff --git a/curio/ssl.py b/curio/ssl.py index 37efa081..12ba6a04 100644 --- a/curio/ssl.py +++ b/curio/ssl.py @@ -27,7 +27,7 @@ class SSLWantWriteError(Exception): from .io import Socket if _ssl: - @wraps(_ssl.wrap_socket) + @wraps(_ssl.SSLContext.wrap_socket) async def wrap_socket(sock, *args, do_handshake_on_connect=True, **kwargs): if isinstance(sock, Socket): sock = sock._socket >From 379904c4ac8cd56c1f69aec2bdd2c78b9bd046eb Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <hug...@users.noreply.github.com> Date: Mon, 11 Sep 2023 11:30:49 +0300 Subject: [PATCH 2/2] Add support for Python 3.12 --- curio/ssl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curio/ssl.py b/curio/ssl.py index 12ba6a04..4619eb18 100644 --- a/curio/ssl.py +++ b/curio/ssl.py @@ -32,7 +32,7 @@ async def wrap_socket(sock, *args, do_handshake_on_connect=True, **kwargs): if isinstance(sock, Socket): sock = sock._socket - ssl_sock = _ssl.wrap_socket(sock, *args, do_handshake_on_connect=False, **kwargs) + ssl_sock = _ssl.SSLContext.wrap_socket(sock, *args, do_handshake_on_connect=False, **kwargs) cssl_sock = Socket(ssl_sock) cssl_sock.do_handshake_on_connect = do_handshake_on_connect if do_handshake_on_connect and ssl_sock._connected: