From d934827bf44b7cfcf6711964418148fa60877668 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 25 Nov 2020 22:39:15 +0000 Subject: gentoo resync : 25.11.2020 --- dev-python/pyflakes/Manifest | 3 +- .../pyflakes/files/pyflakes-2.2.0-fix-tests.patch | 97 ++++++++++++++++++++++ dev-python/pyflakes/pyflakes-2.2.0.ebuild | 8 +- 3 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 dev-python/pyflakes/files/pyflakes-2.2.0-fix-tests.patch (limited to 'dev-python/pyflakes') diff --git a/dev-python/pyflakes/Manifest b/dev-python/pyflakes/Manifest index 013485b1a827..10bc6294d61b 100644 --- a/dev-python/pyflakes/Manifest +++ b/dev-python/pyflakes/Manifest @@ -1,3 +1,4 @@ +AUX pyflakes-2.2.0-fix-tests.patch 3826 BLAKE2B 6f4d213526b2a39642765b3b13665e8a17bcf39804e6787ed2627a77d3b068a8ac1d7951a207c83e1d76812ac77b889d6b4cbf0b1cc30cdd8c59f8ea886ef373 SHA512 47e1c624358edd34b3ddae023275a81ce529594689c3b67ec2c7b5acec84b9c9f426b9f79151a1ec3dc89b39335f11e03cb22db4f4c63399e876f887e3f3ecee DIST pyflakes-2.2.0.tar.gz 65307 BLAKE2B e48e0cb0497f90b6482c0fd08c182d766ab50755fe348352df510841f4ad43f7c1d6486753ce774603a3624f49c9b0165ad930bb1451ef30cf2e828d732e0652 SHA512 6a411efef261874c216b71bcb095412448a8cbeefdf7fa5577d4f4edd48a4a740a4433665e87e5dda2c08fd9ee3bfb7f134f56c7523e1303243edfa92b0ccb35 -EBUILD pyflakes-2.2.0.ebuild 627 BLAKE2B 0d662e047b103e6671f1979ce2d995b00cc36ca7f37caa6e2b50c1234c64c6f6fcc48a68546425f42123684e5ca6c108261ced6fb88e8a58a3af2f89a82cec9d SHA512 6611e6f369b1307f25ef4c14015bfeeb227833c4ec9c427012325f3adcdb9fb264eb202fe1a86857f765b5fb96fdb99e2ae52887b71cda9276df2b5c46c34e34 +EBUILD pyflakes-2.2.0.ebuild 748 BLAKE2B b280ee982aca6d146bd1aa77b1983394ec313f52270788abb6d9b39f294fa5863ee03d157e06f922ec8674a486e0b22795159831b974e2eabf209c81cd48bca7 SHA512 d994c33875d315f160fec768a171cb530750d94ea90e21fe81fc61dc3827ff2d800115f336ba12d34f51f6103384ed894bc6a050742e6c128924ff5c5e13194a MISC metadata.xml 762 BLAKE2B f31d372e281fb92fd01a1bb9e33afcffbb020fed4f82f8c549de08bd4b45619f914ccbad2f60e88f46cab9c3932003d7db353d79548f825a7e9add773b374cfc SHA512 d21377d6a2d76377928b0ca8db8d17673e9f188183141f8b4b980b9da90572ca68bee0e12a71bdb79339fe7dbec8a1e4b4aee344275280e4a61f08ffe9ff6996 diff --git a/dev-python/pyflakes/files/pyflakes-2.2.0-fix-tests.patch b/dev-python/pyflakes/files/pyflakes-2.2.0-fix-tests.patch new file mode 100644 index 000000000000..00b1130bf342 --- /dev/null +++ b/dev-python/pyflakes/files/pyflakes-2.2.0-fix-tests.patch @@ -0,0 +1,97 @@ +diff --git a/pyflakes/test/test_api.py b/pyflakes/test/test_api.py +index b579ac8..d379b3b 100644 +--- a/pyflakes/test/test_api.py ++++ b/pyflakes/test/test_api.py +@@ -515,8 +513,10 @@ def foo(bar=baz, bax): + """ + with self.makeTempFile(source) as sourcePath: + if ERROR_HAS_LAST_LINE: +- if PYPY and sys.version_info >= (3,): ++ if PYPY: + column = 7 ++ elif sys.version_info >= (3, 9): ++ column = 21 + elif sys.version_info >= (3, 8): + column = 9 + else: +@@ -543,8 +543,10 @@ foo(bar=baz, bax) + """ + with self.makeTempFile(source) as sourcePath: + if ERROR_HAS_LAST_LINE: +- if PYPY and sys.version_info >= (3,): ++ if PYPY: + column = 12 ++ elif sys.version_info >= (3, 9): ++ column = 17 + elif sys.version_info >= (3, 8): + column = 14 + else: +@@ -578,7 +580,9 @@ foo(bar=baz, bax) + else: + position_end = 1 + if PYPY: +- column = 6 ++ column = 5 ++ elif ver >= (3, 9): ++ column = 13 + else: + column = 7 + # Column has been "fixed" since 3.2.4 and 3.3.1 +@@ -717,13 +721,6 @@ class IntegrationTests(TestCase): + """ + Tests of the pyflakes script that actually spawn the script. + """ +- +- # https://bitbucket.org/pypy/pypy/issues/3069/pypy36-on-windows-incorrect-line-separator +- if PYPY and sys.version_info >= (3,) and WIN: +- LINESEP = '\n' +- else: +- LINESEP = os.linesep +- + def setUp(self): + self.tempdir = tempfile.mkdtemp() + self.tempfilepath = os.path.join(self.tempdir, 'temp') +@@ -784,7 +781,7 @@ class IntegrationTests(TestCase): + fd.write("import contraband\n".encode('ascii')) + d = self.runPyflakes([self.tempfilepath]) + expected = UnusedImport(self.tempfilepath, Node(1), 'contraband') +- self.assertEqual(d, ("%s%s" % (expected, self.LINESEP), '', 1)) ++ self.assertEqual(d, ("%s%s" % (expected, os.linesep), '', 1)) + + def test_errors_io(self): + """ +@@ -794,7 +791,7 @@ class IntegrationTests(TestCase): + """ + d = self.runPyflakes([self.tempfilepath]) + error_msg = '%s: No such file or directory%s' % (self.tempfilepath, +- self.LINESEP) ++ os.linesep) + self.assertEqual(d, ('', error_msg, 1)) + + def test_errors_syntax(self): +@@ -807,7 +804,7 @@ class IntegrationTests(TestCase): + fd.write("import".encode('ascii')) + d = self.runPyflakes([self.tempfilepath]) + error_msg = '{0}:1:{2}: invalid syntax{1}import{1} {3}^{1}'.format( +- self.tempfilepath, self.LINESEP, 6 if PYPY else 7, '' if PYPY else ' ') ++ self.tempfilepath, os.linesep, 6 if PYPY else 7, '' if PYPY else ' ') + self.assertEqual(d, ('', error_msg, 1)) + + def test_readFromStdin(self): +@@ -816,15 +813,13 @@ class IntegrationTests(TestCase): + """ + d = self.runPyflakes([], stdin='import contraband') + expected = UnusedImport('', Node(1), 'contraband') +- self.assertEqual(d, ("%s%s" % (expected, self.LINESEP), '', 1)) ++ self.assertEqual(d, ("%s%s" % (expected, os.linesep), '', 1)) + + + class TestMain(IntegrationTests): + """ + Tests of the pyflakes main function. + """ +- LINESEP = os.linesep +- + def runPyflakes(self, paths, stdin=None): + try: + with SysStreamCapturing(stdin) as capture: diff --git a/dev-python/pyflakes/pyflakes-2.2.0.ebuild b/dev-python/pyflakes/pyflakes-2.2.0.ebuild index c9d537394f5b..0ce909282377 100644 --- a/dev-python/pyflakes/pyflakes-2.2.0.ebuild +++ b/dev-python/pyflakes/pyflakes-2.2.0.ebuild @@ -2,7 +2,10 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{6,7,8} pypy3 ) + +PYTHON_COMPAT=( pypy3 python3_{6..9} ) +# Uses pkg_resources +DISTUTILS_USE_SETUPTOOLS=rdepend inherit distutils-r1 @@ -14,6 +17,7 @@ LICENSE="MIT" SLOT="0" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -RDEPEND="${BDEPEND}" +# Should be included in the next release +PATCHES=( "${FILESDIR}/${P}-fix-tests.patch" ) distutils_enable_tests unittest -- cgit v1.2.3