summaryrefslogtreecommitdiff
path: root/dev-python/pyflakes
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2023-07-05 06:20:40 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2023-07-05 06:20:40 +0000
commit1aab753a13e3cdead389c03b6b12019cd6d4d0ff (patch)
tree433e2ea4a2749de07b1dc6f21e8a586f80412e9f /dev-python/pyflakes
parente21661b928fac18fec2f9c35cadd4fa80a6dd554 (diff)
downloadbaldeagleos-repo-1aab753a13e3cdead389c03b6b12019cd6d4d0ff.tar.gz
baldeagleos-repo-1aab753a13e3cdead389c03b6b12019cd6d4d0ff.tar.xz
baldeagleos-repo-1aab753a13e3cdead389c03b6b12019cd6d4d0ff.zip
Adding metadata
Diffstat (limited to 'dev-python/pyflakes')
-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
2 files changed, 63 insertions, 0 deletions
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..b7fe10487d2f
--- /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_{7,8,9,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