Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/bpython/files/, dev-python/bpython/
Date: Fri, 29 Oct 2021 15:29:15
Message-Id: 1635521342.9c8807e1f6459f64d22231021a6ddcf8495ded47.arthurzam@gentoo
1 commit: 9c8807e1f6459f64d22231021a6ddcf8495ded47
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Oct 29 15:26:42 2021 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 29 15:29:02 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c8807e1
7
8 dev-python/bpython: enable py3.10
9
10 Closes: https://bugs.gentoo.org/812305
11 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
12
13 dev-python/bpython/bpython-0.21.ebuild | 9 ++--
14 .../bpython/files/bpython-0.21-fix-py3.10.patch | 48 ++++++++++++++++++++++
15 2 files changed, 53 insertions(+), 4 deletions(-)
16
17 diff --git a/dev-python/bpython/bpython-0.21.ebuild b/dev-python/bpython/bpython-0.21.ebuild
18 index b89b7316740..d815d918656 100644
19 --- a/dev-python/bpython/bpython-0.21.ebuild
20 +++ b/dev-python/bpython/bpython-0.21.ebuild
21 @@ -3,9 +3,7 @@
22
23 EAPI=7
24
25 -PYTHON_COMPAT=( python3_{7..9} )
26 -DISTUTILS_USE_SETUPTOOLS=rdepend
27 -
28 +PYTHON_COMPAT=( python3_{8..10} )
29 inherit distutils-r1
30
31 DESCRIPTION="Syntax highlighting and autocompletion for the Python interpreter"
32 @@ -34,7 +32,10 @@ BDEPEND="
33
34 DOCS=( AUTHORS.rst CHANGELOG.rst )
35
36 -PATCHES=( "${FILESDIR}"/${PN}-sphinx-4.patch )
37 +PATCHES=(
38 + "${FILESDIR}"/${PN}-sphinx-4.patch
39 + "${FILESDIR}"/${P}-fix-py3.10.patch
40 +)
41
42 distutils_enable_sphinx doc/sphinx/source --no-autodoc
43 distutils_enable_tests unittest
44
45 diff --git a/dev-python/bpython/files/bpython-0.21-fix-py3.10.patch b/dev-python/bpython/files/bpython-0.21-fix-py3.10.patch
46 new file mode 100644
47 index 00000000000..5b7c6376782
48 --- /dev/null
49 +++ b/dev-python/bpython/files/bpython-0.21-fix-py3.10.patch
50 @@ -0,0 +1,48 @@
51 +From 78ead4c83d7c47c35ab075dd08114f51c24a709d Mon Sep 17 00:00:00 2001
52 +From: Thomas Ballinger <thomasballinger@×××××.com>
53 +Date: Wed, 6 Oct 2021 19:59:38 -0700
54 +Subject: [PATCH] Test Python 3.10 (#924)
55 +
56 +* Test Python 3.10
57 +* Update tests for Python 3.10
58 +
59 +--- a/bpython/test/test_curtsies_painting.py
60 ++++ b/bpython/test/test_curtsies_painting.py
61 +@@ -139,6 +139,14 @@ def test_completion(self):
62 + "└──────────────────────────────┘",
63 + "Welcome to bpython! Press <F1> f",
64 + ]
65 ++ if sys.version_info[:2] < (3, 10)
66 ++ else [
67 ++ ">>> an",
68 ++ "┌──────────────────────────────┐",
69 ++ "│ and anext( any( │",
70 ++ "└──────────────────────────────┘",
71 ++ "Welcome to bpython! Press <F1> f",
72 ++ ]
73 + )
74 + self.assert_paint_ignoring_formatting(screen, (0, 4))
75 +
76 +--- a/bpython/test/test_interpreter.py
77 ++++ b/bpython/test/test_interpreter.py
78 +@@ -35,7 +35,19 @@ def test_syntaxerror(self):
79 +
80 + i.runsource("1.1.1.1")
81 +
82 +- if sys.version_info[:2] >= (3, 8):
83 ++ if sys.version_info[:2] >= (3, 10):
84 ++ expected = (
85 ++ " File "
86 ++ + green('"<bpython-input-148>"')
87 ++ + ", line "
88 ++ + bold(magenta("1"))
89 ++ + "\n 1.1.1.1\n ^^^^^\n"
90 ++ + bold(red("SyntaxError"))
91 ++ + ": "
92 ++ + cyan("invalid syntax. Perhaps you forgot a comma?")
93 ++ + "\n"
94 ++ )
95 ++ elif (3, 8) <= sys.version_info[:2] <= (3, 9):
96 + expected = (
97 + " File "
98 + + green('"<input>"')