commit:     818f429dfdb68c618435465e4ea7ee122a6172f9
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri May 13 11:56:31 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri May 13 12:29:16 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=818f429d

dev-python/pytest: Enable py3.11

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

 dev-python/pytest/files/pytest-7.1.2-py311.patch | 28 ++++++++++++++++++++++++
 dev-python/pytest/pytest-7.1.2.ebuild            |  9 +++++---
 2 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/dev-python/pytest/files/pytest-7.1.2-py311.patch 
b/dev-python/pytest/files/pytest-7.1.2-py311.patch
new file mode 100644
index 000000000000..ecae07b9ce24
--- /dev/null
+++ b/dev-python/pytest/files/pytest-7.1.2-py311.patch
@@ -0,0 +1,28 @@
+From 2f8ae29c173ea8335a1e0cc7027a76032429e8f9 Mon Sep 17 00:00:00 2001
+From: "github-actions[bot]"
+ <41898282+github-actions[bot]@users.noreply.github.com>
+Date: Mon, 9 May 2022 13:38:22 +0000
+Subject: [PATCH] [7.1.x] testing: fix Path.rglob("") failures in Python 3.11b1
+ (#9934)
+
+Co-authored-by: Ran Benita <[email protected]>
+---
+ testing/test_conftest.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testing/test_conftest.py b/testing/test_conftest.py
+index 680482045..d2bf860c6 100644
+--- a/testing/test_conftest.py
++++ b/testing/test_conftest.py
+@@ -553,7 +553,7 @@ class TestConftestVisibility:
+             )
+         )
+         print("created directory structure:")
+-        for x in pytester.path.rglob(""):
++        for x in pytester.path.glob("**/"):
+             print("   " + str(x.relative_to(pytester.path)))
+ 
+         return {"runner": runner, "package": package, "swc": swc, "snc": snc}
+-- 
+2.35.1
+

diff --git a/dev-python/pytest/pytest-7.1.2.ebuild 
b/dev-python/pytest/pytest-7.1.2.ebuild
index 1143038d9a5b..aba0345dc7b7 100644
--- a/dev-python/pytest/pytest-7.1.2.ebuild
+++ b/dev-python/pytest/pytest-7.1.2.ebuild
@@ -39,15 +39,18 @@ BDEPEND="
                        dev-python/argcomplete[${PYTHON_USEDEP}]
                        >=dev-python/hypothesis-3.56[${PYTHON_USEDEP}]
                        dev-python/mock[${PYTHON_USEDEP}]
-                       dev-python/nose[${PYTHON_USEDEP}]
                        >=dev-python/pygments-2.7.2[${PYTHON_USEDEP}]
                        dev-python/pytest-xdist[${PYTHON_USEDEP}]
                        dev-python/requests[${PYTHON_USEDEP}]
                        dev-python/xmlschema[${PYTHON_USEDEP}]
-               ' python3_{8..10} pypy3)
+               ' python3_{8..11} pypy3)
        )
 "
 
+PATCHES=(
+       "${FILESDIR}/${P}-py311.patch"
+)
+
 src_test() {
        # workaround new readline defaults
        echo "set enable-bracketed-paste off" > "${T}"/inputrc || die
@@ -56,7 +59,7 @@ src_test() {
 }
 
 python_test() {
-       if ! has "${EPYTHON}" python3.{8..10} pypy3; then
+       if ! has "${EPYTHON}" python3.{8..11} pypy3; then
                einfo "Skipping tests on ${EPYTHON}"
                return
        fi

Reply via email to