summaryrefslogtreecommitdiff
path: root/dev-python/pyflakes
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-04 22:09:40 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-04 22:09:40 +0100
commitcfd874bb4cf6ed8fa9b0d38cc3a81b33a793ebc8 (patch)
treec36498bd25bbb26ccef7b7e8e9a20bc0b7b0b938 /dev-python/pyflakes
parenta4a6bfb13b5393e584d42ef735796caa2a87c831 (diff)
gentoo auto-resync : 04:07:2023 - 22:09:40
Diffstat (limited to 'dev-python/pyflakes')
-rw-r--r--dev-python/pyflakes/Manifest2
-rw-r--r--dev-python/pyflakes/files/pyflakes-3.0.1-python3.11.patch38
-rw-r--r--dev-python/pyflakes/pyflakes-3.0.1-r1.ebuild25
3 files changed, 65 insertions, 0 deletions
diff --git a/dev-python/pyflakes/Manifest b/dev-python/pyflakes/Manifest
index 1f21df77b761..2f77b6d71012 100644
--- a/dev-python/pyflakes/Manifest
+++ b/dev-python/pyflakes/Manifest
@@ -1,3 +1,5 @@
+AUX pyflakes-3.0.1-python3.11.patch 1531 BLAKE2B c68512c3bf6c1d3eebbaead6bf47274731de46c73a830b8ad48655a7fbf1f5420ce3a9f2d5638c459979d94d2ede38b3f07d00cfd2c4b25ce9d44b78ded33fb7 SHA512 d1ff78e686be4c4222ace7cf0af950f9926a3d2185fdb46f7294fce4779c062016c5a0a20ac2d025c329c24dc4a55482a1298565e4331240b8baab9bbc6c529b
DIST pyflakes-3.0.1.tar.gz 63554 BLAKE2B 992dc4c81204c9ae2fd44744452e76a11209552edaef930edb14b7ba4763720cd1c0c0cd148fa7edd474b33aa529d8ec28f7f35a2b02b707d58cf70243fc13a9 SHA512 10ffe2b92f3885d40578452423a93609f8546b2392997bdbc3f64ca0094516ce6b8449e5d3675bda5fdbc16190c89be23609559fc4cd4f1c97e6af032226d7b7
+EBUILD pyflakes-3.0.1-r1.ebuild 620 BLAKE2B b82e38a4db8a3c344d6d9b81577f572b5b2df518ec3a3d9d5b25bee74c6bfadb0793e79a0931085a5905142fdc9e4d14ae414c1e48d9e8c5d2fcffcd59dec690 SHA512 6531711e4c4df49f9bcff4898f166fbc6b76e13bdacad6c5b0632c1e10eb6f2c953cfb52641f6b114aaa853f4ac7bc322c0e0527fa993d7dd6c9ff6328fa77e4
EBUILD pyflakes-3.0.1.ebuild 561 BLAKE2B ee64e82d9a6bf6cb081e54290e49206fb08c608a144e1d4edebc11f60a15ff78939e05867bf7a9a134e4a3c716030224cde1938f5294b17d3e2a4b6711f6fa74 SHA512 d92be6b250b56ebeafc396eb18eaef2d4d065f3dda7a2d5d53f3c0125b52d6742232afe5f38bb3cc5ff67ebcd3b72c66eb200767085e5513dbd85297a0b25192
MISC metadata.xml 763 BLAKE2B e15bc4240e0cc54bd0d7ecca523bcc43c5ae6ebd4f195815f7b2c3494e0366f1cc6feadbc63fce82390ed414e8f52a7bdf15f5c56909ab39879814ff1b178558 SHA512 bb8e0b6f746c99e5185a8bca736f0af36068ae0de45d1bde9663f0e732770366ac20f2116ddd9d7a85239146cf5d7b8fbbfc5c225d7bca4650001f86468a0142
diff --git a/dev-python/pyflakes/files/pyflakes-3.0.1-python3.11.patch b/dev-python/pyflakes/files/pyflakes-3.0.1-python3.11.patch
new file mode 100644
index 000000000000..db804f42c775
--- /dev/null
+++ b/dev-python/pyflakes/files/pyflakes-3.0.1-python3.11.patch
@@ -0,0 +1,38 @@
+https://github.com/PyCQA/pyflakes/commit/836631f2f73d45baa4021453d89fc9fd6f52be58
+https://bugs.gentoo.org/909554
+
+From 836631f2f73d45baa4021453d89fc9fd6f52be58 Mon Sep 17 00:00:00 2001
+From: Anthony Sottile <asottile@umich.edu>
+Date: Mon, 12 Jun 2023 21:00:45 -0400
+Subject: [PATCH] fix error reporter and testsuite in 3.11.4+ (#775)
+
+--- a/pyflakes/reporter.py
++++ b/pyflakes/reporter.py
+@@ -56,8 +56,9 @@ def syntaxError(self, filename, msg, lineno, offset, text):
+ else:
+ line = text.splitlines()[-1]
+
++ # lineno might be None if the error was during tokenization
+ # lineno might be 0 if the error came from stdin
+- lineno = max(lineno, 1)
++ lineno = max(lineno or 0, 1)
+
+ if offset is not None:
+ # some versions of python emit an offset of -1 for certain encoding errors
+--- a/pyflakes/test/test_api.py
++++ b/pyflakes/test/test_api.py
+@@ -621,8 +621,12 @@ def test_misencodedFileUTF16(self):
+ x = "%s"
+ """ % SNOWMAN).encode('utf-16')
+ with self.makeTempFile(source) as sourcePath:
+- self.assertHasErrors(
+- sourcePath, [f"{sourcePath}: problem decoding source\n"])
++ if sys.version_info < (3, 11, 4):
++ expected = f"{sourcePath}: problem decoding source\n"
++ else:
++ expected = f"{sourcePath}:1: source code string cannot contain null bytes\n" # noqa: E501
++
++ self.assertHasErrors(sourcePath, [expected])
+
+ def test_checkRecursive(self):
+ """
diff --git a/dev-python/pyflakes/pyflakes-3.0.1-r1.ebuild b/dev-python/pyflakes/pyflakes-3.0.1-r1.ebuild
new file mode 100644
index 000000000000..cbe9dae91c15
--- /dev/null
+++ b/dev-python/pyflakes/pyflakes-3.0.1-r1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..11} pypy3 )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Passive checker for Python programs"
+HOMEPAGE="
+ https://github.com/PyCQA/pyflakes/
+ https://pypi.org/project/pyflakes/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-python3.11.patch
+)
+
+distutils_enable_tests unittest