From: "Arthur Zamarin" <arthurzam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/autopep8/files/, dev-python/autopep8/
Date: Sun, 21 Aug 2022 18:52:47 +0000 (UTC) [thread overview]
Message-ID: <1661107287.42fab65962f76b527744488210678ea4bda7b468.arthurzam@gentoo> (raw)
commit: 42fab65962f76b527744488210678ea4bda7b468
Author: Jinqiang Zhang <peeweep <AT> 0x0 <DOT> ee>
AuthorDate: Sun Aug 21 03:36:17 2022 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sun Aug 21 18:41:27 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42fab659
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 <AT> 0x0.ee>
Closes: https://github.com/gentoo/gentoo/pull/26891
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
dev-python/autopep8/autopep8-1.6.0.ebuild | 8 +++++--
dev-python/autopep8/autopep8-1.7.0.ebuild | 6 ++++-
...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)
+
next reply other threads:[~2022-08-21 18:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-21 18:52 Arthur Zamarin [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-02-16 20:32 [gentoo-commits] repo/gentoo:master commit in: dev-python/autopep8/files/, dev-python/autopep8/ Michał Górny
2022-11-29 8:48 Michał Górny
2022-10-14 11:40 Michał Górny
2017-05-27 15:36 David Seifert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1661107287.42fab65962f76b527744488210678ea4bda7b468.arthurzam@gentoo \
--to=arthurzam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox