From cc63aaba87ed789e8155d0eb1f3f9f2b5a77b67f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 15 Jul 2025 07:23:30 +0200 Subject: python-utils-r1.eclass: Preserve order in PYTEST_PLUGINS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do not sort entry points when adding them to `PYTEST_PLUGINS`. Apparently, the order of loading does matter, and reordering the entry points from `dev-python/pytest-xdist` leads to warnings that break the test suite of `dev-python/inline-snapshot`. Signed-off-by: Michał Górny Part-of: https://github.com/gentoo/gentoo/pull/43007 Signed-off-by: Michał Górny --- eclass/python-utils-r1.eclass | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'eclass/python-utils-r1.eclass') diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 68faa9e2adf9..9cdfdc87019f 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1458,11 +1458,13 @@ epytest() { from importlib.metadata import distribution, entry_points packages = {distribution(x).name for x in sys.argv[1:]} - plugins = { + # In packages defining multiple entry points, we must + # list them in the same order! + plugins = ( x.value for x in entry_points(group="pytest11") if x.dist.name in packages - } - sys.stdout.write(",".join(sorted(plugins))) + ) + sys.stdout.write(",".join(plugins)) EOF ) else -- cgit v1.2.3