commit: a4070a13d3701c0688edde718c186b6c2f8750b0 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> AuthorDate: Thu Sep 23 16:40:47 2021 +0000 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> CommitDate: Thu Sep 23 16:44:15 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4070a13
dev-python/pytest-ordering: enable py3.10, fix for >=pytest-6 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> .../files/pytest-ordering-0.6-fix-pytest-6.patch | 21 +++++++++++++++++++++ .../pytest-ordering/pytest-ordering-0.6.ebuild | 8 ++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/dev-python/pytest-ordering/files/pytest-ordering-0.6-fix-pytest-6.patch b/dev-python/pytest-ordering/files/pytest-ordering-0.6-fix-pytest-6.patch new file mode 100644 index 00000000000..3a3ea15f4b8 --- /dev/null +++ b/dev-python/pytest-ordering/files/pytest-ordering-0.6-fix-pytest-6.patch @@ -0,0 +1,21 @@ +From 9bfb05700386254afabb38f762e0ea860b567209 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <[email protected]> +Date: Tue, 26 Jan 2021 20:42:14 +0100 +Subject: [PATCH] Don't use accidental pytest API, fix tests for pytest 6.2+ + +https://github.com/ftobia/pytest-ordering/pull/76 + +--- a/tests/test_ordering.py ++++ b/tests/test_ordering.py +@@ -12,9 +12,9 @@ def item_names_for(testdir): + def _item_names_for(tests_content): + # some strange code to extract sorted items + items = testdir.getitems(tests_content) +- hook = testdir.config.hook ++ hook = items[0].config.hook + hook.pytest_collection_modifyitems(session=items[0].session, +- config=testdir.config, items=items) ++ config=items[0].config, items=items) + return [item.name for item in items] + + return _item_names_for diff --git a/dev-python/pytest-ordering/pytest-ordering-0.6.ebuild b/dev-python/pytest-ordering/pytest-ordering-0.6.ebuild index 0bd6f7293be..25ef67eebc1 100644 --- a/dev-python/pytest-ordering/pytest-ordering-0.6.ebuild +++ b/dev-python/pytest-ordering/pytest-ordering-0.6.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_COMPAT=( python3_{8..10} ) inherit distutils-r1 @@ -18,7 +18,11 @@ LICENSE="MIT" SLOT="0" KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 sparc x86" -RDEPEND="<dev-python/pytest-6[${PYTHON_USEDEP}]" +RDEPEND="dev-python/pytest[${PYTHON_USEDEP}]" + +PATCHES=( + "${FILESDIR}/${P}-fix-pytest-6.patch" +) distutils_enable_tests --install pytest distutils_enable_sphinx docs/source
