diff options
author | Jinqiang Zhang <peeweep@0x0.ee> | 2022-08-21 03:36:17 +0000 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2022-08-21 21:41:27 +0300 |
commit | 42fab65962f76b527744488210678ea4bda7b468 (patch) | |
tree | 3bbdd25f0acfb32fb6a7de041a1521168431cd2b /dev-python/autopep8 | |
parent | dev-util/codespell: add 2.2.1 (diff) | |
download | gentoo-42fab65962f76b527744488210678ea4bda7b468.tar.gz gentoo-42fab65962f76b527744488210678ea4bda7b468.tar.bz2 gentoo-42fab65962f76b527744488210678ea4bda7b468.zip |
dev-python/autopep8: enable py3.11
This is part of https://github.com/gentoo/gentoo/pull/26805
Add python 3.11 target to autopep8, and add patch to pass the test cases.
I update the latest version autopep8-1.7.0.
dev-python/python-lsp-server depend on the autopep8 >=1.6.0 and <1.7.0, so I also update the autopep8-1.6.0.
Signed-off-by: Jinqiang Zhang <peeweep@0x0.ee>
Closes: https://github.com/gentoo/gentoo/pull/26891
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-python/autopep8')
-rw-r--r-- | dev-python/autopep8/autopep8-1.6.0.ebuild | 8 | ||||
-rw-r--r-- | dev-python/autopep8/autopep8-1.7.0.ebuild | 6 | ||||
-rw-r--r-- | dev-python/autopep8/files/autopep8-1.6.0-lib2to3-deprecation-pytest.patch | 28 |
3 files changed, 39 insertions, 3 deletions
diff --git a/dev-python/autopep8/autopep8-1.6.0.ebuild b/dev-python/autopep8/autopep8-1.6.0.ebuild index 2c892ed26d7e..ebe36cfed891 100644 --- a/dev-python/autopep8/autopep8-1.6.0.ebuild +++ b/dev-python/autopep8/autopep8-1.6.0.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{8..10} pypy3 ) +PYTHON_COMPAT=( python3_{8..11} pypy3 ) PYTHON_REQ_USE="threads(+)" inherit distutils-r1 @@ -26,3 +26,7 @@ RDEPEND=" dev-python/toml[${PYTHON_USEDEP}]" distutils_enable_tests unittest + +PATCHES=( + "${FILESDIR}"/autopep8-1.6.0-lib2to3-deprecation-pytest.patch +) diff --git a/dev-python/autopep8/autopep8-1.7.0.ebuild b/dev-python/autopep8/autopep8-1.7.0.ebuild index 6ddc994a7a0e..8a4cf8b6e538 100644 --- a/dev-python/autopep8/autopep8-1.7.0.ebuild +++ b/dev-python/autopep8/autopep8-1.7.0.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{8..10} pypy3 ) +PYTHON_COMPAT=( python3_{8..11} pypy3 ) PYTHON_REQ_USE="threads(+)" inherit distutils-r1 @@ -31,3 +31,7 @@ EPYTEST_DESELECT=( # test require in source build test/test_autopep8.py::SystemTests::test_e101_skip_innocuous ) + +PATCHES=( + "${FILESDIR}"/autopep8-1.6.0-lib2to3-deprecation-pytest.patch +) diff --git a/dev-python/autopep8/files/autopep8-1.6.0-lib2to3-deprecation-pytest.patch b/dev-python/autopep8/files/autopep8-1.6.0-lib2to3-deprecation-pytest.patch new file mode 100644 index 000000000000..9aadf2758c0c --- /dev/null +++ b/dev-python/autopep8/files/autopep8-1.6.0-lib2to3-deprecation-pytest.patch @@ -0,0 +1,28 @@ +--- a/test/test_autopep8.py 2022-07-01 16:53:14.197393816 +0300 ++++ b/test/test_autopep8.py 2022-07-01 17:26:07.740358186 +0300 +@@ -5729,7 +5729,11 @@ + list(AUTOPEP8_CMD_TUPLE) + [filename, '--in-place'], + stderr=PIPE, + ) +- _, err = p.communicate() ++ _, error = p.communicate() ++ if b'DeprecationWarning: lib2to3 package is deprecated' in error: ++ err = bytes() ++ else: ++ err = error + self.assertEqual(err, b'') + self.assertEqual(p.returncode, autopep8.EXIT_CODE_OK) + +@@ -5741,7 +5745,11 @@ + list(AUTOPEP8_CMD_TUPLE) + [filename, '--in-place'], + stderr=PIPE, + ) +- _, err = p.communicate() ++ _, error = p.communicate() ++ if b'DeprecationWarning: lib2to3 package is deprecated' in error: ++ err = bytes() ++ else: ++ err = error + self.assertEqual(err, b'') + self.assertEqual(p.returncode, autopep8.EXIT_CODE_OK) + |