You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

165 lines
4.3 KiB

  1. Metadata-Version: 2.1
  2. Name: astunparse
  3. Version: 1.6.3
  4. Summary: An AST unparser for Python
  5. Home-page: https://github.com/simonpercivall/astunparse
  6. Maintainer: Simon Percivall
  7. Maintainer-email: percivall@gmail.com
  8. License: BSD
  9. Keywords: astunparse
  10. Platform: UNKNOWN
  11. Classifier: Development Status :: 5 - Production/Stable
  12. Classifier: Intended Audience :: Developers
  13. Classifier: License :: OSI Approved :: BSD License
  14. Classifier: Natural Language :: English
  15. Classifier: Programming Language :: Python :: 2
  16. Classifier: Programming Language :: Python :: 2.7
  17. Classifier: Programming Language :: Python :: 3
  18. Classifier: Programming Language :: Python :: 3.5
  19. Classifier: Programming Language :: Python :: 3.6
  20. Classifier: Programming Language :: Python :: 3.7
  21. Classifier: Programming Language :: Python :: 3.8
  22. Classifier: Topic :: Software Development :: Code Generators
  23. Requires-Dist: wheel (<1.0,>=0.23.0)
  24. Requires-Dist: six (<2.0,>=1.6.1)
  25. ============
  26. AST Unparser
  27. ============
  28. .. image:: https://badge.fury.io/py/astunparse.png
  29. :target: http://badge.fury.io/py/astunparse
  30. .. image:: https://travis-ci.org/simonpercivall/astunparse.png?branch=master
  31. :target: https://travis-ci.org/simonpercivall/astunparse
  32. .. image:: https://readthedocs.org/projects/astunparse/badge/
  33. :target: https://astunparse.readthedocs.org/
  34. An AST unparser for Python.
  35. This is a factored out version of ``unparse`` found in the Python
  36. source distribution; under Demo/parser in Python 2 and under Tools/parser
  37. in Python 3.
  38. Basic example::
  39. import inspect
  40. import ast
  41. import astunparse
  42. # get back the source code
  43. astunparse.unparse(ast.parse(inspect.getsource(ast)))
  44. # get a pretty-printed dump of the AST
  45. astunparse.dump(ast.parse(inspect.getsource(ast)))
  46. This library is single-source compatible with Python 2.6 through Python 3.5. It
  47. is authored by the Python core developers; I have simply merged the Python 2.7
  48. and the Python 3.5 source and test suites, and added a wrapper. This factoring
  49. out is to provide a library implementation that supports both versions.
  50. Added to this is a pretty-printing ``dump`` utility function.
  51. The test suite both runs specific tests and also roundtrips much of the
  52. standard library.
  53. Extensions and Alternatives
  54. ---------------------------
  55. Similar projects include:
  56. * codegen_
  57. * astor_
  58. * astmonkey_
  59. * astprint_
  60. None of these roundtrip much of the standard library and fail several of the basic
  61. tests in the ``test_unparse`` test suite.
  62. This library uses mature and core maintained code instead of trying to patch
  63. existing libraries. The ``unparse`` and the ``test_unparse`` modules
  64. are under the PSF license.
  65. Extensions include:
  66. * typed-astunparse: extends astunparse to support type annotations.
  67. * Documentation: http://astunparse.rtfd.org.
  68. Features
  69. --------
  70. * unparses Python AST.
  71. * pretty-prints AST.
  72. .. _codegen: https://github.com/andreif/codegen
  73. .. _astor: https://github.com/berkerpeksag/astor
  74. .. _astmonkey: https://github.com/konradhalas/astmonkey
  75. .. _astprint: https://github.com/Manticore/astprint
  76. Changelog
  77. =========
  78. Here's the recent changes to AST Unparser.
  79. 1.6.3 - 2019-12-22
  80. ~~~~~~~~~~~~~~~~~~
  81. * Add full support for Python 3.8
  82. 1.6.2 - 2019-01-19
  83. ~~~~~~~~~~~~~~~~~~
  84. * Add support for the Constant node in Python 3.8
  85. * Add tests to the sdist
  86. 1.6.1 - 2018-10-03
  87. ~~~~~~~~~~~~~~~~~~
  88. * Fix the roundtripping of very complex f-strings.
  89. 1.6.0 - 2018-09-30
  90. ~~~~~~~~~~~~~~~~~~
  91. * Python 3.7 compatibility
  92. 1.5.0 - 2017-02-05
  93. ~~~~~~~~~~~~~~~~~~
  94. * Python 3.6 compatibility
  95. * bugfix: correct argparser option type
  96. 1.4.0 - 2016-06-24
  97. ~~~~~~~~~~~~~~~~~~
  98. * Support for the ``async`` keyword
  99. * Support for unparsing "Interactive" and "Expression" nodes
  100. 1.3.0 - 2016-01-17
  101. ~~~~~~~~~~~~~~~~~~
  102. * Python 3.5 compatibility
  103. 1.2.0 - 2014-04-03
  104. ~~~~~~~~~~~~~~~~~~
  105. * Python 2.6 through 3.4 compatibility
  106. * A new function ``dump`` is added to return a pretty-printed version
  107. of the AST. It's also available when running ``python -m astunparse``
  108. as the ``--dump`` argument.
  109. 1.1.0 - 2014-04-01
  110. ~~~~~~~~~~~~~~~~~~
  111. * ``unparse`` will return the source code for an AST. It is pretty
  112. feature-complete, and round-trips the stdlib, and is compatible with
  113. Python 2.7 and Python 3.4.
  114. Running ``python -m astunparse`` will print the round-tripped source
  115. for any python files given as argument.