diff --git a/dev-python/trio/files/trio-0.20.0-py311.patch b/dev-python/trio/files/trio-0.20.0-py311.patch new file mode 100644 index 0000000000000..f7d447825a16d --- /dev/null +++ b/dev-python/trio/files/trio-0.20.0-py311.patch @@ -0,0 +1,26 @@ +diff --git a/trio/_core/_multierror.py b/trio/_core/_multierror.py +index 6dfdaa7a5..de0d56d46 100644 +--- a/trio/_core/_multierror.py ++++ b/trio/_core/_multierror.py +@@ -383,11 +383,10 @@ def traceback_exception_init( + capture_locals=False, + compact=False, + _seen=None, ++ **kwargs, + ): + if sys.version_info >= (3, 10): +- kwargs = {"compact": compact} +- else: +- kwargs = {} ++ kwargs["compact"] = compact + + # Capture the original exception and its cause and context as TracebackExceptions + traceback_exception_original_init( +@@ -421,6 +420,7 @@ def traceback_exception_init( + # copy the set of _seen exceptions so that duplicates + # shared between sub-exceptions are not omitted + _seen=None if seen_was_none else set(_seen), ++ **kwargs, + ) + ) + self.embedded = embedded diff --git a/dev-python/trio/trio-0.20.0.ebuild b/dev-python/trio/trio-0.20.0.ebuild index 721a7b11a297c..10ace0d680905 100644 --- a/dev-python/trio/trio-0.20.0.ebuild +++ b/dev-python/trio/trio-0.20.0.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( pypy3 python3_{8..10} ) +PYTHON_COMPAT=( pypy3 python3_{8..11} ) DISTUTILS_USE_PEP517=setuptools inherit distutils-r1 @@ -38,19 +38,8 @@ BDEPEND=" ) " -EPYTEST_DESELECT=( - # Times out on slower arches (ia64 in this case) - # https://github.com/python-trio/trio/issues/1753 - trio/tests/test_unix_pipes.py::test_close_at_bad_time_for_send_all - - # incompatible ipython version? - trio/_core/tests/test_multierror.py::test_ipython_exc_handler -) - -EPYTEST_IGNORE=( - # these tests require internet access - trio/tests/test_ssl.py - trio/tests/test_highlevel_ssl_helpers.py +PATCHES=( + "${FILESDIR}/${P}-py311.patch" ) distutils_enable_tests pytest @@ -61,6 +50,26 @@ distutils_enable_sphinx docs/source \ dev-python/towncrier python_test() { + local EPYTEST_IGNORE=( + # these tests require internet access + trio/tests/test_ssl.py + trio/tests/test_highlevel_ssl_helpers.py + ) + + local EPYTEST_DESELECT=( + # Times out on slower arches (ia64 in this case) + # https://github.com/python-trio/trio/issues/1753 + trio/tests/test_unix_pipes.py::test_close_at_bad_time_for_send_all + + # incompatible ipython version? + trio/_core/tests/test_multierror.py::test_ipython_exc_handler + ) + + [[ ${EPYTHON} == python3.11 ]] && EPYTEST_DESELECT+=( + # test for functionality that has been removed from py3.11 + trio/tests/test_util.py::test_coroutine_or_error + ) + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 epytest -m "not redistributors_should_skip" }