Hello community,

here is the log from the commit of package python-astunparse for 
openSUSE:Factory checked in at 2020-01-18 12:18:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-astunparse (Old)
 and      /work/SRC/openSUSE:Factory/.python-astunparse.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-astunparse"

Sat Jan 18 12:18:20 2020 rev:4 rq:765351 version:1.6.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-astunparse/python-astunparse.changes      
2019-03-06 15:52:46.244419332 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-astunparse.new.26092/python-astunparse.changes
   2020-01-18 12:19:06.347170270 +0100
@@ -1,0 +2,6 @@
+Fri Jan 17 15:36:43 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- update to 1.6.3
+  * Add full support for Python 3.8
+
+-------------------------------------------------------------------

Old:
----
  astunparse-1.6.2.tar.gz

New:
----
  astunparse-1.6.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-astunparse.spec ++++++
--- /var/tmp/diff_new_pack.TcTiqy/_old  2020-01-18 12:19:06.995170618 +0100
+++ /var/tmp/diff_new_pack.TcTiqy/_new  2020-01-18 12:19:06.999170620 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-astunparse
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-astunparse
-Version:        1.6.2
+Version:        1.6.3
 Release:        0
 Summary:        An AST unparser for Python
 License:        BSD-3-Clause AND Python-2.0

++++++ astunparse-1.6.2.tar.gz -> astunparse-1.6.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astunparse-1.6.2/AUTHORS.rst 
new/astunparse-1.6.3/AUTHORS.rst
--- old/astunparse-1.6.2/AUTHORS.rst    2018-09-30 23:42:18.000000000 +0200
+++ new/astunparse-1.6.3/AUTHORS.rst    2019-12-22 19:11:41.000000000 +0100
@@ -17,3 +17,4 @@
 * Amund Hov
 * Jakub Wilk
 * Mateusz Bysiek
+* Serge Sans Paille
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astunparse-1.6.2/HISTORY.rst 
new/astunparse-1.6.3/HISTORY.rst
--- old/astunparse-1.6.2/HISTORY.rst    2019-01-19 16:08:34.000000000 +0100
+++ new/astunparse-1.6.3/HISTORY.rst    2019-12-22 19:11:41.000000000 +0100
@@ -3,6 +3,11 @@
 
 Here's the recent changes to AST Unparser.
 
+1.6.3 - 2019-12-22
+~~~~~~~~~~~~~~~~~~
+
+* Add full support for Python 3.8
+
 1.6.2 - 2019-01-19
 ~~~~~~~~~~~~~~~~~~
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astunparse-1.6.2/PKG-INFO 
new/astunparse-1.6.3/PKG-INFO
--- old/astunparse-1.6.2/PKG-INFO       2019-01-19 19:00:44.000000000 +0100
+++ new/astunparse-1.6.3/PKG-INFO       2019-12-22 19:11:58.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: astunparse
-Version: 1.6.2
+Version: 1.6.3
 Summary: An AST unparser for Python
 Home-page: https://github.com/simonpercivall/astunparse
 Maintainer: Simon Percivall
@@ -89,6 +89,11 @@
         
         Here's the recent changes to AST Unparser.
         
+        1.6.3 - 2019-12-22
+        ~~~~~~~~~~~~~~~~~~
+        
+        * Add full support for Python 3.8
+        
         1.6.2 - 2019-01-19
         ~~~~~~~~~~~~~~~~~~
         
@@ -149,9 +154,8 @@
 Classifier: Programming Language :: Python :: 2
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
-Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
 Classifier: Topic :: Software Development :: Code Generators
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astunparse-1.6.2/lib/astunparse/__init__.py 
new/astunparse-1.6.3/lib/astunparse/__init__.py
--- old/astunparse-1.6.2/lib/astunparse/__init__.py     2019-01-19 
16:07:47.000000000 +0100
+++ new/astunparse-1.6.3/lib/astunparse/__init__.py     2019-12-22 
19:11:41.000000000 +0100
@@ -5,7 +5,7 @@
 from .printer import Printer
 
 
-__version__ = '1.6.2'
+__version__ = '1.6.3'
 
 
 def unparse(tree):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astunparse-1.6.2/lib/astunparse/unparser.py 
new/astunparse-1.6.3/lib/astunparse/unparser.py
--- old/astunparse-1.6.2/lib/astunparse/unparser.py     2019-01-19 
16:06:10.000000000 +0100
+++ new/astunparse-1.6.3/lib/astunparse/unparser.py     2019-12-22 
19:00:25.000000000 +0100
@@ -29,7 +29,7 @@
     output source code for the abstract syntax; original formatting
     is disregarded. """
 
-    def __init__(self, tree, file=sys.stdout):
+    def __init__(self, tree, file = sys.stdout):
         """Unparser(tree, file=sys.stdout) -> None.
          Print the source for tree to file."""
         self.f = file
@@ -89,6 +89,13 @@
         self.fill()
         self.dispatch(tree.value)
 
+    def _NamedExpr(self, tree):
+        self.write("(")
+        self.dispatch(tree.target)
+        self.write(" := ")
+        self.dispatch(tree.value)
+        self.write(")")
+
     def _Import(self, t):
         self.fill("import ")
         interleave(lambda: self.write(", "), self.dispatch, t.names)
@@ -120,11 +127,11 @@
 
     def _AnnAssign(self, t):
         self.fill()
-        if not t.simple:
-            self.write("(")
+        if not t.simple and isinstance(t.target, ast.Name):
+            self.write('(')
         self.dispatch(t.target)
-        if not t.simple:
-            self.write(")")
+        if not t.simple and isinstance(t.target, ast.Name):
+            self.write(')')
         self.write(": ")
         self.dispatch(t.annotation)
         if t.value:
@@ -189,6 +196,14 @@
         self.fill("nonlocal ")
         interleave(lambda: self.write(", "), self.write, t.names)
 
+    def _Await(self, t):
+        self.write("(")
+        self.write("await")
+        if t.value:
+            self.write(" ")
+            self.dispatch(t.value)
+        self.write(")")
+
     def _Yield(self, t):
         self.write("(")
         self.write("yield")
@@ -328,12 +343,19 @@
         self.dispatch(t.body)
         self.leave()
 
-    def _generic_FunctionDef(self, t, async_=False):
+    def _FunctionDef(self, t):
+        self.__FunctionDef_helper(t, "def")
+
+    def _AsyncFunctionDef(self, t):
+        self.__FunctionDef_helper(t, "async def")
+
+    def __FunctionDef_helper(self, t, fill_suffix):
         self.write("\n")
         for deco in t.decorator_list:
             self.fill("@")
             self.dispatch(deco)
-        self.fill(("async " if async_ else "") + "def " + t.name + "(")
+        def_str = fill_suffix+" "+t.name + "("
+        self.fill(def_str)
         self.dispatch(t.args)
         self.write(")")
         if getattr(t, "returns", False):
@@ -343,14 +365,14 @@
         self.dispatch(t.body)
         self.leave()
 
-    def _FunctionDef(self, t):
-        self._generic_FunctionDef(t)
+    def _For(self, t):
+        self.__For_helper("for ", t)
 
-    def _AsyncFunctionDef(self, t):
-        self._generic_FunctionDef(t, async_=True)
+    def _AsyncFor(self, t):
+        self.__For_helper("async for ", t)
 
-    def _generic_For(self, t, async_=False):
-        self.fill("async for " if async_ else "for ")
+    def __For_helper(self, fill, t):
+        self.fill(fill)
         self.dispatch(t.target)
         self.write(" in ")
         self.dispatch(t.iter)
@@ -363,12 +385,6 @@
             self.dispatch(t.orelse)
             self.leave()
 
-    def _For(self, t):
-        self._generic_For(t)
-
-    def _AsyncFor(self, t):
-        self._generic_For(t, async_=True)
-
     def _If(self, t):
         self.fill("if ")
         self.dispatch(t.test)
@@ -532,6 +548,8 @@
         elif value is Ellipsis: # instead of `...` for Py2 compatibility
             self.write("...")
         else:
+            if t.kind == "u":
+                self.write("u")
             self._write_constant(t.value)
 
     def _Num(self, t):
@@ -586,8 +604,9 @@
 
     def _comprehension(self, t):
         if getattr(t, 'is_async', False):
-            self.write(" async")
-        self.write(" for ")
+            self.write(" async for ")
+        else:
+            self.write(" for ")
         self.dispatch(t.target)
         self.write(" in ")
         self.dispatch(t.iter)
@@ -612,26 +631,27 @@
 
     def _Dict(self, t):
         self.write("{")
-        def write_pair(pair):
-            (k, v) = pair
+        def write_key_value_pair(k, v):
+            self.dispatch(k)
+            self.write(": ")
+            self.dispatch(v)
+
+        def write_item(item):
+            k, v = item
             if k is None:
-                self.write('**')
+                # for dictionary unpacking operator in dicts {**{'y': 2}}
+                # see PEP 448 for details
+                self.write("**")
                 self.dispatch(v)
             else:
-                self.dispatch(k)
-                self.write(": ")
-                self.dispatch(v)
-            self.write(",")
-        self._indent +=1
-        self.fill("")
-        interleave(lambda: self.fill(""), write_pair, zip(t.keys, t.values))
-        self._indent -=1
-        self.fill("}")
+                write_key_value_pair(k, v)
+        interleave(lambda: self.write(", "), write_item, zip(t.keys, t.values))
+        self.write("}")
 
     def _Tuple(self, t):
         self.write("(")
         if len(t.elts) == 1:
-            (elt,) = t.elts
+            elt = t.elts[0]
             self.dispatch(elt)
             self.write(",")
         else:
@@ -656,10 +676,9 @@
             self.dispatch(t.operand)
         self.write(")")
 
-    binop = { "Add":"+", "Sub":"-", "Mult":"*", "Div":"/", "Mod":"%",
+    binop = { "Add":"+", "Sub":"-", "Mult":"*", "MatMult":"@", "Div":"/", 
"Mod":"%",
                     "LShift":"<<", "RShift":">>", "BitOr":"|", "BitXor":"^", 
"BitAnd":"&",
-                    "FloorDiv":"//", "Pow": "**",
-                    "MatMult":"@"}
+                    "FloorDiv":"//", "Pow": "**"}
     def _BinOp(self, t):
         self.write("(")
         self.dispatch(t.left)
@@ -689,7 +708,7 @@
         # Special case: 3.__abs__() is a syntax error, so if t.value
         # is an integer literal then we need to either parenthesize
         # it or add an extra space to get 3 .__abs__().
-        if isinstance(t.value, ast.Num) and isinstance(t.value.n, int):
+        if isinstance(t.value, getattr(ast, 'Constant', getattr(ast, 'Num', 
None))) and isinstance(t.value.n, int):
             self.write(" ")
         self.write(".")
         self.write(t.attr)
@@ -760,18 +779,22 @@
     def _arguments(self, t):
         first = True
         # normal arguments
-        defaults = [None] * (len(t.args) - len(t.defaults)) + t.defaults
-        for a,d in zip(t.args, defaults):
+        all_args = getattr(t, 'posonlyargs', []) + t.args
+        defaults = [None] * (len(all_args) - len(t.defaults)) + t.defaults
+        for index, elements in enumerate(zip(all_args, defaults), 1):
+            a, d = elements
             if first:first = False
             else: self.write(", ")
             self.dispatch(a)
             if d:
                 self.write("=")
                 self.dispatch(d)
+            if index == len(getattr(t, 'posonlyargs', ())):
+                self.write(", /")
 
         # varargs, or bare '*' if no varargs but keyword-only arguments present
         if t.vararg or getattr(t, "kwonlyargs", False):
-            if first: first = False
+            if first:first = False
             else: self.write(", ")
             self.write("*")
             if t.vararg:
@@ -839,14 +862,6 @@
             self.write(" as ")
             self.dispatch(t.optional_vars)
 
-    def _Await(self, t):
-        self.write("(")
-        self.write("await")
-        if t.value:
-            self.write(" ")
-            self.dispatch(t.value)
-        self.write(")")
-
 def roundtrip(filename, output=sys.stdout):
     if six.PY3:
         with open(filename, "rb") as pyfile:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astunparse-1.6.2/lib/astunparse.egg-info/PKG-INFO 
new/astunparse-1.6.3/lib/astunparse.egg-info/PKG-INFO
--- old/astunparse-1.6.2/lib/astunparse.egg-info/PKG-INFO       2019-01-19 
19:00:44.000000000 +0100
+++ new/astunparse-1.6.3/lib/astunparse.egg-info/PKG-INFO       2019-12-22 
19:11:58.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: astunparse
-Version: 1.6.2
+Version: 1.6.3
 Summary: An AST unparser for Python
 Home-page: https://github.com/simonpercivall/astunparse
 Maintainer: Simon Percivall
@@ -89,6 +89,11 @@
         
         Here's the recent changes to AST Unparser.
         
+        1.6.3 - 2019-12-22
+        ~~~~~~~~~~~~~~~~~~
+        
+        * Add full support for Python 3.8
+        
         1.6.2 - 2019-01-19
         ~~~~~~~~~~~~~~~~~~
         
@@ -149,9 +154,8 @@
 Classifier: Programming Language :: Python :: 2
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
-Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
 Classifier: Topic :: Software Development :: Code Generators
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astunparse-1.6.2/setup.py 
new/astunparse-1.6.3/setup.py
--- old/astunparse-1.6.2/setup.py       2018-09-30 23:42:18.000000000 +0200
+++ new/astunparse-1.6.3/setup.py       2019-12-22 19:11:41.000000000 +0100
@@ -48,11 +48,10 @@
         "Programming Language :: Python :: 2",
         'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.3',
-        'Programming Language :: Python :: 3.4',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
+        'Programming Language :: Python :: 3.8',
         'Topic :: Software Development :: Code Generators',
     ],
     test_suite='tests',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astunparse-1.6.2/tests/common.py 
new/astunparse-1.6.3/tests/common.py
--- old/astunparse-1.6.2/tests/common.py        2018-10-03 11:01:13.000000000 
+0200
+++ new/astunparse-1.6.3/tests/common.py        2019-12-22 18:52:43.000000000 
+0100
@@ -215,6 +215,7 @@
         self.check_roundtrip("not True or False")
         self.check_roundtrip("True or not False")
 
+    @unittest.skipUnless(sys.version_info < (3, 6), "Only works for Python < 
3.6")
     def test_integer_parens(self):
         self.check_roundtrip("3 .__abs__()")
 


Reply via email to