diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-06-21 17:32:00 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-06-21 17:32:00 +0100 |
commit | 61f10f985e19dfe20a4d9552902625edd5b6eabb (patch) | |
tree | 50db31971b38c4e0358253ef5005058a46fc773e /dev-python/astunparse | |
parent | 34dea8e38f88007799629d0a56b12dec480b1d21 (diff) |
gentoo resync : 21.06.2021
Diffstat (limited to 'dev-python/astunparse')
-rw-r--r-- | dev-python/astunparse/Manifest | 5 | ||||
-rw-r--r-- | dev-python/astunparse/astunparse-1.6.3.ebuild | 6 | ||||
-rw-r--r-- | dev-python/astunparse/files/astunparse-1.6.3-py39.patch | 74 | ||||
-rw-r--r-- | dev-python/astunparse/metadata.xml | 4 |
4 files changed, 85 insertions, 4 deletions
diff --git a/dev-python/astunparse/Manifest b/dev-python/astunparse/Manifest index 47481fc06376..86d43a53a944 100644 --- a/dev-python/astunparse/Manifest +++ b/dev-python/astunparse/Manifest @@ -1,4 +1,5 @@ AUX astunparse-1.6.2-tests.patch 707 BLAKE2B 00d45b4b6bfdc70828d173985533345798a5982fa4f345e83c07e39c58dafffbf2a50ae1657df02769351a402e66faec443f7e63604ef457517e570803c50b3b SHA512 d1a86860548e0b904cc70017e0b5fa3a4e8da6bd1c03571e196e01a660d31a3ae03dec77c36945d7b5e53920b2531f0a7a0a5e3edc15b5a61c53ddafe83156d4 +AUX astunparse-1.6.3-py39.patch 2466 BLAKE2B 8779b2a98e801f675f67e2f57b283401aa577f76bfc9633c0f17af9ee9c11f1508c3b23f4bba12040012e9796f887bb7253a40603f1777a1f8cb95c5cd080c4f SHA512 6bd1a46f48e96634f67ffbd49fce4a3e9251f030a1a4298455bbe92f09bdaf1d03ce807b9bd44b8e04218d80df72974570f2c4de00e617dc6557ce537fb2abcf DIST astunparse-1.6.3.tar.gz 18290 BLAKE2B d7e6fa3ba58c6e112eb84720832890f4515b1c4ed420587565cdff37da893c07eefd0b9eb00795a3eb08bf56834d65150298a6be65e524b0c267c38e6f9c20d1 SHA512 12e99b32524e551494d3053a57aeb646bca8a96a9aa17b0737e6dace6c11874e2e7633d82197cacc0b55622bea637030344ab45c8db57ef244bd63663799d2e9 -EBUILD astunparse-1.6.3.ebuild 616 BLAKE2B 6eadebea1bc9e84bd615e6d3bd1f44d0b2b5d27f71cc706158b81228fe6d09459ea2a8fbe7dedcc47fced99938693f02e0d341bc365dd68ce400536e4b6fb54d SHA512 55463b793bb6088c1c278dbf510963aa195a6de4e2908da5bf2eaba522a16a91bf01249868c334e03c5dcbdf699da2712922204f529ad8a0793937c9ebacf9c9 -MISC metadata.xml 321 BLAKE2B 722f1449c016ff8fa07f474fda10f9caa14137eadde3872e5fe0624a4a3c5f516826b1b98a345c286032d947e4b41e0d06aed4eeb80ae0734e4ecb657b51da09 SHA512 e29a82b0c307eea4f9b60464a2fe8b9cb6c5bab4b797ada3ddc3f8cbda00f892910c97908487c5f53986f762c7824d9af61e28baa62d5b9985893798e6b64cad +EBUILD astunparse-1.6.3.ebuild 669 BLAKE2B 5d2ecdc9def9fdb262e15164afca1238e0882fa547ede3e08d0316a5bb73188c87c57b48cc2d303a165c46024232a153dbe1728697f6cb895735fc3cd30b184e SHA512 b75273b091fb84171f3871ef621eb322bcde7ab7efcf34495394069699314b39781467918554811600df8c8bbd52473b04bb5b28cbb386cfb73ae81ac19769ac +MISC metadata.xml 422 BLAKE2B 763c15dd58eb4688772d6a7a2fa0ed133584ed20dc9c1582a8b17cf07c53a57dc235346d77467345347026f2ee472015eeb07d877f3c5270c80531a600a53a06 SHA512 1dc2b0a7712a848f3a611af5bde383b3a60bb5d03f220867b690cb921fecc6fa5e892a61a1b53c788e41e4242f0513a023d64eb2e3effefc32daf9c7a33b7686 diff --git a/dev-python/astunparse/astunparse-1.6.3.ebuild b/dev-python/astunparse/astunparse-1.6.3.ebuild index 4f9d5b0158f7..0339e4a52d90 100644 --- a/dev-python/astunparse/astunparse-1.6.3.ebuild +++ b/dev-python/astunparse/astunparse-1.6.3.ebuild @@ -1,9 +1,9 @@ -# Copyright 2020 Gentoo Authors +# Copyright 2020-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{7,8} ) +PYTHON_COMPAT=( python3_{8..10} ) inherit distutils-r1 DESCRIPTION="Astun parser for python" @@ -20,6 +20,8 @@ RDEPEND=" " PATCHES=( "${FILESDIR}/astunparse-1.6.2-tests.patch" + # from Fedora + "${FILESDIR}/${P}-py39.patch" ) distutils_enable_tests setup.py diff --git a/dev-python/astunparse/files/astunparse-1.6.3-py39.patch b/dev-python/astunparse/files/astunparse-1.6.3-py39.patch new file mode 100644 index 000000000000..ab8116a559ac --- /dev/null +++ b/dev-python/astunparse/files/astunparse-1.6.3-py39.patch @@ -0,0 +1,74 @@ +From 0388a0d2f42401dcedf7f89d3c291cfed3e4a3d5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz> +Date: Wed, 8 Jul 2020 20:15:57 +0200 +Subject: [PATCH 1/2] Adapt dump() behavior to match ast.dump() on Python 3.9+ + +In Python 3.9+, ast.dump() omits optional fields/attributes from the output if +their value is None. Such defaults are defined as class attributes. + +See https://bugs.python.org/issue36287 +And https://github.com/python/cpython/pull/18843 + +This patch does not change the output on previous Python versions, +because the class attributes are missing there. + +Fixes https://github.com/simonpercivall/astunparse/issues/56 +--- + lib/astunparse/printer.py | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/lib/astunparse/printer.py b/lib/astunparse/printer.py +index 92d64f7..7a33deb 100644 +--- a/lib/astunparse/printer.py ++++ b/lib/astunparse/printer.py +@@ -4,6 +4,9 @@ + import six + + ++_NOPE = object() ++ ++ + class Printer(ast.NodeVisitor): + + def __init__(self, file=sys.stdout, indent=" "): +@@ -19,6 +22,7 @@ def write(self, text): + self.f.write(six.text_type(text)) + + def generic_visit(self, node): ++ cls = type(node) + + if isinstance(node, list): + nodestart = "[" +@@ -27,7 +31,8 @@ def generic_visit(self, node): + else: + nodestart = type(node).__name__ + "(" + nodeend = ")" +- children = [(name + "=", value) for name, value in ast.iter_fields(node)] ++ children = [(name + "=", value) for name, value in ast.iter_fields(node) ++ if not (value is None and getattr(cls, name, _NOPE) is None)] + + if len(children) > 1: + self.indentation += 1 + +From ea2b578a1b653e73696db2392b8e3d5bf75dadc7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz> +Date: Wed, 8 Jul 2020 20:21:17 +0200 +Subject: [PATCH 2/2] Test and support Python 3.9 + +--- + setup.py | 1 + + tox.ini | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index e5a277a..29b384b 100755 +--- a/setup.py ++++ b/setup.py +@@ -52,6 +52,7 @@ def read_version(): + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', ++ 'Programming Language :: Python :: 3.9', + 'Topic :: Software Development :: Code Generators', + ], + test_suite='tests', diff --git a/dev-python/astunparse/metadata.xml b/dev-python/astunparse/metadata.xml index 3450c7499fed..21605f3bf354 100644 --- a/dev-python/astunparse/metadata.xml +++ b/dev-python/astunparse/metadata.xml @@ -5,6 +5,10 @@ <email>williamh@gentoo.org</email> <name>William Hubbs</name> </maintainer> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> <upstream> <remote-id type="pypi">astunparse</remote-id> </upstream> |