Hello community,

here is the log from the commit of package python-typed-ast for 
openSUSE:Factory checked in at 2019-05-07 23:13:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-typed-ast (Old)
 and      /work/SRC/openSUSE:Factory/.python-typed-ast.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-typed-ast"

Tue May  7 23:13:07 2019 rev:6 rq:701279 version:1.3.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-typed-ast/python-typed-ast.changes        
2019-02-26 22:15:58.318199671 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-typed-ast.new.5148/python-typed-ast.changes  
    2019-05-07 23:13:11.660189907 +0200
@@ -1,0 +2,24 @@
+Tue May  7 10:38:42 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Use %pytest_arch
+- Add missing fdupes call
+
+-------------------------------------------------------------------
+Tue May  7 09:28:37 UTC 2019 - [email protected]
+
+- version update to 1.3.5
+  *  Counteract PyTuple_SetItem stealing reference in _PyObject_FastCall
+     fallback (#104)
+- run tests
+
+-------------------------------------------------------------------
+Fri May  3 18:13:27 UTC 2019 - Sebastian Wagner <[email protected]>
+
+- update to version 1.3.4:
+ * Oops: add the pgenheaders files to the depends lists
+- update to version 1.3.3:
+ * Don't rely on Python's pgenheaders.h (#101)
+- update to version 1.3.2:
+ * Fix two out-of-bounds array reads (#99)
+
+-------------------------------------------------------------------

Old:
----
  typed-ast-1.3.1.tar.gz

New:
----
  typed-ast-1.3.5.tar.gz

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

Other differences:
------------------
++++++ python-typed-ast.spec ++++++
--- /var/tmp/diff_new_pack.LENC7s/_old  2019-05-07 23:13:12.708192006 +0200
+++ /var/tmp/diff_new_pack.LENC7s/_new  2019-05-07 23:13:12.712192014 +0200
@@ -19,16 +19,20 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-typed-ast
-Version:        1.3.1
+Version:        1.3.5
 Release:        0
 Summary:        A fork of Python 2 and 3 ast modules with type comment support
 License:        Apache-2.0
 Group:          Development/Languages/Python
 URL:            https://github.com/python/typed_ast
-Source:         
https://files.pythonhosted.org/packages/source/t/typed-ast/typed-ast-%{version}.tar.gz
+Source0:        
https://files.pythonhosted.org/packages/source/t/typed-ast/typed-ast-%{version}.tar.gz
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
+# SECTION test requirements
+BuildRequires:  %{python_module pytest}
+# /SECTION
 %python_subpackages
 
 %description
@@ -48,6 +52,10 @@
 
 %install
 %python_install
+%python_expand %fdupes %{buildroot}%{$python_sitearch}
+
+%check
+%pytest_arch
 
 %files %{python_files}
 %license LICENSE

++++++ typed-ast-1.3.1.tar.gz -> typed-ast-1.3.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typed-ast-1.3.1/MANIFEST.in 
new/typed-ast-1.3.5/MANIFEST.in
--- old/typed-ast-1.3.1/MANIFEST.in     2017-02-13 02:03:32.000000000 +0100
+++ new/typed-ast-1.3.5/MANIFEST.in     2019-02-27 23:17:29.000000000 +0100
@@ -1,3 +1,4 @@
 recursive-include ast27 *.h
 recursive-include ast3 *.h
+recursive-include ast3/tests *.py
 include LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typed-ast-1.3.1/PKG-INFO new/typed-ast-1.3.5/PKG-INFO
--- old/typed-ast-1.3.1/PKG-INFO        2019-02-06 02:05:37.000000000 +0100
+++ new/typed-ast-1.3.5/PKG-INFO        2019-04-28 22:34:58.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: typed-ast
-Version: 1.3.1
+Version: 1.3.5
 Summary: a fork of Python 2 and 3 ast modules with type comment support
 Home-page: https://github.com/python/typed_ast
 Author: David Fisher
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typed-ast-1.3.1/README.md 
new/typed-ast-1.3.5/README.md
--- old/typed-ast-1.3.1/README.md       2019-01-15 17:24:36.000000000 +0100
+++ new/typed-ast-1.3.5/README.md       2019-04-18 01:06:32.000000000 +0200
@@ -22,7 +22,7 @@
 the potential to be broadly useful and not be built just for one niche usecase
 or in a manner such that only one project can use them.
 
-### Incompatabilities
+### Incompatibilities
 
 For the purposes of *consuming* syntax trees, this should be a drop-in 
replacement.
 It is not a drop-in replacement for users that wish to create or transform 
ASTs,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typed-ast-1.3.1/ast27/Include/pgenheaders.h 
new/typed-ast-1.3.5/ast27/Include/pgenheaders.h
--- old/typed-ast-1.3.1/ast27/Include/pgenheaders.h     1970-01-01 
01:00:00.000000000 +0100
+++ new/typed-ast-1.3.5/ast27/Include/pgenheaders.h     2019-04-18 
04:46:30.000000000 +0200
@@ -0,0 +1,10 @@
+#ifndef DUMMY_Py_PGENHEADERS_H
+#define DUMMY_Py_PGENHEADERS_H
+
+/* pgenheaders.h is included by a bunch of files but nothing in it is
+ * used except for the Python.h import, and it was removed in Python
+ * 3.8. Since some of those files are generated we provide a dummy
+ * pgenheaders.h. */
+#include "Python.h"
+
+#endif /* !DUMMY_Py_PGENHEADERS_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typed-ast-1.3.1/ast3/Include/pgenheaders.h 
new/typed-ast-1.3.5/ast3/Include/pgenheaders.h
--- old/typed-ast-1.3.1/ast3/Include/pgenheaders.h      1970-01-01 
01:00:00.000000000 +0100
+++ new/typed-ast-1.3.5/ast3/Include/pgenheaders.h      2019-04-18 
04:46:30.000000000 +0200
@@ -0,0 +1,10 @@
+#ifndef DUMMY_Py_PGENHEADERS_H
+#define DUMMY_Py_PGENHEADERS_H
+
+/* pgenheaders.h is included by a bunch of files but nothing in it is
+ * used except for the Python.h import, and it was removed in Python
+ * 3.8. Since some of those files are generated we provide a dummy
+ * pgenheaders.h. */
+#include "Python.h"
+
+#endif /* !DUMMY_Py_PGENHEADERS_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typed-ast-1.3.1/ast3/Python/ast.c 
new/typed-ast-1.3.5/ast3/Python/ast.c
--- old/typed-ast-1.3.1/ast3/Python/ast.c       2019-02-06 01:39:02.000000000 
+0100
+++ new/typed-ast-1.3.5/ast3/Python/ast.c       2019-04-28 22:23:51.000000000 
+0200
@@ -29,6 +29,7 @@
         return NULL;
     }
     for (i = 0; i < nargs; i++) {
+        Py_INCREF(args[i]);
         if (PyTuple_SetItem(t, i, args[i]) < 0) {
             Py_DECREF(t);
             return NULL;
@@ -1445,7 +1446,7 @@
                     goto error;
                 asdl_seq_SET(kwonlyargs, j++, arg);
                 i += 1; /* the name */
-                if (TYPE(CHILD(n, i)) == COMMA)
+                if (i < NCH(n) && TYPE(CHILD(n, i)) == COMMA)
                     i += 1; /* the comma, if present */
                 break;
             case TYPE_COMMENT:
@@ -1644,7 +1645,7 @@
                 if (!kwarg)
                     return NULL;
                 i += 2; /* the double star and the name */
-                if (TYPE(CHILD(n, i)) == COMMA)
+                if (i < NCH(n) && TYPE(CHILD(n, i)) == COMMA)
                     i += 1; /* the comma, if present */
                 break;
             case TYPE_COMMENT:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typed-ast-1.3.1/ast3/tests/test_basics.py 
new/typed-ast-1.3.5/ast3/tests/test_basics.py
--- old/typed-ast-1.3.1/ast3/tests/test_basics.py       1970-01-01 
01:00:00.000000000 +0100
+++ new/typed-ast-1.3.5/ast3/tests/test_basics.py       2019-02-05 
22:10:29.000000000 +0100
@@ -0,0 +1,302 @@
+import os
+
+import pytest
+
+from typed_ast import _ast3
+from typed_ast import _ast27
+import typed_ast.conversions
+
+# Lowest and highest supported Python 3 minor version (inclusive)
+MIN_VER = 4
+MAX_VER = 7
+NEXT_VER = MAX_VER + 1
+
+
+basics = """\
+def foo():
+    # type: () -> int
+    pass
+
+def bar():  # type: () -> None
+    pass
+"""
+def test_basics():
+    for version in range(MIN_VER, NEXT_VER):
+        tree = _ast3._parse(basics, "<basics>", "exec", version)
+        assert tree.body[0].type_comment == "() -> int"
+        assert tree.body[1].type_comment == "() -> None"
+
+
+redundantdef = """\
+def foo():  # type: () -> int
+    # type: () -> str
+    return ''
+"""
+def test_redundantdef():
+    for version in range(MIN_VER, NEXT_VER):
+        with pytest.raises(SyntaxError):
+            t = _ast3._parse(redundantdef, "<redundantdef>", "exec", version)
+
+
+vardecl = """\
+a = 0  # type: int
+a  # type: int
+"""
+def test_vardecl():
+    for version in range(MIN_VER, NEXT_VER):
+        tree = _ast3._parse(vardecl, "<vardecl>", "exec", version)
+        assert tree.body[0].type_comment == "int"
+        # Curious fact: an expression can have a type comment
+        # but it is lost in the AST.
+
+
+forstmt = """\
+for a in []:  # type: int
+    pass
+"""
+def test_forstmt():
+    for version in range(MIN_VER, NEXT_VER):
+        tree = _ast3._parse(forstmt, "<forstmt>", "exec", version)
+        assert tree.body[0].type_comment == "int"
+
+
+withstmt = """\
+with context():  # type: int
+    pass
+"""
+def test_withstmt():
+    for version in range(MIN_VER, NEXT_VER):
+        tree = _ast3._parse(withstmt, "<withstmt>", "exec", version)
+        assert tree.body[0].type_comment == "int"
+
+
+# A test function named 'fabvk' would have two positional args, a and b,
+# plus a var-arg *v, plus a kw-arg **k.  It is verified in test_longargs()
+# that it has exactly these arguments, no more, no fewer.
+longargs = """\
+def fa(
+    a = 1,  # type: A
+):
+    pass
+
+def fa(
+    a = 1  # type: A
+):
+    pass
+
+def fab(
+    a,  # type: A
+    b,  # type: B
+):
+    pass
+
+def fab(
+    a,  # type: A
+    b  # type: B
+):
+    pass
+
+def fv(
+    *v,  # type: V
+):
+    pass
+
+def fv(
+    *v  # type: V
+):
+    pass
+
+def fk(
+    **k,  # type: K
+):
+    pass
+
+def fk(
+    **k  # type: K
+):
+    pass
+
+def fvk(
+    *v,  # type: V
+    **k,  # type: K
+):
+    pass
+
+def fvk(
+    *v,  # type: V
+    **k  # type: K
+):
+    pass
+
+def fav(
+    a,  # type: A
+    *v,  # type: V
+):
+    pass
+
+def fav(
+    a,  # type: A
+    *v  # type: V
+):
+    pass
+
+def fak(
+    a,  # type: A
+    **k,  # type: K
+):
+    pass
+
+def fak(
+    a,  # type: A
+    **k  # type: K
+):
+    pass
+
+def favk(
+    a,  # type: A
+    *v,  # type: V
+    **k,  # type: K
+):
+    pass
+
+def favk(
+    a,  # type: A
+    *v,  # type: V
+    **k  # type: K
+):
+    pass
+
+"""
+def test_longargs():
+    for version in range(MIN_VER, NEXT_VER):
+        tree = _ast3._parse(longargs, "<longargs>", "exec", version)
+        for t in tree.body:
+            # The expected args are encoded in the function name
+            todo = set(t.name[1:])
+            assert len(t.args.args) == len(todo) - bool(t.args.vararg) - 
bool(t.args.kwarg)
+            assert t.name.startswith('f')
+            for c in t.name[1:]:
+                todo.remove(c)
+                if c == 'v':
+                    arg = t.args.vararg
+                elif c == 'k':
+                    arg = t.args.kwarg
+                else:
+                    assert 0 <= ord(c) - ord('a') < len(t.args.args)
+                    arg = t.args.args[ord(c) - ord('a')]
+                assert arg.arg == c  # That's the argument name
+                assert arg.type_comment == arg.arg.upper()
+            assert not todo
+
+
+ignores = """\
+def foo():
+    pass  # type: ignore
+
+def bar():
+    x = 1  # type: ignore
+"""
+def test_ignores():
+    for version in range(MIN_VER, NEXT_VER):
+        tree = _ast3._parse(ignores, "<ignores>", "exec", version)
+        assert [ti.lineno for ti in tree.type_ignores] == [2, 5]
+
+
+asyncfunc = """\
+async def foo():
+    # type: () -> int
+    return await bar()
+"""
+def test_asyncfunc():
+    for version in range(3, 5):
+        with pytest.raises(SyntaxError):
+            _ast3._parse(asyncfunc, "<asyncfunc>", "exec", version)
+    for version in range(5, NEXT_VER):
+        tree = _ast3._parse(asyncfunc, "<asyncfunc>", "exec", version)
+        assert tree.body[0].type_comment == "() -> int"
+
+
+asyncvar = """\
+async = 12
+await = 13
+"""
+def test_asyncvar():
+    for version in range(3, 7):
+        tree = _ast3._parse(asyncvar, "<asyncvar>", "exec", version)
+    for version in range(7, NEXT_VER):
+        with pytest.raises(SyntaxError):
+            _ast3._parse(asyncvar, "<asyncvar>", "exec", version)
+
+
+asynccomp = """\
+async def foo(xs):
+    [x async for x in xs]
+"""
+def test_asynccomp():
+    for version in range(3, 6):
+        with pytest.raises(SyntaxError):
+            tree = _ast3._parse(asynccomp, "<asynccomp>", "exec", version)
+    for version in range(6, NEXT_VER):
+            _ast3._parse(asynccomp, "<asynccomp>", "exec", version)
+
+
+matmul = """\
+a = b @ c
+"""
+def test_matmul():
+    for version in range(3, 5):
+        with pytest.raises(SyntaxError):
+            tree = _ast3._parse(matmul, "<matmul>", "exec", version)
+    for version in range(5, NEXT_VER):
+        tree = _ast3._parse(matmul, "<matmul>", "exec", version)
+
+
+strkind = """\
+plain = 'abc'
+raw = r'abc'
+plain_bytes = b'abc'
+raw_bytes = br'abc'
+"""
+def test_strkind():
+    # Test that Str() objects have a kind argument/attribute.
+    node = _ast3.Str("foo", "r")
+    assert node.s == "foo"
+    assert node.kind == "r"
+    for version in range(MIN_VER, NEXT_VER):
+        tree = _ast3._parse(strkind, "<strkind>", "exec", version)
+        assert tree.body[0].value.kind == ""
+        assert tree.body[1].value.kind == "r"
+        assert tree.body[2].value.kind == "b"
+        assert tree.body[3].value.kind == "br"
+
+
+basic_py2 = """\
+a = 'hello'
+b = u'hello'
+c = b'hello'
+"""
+def test_convert_strs():
+    ast = _ast27.parse(basic_py2, "<basic_py2>", "exec")
+    tree = typed_ast.conversions.py2to3(ast)
+    assert tree.body[0].value.kind == ""
+    assert tree.body[1].value.kind == "u"
+    assert tree.body[2].value.kind == "b"
+
+simple_fstring = """\
+f'{5}'
+"""
+def test_simple_fstring():
+    for version in range(6, NEXT_VER):
+        tree = _ast3._parse(simple_fstring, "<fstring>", "exec", version)
+        assert isinstance(tree.body[0].value, _ast3.JoinedStr)
+        assert isinstance(tree.body[0].value.values[0].value, _ast3.Num)
+
+# Test the interaction between versions and f strings
+await_fstring = """\
+f'1 + {f"{await}"}'
+"""
+def test_await_fstring():
+    # Should work on 6 but fail on 7
+    _ast3._parse(await_fstring, "<bad-f-string>", "exec", 6)
+    with pytest.raises(SyntaxError):
+        _ast3._parse(await_fstring, "<bad-f-string>", "exec", 7)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typed-ast-1.3.1/setup.py new/typed-ast-1.3.5/setup.py
--- old/typed-ast-1.3.1/setup.py        2019-01-24 00:02:02.000000000 +0100
+++ new/typed-ast-1.3.5/setup.py        2019-04-18 04:46:30.000000000 +0200
@@ -38,6 +38,7 @@
         'ast27/Include/grammar.h',
         'ast27/Include/node.h',
         'ast27/Include/parsetok.h',
+        'ast27/Include/pgenheaders.h',
         'ast27/Include/Python-ast.h',
         'ast27/Include/token.h',
         'ast27/Parser/parser.h',
@@ -73,6 +74,7 @@
         'ast3/Include/grammar.h',
         'ast3/Include/node.h',
         'ast3/Include/parsetok.h',
+        'ast3/Include/pgenheaders.h',
         'ast3/Include/Python-ast.h',
         'ast3/Include/token.h',
         'ast3/Parser/parser.h',
@@ -116,6 +118,7 @@
            'Programming Language :: Python :: 3.7',
            'Topic :: Software Development',
        ],
-       packages = ['typed_ast'],
+       packages = ['typed_ast', 'typed_ast.tests'],
+       package_dir={ 'typed_ast.tests': 'ast3/tests' },
        ext_package='typed_ast',
        ext_modules = [_ast27, _ast3])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typed-ast-1.3.1/typed_ast/__init__.py 
new/typed-ast-1.3.5/typed_ast/__init__.py
--- old/typed-ast-1.3.1/typed_ast/__init__.py   2019-02-06 01:40:33.000000000 
+0100
+++ new/typed-ast-1.3.5/typed_ast/__init__.py   2019-04-28 22:25:54.000000000 
+0200
@@ -1 +1 @@
-__version__ = "1.3.1"
+__version__ = "1.3.5"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typed-ast-1.3.1/typed_ast.egg-info/PKG-INFO 
new/typed-ast-1.3.5/typed_ast.egg-info/PKG-INFO
--- old/typed-ast-1.3.1/typed_ast.egg-info/PKG-INFO     2019-02-06 
02:05:37.000000000 +0100
+++ new/typed-ast-1.3.5/typed_ast.egg-info/PKG-INFO     2019-04-28 
22:34:56.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: typed-ast
-Version: 1.3.1
+Version: 1.3.5
 Summary: a fork of Python 2 and 3 ast modules with type comment support
 Home-page: https://github.com/python/typed_ast
 Author: David Fisher
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typed-ast-1.3.1/typed_ast.egg-info/SOURCES.txt 
new/typed-ast-1.3.5/typed_ast.egg-info/SOURCES.txt
--- old/typed-ast-1.3.1/typed_ast.egg-info/SOURCES.txt  2019-02-06 
02:05:37.000000000 +0100
+++ new/typed-ast-1.3.5/typed_ast.egg-info/SOURCES.txt  2019-04-28 
22:34:57.000000000 +0200
@@ -13,6 +13,7 @@
 ast27/Include/grammar.h
 ast27/Include/node.h
 ast27/Include/parsetok.h
+ast27/Include/pgenheaders.h
 ast27/Include/token.h
 ast27/Parser/acceler.c
 ast27/Parser/bitset.c
@@ -40,6 +41,7 @@
 ast3/Include/grammar.h
 ast3/Include/node.h
 ast3/Include/parsetok.h
+ast3/Include/pgenheaders.h
 ast3/Include/token.h
 ast3/Parser/acceler.c
 ast3/Parser/bitset.c
@@ -55,6 +57,7 @@
 ast3/Python/asdl.c
 ast3/Python/ast.c
 ast3/Python/graminit.c
+ast3/tests/test_basics.py
 typed_ast/__init__.py
 typed_ast/ast27.py
 typed_ast/ast3.py


Reply via email to