commit:     c22c89bd9dba47b0d2c72f467a565f5437526fa2
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Feb 28 17:16:03 2026 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Feb 28 18:33:17 2026 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c22c89bd

dev-python/asyncpg: add 0.31.0

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 dev-python/asyncpg/Manifest              |  1 +
 dev-python/asyncpg/asyncpg-0.31.0.ebuild | 85 ++++++++++++++++++++++++++++++++
 dev-python/asyncpg/files/cython-3.patch  | 26 ----------
 3 files changed, 86 insertions(+), 26 deletions(-)

diff --git a/dev-python/asyncpg/Manifest b/dev-python/asyncpg/Manifest
index 5f650003c8..21b6a37020 100644
--- a/dev-python/asyncpg/Manifest
+++ b/dev-python/asyncpg/Manifest
@@ -1 +1,2 @@
 DIST asyncpg-0.30.0.tar.gz 957746 BLAKE2B 
2da92520bd30c1e5eebbfddabf78b9e9e221fb33ad77fa01f77ceb8bdf73e057868bf60987c2c67a6ed5d8b0cacb3b80c0aefd6afa1b574e2629d358c9158bbb
 SHA512 
bbfc83ae881f454cb16343037ae48fbc9c9c65b57d11fc1e28ec054b9051d823f7da0735307090d0ce4e5dca166590b147d0f9d383a1ac0b894396290aa0782a
+DIST asyncpg-0.31.0.tar.gz 993667 BLAKE2B 
41c88e652b280ccb2add527df35fd470a3c42573082022ba5e241a9c414f4bf32265249b22d5c7de8414b95c0b2de7ed974df1fff1d8777864553e3ba9b3dfce
 SHA512 
150c5b989a0ecd9903e9c932030f30c58750a180e95d2fab7323cf2b8b20a13b85c346f9fae19efb74ced5dbe724fd2722bbd3b0c44eedca532fb79b42edf350

diff --git a/dev-python/asyncpg/asyncpg-0.31.0.ebuild 
b/dev-python/asyncpg/asyncpg-0.31.0.ebuild
new file mode 100644
index 0000000000..ecafa1803a
--- /dev/null
+++ b/dev-python/asyncpg/asyncpg-0.31.0.ebuild
@@ -0,0 +1,85 @@
+# Copyright 2020-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{12..14} )  # doesn't build with pypy3
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+inherit distutils-r1 pypi
+
+DESCRIPTION="An asyncio PostgreSQL driver"
+HOMEPAGE="
+       https://pypi.org/project/asyncpg/
+       https://github.com/MagicStack/asyncpg
+"
+
+LICENSE="Apache-2.0 PSF-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="kerberos"
+
+RDEPEND="
+       kerberos? ( dev-python/gssapi[${PYTHON_USEDEP}] )
+"
+BDEPEND="
+       dev-python/cython[${PYTHON_USEDEP}]
+       test? (
+               dev-db/postgresql[kerberos?,server,ssl]
+               dev-python/distro[${PYTHON_USEDEP}]
+               dev-python/uvloop[${PYTHON_USEDEP}]
+               kerberos? (
+                       app-crypt/mit-krb5
+                       dev-python/k5test[${PYTHON_USEDEP}]
+               )
+       )
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.30.0-cflags.patch
+)
+
+EPYTEST_PLUGINS=( )
+EPYTEST_IGNORE=(
+       # checks versions from env variables
+       "${S}"/tests/test__environment.py
+       # runs flake8 (???)
+       "${S}"/tests/test__sourcecode.py
+)
+
+distutils_enable_tests pytest
+
+distutils_enable_sphinx docs \
+       dev-python/sphinx-rtd-theme
+
+python_prepare_all() {
+       # bug #926720
+       cat <<-EOF >> setup.cfg || die
+               [build_ext]
+               debug=False
+               cython_always=True
+               cython_annotate=False
+               cython_directives=
+       EOF
+
+       # remove pre-generated Cython sources
+       rm asyncpg/{pgproto/pgproto,protocol/protocol}.c || die
+
+       distutils-r1_python_prepare_all
+}
+
+python_configure_all() {
+       use debug && \
+               export ASYNCPG_DEBUG=1
+
+       use kerberos || \
+               EPYTEST_DESELECT+=( 
tests/test_connect.py::TestGssAuthentication )
+}
+
+python_test() {
+       cd "${T}" || die
+       for opt in "" "1"; do
+               einfo "  testing with USE_UVLOOP='${opt}'"
+               USE_UVLOOP="${opt}" epytest "${S}"/tests
+       done
+}

diff --git a/dev-python/asyncpg/files/cython-3.patch 
b/dev-python/asyncpg/files/cython-3.patch
deleted file mode 100644
index 89c51c0eb4..0000000000
--- a/dev-python/asyncpg/files/cython-3.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/pyproject.toml b/pyproject.toml
-index ed2340a..825af6a 100644
---- a/pyproject.toml
-+++ b/pyproject.toml
-@@ -50,7 +50,7 @@ requires = [
-     "setuptools>=60",
-     "wheel",
- 
--    "Cython(>=0.29.24,<3.0.0)"
-+    "Cython(>=3.0.0)"
- ]
- build-backend = "setuptools.build_meta"
- 
-diff --git a/setup.py b/setup.py
-index c4d42d8..c4d6ed1 100644
---- a/setup.py
-+++ b/setup.py
-@@ -25,7 +25,7 @@ from setuptools.command import sdist as setuptools_sdist
- from setuptools.command import build_ext as setuptools_build_ext
- 
- 
--CYTHON_DEPENDENCY = 'Cython(>=0.29.24,<0.30.0)'
-+CYTHON_DEPENDENCY = 'Cython(>=0.30.0)'
- 
- CFLAGS = ['-O2']
- LDFLAGS = []

Reply via email to