Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest/, dev-python/pytest/files/
Date: Fri, 13 May 2022 12:29:29
Message-Id: 1652444956.818f429dfdb68c618435465e4ea7ee122a6172f9.mgorny@gentoo
1 commit: 818f429dfdb68c618435465e4ea7ee122a6172f9
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 13 11:56:31 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri May 13 12:29:16 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=818f429d
7
8 dev-python/pytest: Enable py3.11
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pytest/files/pytest-7.1.2-py311.patch | 28 ++++++++++++++++++++++++
13 dev-python/pytest/pytest-7.1.2.ebuild | 9 +++++---
14 2 files changed, 34 insertions(+), 3 deletions(-)
15
16 diff --git a/dev-python/pytest/files/pytest-7.1.2-py311.patch b/dev-python/pytest/files/pytest-7.1.2-py311.patch
17 new file mode 100644
18 index 000000000000..ecae07b9ce24
19 --- /dev/null
20 +++ b/dev-python/pytest/files/pytest-7.1.2-py311.patch
21 @@ -0,0 +1,28 @@
22 +From 2f8ae29c173ea8335a1e0cc7027a76032429e8f9 Mon Sep 17 00:00:00 2001
23 +From: "github-actions[bot]"
24 + <41898282+github-actions[bot]@users.noreply.github.com>
25 +Date: Mon, 9 May 2022 13:38:22 +0000
26 +Subject: [PATCH] [7.1.x] testing: fix Path.rglob("") failures in Python 3.11b1
27 + (#9934)
28 +
29 +Co-authored-by: Ran Benita <ran@×××××××××.com>
30 +---
31 + testing/test_conftest.py | 2 +-
32 + 1 file changed, 1 insertion(+), 1 deletion(-)
33 +
34 +diff --git a/testing/test_conftest.py b/testing/test_conftest.py
35 +index 680482045..d2bf860c6 100644
36 +--- a/testing/test_conftest.py
37 ++++ b/testing/test_conftest.py
38 +@@ -553,7 +553,7 @@ class TestConftestVisibility:
39 + )
40 + )
41 + print("created directory structure:")
42 +- for x in pytester.path.rglob(""):
43 ++ for x in pytester.path.glob("**/"):
44 + print(" " + str(x.relative_to(pytester.path)))
45 +
46 + return {"runner": runner, "package": package, "swc": swc, "snc": snc}
47 +--
48 +2.35.1
49 +
50
51 diff --git a/dev-python/pytest/pytest-7.1.2.ebuild b/dev-python/pytest/pytest-7.1.2.ebuild
52 index 1143038d9a5b..aba0345dc7b7 100644
53 --- a/dev-python/pytest/pytest-7.1.2.ebuild
54 +++ b/dev-python/pytest/pytest-7.1.2.ebuild
55 @@ -39,15 +39,18 @@ BDEPEND="
56 dev-python/argcomplete[${PYTHON_USEDEP}]
57 >=dev-python/hypothesis-3.56[${PYTHON_USEDEP}]
58 dev-python/mock[${PYTHON_USEDEP}]
59 - dev-python/nose[${PYTHON_USEDEP}]
60 >=dev-python/pygments-2.7.2[${PYTHON_USEDEP}]
61 dev-python/pytest-xdist[${PYTHON_USEDEP}]
62 dev-python/requests[${PYTHON_USEDEP}]
63 dev-python/xmlschema[${PYTHON_USEDEP}]
64 - ' python3_{8..10} pypy3)
65 + ' python3_{8..11} pypy3)
66 )
67 "
68
69 +PATCHES=(
70 + "${FILESDIR}/${P}-py311.patch"
71 +)
72 +
73 src_test() {
74 # workaround new readline defaults
75 echo "set enable-bracketed-paste off" > "${T}"/inputrc || die
76 @@ -56,7 +59,7 @@ src_test() {
77 }
78
79 python_test() {
80 - if ! has "${EPYTHON}" python3.{8..10} pypy3; then
81 + if ! has "${EPYTHON}" python3.{8..11} pypy3; then
82 einfo "Skipping tests on ${EPYTHON}"
83 return
84 fi