[med-svn] [Git][med-team/python3-typed-ast][master] 5 commits: New upstream version 1.2.0

Michael R. Crusoe gitlab at salsa.debian.org
Thu Jan 17 09:17:12 GMT 2019


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


Commits:
527426f3 by Michael R. Crusoe at 2019-01-17T09:01:34Z
New upstream version 1.2.0
- - - - -
8cad0dbb by Michael R. Crusoe at 2019-01-17T09:01:36Z
Update upstream source from tag 'upstream/1.2.0'

Update to upstream version '1.2.0'
with Debian dir 04c1900daf4400268bda53cb9e6a8793999ac00d
- - - - -
c7c12ca3 by Michael R. Crusoe at 2019-01-17T09:01:36Z
New upstream version

- - - - -
14ea6c81 by Michael R. Crusoe at 2019-01-17T09:01:44Z
Drop ancient X-Python-Version field

- - - - -
10e2be14 by Michael R. Crusoe at 2019-01-17T09:05:15Z
Upload to unstable

- - - - -


10 changed files:

- PKG-INFO
- README.md
- debian/changelog
- debian/control
- setup.py
- typed_ast.egg-info/PKG-INFO
- typed_ast/__init__.py
- typed_ast/ast27.py
- typed_ast/ast3.py
- typed_ast/conversions.py


Changes:

=====================================
PKG-INFO
=====================================
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: typed-ast
-Version: 1.1.1
+Version: 1.2.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
@@ -23,4 +23,5 @@ 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: Topic :: Software Development


=====================================
README.md
=====================================
@@ -9,11 +9,11 @@ parser similar to the standard `ast` library.  Unlike `ast`, the parsers in
 comments and are independent of the version of Python under which they are run.
 The `typed_ast` parsers produce the standard Python AST (plus type comments),
 and are both fast and correct, as they are based on the CPython 2.7 and 3.6
-parsers.  `typed_ast` runs on Python 3.3-3.6 on Linux, OS X and Windows.
+parsers.  `typed_ast` runs on Python 3.3-3.7 on Linux, OS X and Windows.
 
 ## Development Philosophy
 
-This project is a drop-in replacement for the builtin `ast` module.  It is
+This project is a (mostly) drop-in replacement for the builtin `ast` module.  It is
 intended to be bug-for-bug compatible and behave identically, except for the
 presence of a few additional fields on the returned classes and a few
 additional optional arguments to the `parse` call.  Therefore, `typed_ast` will
@@ -22,9 +22,22 @@ instead.  To avoid feature bloat, any new features for `typed_ast` should have
 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
+
+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,
+as a number of syntax tree classes have additional fields that must be populated
+when constructing them.
+
+### Python 3.7
+
+`typed_ast` has not yet been updated to be based on the Python 3.7
+parser. The main consequence of this that `await` and `async` are
+not treated as keywords.
+
 ## Submodules
 ### ast3
-The `ast3` parser produces the AST from the latest version of Python 3
+The `ast3` parser produces the AST from a recent version of Python 3
 (currently Python 3.6).  When new versions of Python 3 are released, it will be
 updated to match any changes in their AST.  (For rationale and technical
 details, see [here](update_process.md).)  The AST it currently produces is described in


=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+python3-typed-ast (1.2.0-1) unstable; urgency=medium
+
+  * New upstream version
+
+ -- Michael R. Crusoe <michael.crusoe at gmail.com>  Thu, 17 Jan 2019 01:01:44 -0800
+
 python3-typed-ast (1.1.1-1) unstable; urgency=medium
 
   * New upstream version


=====================================
debian/control
=====================================
@@ -9,18 +9,17 @@ Build-Depends: debhelper (>= 11~),
                python3-all,
                python3-setuptools,
                python3-all-dev
-Standards-Version: 4.2.1
+Standards-Version: 4.3.0
 Vcs-Browser: https://salsa.debian.org/med-team/python3-typed-ast
 Vcs-Git: https://salsa.debian.org/med-team/python3-typed-ast.git
 Homepage: http://www.mypy-lang.org/
 
 Package: python3-typed-ast
 Architecture: any
-X-Python3-Version: ${python3:Versions}
-Provides: ${python3:Provides}
 Depends: ${python3:Depends},
          ${misc:Depends},
          ${shlibs:Depends}
+Provides: ${python3:Provides}
 Description: AST with PEP 484 type comments support
  A fork of the CPython 2.7 and 3.5 ast modules with the ability to parse
  PEP 484 type comments. The primary goals of this package are correctness and


=====================================
setup.py
=====================================
@@ -113,6 +113,7 @@ setup (name = 'typed-ast',
            'Programming Language :: Python :: 3.4',
            'Programming Language :: Python :: 3.5',
            'Programming Language :: Python :: 3.6',
+           'Programming Language :: Python :: 3.7',
            'Topic :: Software Development',
        ],
        packages = ['typed_ast'],


=====================================
typed_ast.egg-info/PKG-INFO
=====================================
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: typed-ast
-Version: 1.1.1
+Version: 1.2.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
@@ -23,4 +23,5 @@ 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: Topic :: Software Development


=====================================
typed_ast/__init__.py
=====================================
@@ -1 +1 @@
-__version__ = "1.1.1"
+__version__ = "1.2.0"


=====================================
typed_ast/ast27.py
=====================================
@@ -283,7 +283,7 @@ class NodeTransformer(NodeVisitor):
            def visit_Name(self, node):
                return copy_location(Subscript(
                    value=Name(id='data', ctx=Load()),
-                   slice=Index(value=Str(s=node.id)),
+                   slice=Index(value=Str(s=node.id, kind='')),
                    ctx=node.ctx
                ), node)
 


=====================================
typed_ast/ast3.py
=====================================
@@ -53,8 +53,8 @@ def parse(source, filename='<unknown>', mode='exec', feature_version=LATEST_MINO
     fully supported for Python 3.5+ with partial support for Python 3.4.
     So, feature_version=3 or less are all equivalent to feature_version=4.
 
-    When feature_version=4, the parser will forbid the use of the async/await 
-    keywords and the '@' operator, but will not forbid the use of PEP 448 
+    When feature_version=4, the parser will forbid the use of the async/await
+    keywords and the '@' operator, but will not forbid the use of PEP 448
     additional unpacking generalizations, which were also added in Python 3.5.
     """
     return _ast3._parse(source, filename, mode, feature_version)
@@ -306,7 +306,7 @@ class NodeTransformer(NodeVisitor):
            def visit_Name(self, node):
                return copy_location(Subscript(
                    value=Name(id='data', ctx=Load()),
-                   slice=Index(value=Str(s=node.id)),
+                   slice=Index(value=Str(s=node.id, kind='')),
                    ctx=node.ctx
                ), node)
 


=====================================
typed_ast/conversions.py
=====================================
@@ -106,7 +106,8 @@ class _AST2To3(ast27.NodeTransformer):
             keywords.append(ast3.keyword("file", self.visit(n.dest)))
 
         if not n.nl:
-            keywords.append(ast3.keyword("end", ast3.Str(" ", lineno=n.lineno, col_offset=-1)))
+            keywords.append(ast3.keyword("end",
+                                         ast3.Str(s=" ", kind='', lineno=n.lineno, col_offset=-1)))
 
         return ast3.Expr(ast3.Call(ast3.Name("print", ast3.Load(), lineno=n.lineno, col_offset=-1),
                                    self.visit(n.values),
@@ -218,7 +219,7 @@ class _AST2To3(ast27.NodeTransformer):
         if isinstance(s.s, bytes):
             return ast3.Bytes(s.s)
         else:
-            return ast3.Str(s.s)
+            return ast3.Str(s.s, s.kind)
 
     def visit_Num(self, n):
         new = self.generic_visit(n)



View it on GitLab: https://salsa.debian.org/med-team/python3-typed-ast/compare/ecd68eed48eee7fd11aa81469aa347850e4d2937...10e2be146074643ad8bdfc0017cd206eb913b7d1

-- 
View it on GitLab: https://salsa.debian.org/med-team/python3-typed-ast/compare/ecd68eed48eee7fd11aa81469aa347850e4d2937...10e2be146074643ad8bdfc0017cd206eb913b7d1
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/20190117/c3ac7bfd/attachment-0001.html>


More information about the debian-med-commit mailing list