diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-05-15 07:49:43 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-05-15 08:07:41 +0200 |
commit | 26feaf57c5a4ecc163efc2d036b9c6df1b48067b (patch) | |
tree | 347cc9375261fcfd845ac9859ae575614863e55d /dev-python/trio | |
parent | dev-util/pkgcheck: Keyword 0.10.10 sparc, #844223 (diff) | |
download | gentoo-26feaf57c5a4ecc163efc2d036b9c6df1b48067b.tar.gz gentoo-26feaf57c5a4ecc163efc2d036b9c6df1b48067b.tar.bz2 gentoo-26feaf57c5a4ecc163efc2d036b9c6df1b48067b.zip |
dev-python/trio: Enable py3.11
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/trio')
-rw-r--r-- | dev-python/trio/files/trio-0.20.0-py311.patch | 26 | ||||
-rw-r--r-- | dev-python/trio/trio-0.20.0.ebuild | 37 |
2 files changed, 49 insertions, 14 deletions
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 000000000000..f7d447825a16 --- /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 721a7b11a297..10ace0d68090 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" } |