public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/uvloop/files/, dev-python/uvloop/
@ 2021-07-28  9:19 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2021-07-28  9:19 UTC (permalink / raw
  To: gentoo-commits

commit:     2ff590874366fb7e656a88293e19fa4bacd2e489
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 28 07:27:18 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jul 28 09:19:04 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ff59087

dev-python/uvloop: Attempt fixing 64-bit thread id problems

The upstream hack for 32-bit platforms seems to cause OverflowErrors
on 64-bit platforms with large Python thread identifiers (e.g. sparc).
Let's attempt reverting the patch and see how uvloop fares without it
on Gentoo-supported platforms.

Bug: https://bugs.gentoo.org/796803
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../files/uvloop-0.15.3-uint64-thread-id.patch     | 43 +++++++++++++++
 dev-python/uvloop/uvloop-0.15.3-r1.ebuild          | 63 ++++++++++++++++++++++
 2 files changed, 106 insertions(+)

diff --git a/dev-python/uvloop/files/uvloop-0.15.3-uint64-thread-id.patch b/dev-python/uvloop/files/uvloop-0.15.3-uint64-thread-id.patch
new file mode 100644
index 00000000000..a74fedd308e
--- /dev/null
+++ b/dev-python/uvloop/files/uvloop-0.15.3-uint64-thread-id.patch
@@ -0,0 +1,43 @@
+From 732df28f0739d84c687d3e6d81995dafa18ac775 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 28 Jul 2021 09:21:00 +0200
+Subject: [PATCH] Revert 32-bit thread ID hack
+
+Apparently the hack used to fix 32-bit platforms actually breaks 64-bit
+platforms using large thread IDs (e.g. sparc).
+
+Reverts: b5b4abb16ba558cf957cf40120dfd4937c53aea5
+---
+ uvloop/includes/stdlib.pxi | 2 +-
+ uvloop/loop.pyx            | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/uvloop/includes/stdlib.pxi b/uvloop/includes/stdlib.pxi
+index adf9806..21d69e6 100644
+--- a/uvloop/includes/stdlib.pxi
++++ b/uvloop/includes/stdlib.pxi
+@@ -135,7 +135,7 @@ cdef int ssl_SSL_ERROR_WANT_READ = ssl.SSL_ERROR_WANT_READ
+ cdef int ssl_SSL_ERROR_WANT_WRITE = ssl.SSL_ERROR_WANT_WRITE
+ cdef int ssl_SSL_ERROR_SYSCALL = ssl.SSL_ERROR_SYSCALL
+ 
+-cdef uint64_t MAIN_THREAD_ID = <uint64_t><int64_t>threading.main_thread().ident
++cdef uint64_t MAIN_THREAD_ID = <uint64_t>threading.main_thread().ident
+ cdef threading_Thread = threading.Thread
+ 
+ cdef int subprocess_PIPE = subprocess.PIPE
+diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx
+index d9b5aaa..96c9cde 100644
+--- a/uvloop/loop.pyx
++++ b/uvloop/loop.pyx
+@@ -707,7 +707,7 @@ cdef class Loop:
+             return
+ 
+         cdef uint64_t thread_id
+-        thread_id = <uint64_t><int64_t>PyThread_get_thread_ident()
++        thread_id = <uint64_t>PyThread_get_thread_ident()
+ 
+         if thread_id != self._thread_id:
+             raise RuntimeError(
+-- 
+2.32.0
+

diff --git a/dev-python/uvloop/uvloop-0.15.3-r1.ebuild b/dev-python/uvloop/uvloop-0.15.3-r1.ebuild
new file mode 100644
index 00000000000..41047739fb7
--- /dev/null
+++ b/dev-python/uvloop/uvloop-0.15.3-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..9} )
+inherit distutils-r1
+
+DESCRIPTION="Ultra-fast implementation of asyncio event loop on top of libuv"
+HOMEPAGE="https://github.com/magicstack/uvloop"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+KEYWORDS="~amd64"
+LICENSE="MIT"
+SLOT="0"
+IUSE="doc examples"
+
+RDEPEND=">=dev-libs/libuv-1.11.0:="
+DEPEND="${RDEPEND}"
+BDEPEND="
+	dev-python/cython[${PYTHON_USEDEP}]
+	doc? (
+		>=dev-python/alabaster-0.6.2[${PYTHON_USEDEP}]
+		dev-python/sphinx[${PYTHON_USEDEP}]
+	)
+	test? (
+		dev-python/aiohttp[${PYTHON_USEDEP}]
+		dev-python/pyopenssl[${PYTHON_USEDEP}]
+		dev-python/psutil[${PYTHON_USEDEP}]
+	)
+"
+
+distutils_enable_tests setup.py
+
+PATCHES=(
+	"${FILESDIR}"/${P}-uint64-thread-id.patch
+)
+
+python_prepare_all() {
+	cat <<EOF >> setup.cfg || die
+[build_ext]
+use-system-libuv=1
+EOF
+
+	# flake8 only
+	rm tests/test_sourcecode.py || die
+	# TODO: broken by cythonize
+	rm tests/test_cython.py || die
+	# force cythonization
+	rm uvloop/loop.c || die
+
+	distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+	use doc && esetup.py build_ext --inplace build_sphinx
+}
+
+python_install_all() {
+	use examples && dodoc -r examples
+	use doc && local HTML_DOCS=( "${BUILD_DIR}/sphinx/html/." )
+	distutils-r1_python_install_all
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/uvloop/files/, dev-python/uvloop/
@ 2022-10-28  8:17 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2022-10-28  8:17 UTC (permalink / raw
  To: gentoo-commits

commit:     d5b238e31b38d326c89de29ad5aa2148c27ee465
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 28 07:38:15 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Oct 28 08:17:04 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5b238e3

dev-python/uvloop: Remove old

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

 dev-python/uvloop/Manifest                         |  2 -
 .../files/uvloop-0.15.3-uint64-thread-id.patch     | 43 ---------------
 dev-python/uvloop/uvloop-0.15.3-r1.ebuild          | 63 ----------------------
 dev-python/uvloop/uvloop-0.15.3.ebuild             | 54 -------------------
 dev-python/uvloop/uvloop-0.16.0.ebuild             | 63 ----------------------
 5 files changed, 225 deletions(-)

diff --git a/dev-python/uvloop/Manifest b/dev-python/uvloop/Manifest
index a033afc048d9..cc6d66efd06c 100644
--- a/dev-python/uvloop/Manifest
+++ b/dev-python/uvloop/Manifest
@@ -1,3 +1 @@
-DIST uvloop-0.15.3.tar.gz 2094066 BLAKE2B 77ae4634ee31211dba13f41aede4480d70271e042a30a1268e9ad18f5de2b296b84931fb6b2022d2351f33521a84264f74cbc30caa5ff84b0f429bc9f1d426a0 SHA512 5687371a13509bdac0ef7a5ca0f7c78b54d0d9225cbf68cebc6d4fdf3807c2e3346579f5440eb0ff6578088780cc5efb09fba114da0bc0e60ad3f607d9df652f
-DIST uvloop-0.16.0.tar.gz 2129067 BLAKE2B 8a5a5c760b1036428483d2cf1f509784aa61cb69388720775c9555bdb0ce19341cb58fc051ab6f92066a3478acf729513dafafd79f31115b064bf1d3660479de SHA512 dd6dcec38f7f94dc0cf0123302fd6fe404428196b452a80a8258a207654e3f67e210233be3d649668c22b48390232d0347706b1d87fb50016287142c742b806d
 DIST uvloop-0.17.0.tar.gz 2279973 BLAKE2B 7ccbf3b8e723e36c1010a70e256de0ad1a9728fe10b3538e05c57157b16ea7e5369347c855cd1460e49f89197ebb05628c4b6fcd7e50c623b1aaa5890ac64b5f SHA512 861d7f28ad879ecbfa40d53b9626e38660f02618fd433edbd5a8ea5100a17ade042a26549def04bc23f928aca3adc83d62503f0548038cd400284f5654003ee4

diff --git a/dev-python/uvloop/files/uvloop-0.15.3-uint64-thread-id.patch b/dev-python/uvloop/files/uvloop-0.15.3-uint64-thread-id.patch
deleted file mode 100644
index a74fedd308e9..000000000000
--- a/dev-python/uvloop/files/uvloop-0.15.3-uint64-thread-id.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 732df28f0739d84c687d3e6d81995dafa18ac775 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Wed, 28 Jul 2021 09:21:00 +0200
-Subject: [PATCH] Revert 32-bit thread ID hack
-
-Apparently the hack used to fix 32-bit platforms actually breaks 64-bit
-platforms using large thread IDs (e.g. sparc).
-
-Reverts: b5b4abb16ba558cf957cf40120dfd4937c53aea5
----
- uvloop/includes/stdlib.pxi | 2 +-
- uvloop/loop.pyx            | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/uvloop/includes/stdlib.pxi b/uvloop/includes/stdlib.pxi
-index adf9806..21d69e6 100644
---- a/uvloop/includes/stdlib.pxi
-+++ b/uvloop/includes/stdlib.pxi
-@@ -135,7 +135,7 @@ cdef int ssl_SSL_ERROR_WANT_READ = ssl.SSL_ERROR_WANT_READ
- cdef int ssl_SSL_ERROR_WANT_WRITE = ssl.SSL_ERROR_WANT_WRITE
- cdef int ssl_SSL_ERROR_SYSCALL = ssl.SSL_ERROR_SYSCALL
- 
--cdef uint64_t MAIN_THREAD_ID = <uint64_t><int64_t>threading.main_thread().ident
-+cdef uint64_t MAIN_THREAD_ID = <uint64_t>threading.main_thread().ident
- cdef threading_Thread = threading.Thread
- 
- cdef int subprocess_PIPE = subprocess.PIPE
-diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx
-index d9b5aaa..96c9cde 100644
---- a/uvloop/loop.pyx
-+++ b/uvloop/loop.pyx
-@@ -707,7 +707,7 @@ cdef class Loop:
-             return
- 
-         cdef uint64_t thread_id
--        thread_id = <uint64_t><int64_t>PyThread_get_thread_ident()
-+        thread_id = <uint64_t>PyThread_get_thread_ident()
- 
-         if thread_id != self._thread_id:
-             raise RuntimeError(
--- 
-2.32.0
-

diff --git a/dev-python/uvloop/uvloop-0.15.3-r1.ebuild b/dev-python/uvloop/uvloop-0.15.3-r1.ebuild
deleted file mode 100644
index c52b01da9204..000000000000
--- a/dev-python/uvloop/uvloop-0.15.3-r1.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit distutils-r1
-
-DESCRIPTION="Ultra-fast implementation of asyncio event loop on top of libuv"
-HOMEPAGE="https://github.com/magicstack/uvloop"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-KEYWORDS="amd64 arm arm64 ppc ppc64 -riscv sparc"
-LICENSE="MIT"
-SLOT="0"
-IUSE="doc examples"
-
-RDEPEND=">=dev-libs/libuv-1.11.0:="
-DEPEND="${RDEPEND}"
-BDEPEND="
-	dev-python/cython[${PYTHON_USEDEP}]
-	doc? (
-		>=dev-python/alabaster-0.6.2[${PYTHON_USEDEP}]
-		dev-python/sphinx[${PYTHON_USEDEP}]
-	)
-	test? (
-		dev-python/aiohttp[${PYTHON_USEDEP}]
-		dev-python/pyopenssl[${PYTHON_USEDEP}]
-		dev-python/psutil[${PYTHON_USEDEP}]
-	)
-"
-
-distutils_enable_tests setup.py
-
-PATCHES=(
-	"${FILESDIR}"/${P}-uint64-thread-id.patch
-)
-
-python_prepare_all() {
-	cat <<-EOF >> setup.cfg || die
-		[build_ext]
-		use_system_libuv=1
-	EOF
-
-	# flake8 only
-	rm tests/test_sourcecode.py || die
-	# TODO: broken by cythonize
-	rm tests/test_cython.py || die
-	# force cythonization
-	rm uvloop/loop.c || die
-
-	distutils-r1_python_prepare_all
-}
-
-python_compile_all() {
-	use doc && esetup.py build_ext --inplace build_sphinx
-}
-
-python_install_all() {
-	use examples && dodoc -r examples
-	use doc && local HTML_DOCS=( "${BUILD_DIR}/sphinx/html/." )
-	distutils-r1_python_install_all
-}

diff --git a/dev-python/uvloop/uvloop-0.15.3.ebuild b/dev-python/uvloop/uvloop-0.15.3.ebuild
deleted file mode 100644
index 53214c0c6779..000000000000
--- a/dev-python/uvloop/uvloop-0.15.3.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit distutils-r1
-
-DESCRIPTION="Ultra-fast implementation of asyncio event loop on top of libuv"
-HOMEPAGE="https://github.com/magicstack/uvloop"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 -riscv x86"
-LICENSE="MIT"
-SLOT="0"
-IUSE="doc examples"
-
-RDEPEND=">=dev-libs/libuv-1.11.0:="
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? (
-		>=dev-python/alabaster-0.6.2[${PYTHON_USEDEP}]
-		dev-python/sphinx[${PYTHON_USEDEP}]
-	)
-	test? (
-		dev-python/aiohttp[${PYTHON_USEDEP}]
-		dev-python/pyopenssl[${PYTHON_USEDEP}]
-		dev-python/psutil[${PYTHON_USEDEP}]
-	)
-"
-
-distutils_enable_tests setup.py
-
-python_prepare_all() {
-	cat <<-EOF >> setup.cfg || die
-		[build_ext]
-		use_system_libuv=1
-	EOF
-
-	# flake8 only
-	rm tests/test_sourcecode.py || die
-
-	distutils-r1_python_prepare_all
-}
-
-python_compile_all() {
-	use doc && esetup.py build_ext --inplace build_sphinx
-}
-
-python_install_all() {
-	use examples && dodoc -r examples
-	use doc && local HTML_DOCS=( "${BUILD_DIR}/sphinx/html/." )
-	distutils-r1_python_install_all
-}

diff --git a/dev-python/uvloop/uvloop-0.16.0.ebuild b/dev-python/uvloop/uvloop-0.16.0.ebuild
deleted file mode 100644
index b01168428710..000000000000
--- a/dev-python/uvloop/uvloop-0.16.0.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit distutils-r1
-
-DESCRIPTION="Ultra-fast implementation of asyncio event loop on top of libuv"
-HOMEPAGE="https://github.com/magicstack/uvloop"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-KEYWORDS="amd64 arm ~arm64 ppc ~ppc64 -riscv sparc x86"
-LICENSE="MIT"
-SLOT="0"
-IUSE="doc examples"
-
-RDEPEND=">=dev-libs/libuv-1.11.0:="
-DEPEND="${RDEPEND}"
-BDEPEND="
-	>=dev-python/cython-0.29.24[${PYTHON_USEDEP}]
-	doc? (
-		>=dev-python/alabaster-0.6.2[${PYTHON_USEDEP}]
-		dev-python/sphinx[${PYTHON_USEDEP}]
-	)
-	test? (
-		dev-python/aiohttp[${PYTHON_USEDEP}]
-		dev-python/pyopenssl[${PYTHON_USEDEP}]
-		dev-python/psutil[${PYTHON_USEDEP}]
-	)
-"
-
-distutils_enable_tests setup.py
-
-PATCHES=(
-	"${FILESDIR}"/uvloop-0.15.3-uint64-thread-id.patch
-)
-
-python_prepare_all() {
-	cat <<-EOF >> setup.cfg || die
-		[build_ext]
-		use_system_libuv=1
-	EOF
-
-	# flake8 only
-	rm tests/test_sourcecode.py || die
-	# TODO: broken by cythonize
-	rm tests/test_cython.py || die
-	# force cythonization
-	rm uvloop/loop.c || die
-
-	distutils-r1_python_prepare_all
-}
-
-python_compile_all() {
-	use doc && esetup.py build_ext --inplace build_sphinx
-}
-
-python_install_all() {
-	use examples && dodoc -r examples
-	use doc && local HTML_DOCS=( "${BUILD_DIR}/sphinx/html/." )
-	distutils-r1_python_install_all
-}


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

end of thread, other threads:[~2022-10-28  8:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-28  9:19 [gentoo-commits] repo/gentoo:master commit in: dev-python/uvloop/files/, dev-python/uvloop/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2022-10-28  8:17 Michał Górny

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