commit:     36d111cc81a02e81181ed7a4081aa165ec83fbb1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 26 19:05:30 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Oct 26 19:06:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36d111cc

dev-python/black: Use pytest-forked to workaround fd leaks

Use pytest-forked to workaround fd leaks in blackd that cause the test
suite to fail and hang on systems with high nproc (i.e. our arm64
and sparc devboxes).

Bug: https://github.com/psf/black/issues/4504
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/black/black-24.10.0.ebuild | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dev-python/black/black-24.10.0.ebuild 
b/dev-python/black/black-24.10.0.ebuild
index 7972d233773c..daff56b55149 100644
--- a/dev-python/black/black-24.10.0.ebuild
+++ b/dev-python/black/black-24.10.0.ebuild
@@ -38,6 +38,7 @@ BDEPEND="
                dev-python/aiohttp-cors[${PYTHON_USEDEP}]
                dev-python/colorama[${PYTHON_USEDEP}]
                dev-python/parameterized[${PYTHON_USEDEP}]
+               dev-python/pytest-forked[${PYTHON_USEDEP}]
        )
 "
 
@@ -45,7 +46,9 @@ distutils_enable_tests pytest
 
 python_test() {
        local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
-       epytest
+       # pytest-forked to workaround fd leakage in blackd
+       # https://github.com/psf/black/issues/4504
+       epytest -p pytest_forked --forked
 }
 
 pkg_postinst() {

Reply via email to