[med-svn] [Git][med-team/python3-typed-ast][upstream] New upstream version 1.1.0

Michael R. Crusoe gitlab at salsa.debian.org
Wed May 2 09:06:02 BST 2018


Michael R. Crusoe pushed to branch upstream at Debian Med / python3-typed-ast


Commits:
378a3e92 by Michael R. Crusoe at 2017-10-07T10:02:04-07:00
New upstream version 1.1.0
- - - - -


8 changed files:

- PKG-INFO
- ast27/Custom/typed_ast.c
- ast27/Parser/tokenizer.c
- ast27/Python/ast.c
- ast3/Custom/typed_ast.c
- ast3/Python/ast.c
- setup.py
- typed_ast.egg-info/PKG-INFO


Changes:

=====================================
PKG-INFO
=====================================
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: typed-ast
-Version: 1.0.4
+Version: 1.1.0
 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


=====================================
ast27/Custom/typed_ast.c
=====================================
--- a/ast27/Custom/typed_ast.c
+++ b/ast27/Custom/typed_ast.c
@@ -239,6 +239,7 @@ string_object_to_py_ast(const char *str, PyObject *filename, int start,
                        PyCompilerFlags *flags)
 {
     mod_ty mod;
+    PyObject *result;
     PyArena *arena = PyArena_New();
     if (arena == NULL)
         return NULL;
@@ -249,7 +250,7 @@ string_object_to_py_ast(const char *str, PyObject *filename, int start,
         return NULL;
     }
 
-    PyObject *result = Ta27AST_mod2obj(mod);
+    result = Ta27AST_mod2obj(mod);
     PyArena_Free(arena);
     return result;
 }


=====================================
ast27/Parser/tokenizer.c
=====================================
--- a/ast27/Parser/tokenizer.c
+++ b/ast27/Parser/tokenizer.c
@@ -1352,6 +1352,10 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end)
         };
         char cbuf[80];
         char *tp, **cp;
+
+        /* used for type comment checks */
+        const char *prefix, *p, *type_start;
+
         tp = cbuf;
         do {
             *tp++ = c = tok_nextc(tok);
@@ -1375,9 +1379,9 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end)
         }
         while (c != EOF && c != '\n')
             c = tok_nextc(tok);
-
+            
         /* check for type comment */
-        const char *prefix, *p, *type_start;
+        
         p = tok->start;
         prefix = type_comment_prefix;
         while (*prefix && p < tok->cur) {


=====================================
ast27/Python/ast.c
=====================================
--- a/ast27/Python/ast.c
+++ b/ast27/Python/ast.c
@@ -2303,6 +2303,7 @@ ast_for_class_bases(struct compiling *c, const node* n)
 static stmt_ty
 ast_for_expr_stmt(struct compiling *c, const node *n)
 {
+    int num;
     REQ(n, expr_stmt);
     /* expr_stmt: testlist (augassign (yield_expr|testlist)
                 | ('=' (yield_expr|testlist))* [TYPE_COMMENT])
@@ -2311,7 +2312,7 @@ ast_for_expr_stmt(struct compiling *c, const node *n)
                 | '<<=' | '>>=' | '**=' | '//='
        test: ... here starts the operator precendence dance
      */
-    int num = NCH(n);
+    num = NCH(n);
 
     if (num == 1 || (num == 2 && TYPE(CHILD(n, 1)) == TYPE_COMMENT)) {
         expr_ty e = ast_for_testlist(c, CHILD(n, 0));
@@ -3516,12 +3517,13 @@ parsenumber(struct compiling *c, const char *s)
                 /* Make a copy without the trailing 'L' */
                 size_t len = end - s  + 1;
                 char *copy = malloc(len);
+                PyObject *result;
                 if (copy == NULL)
                         return PyErr_NoMemory();
                 memcpy(copy, s, len);
                 copy[len - 1] = '\0';
                 old_style_octal = len > 2 && copy[0] == '0' && copy[1] >= '0' && copy[1] <= '9';
-                PyObject *result = PyLong_FromString(copy, (char **)0, old_style_octal ? 8 : 0);
+                result = PyLong_FromString(copy, (char **)0, old_style_octal ? 8 : 0);
                 free(copy);
                 return result;
         }


=====================================
ast3/Custom/typed_ast.c
=====================================
--- a/ast3/Custom/typed_ast.c
+++ b/ast3/Custom/typed_ast.c
@@ -249,6 +249,7 @@ string_object_to_py_ast(const char *str, PyObject *filename, int start,
                        PyCompilerFlags *flags, int feature_version)
 {
     mod_ty mod;
+    PyObject *result;
     PyArena *arena = PyArena_New();
     if (arena == NULL)
         return NULL;
@@ -259,7 +260,7 @@ string_object_to_py_ast(const char *str, PyObject *filename, int start,
         return NULL;
     }
 
-    PyObject *result = Ta3AST_mod2obj(mod);
+    result = Ta3AST_mod2obj(mod);
     PyArena_Free(arena);
     return result;
 }


=====================================
ast3/Python/ast.c
=====================================
--- a/ast3/Python/ast.c
+++ b/ast3/Python/ast.c
@@ -2274,6 +2274,7 @@ ast_for_atom(struct compiling *c, const node *n)
         return str;
     }
     case NUMBER: {
+        PyObject *pynum;
         const char *s = STR(ch);
         /* Underscores in numeric literals are only allowed in Python 3.6 or greater */
         /* Check for underscores here rather than in parse_number so we can report a line number on error */
@@ -2282,7 +2283,7 @@ ast_for_atom(struct compiling *c, const node *n)
                     "Underscores in numeric literals are only supported in Python 3.6 and greater");
             return NULL;
         }
-        PyObject *pynum = parsenumber(c, s);
+        pynum = parsenumber(c, s);
         if (!pynum)
             return NULL;
 
@@ -3040,6 +3041,7 @@ ast_for_testlist(struct compiling *c, const node* n)
 static stmt_ty
 ast_for_expr_stmt(struct compiling *c, const node *n)
 {
+    int num;
     REQ(n, expr_stmt);
     /* expr_stmt: testlist_star_expr (annassign | augassign (yield_expr|testlist) |
                            ('=' (yield_expr|testlist_star_expr))* [TYPE_COMMENT])
@@ -3049,7 +3051,7 @@ ast_for_expr_stmt(struct compiling *c, const node *n)
                 | '<<=' | '>>=' | '**=' | '//='
        test: ... here starts the operator precedence dance
      */
-    int num = NCH(n);
+    num = NCH(n);
 
     if (num == 1 || (num == 2 && TYPE(CHILD(n, 1)) == TYPE_COMMENT)) {
         expr_ty e = ast_for_testlist(c, CHILD(n, 0));


=====================================
setup.py
=====================================
--- a/setup.py
+++ b/setup.py
@@ -87,7 +87,7 @@ based on the CPython 2.7 and 3.6 parsers.
 """.strip()
 
 setup (name = 'typed-ast',
-       version = '1.0.4',
+       version = '1.1.0',
        description = 'a fork of Python 2 and 3 ast modules with type comment support',
        long_description = long_description,
        author = 'David Fisher',


=====================================
typed_ast.egg-info/PKG-INFO
=====================================
--- a/typed_ast.egg-info/PKG-INFO
+++ b/typed_ast.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: typed-ast
-Version: 1.0.4
+Version: 1.1.0
 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



View it on GitLab: https://salsa.debian.org/med-team/python3-typed-ast/commit/378a3e92a8ee47755d2fff159fed537f22e1ed94

---
View it on GitLab: https://salsa.debian.org/med-team/python3-typed-ast/commit/378a3e92a8ee47755d2fff159fed537f22e1ed94
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20180502/3d580fd5/attachment-0001.html>


More information about the debian-med-commit mailing list