commit:     a3ae72b4cb73182e41bfea2c1b270a9fa7e5e4a7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 18 03:58:48 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Nov 18 04:01:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3ae72b4

dev-python/trio: add Python 3.10

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-python/trio/files/trio-0.19.0-python3.10.patch | 25 ++++++++++++++++++++++
 dev-python/trio/trio-0.19.0.ebuild                 | 11 +++++++++-
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/dev-python/trio/files/trio-0.19.0-python3.10.patch 
b/dev-python/trio/files/trio-0.19.0-python3.10.patch
new file mode 100644
index 000000000000..45af8955df3e
--- /dev/null
+++ b/dev-python/trio/files/trio-0.19.0-python3.10.patch
@@ -0,0 +1,25 @@
+https://github.com/python-trio/trio/commit/0a0b75c914e63366f23790d72caa10bdfcc186f6
+https://github.com/python-trio/trio/pull/2061
+
+From a9c54747b90129776f6d2d384e0f64efaac324ee Mon Sep 17 00:00:00 2001
+From: "Nathaniel J. Smith" <n...@pobox.com>
+Date: Tue, 13 Jul 2021 17:34:26 -0700
+Subject: [PATCH] Export IP_RECVTOS, newly added in python 3.10
+
+---
+ trio/socket.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/trio/socket.py b/trio/socket.py
+index 5402f5bc7..afbcefa1d 100644
+--- a/trio/socket.py
++++ b/trio/socket.py
+@@ -117,7 +117,7 @@
+         J1939_PGN_MAX, J1939_PGN_PDU1_MAX, J1939_PGN_REQUEST,
+         SCM_J1939_DEST_ADDR, SCM_J1939_DEST_NAME, SCM_J1939_ERRQUEUE,
+         SCM_J1939_PRIO, SO_J1939_ERRQUEUE, SO_J1939_FILTER, SO_J1939_PROMISC,
+-        SO_J1939_SEND_PRIO, UDPLITE_RECV_CSCOV, UDPLITE_SEND_CSCOV
++        SO_J1939_SEND_PRIO, UDPLITE_RECV_CSCOV, UDPLITE_SEND_CSCOV, IP_RECVTOS
+     )
+     # fmt: on
+ except ImportError:

diff --git a/dev-python/trio/trio-0.19.0.ebuild 
b/dev-python/trio/trio-0.19.0.ebuild
index e7b642031083..c72f4de9e3f3 100644
--- a/dev-python/trio/trio-0.19.0.ebuild
+++ b/dev-python/trio/trio-0.19.0.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{8..9} )
+PYTHON_COMPAT=( python3_{8..10} )
 
 inherit distutils-r1
 
@@ -38,10 +38,19 @@ BDEPEND="
        )
 "
 
+PATCHES=(
+       "${FILESDIR}"/${P}-python3.10.patch
+)
+
 EPYTEST_DESELECT=(
        # Times out on slower arches (ia64 in this case)
        # https://github.com/python-trio/trio/issues/1753
        trio/tests/test_unix_pipes.py::test_close_at_bad_time_for_send_all
+
+       # Fail with Python 3.10 on 'IPPROTO_MPTCP'
+       # Everything else passes and this is a simple check for exported symbols
+       # Let's try again with the next release (after 0.19.0).
+       trio/tests/test_exports.py::test_static_tool_sees_all_symbols
 )
 
 distutils_enable_tests --install pytest

Reply via email to