summaryrefslogtreecommitdiff
path: root/dev-python
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-05-21 18:00:32 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-05-21 18:00:32 +0000
commit0ab0678be688a9e5ff3a2c1777c07759df498155 (patch)
treebf2158cf14f1191bd775ace39ee6479260972648 /dev-python
parent10c8dfd3134343aaf5f2fdaac75fea3d51239f1c (diff)
downloadbaldeagleos-repo-0ab0678be688a9e5ff3a2c1777c07759df498155.tar.gz
baldeagleos-repo-0ab0678be688a9e5ff3a2c1777c07759df498155.tar.xz
baldeagleos-repo-0ab0678be688a9e5ff3a2c1777c07759df498155.zip
Adding metadata
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/autopage/autopage-0.5.0.ebuild14
-rw-r--r--dev-python/cliff/cliff-3.10.1.ebuild6
-rw-r--r--dev-python/cmd2/cmd2-2.4.1.ebuild12
-rw-r--r--dev-python/cmd2/files/cmd2-2.4.1-py311.patch26
-rw-r--r--dev-python/debtcollector/debtcollector-2.5.0.ebuild7
-rw-r--r--dev-python/fixtures/files/fixtures-4.0.0-py311.patch116
-rw-r--r--dev-python/fixtures/fixtures-4.0.0.ebuild1
-rw-r--r--dev-python/netaddr/netaddr-0.8.0-r1.ebuild37
-rw-r--r--dev-python/oslo-i18n/oslo-i18n-5.1.0-r1.ebuild38
-rw-r--r--dev-python/oslotest/oslotest-4.5.0-r1.ebuild7
-rw-r--r--dev-python/prettytable/prettytable-3.3.0.ebuild6
-rw-r--r--dev-python/pyperclip/pyperclip-1.8.2-r1.ebuild56
-rw-r--r--dev-python/stevedore/stevedore-3.4.0-r1.ebuild53
-rw-r--r--dev-python/stevedore/stevedore-3.4.0.ebuild5
-rw-r--r--dev-python/testresources/testresources-2.0.1-r1.ebuild38
-rw-r--r--dev-python/testscenarios/testscenarios-0.5.0-r2.ebuild36
-rw-r--r--dev-python/testtools/files/testtools-2.5.0-py311.patch116
-rw-r--r--dev-python/testtools/testtools-2.5.0-r1.ebuild60
18 files changed, 620 insertions, 14 deletions
diff --git a/dev-python/autopage/autopage-0.5.0.ebuild b/dev-python/autopage/autopage-0.5.0.ebuild
index 83119466b6c3..27b192430f72 100644
--- a/dev-python/autopage/autopage-0.5.0.ebuild
+++ b/dev-python/autopage/autopage-0.5.0.ebuild
@@ -3,24 +3,30 @@
EAPI=8
-PYTHON_COMPAT=( python3_{7,8,9,10} )
DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+
inherit distutils-r1
DESCRIPTION="A library to provide automatic paging for console output"
HOMEPAGE="
+ https://github.com/zaneb/autopage/
https://pypi.org/project/autopage/
- https://github.com/zaneb/autopage/"
+"
SRC_URI="
https://github.com/zaneb/autopage/archive/v${PV}.tar.gz
- -> ${P}.gh.tar.gz"
+ -> ${P}.gh.tar.gz
+"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc64 ~s390 sparc x86"
BDEPEND="
- test? ( dev-python/fixtures[${PYTHON_USEDEP}] )"
+ test? (
+ dev-python/fixtures[${PYTHON_USEDEP}]
+ )
+"
distutils_enable_tests unittest
diff --git a/dev-python/cliff/cliff-3.10.1.ebuild b/dev-python/cliff/cliff-3.10.1.ebuild
index 7aa7b6e22a9c..eda1d892970f 100644
--- a/dev-python/cliff/cliff-3.10.1.ebuild
+++ b/dev-python/cliff/cliff-3.10.1.ebuild
@@ -9,7 +9,11 @@ PYTHON_COMPAT=( python3_{7,8,9,10} )
inherit distutils-r1
DESCRIPTION="Command Line Interface Formulation Framework"
-HOMEPAGE="https://github.com/openstack/cliff"
+HOMEPAGE="
+ https://opendev.org/openstack/cliff/
+ https://github.com/openstack/cliff/
+ https://pypi.org/project/cliff/
+"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
diff --git a/dev-python/cmd2/cmd2-2.4.1.ebuild b/dev-python/cmd2/cmd2-2.4.1.ebuild
index f804db5eab53..9ca81d0feaaf 100644
--- a/dev-python/cmd2/cmd2-2.4.1.ebuild
+++ b/dev-python/cmd2/cmd2-2.4.1.ebuild
@@ -9,7 +9,10 @@ PYTHON_COMPAT=( python3_{7,8,9,10} )
inherit distutils-r1 virtualx
DESCRIPTION="Extra features for standard library's cmd module"
-HOMEPAGE="https://github.com/python-cmd2/cmd2"
+HOMEPAGE="
+ https://github.com/python-cmd2/cmd2/
+ https://pypi.org/project/cmd2/
+"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
@@ -27,12 +30,11 @@ RDEPEND="
# pygtk, xclip, xsel, klipper, qtpy, pyqt5, pyqt4.
# klipper is known to be broken in Xvfb, and therefore causes test
# failures. to avoid them, we must ensure that one of the backends
-# preferred to it is available (i.e. xclip or xsel) + which(1).
+# preferred to it is available (i.e. xclip or xsel).
BDEPEND="
dev-python/setuptools_scm[${PYTHON_USEDEP}]
test? (
dev-python/pytest-mock[${PYTHON_USEDEP}]
- sys-apps/which
|| (
x11-misc/xclip
x11-misc/xsel
@@ -42,6 +44,10 @@ BDEPEND="
distutils_enable_tests pytest
+PATCHES=(
+ "${FILESDIR}"/${P}-py311.patch
+)
+
src_prepare() {
distutils-r1_src_prepare
sed -i -e '/--cov/d' setup.cfg || die
diff --git a/dev-python/cmd2/files/cmd2-2.4.1-py311.patch b/dev-python/cmd2/files/cmd2-2.4.1-py311.patch
new file mode 100644
index 000000000000..c0e9da528a08
--- /dev/null
+++ b/dev-python/cmd2/files/cmd2-2.4.1-py311.patch
@@ -0,0 +1,26 @@
+From c02bb7dce587886fe380704a8c6a6009eb677a74 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 21 May 2022 15:41:11 +0200
+Subject: [PATCH] Fixed duplicate subparser name in
+ test_add_parser_custom_completer
+
+If I'm not mistaken, the use of the same name for both subparsers was
+not intentional but a typo. In Python 3.11, this is an error and causes
+the test to fail.
+
+Fixes #1228
+---
+ tests/test_argparse_completer.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test_argparse_completer.py b/tests/test_argparse_completer.py
+index 135d3de4..14c8c1de 100644
+--- a/tests/test_argparse_completer.py
++++ b/tests/test_argparse_completer.py
+@@ -1371,5 +1371,5 @@ def test_add_parser_custom_completer():
+ no_custom_completer_parser = subparsers.add_parser(name="no_custom_completer")
+ assert no_custom_completer_parser.get_ap_completer_type() is None # type: ignore[attr-defined]
+
+- custom_completer_parser = subparsers.add_parser(name="no_custom_completer", ap_completer_type=CustomCompleter)
++ custom_completer_parser = subparsers.add_parser(name="custom_completer", ap_completer_type=CustomCompleter)
+ assert custom_completer_parser.get_ap_completer_type() is CustomCompleter # type: ignore[attr-defined]
diff --git a/dev-python/debtcollector/debtcollector-2.5.0.ebuild b/dev-python/debtcollector/debtcollector-2.5.0.ebuild
index 76064e853067..a5bf68e5a143 100644
--- a/dev-python/debtcollector/debtcollector-2.5.0.ebuild
+++ b/dev-python/debtcollector/debtcollector-2.5.0.ebuild
@@ -9,7 +9,11 @@ PYTHON_COMPAT=( python3_{7,8,9,10} )
inherit distutils-r1
DESCRIPTION="Python deprecation patterns and strategies that collect technical debt"
-HOMEPAGE="https://www.openstack.org/"
+HOMEPAGE="
+ https://opendev.org/openstack/debtcollector/
+ https://github.com/openstack/debtcollector/
+ https://pypi.org/project/debtcollector/
+"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
@@ -22,7 +26,6 @@ RDEPEND="
BDEPEND="
>dev-python/pbr-2.1.0[${PYTHON_USEDEP}]
test? (
- dev-python/subunit[${PYTHON_USEDEP}]
dev-python/testtools[${PYTHON_USEDEP}]
dev-python/fixtures[${PYTHON_USEDEP}]
)
diff --git a/dev-python/fixtures/files/fixtures-4.0.0-py311.patch b/dev-python/fixtures/files/fixtures-4.0.0-py311.patch
new file mode 100644
index 000000000000..6cda1104afca
--- /dev/null
+++ b/dev-python/fixtures/files/fixtures-4.0.0-py311.patch
@@ -0,0 +1,116 @@
+From 54ef596952d459d605fcb40f13bed6d07ef93f4c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 21 May 2022 12:15:21 +0200
+Subject: [PATCH 1/2] Update classmethod expectations (again) for Python 3.11
+
+It seems that the classmethod behavior in Python 3.11.0b1 is back
+to the one found in Python 3.8. Adjust the test expectations again.
+This time around, we expect the "old-new" behavior in CPython 3.9
+and 3.10 only.
+---
+ fixtures/tests/_fixtures/test_monkeypatch.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/fixtures/tests/_fixtures/test_monkeypatch.py b/fixtures/tests/_fixtures/test_monkeypatch.py
+index 08cd1c8..fa08b24 100644
+--- a/fixtures/tests/_fixtures/test_monkeypatch.py
++++ b/fixtures/tests/_fixtures/test_monkeypatch.py
+@@ -24,7 +24,8 @@ from fixtures import MonkeyPatch, TestWithFixtures
+ reference = 23
+
+ NEW_PY39_CLASSMETHOD = (
+- sys.version_info >= (3, 9) and not hasattr(sys, "pypy_version_info"))
++ sys.version_info[:2] in ((3, 9), (3,10))
++ and not hasattr(sys, "pypy_version_info"))
+
+ class C(object):
+ def foo(self, arg):
+--
+2.35.1
+
+From 48d8626168a374c099fa891d7e734548e1e03683 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 21 May 2022 12:25:49 +0200
+Subject: [PATCH 2/2] Support Popen's process_group argument from Python 3.11
+
+---
+ fixtures/_fixtures/popen.py | 9 +++++++--
+ fixtures/tests/_fixtures/test_popen.py | 14 ++++++++++++++
+ 2 files changed, 21 insertions(+), 2 deletions(-)
+
+diff --git a/fixtures/_fixtures/popen.py b/fixtures/_fixtures/popen.py
+index ffa9bf4..a099854 100644
+--- a/fixtures/_fixtures/popen.py
++++ b/fixtures/_fixtures/popen.py
+@@ -131,7 +131,8 @@ class FakePopen(Fixture):
+ restore_signals=_unpassed, start_new_session=_unpassed,
+ pass_fds=_unpassed, *, group=_unpassed, extra_groups=_unpassed,
+ user=_unpassed, umask=_unpassed, encoding=_unpassed,
+- errors=_unpassed, text=_unpassed, pipesize=_unpassed):
++ errors=_unpassed, text=_unpassed, pipesize=_unpassed,
++ process_group=_unpassed):
+ # Reject arguments introduced by newer versions of Python in older
+ # versions; this makes it harder to accidentally hide compatibility
+ # problems using test doubles.
+@@ -149,6 +150,10 @@ class FakePopen(Fixture):
+ raise TypeError(
+ "FakePopen.__call__() got an unexpected keyword argument "
+ "'pipesize'")
++ if sys.version_info < (3, 11) and process_group is not FakePopen._unpassed:
++ raise TypeError(
++ "FakePopen.__call__() got an unexpected keyword argument "
++ "'process_group'")
+
+ proc_args = dict(args=args)
+ local = locals()
+@@ -158,7 +163,7 @@ class FakePopen(Fixture):
+ "universal_newlines", "startupinfo", "creationflags",
+ "restore_signals", "start_new_session", "pass_fds", "group",
+ "extra_groups", "user", "umask", "encoding", "errors", "text",
+- "pipesize"]:
++ "pipesize", "process_group"]:
+ if local[param] is not FakePopen._unpassed:
+ proc_args[param] = local[param]
+ proc_info = self.get_info(proc_args)
+diff --git a/fixtures/tests/_fixtures/test_popen.py b/fixtures/tests/_fixtures/test_popen.py
+index c7bf1bd..e9ab074 100644
+--- a/fixtures/tests/_fixtures/test_popen.py
++++ b/fixtures/tests/_fixtures/test_popen.py
+@@ -74,6 +74,8 @@ class TestFakePopen(testtools.TestCase, TestWithFixtures):
+ all_args["umask"] = "umask"
+ if sys.version_info >= (3, 10):
+ all_args["pipesize"] = "pipesize"
++ if sys.version_info >= (3, 11):
++ all_args["process_group"] = "process_group"
+
+ def get_info(proc_args):
+ self.assertEqual(all_args, proc_args)
+@@ -110,6 +112,15 @@ class TestFakePopen(testtools.TestCase, TestWithFixtures):
+ r".* got an unexpected keyword argument 'pipesize'"):
+ fixture(args="args", pipesize=1024)
+
++ @testtools.skipUnless(
++ sys.version_info < (3, 11), "only relevant on Python <3.11")
++ def test_rejects_3_11_args_on_older_versions(self):
++ fixture = self.useFixture(FakePopen(lambda proc_args: {}))
++ with testtools.ExpectedException(
++ TypeError,
++ r".* got an unexpected keyword argument 'process_group'"):
++ fixture(args="args", process_group=42)
++
+ def test_function_signature(self):
+ fake_signature = inspect.getfullargspec(FakePopen.__call__)
+ real_signature = inspect.getfullargspec(subprocess.Popen)
+@@ -130,6 +141,9 @@ class TestFakePopen(testtools.TestCase, TestWithFixtures):
+ fake_kwargs = set(fake_signature.kwonlyargs)
+ real_kwargs = set(real_signature.kwonlyargs)
+
++ if sys.version_info < (3, 11):
++ fake_kwargs.remove('process_group')
++
+ if sys.version_info < (3, 10):
+ fake_kwargs.remove('pipesize')
+
+--
+2.35.1
+
diff --git a/dev-python/fixtures/fixtures-4.0.0.ebuild b/dev-python/fixtures/fixtures-4.0.0.ebuild
index ff615708e0bb..70bd41822450 100644
--- a/dev-python/fixtures/fixtures-4.0.0.ebuild
+++ b/dev-python/fixtures/fixtures-4.0.0.ebuild
@@ -33,4 +33,5 @@ distutils_enable_tests unittest
PATCHES=(
"${FILESDIR}"/${P}-pypy39.patch
+ "${FILESDIR}"/${P}-py311.patch
)
diff --git a/dev-python/netaddr/netaddr-0.8.0-r1.ebuild b/dev-python/netaddr/netaddr-0.8.0-r1.ebuild
new file mode 100644
index 000000000000..20d496c11315
--- /dev/null
+++ b/dev-python/netaddr/netaddr-0.8.0-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+
+inherit distutils-r1 optfeature
+
+DESCRIPTION="Network address representation and manipulation library"
+HOMEPAGE="
+ https://github.com/netaddr/netaddr/
+ https://pypi.org/project/netaddr/
+ https://netaddr.readthedocs.io/
+"
+SRC_URI="
+ https://github.com/netaddr/netaddr/archive/${PV}.tar.gz
+ -> ${P}.tar.gz
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
+
+distutils_enable_sphinx docs/source
+distutils_enable_tests pytest
+
+src_prepare() {
+ # Disable coverage (requires additional plugins)
+ sed -i 's/^addopts = .*//' pytest.ini || die
+ distutils-r1_src_prepare
+}
+
+pkg_postinst() {
+ optfeature "CLI support" dev-python/ipython
+}
diff --git a/dev-python/oslo-i18n/oslo-i18n-5.1.0-r1.ebuild b/dev-python/oslo-i18n/oslo-i18n-5.1.0-r1.ebuild
new file mode 100644
index 000000000000..75939671bdb2
--- /dev/null
+++ b/dev-python/oslo-i18n/oslo-i18n-5.1.0-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+
+inherit distutils-r1
+
+MY_PN=${PN/-/.}
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Oslo i18n library"
+HOMEPAGE="
+ https://opendev.org/openstack/oslo.i18n/
+ https://github.com/openstack/oslo.i18n/
+ https://pypi.org/project/oslo.i18n/
+"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+RDEPEND="
+ >=dev-python/pbr-2.0.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ ${RDEPEND}
+ test? (
+ >=dev-python/oslotest-3.2.0[${PYTHON_USEDEP}]
+ >=dev-python/testscenarios-0.4[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests unittest
diff --git a/dev-python/oslotest/oslotest-4.5.0-r1.ebuild b/dev-python/oslotest/oslotest-4.5.0-r1.ebuild
index 2e44be8573db..674b1ca5a9f2 100644
--- a/dev-python/oslotest/oslotest-4.5.0-r1.ebuild
+++ b/dev-python/oslotest/oslotest-4.5.0-r1.ebuild
@@ -9,7 +9,11 @@ PYTHON_COMPAT=( python3_{7,8,9,10} )
inherit distutils-r1
DESCRIPTION="Oslo test framework"
-HOMEPAGE="https://launchpad.net/oslo"
+HOMEPAGE="
+ https://opendev.org/openstack/oslotest/
+ https://github.com/openstack/oslotest/
+ https://pypi.org/project/oslotest/
+"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
@@ -21,7 +25,6 @@ BDEPEND="
"
RDEPEND="
>=dev-python/fixtures-3.0.0[${PYTHON_USEDEP}]
- >=dev-python/subunit-1.0.0[${PYTHON_USEDEP}]
>=dev-python/six-1.10.0[${PYTHON_USEDEP}]
>=dev-python/testtools-2.2.0[${PYTHON_USEDEP}]
"
diff --git a/dev-python/prettytable/prettytable-3.3.0.ebuild b/dev-python/prettytable/prettytable-3.3.0.ebuild
index 661f345b1982..2feec3be1dba 100644
--- a/dev-python/prettytable/prettytable-3.3.0.ebuild
+++ b/dev-python/prettytable/prettytable-3.3.0.ebuild
@@ -11,7 +11,8 @@ inherit distutils-r1
DESCRIPTION="Easily displaying tabular data in a visually appealing ASCII table format"
HOMEPAGE="
https://github.com/jazzband/prettytable/
- https://pypi.org/project/prettytable/"
+ https://pypi.org/project/prettytable/
+"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
@@ -26,6 +27,7 @@ BDEPEND="
test? (
$(python_gen_impl_dep sqlite)
dev-python/pytest-lazy-fixture[${PYTHON_USEDEP}]
- )"
+ )
+"
distutils_enable_tests pytest
diff --git a/dev-python/pyperclip/pyperclip-1.8.2-r1.ebuild b/dev-python/pyperclip/pyperclip-1.8.2-r1.ebuild
new file mode 100644
index 000000000000..fd730de0a710
--- /dev/null
+++ b/dev-python/pyperclip/pyperclip-1.8.2-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+
+inherit distutils-r1 virtualx
+
+DESCRIPTION="A cross-platform clipboard module for Python"
+HOMEPAGE="
+ https://github.com/asweigart/pyperclip/
+ https://pypi.org/project/pyperclip/
+"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+RDEPEND="
+ || (
+ x11-misc/xsel
+ x11-misc/xclip
+ kde-plasma/plasma-workspace
+ dev-python/PyQt5[${PYTHON_USEDEP}]
+ dev-python/QtPy[${PYTHON_USEDEP}]
+ )
+"
+# test at least one backend
+BDEPEND="
+ test? (
+ ${RDEPEND}
+ )
+"
+
+src_prepare() {
+ # stupid windows
+ find -type f -exec sed -i -e 's:\r$::' {} + || die
+ # klipper is hard to get working, and once we make it work,
+ # it breaks most of the other backends
+ # wl-copy requires wayland, not Xvfb
+ sed -e 's:_executable_exists("\(klipper\|wl-copy\)"):False:' \
+ -i tests/test_pyperclip.py || die
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ "${EPYTHON}" tests/test_pyperclip.py -vv ||
+ die "Tests fail on ${EPYTHON}"
+}
+
+src_test() {
+ virtx distutils-r1_src_test
+}
diff --git a/dev-python/stevedore/stevedore-3.4.0-r1.ebuild b/dev-python/stevedore/stevedore-3.4.0-r1.ebuild
new file mode 100644
index 000000000000..3073dfda56cf
--- /dev/null
+++ b/dev-python/stevedore/stevedore-3.4.0-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+
+inherit distutils-r1
+
+DESCRIPTION="Manage dynamic plugins for Python applications"
+HOMEPAGE="
+ https://opendev.org/openstack/stevedore/
+ https://github.com/openstack/stevedore/
+ https://pypi.org/project/stevedore/
+"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc64 ~s390 ~sparc ~x86"
+
+RDEPEND="
+ >=dev-python/six-1.10.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ >=dev-python/pbr-2.0.0[${PYTHON_USEDEP}]
+ test? (
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/testtools[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests unittest
+distutils_enable_sphinx 'doc/source' \
+ '>=dev-python/openstackdocstheme-1.18.1' \
+ '>=dev-python/reno-2.5.0' \
+ '>=dev-python/sphinx-2.0.0'
+
+python_prepare_all() {
+ # Delete spurious data in requirements.txt
+ sed -e '/^pbr/d' -i requirements.txt || die
+
+ # Known bug in tests
+ # https://bugs.launchpad.net/python-stevedore/+bug/1966040
+ sed -i -e 's:test_extras:_&:' stevedore/tests/test_extension.py || die
+
+ # Also known problem, inside venv
+ sed -i -e 's:test_disable_caching_file:_&:' \
+ stevedore/tests/test_cache.py || die
+
+ distutils-r1_python_prepare_all
+}
diff --git a/dev-python/stevedore/stevedore-3.4.0.ebuild b/dev-python/stevedore/stevedore-3.4.0.ebuild
index 3de9805236f7..36f346d0ee71 100644
--- a/dev-python/stevedore/stevedore-3.4.0.ebuild
+++ b/dev-python/stevedore/stevedore-3.4.0.ebuild
@@ -34,5 +34,10 @@ distutils_enable_sphinx 'doc/source' \
python_prepare_all() {
# Delete spurious data in requirements.txt
sed -e '/^pbr/d' -i requirements.txt || die
+
+ # Known bug in tests
+ # https://bugs.launchpad.net/python-stevedore/+bug/1966040
+ sed -i -e 's:test_extras:_&:' stevedore/tests/test_extension.py || die
+
distutils-r1_python_prepare_all
}
diff --git a/dev-python/testresources/testresources-2.0.1-r1.ebuild b/dev-python/testresources/testresources-2.0.1-r1.ebuild
new file mode 100644
index 000000000000..9e1922d33045
--- /dev/null
+++ b/dev-python/testresources/testresources-2.0.1-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{7,8,9,10} pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="A pyunit extension for managing expensive test resources"
+HOMEPAGE="
+ https://launchpad.net/testresources/
+ https://github.com/testing-cabal/testresources/
+ https://pypi.org/project/testresources/
+"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+BDEPEND="
+ dev-python/pbr[${PYTHON_USEDEP}]
+ test? (
+ dev-python/testtools[${PYTHON_USEDEP}]
+ dev-python/fixtures[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests unittest
+
+python_prepare_all() {
+# sed \
+# -e 's:testBasicSortTests:_&:g' \
+# -i testresources/tests/test_optimising_test_suite.py || die
+ distutils-r1_python_prepare_all
+}
diff --git a/dev-python/testscenarios/testscenarios-0.5.0-r2.ebuild b/dev-python/testscenarios/testscenarios-0.5.0-r2.ebuild
new file mode 100644
index 000000000000..ff17505cdc95
--- /dev/null
+++ b/dev-python/testscenarios/testscenarios-0.5.0-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{7,8,9,10} pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="A pyunit extension for dependency injection"
+HOMEPAGE="
+ https://launchpad.net/testscenarios/
+ https://github.com/testing-cabal/testscenarios/
+ https://pypi.org/project/testscenarios/
+"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+
+RDEPEND="
+ dev-python/testtools[${PYTHON_USEDEP}]
+"
+
+# using pytest for tests since unittest loader fails with py3.5+
+BDEPEND="
+ >=dev-python/pbr-0.11[${PYTHON_USEDEP}]
+"
+
+distutils_enable_tests pytest
+
+EPYTEST_DESELECT=(
+ testscenarios/tests/test_testcase.py
+)
diff --git a/dev-python/testtools/files/testtools-2.5.0-py311.patch b/dev-python/testtools/files/testtools-2.5.0-py311.patch
new file mode 100644
index 000000000000..ee457f6119c3
--- /dev/null
+++ b/dev-python/testtools/files/testtools-2.5.0-py311.patch
@@ -0,0 +1,116 @@
+From 77953cf633ecd149b2c29e616f8d9d4e0cf8e5fa Mon Sep 17 00:00:00 2001
+From: Colin Watson <cjwatson@canonical.com>
+Date: Sat, 23 Apr 2022 22:53:48 +0100
+Subject: [PATCH] Fix various test failures with Python 3.11
+
+The changes for https://peps.python.org/pep-0657/ require a number of
+changes in our tests.
+
+Some tests still fail due to
+https://twistedmatrix.com/trac/ticket/10336, so I'm not adding
+3.11 to the test matrix yet.
+
+Fixes #325.
+---
+ testtools/tests/test_run.py | 4 ++--
+ testtools/tests/test_testresult.py | 23 +++++++++++++----------
+ testtools/tests/test_testsuite.py | 2 +-
+ 3 files changed, 16 insertions(+), 13 deletions(-)
+
+diff --git a/testtools/tests/test_run.py b/testtools/tests/test_run.py
+index ee96eec9..9808421b 100644
+--- a/testtools/tests/test_run.py
++++ b/testtools/tests/test_run.py
+@@ -202,9 +202,9 @@ def test_run_list_failed_import(self):
+ Failed to import test module: runexample
+ Traceback (most recent call last):
+ File ".../loader.py", line ..., in _find_test_path
+- package = self._get_module_from_name(name)
++ package = self._get_module_from_name(name)...
+ File ".../loader.py", line ..., in _get_module_from_name
+- __import__(name)
++ __import__(name)...
+ File ".../runexample/__init__.py", line 1
+ class not in
+ ...^...
+diff --git a/testtools/tests/test_testresult.py b/testtools/tests/test_testresult.py
+index 4fbf15d1..7824ff46 100644
+--- a/testtools/tests/test_testresult.py
++++ b/testtools/tests/test_testresult.py
+@@ -1266,11 +1266,11 @@ def test_traceback_formatting_without_stack_hidden(self):
+ DocTestMatches(
+ 'Traceback (most recent call last):\n'
+ ' File "...testtools...runtest.py", line ..., in _run_user\n'
+- ' return fn(*args, **kwargs)\n'
++ ' return fn(*args, **kwargs)\n...'
+ ' File "...testtools...testcase.py", line ..., in _run_test_method\n'
+- ' return self._get_test_method()()\n'
++ ' return self._get_test_method()()\n...'
+ ' File "...testtools...tests...test_testresult.py", line ..., in error\n'
+- ' 1/0\n'
++ ' 1/0\n...'
+ 'ZeroDivisionError: ...\n',
+ doctest.ELLIPSIS | doctest.REPORT_UDIFF))
+
+@@ -1283,7 +1283,7 @@ def test_traceback_formatting_with_stack_hidden(self):
+ DocTestMatches(
+ 'Traceback (most recent call last):\n'
+ ' File "...testtools...tests...test_testresult.py", line ..., in error\n'
+- ' 1/0\n'
++ ' 1/0\n...'
+ 'ZeroDivisionError: ...\n',
+ doctest.ELLIPSIS))
+
+@@ -1322,17 +1322,17 @@ def test_traceback_with_locals(self):
+ DocTestMatches(
+ 'Traceback (most recent call last):\n'
+ ' File "...testtools...runtest.py", line ..., in _run_user\n'
+- ' return fn(*args, **kwargs)\n'
++ ' return fn(*args, **kwargs)\n...'
+ ' args = ...\n'
+ ' fn = ...\n'
+ ' kwargs = ...\n'
+ ' self = ...\n'
+ ' File "...testtools...testcase.py", line ..., in _run_test_method\n'
+- ' return self._get_test_method()()\n'
++ ' return self._get_test_method()()\n...'
+ ' result = ...\n'
+ ' self = ...\n'
+ ' File "...testtools...tests...test_testresult.py", line ..., in error\n'
+- ' 1/0\n'
++ ' 1/0\n...'
+ ' a = 1\n'
+ ' self = ...\n'
+ 'ZeroDivisionError: ...\n',
+@@ -2645,12 +2645,15 @@ def test_unprintable_exception(self):
+ " raise RuntimeError\n"
+ " def __repr__(self):\n"
+ " raise RuntimeError\n")
++ if sys.version_info >= (3, 11):
++ expected = "UnprintableError: <exception str() failed>\n"
++ else:
++ expected = (
++ "UnprintableError: <unprintable UnprintableError object>\n")
+ textoutput = self._test_external_case(
+ modulelevel=exception_class,
+ testline="raise UnprintableError")
+- self.assertIn(self._as_output(
+- "UnprintableError: <unprintable UnprintableError object>\n"),
+- textoutput)
++ self.assertIn(self._as_output(expected), textoutput)
+
+ def test_non_ascii_dirname(self):
+ """Script paths in the traceback can be non-ascii"""
+diff --git a/testtools/tests/test_testsuite.py b/testtools/tests/test_testsuite.py
+index 65cb88d7..01abb23c 100644
+--- a/testtools/tests/test_testsuite.py
++++ b/testtools/tests/test_testsuite.py
+@@ -178,7 +178,7 @@ def run(self):
+ "Traceback (most recent call last):\n")
+ self.assertThat(events[2][6].decode('utf8'), DocTestMatches("""\
+ File "...testtools/testsuite.py", line ..., in _run_test
+- test.run(process_result)
++ test.run(process_result)...
+ """, doctest.ELLIPSIS))
+ self.assertThat(events[3][6].decode('utf8'), DocTestMatches("""\
+ TypeError: ...run() takes ...1 ...argument...2...given...
diff --git a/dev-python/testtools/testtools-2.5.0-r1.ebuild b/dev-python/testtools/testtools-2.5.0-r1.ebuild
new file mode 100644
index 000000000000..4bc81c3427b4
--- /dev/null
+++ b/dev-python/testtools/testtools-2.5.0-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{7,8,9,10} pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="Extensions to the Python standard library unit testing framework"
+HOMEPAGE="
+ https://github.com/testing-cabal/testtools/
+ https://pypi.org/project/testtools/
+"
+SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-python/extras-1.0.0[${PYTHON_USEDEP}]
+ dev-python/python-mimeparse[${PYTHON_USEDEP}]
+ >=dev-python/pbr-0.11[${PYTHON_USEDEP}]
+ dev-python/pyrsistent[${PYTHON_USEDEP}]
+ >=dev-python/six-1.4.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ >=dev-python/fixtures-1.3.0[${PYTHON_USEDEP}]
+ dev-python/testscenarios[${PYTHON_USEDEP}]
+ )
+"
+PDEPEND="
+ >=dev-python/fixtures-1.3.0[${PYTHON_USEDEP}]
+"
+
+distutils_enable_sphinx doc
+
+PATCHES=(
+ # https://github.com/testing-cabal/testtools/pull/328
+ "${FILESDIR}"/${P}-py311.patch
+)
+
+src_prepare() {
+ # very fragile to formatting changes (broken on py3.10 & pypy3)
+ sed -i -e 's:test_syntax_error(:_&:' \
+ testtools/tests/test_testresult.py || die
+
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ "${PYTHON}" -m testtools.run testtools.tests.test_suite ||
+ die "tests failed under ${EPYTHON}"
+}