Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-astunparse for openSUSE:Factory checked in at 2021-04-19 21:05:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-astunparse (Old) and /work/SRC/openSUSE:Factory/.python-astunparse.new.12324 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-astunparse" Mon Apr 19 21:05:58 2021 rev:5 rq:886561 version:1.6.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-astunparse/python-astunparse.changes 2020-01-18 12:19:06.347170270 +0100 +++ /work/SRC/openSUSE:Factory/.python-astunparse.new.12324/python-astunparse.changes 2021-04-19 21:06:17.860056206 +0200 @@ -1,0 +2,6 @@ +Sun Apr 18 12:03:07 UTC 2021 - Ben Greiner <c...@bnavigator.de> + +- Add astunparse-pr57-py39.patch by Fedora maintainer for Python + 3.9 support -- gh#simonpercivall/astunparse#57 + +------------------------------------------------------------------- New: ---- astunparse-pr57-py39.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-astunparse.spec ++++++ --- /var/tmp/diff_new_pack.492MXs/_old 2021-04-19 21:06:18.280056836 +0200 +++ /var/tmp/diff_new_pack.492MXs/_new 2021-04-19 21:06:18.280056836 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-astunparse # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,6 +25,8 @@ Group: Development/Languages/Python URL: https://github.com/simonpercivall/astunparse Source: https://files.pythonhosted.org/packages/source/a/astunparse/astunparse-%{version}.tar.gz +# PATCH-FIX-UPSTREAM astunparse-pr57-py39.patch -- gh#simonpercivall/astunparse#57 +Patch0: astunparse-pr57-py39.patch BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six >= 1.6.1} BuildRequires: %{python_module wheel >= 0.23.0} @@ -49,7 +51,7 @@ Added to this is a pretty-printing dump utility function. %prep -%setup -q -n astunparse-%{version} +%autosetup -p1 -n astunparse-%{version} %build %python_build @@ -64,6 +66,7 @@ %files %{python_files} %doc AUTHORS.rst README.rst HISTORY.rst %license LICENSE -%{python_sitelib}/* +%{python_sitelib}/astunparse +%{python_sitelib}/astunparse-%{version}*-info %changelog ++++++ astunparse-pr57-py39.patch ++++++ >From 0388a0d2f42401dcedf7f89d3c291cfed3e4a3d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <m...@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?= <m...@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 +-) removed from openSUSE patch for PyPI package 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',