public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/trio/files/, dev-python/trio/
@ 2021-11-18  4:01 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2021-11-18  4:01 UTC (permalink / raw
  To: gentoo-commits

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" <njs@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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/trio/files/, dev-python/trio/
@ 2024-04-06  9:35 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2024-04-06  9:35 UTC (permalink / raw
  To: gentoo-commits

commit:     dae37ee54717c19e332d9cb5298fc13905d37a81
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  6 09:34:08 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Apr  6 09:35:49 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dae37ee5

dev-python/trio: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/trio/Manifest                     |  1 -
 dev-python/trio/files/trio-0.24.0-musl.patch | 66 -------------------------
 dev-python/trio/trio-0.24.0.ebuild           | 72 ----------------------------
 3 files changed, 139 deletions(-)

diff --git a/dev-python/trio/Manifest b/dev-python/trio/Manifest
index 020113c99594..24faf192634e 100644
--- a/dev-python/trio/Manifest
+++ b/dev-python/trio/Manifest
@@ -1,2 +1 @@
-DIST trio-0.24.0.gh.tar.gz 592652 BLAKE2B c102c6b6e25b497a5823b58b926f43d06905a8aaa41434d9503c127cb1b26a3c58594edc90e48e9acea6e6ffbc36a2d02a9f1805b14ba65a77ffedcbb8cf48f8 SHA512 3f52e770a19c45b5227ffd34e7ae4664ee739dbae81c09e1e4bf2bd3eddb414ff9ab32dd2b18d59e420a18660a2f7db7ad2cda9f725729dda7e99f7a89b66bbc
 DIST trio-0.25.0.gh.tar.gz 599079 BLAKE2B d0615111fba3981c89d72a6eff93e9f500854e94f7227f3f235d4effa4ab53b9a280278b62db90c4a9612028edc5c9892b56464c9ee5b7e3c8120086dfc64e56 SHA512 0690193c501e054b5c2d96ea208d6a49b9ac860dd63a58c4b5cec5b5f6f197fc5eae0e2fae99ef498d5d1513b189a75504905bd5cc6dc34ae791e3451655933a

diff --git a/dev-python/trio/files/trio-0.24.0-musl.patch b/dev-python/trio/files/trio-0.24.0-musl.patch
deleted file mode 100644
index b5b692bf6e0c..000000000000
--- a/dev-python/trio/files/trio-0.24.0-musl.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From c8c19570aa9e46b67d44228241e7401af96cbccd Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Mon, 29 Jan 2024 17:48:40 +0100
-Subject: [PATCH] Fix finding pthread_*name_np on vanilla musl libc
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fix the `pthread_getname_np` and `pthread_setname_np` search logic
-to support vanilla versions of musl and CPython, e.g. as used on Gentoo
-musl systems.  On such systems, there is no "libpthread.so" (there is
-only a static library) and the relevant functions are found
-in "libc.so".  Additionally, `ctypes.util.find_library("c")` does not
-work because of an old unsolved bug in CPython (linked in the code).
-
-To resolve the problem, add a fallback to trying `libc.so` if no pthread
-library can be found.  This roughly covers three possibilities:
-
-- a "typical" system with `libpthread.so` will find that library
-  and use it
-
-- a musl system will fall back to `libc.so`, load that library and find
-  pthread functions there
-
-- any other system will try to load `libc.so`, and fail
-
-The code in `get_os_thread_name_func()` remains fully relaxed, allowing
-either CDLL construction (i.e. finding the library) to fail,
-or the library not to contain `pthread_setname_np`.
-
-The code in `test_threads.py` was made more relaxed — rather than
-skipping if `libpthread.so` does not exist, it tries to load `libc.so`
-as a fallback, and skips if that fails.
-
-Originally reported as https://bugs.gentoo.org/923257.
----
- newsfragments/2939.bugfix.rst   |  1 +
- src/trio/_core/_thread_cache.py |  9 +++++++--
- src/trio/_tests/test_threads.py | 12 ++++++++++--
- 3 files changed, 18 insertions(+), 4 deletions(-)
- create mode 100644 newsfragments/2939.bugfix.rst
-
-diff --git a/src/trio/_tests/test_threads.py b/src/trio/_tests/test_threads.py
-index aefb4ba27..326cffd6b 100644
---- a/src/trio/_tests/test_threads.py
-+++ b/src/trio/_tests/test_threads.py
-@@ -237,9 +237,17 @@ def _get_thread_name(ident: int | None = None) -> str | None:
- 
-     libpthread_path = ctypes.util.find_library("pthread")
-     if not libpthread_path:
--        print(f"no pthread on {sys.platform})")
-+        # musl includes pthread functions directly in libc.so
-+        # (but note that find_library("c") does not work on musl,
-+        #  see: https://github.com/python/cpython/issues/65821)
-+        # so try that library instead
-+        # if it doesn't exist, CDLL() will fail below
-+        libpthread_path = "libc.so"
-+    try:
-+        libpthread = ctypes.CDLL(libpthread_path)
-+    except Exception:
-+        print(f"no pthread on {sys.platform}")
-         return None
--    libpthread = ctypes.CDLL(libpthread_path)
- 
-     pthread_getname_np = getattr(libpthread, "pthread_getname_np", None)
- 

diff --git a/dev-python/trio/trio-0.24.0.ebuild b/dev-python/trio/trio-0.24.0.ebuild
deleted file mode 100644
index 731ec9713527..000000000000
--- a/dev-python/trio/trio-0.24.0.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( pypy3 python3_{10..12} )
-
-inherit distutils-r1
-
-DESCRIPTION="Python library for async concurrency and I/O"
-HOMEPAGE="
-	https://github.com/python-trio/trio/
-	https://pypi.org/project/trio/
-"
-SRC_URI="
-	https://github.com/python-trio/${PN}/archive/v${PV}.tar.gz
-		-> ${P}.gh.tar.gz
-"
-
-LICENSE="|| ( Apache-2.0 MIT )"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-
-RDEPEND="
-	>=dev-python/attrs-20.1.0[${PYTHON_USEDEP}]
-	$(python_gen_cond_dep '
-		dev-python/exceptiongroup[${PYTHON_USEDEP}]
-	' 3.10)
-	dev-python/idna[${PYTHON_USEDEP}]
-	dev-python/outcome[${PYTHON_USEDEP}]
-	>=dev-python/sniffio-1.3.0[${PYTHON_USEDEP}]
-	dev-python/sortedcontainers[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	test? (
-		>=dev-python/astor-0.8.0[${PYTHON_USEDEP}]
-		>=dev-python/immutables-0.6[${PYTHON_USEDEP}]
-		dev-python/pyopenssl[${PYTHON_USEDEP}]
-		dev-python/trustme[${PYTHON_USEDEP}]
-	)
-"
-
-distutils_enable_tests pytest
-# Bug https://bugs.gentoo.org/916756
-# distutils_enable_sphinx docs/source \
-# 	dev-python/immutables \
-# 	dev-python/sphinxcontrib-trio \
-# 	dev-python/sphinx-rtd-theme \
-# 	dev-python/towncrier
-
-PATCHES=(
-	# https://github.com/python-trio/trio/pull/2939
-	"${FILESDIR}/${P}-musl.patch"
-)
-
-python_test() {
-	local EPYTEST_DESELECT=(
-		# Times out on slower arches (ia64 in this case)
-		# https://github.com/python-trio/trio/issues/1753
-		tests/test_unix_pipes.py::test_close_at_bad_time_for_send_all
-		# requires ruff
-		_tests/tools/test_gen_exports.py
-	)
-
-	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
-	rm -rf trio || die
-	epytest -p trio._tests.pytest_plugin \
-		-m "not redistributors_should_skip" \
-		--pyargs trio \
-		--skip-optional-imports
-}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-06  9:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-06  9:35 [gentoo-commits] repo/gentoo:master commit in: dev-python/trio/files/, dev-python/trio/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2021-11-18  4:01 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox