diff options
author | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2021-06-23 15:14:05 +0200 |
---|---|---|
committer | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2021-06-23 15:19:17 +0200 |
commit | c1e4dab588c8140daf2ea43d2b7f998bb1171943 (patch) | |
tree | c2915050bd138402aa14e54606b41138d506564c /dev-python/traitlets | |
parent | x11-wm/herbstluftwm: enable tests (diff) | |
download | gentoo-c1e4dab588c8140daf2ea43d2b7f998bb1171943.tar.gz gentoo-c1e4dab588c8140daf2ea43d2b7f998bb1171943.tar.bz2 gentoo-c1e4dab588c8140daf2ea43d2b7f998bb1171943.zip |
dev-python/traitlets: enable py3.10
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'dev-python/traitlets')
-rw-r--r-- | dev-python/traitlets/files/traitlets-5.0.5-python3_10.patch | 33 | ||||
-rw-r--r-- | dev-python/traitlets/traitlets-5.0.5.ebuild | 9 |
2 files changed, 40 insertions, 2 deletions
diff --git a/dev-python/traitlets/files/traitlets-5.0.5-python3_10.patch b/dev-python/traitlets/files/traitlets-5.0.5-python3_10.patch new file mode 100644 index 000000000000..53ade693a3ad --- /dev/null +++ b/dev-python/traitlets/files/traitlets-5.0.5-python3_10.patch @@ -0,0 +1,33 @@ +From dbb604946745ed90c6e9f6ed17f2bde253042d52 Mon Sep 17 00:00:00 2001 +From: Olga <olgamatoula@gmail.com> +Date: Fri, 7 May 2021 17:27:09 +0100 +Subject: [PATCH] Fix string assertion for python3.10 + +--- + traitlets/tests/test_traitlets_enum.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/traitlets/tests/test_traitlets_enum.py b/traitlets/tests/test_traitlets_enum.py +index 769e830b..a87dd705 100644 +--- a/traitlets/tests/test_traitlets_enum.py ++++ b/traitlets/tests/test_traitlets_enum.py +@@ -5,6 +5,7 @@ + + import unittest + import enum ++import sys + from traitlets import HasTraits, TraitError, Enum, UseEnum, CaselessStrEnum, FuzzyEnum + + +@@ -87,7 +88,10 @@ def test_assign_scoped_enum_value_name(self): + example = self.Example() + example.color = value + self.assertIsInstance(example.color, Color) +- self.assertEqual(str(example.color), value) ++ if sys.version_info < (3, 10): ++ self.assertEqual(str(example.color), value) ++ else: ++ self.assertEqual(repr(example.color), value) + + def test_assign_bad_enum_value_name__raises_error(self): + # -- CONVERT: string => Enum value (item) diff --git a/dev-python/traitlets/traitlets-5.0.5.ebuild b/dev-python/traitlets/traitlets-5.0.5.ebuild index 75a741049c58..d1bd74f7d5f2 100644 --- a/dev-python/traitlets/traitlets-5.0.5.ebuild +++ b/dev-python/traitlets/traitlets-5.0.5.ebuild @@ -3,7 +3,8 @@ EAPI=7 -PYTHON_COMPAT=( python3_{7..9} ) +PYTHON_COMPAT=( python3_{7..10} ) +DISTUTILS_USE_SETUPTOOLS=no inherit distutils-r1 @@ -17,7 +18,11 @@ KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 ~sparc x86" RDEPEND=" dev-python/ipython_genutils[${PYTHON_USEDEP}] - " +" + +PATCHES=( + "${FILESDIR}/${P}-python3_10.patch" +) distutils_enable_sphinx docs/source \ dev-python/ipython_genutils \ |