METADATA 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. Metadata-Version: 2.4
  2. Name: parso
  3. Version: 0.8.6
  4. Summary: A Python Parser
  5. Home-page: https://github.com/davidhalter/parso
  6. Author: David Halter
  7. Author-email: davidhalter88@gmail.com
  8. Maintainer: David Halter
  9. Maintainer-email: davidhalter88@gmail.com
  10. License: MIT
  11. Keywords: python parser parsing
  12. Platform: any
  13. Classifier: Development Status :: 4 - Beta
  14. Classifier: Environment :: Plugins
  15. Classifier: Intended Audience :: Developers
  16. Classifier: License :: OSI Approved :: MIT License
  17. Classifier: Operating System :: OS Independent
  18. Classifier: Programming Language :: Python :: 3
  19. Classifier: Programming Language :: Python :: 3.6
  20. Classifier: Programming Language :: Python :: 3.7
  21. Classifier: Programming Language :: Python :: 3.8
  22. Classifier: Programming Language :: Python :: 3.9
  23. Classifier: Programming Language :: Python :: 3.10
  24. Classifier: Programming Language :: Python :: 3.11
  25. Classifier: Programming Language :: Python :: 3.12
  26. Classifier: Programming Language :: Python :: 3.13
  27. Classifier: Programming Language :: Python :: 3.14
  28. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  29. Classifier: Topic :: Text Editors :: Integrated Development Environments (IDE)
  30. Classifier: Topic :: Utilities
  31. Classifier: Typing :: Typed
  32. Requires-Python: >=3.6
  33. License-File: LICENSE.txt
  34. License-File: AUTHORS.txt
  35. Provides-Extra: testing
  36. Requires-Dist: pytest; extra == "testing"
  37. Requires-Dist: docopt; extra == "testing"
  38. Provides-Extra: qa
  39. Requires-Dist: flake8==5.0.4; extra == "qa"
  40. Requires-Dist: zuban==0.5.1; extra == "qa"
  41. Requires-Dist: types-setuptools==67.2.0.1; extra == "qa"
  42. Dynamic: author
  43. Dynamic: author-email
  44. Dynamic: classifier
  45. Dynamic: description
  46. Dynamic: home-page
  47. Dynamic: keywords
  48. Dynamic: license
  49. Dynamic: license-file
  50. Dynamic: maintainer
  51. Dynamic: maintainer-email
  52. Dynamic: platform
  53. Dynamic: provides-extra
  54. Dynamic: requires-python
  55. Dynamic: summary
  56. ###################################################################
  57. parso - A Python Parser
  58. ###################################################################
  59. .. image:: https://github.com/davidhalter/parso/workflows/Build/badge.svg?branch=master
  60. :target: https://github.com/davidhalter/parso/actions
  61. :alt: GitHub Actions build status
  62. .. image:: https://coveralls.io/repos/github/davidhalter/parso/badge.svg?branch=master
  63. :target: https://coveralls.io/github/davidhalter/parso?branch=master
  64. :alt: Coverage Status
  65. .. image:: https://pepy.tech/badge/parso
  66. :target: https://pepy.tech/project/parso
  67. :alt: PyPI Downloads
  68. .. image:: https://raw.githubusercontent.com/davidhalter/parso/master/docs/_static/logo_characters.png
  69. Parso is a Python parser that supports error recovery and round-trip parsing
  70. for different Python versions (in multiple Python versions). Parso is also able
  71. to list multiple syntax errors in your python file.
  72. Parso has been battle-tested by jedi_. It was pulled out of jedi to be useful
  73. for other projects as well.
  74. Parso consists of a small API to parse Python and analyse the syntax tree.
  75. A simple example:
  76. .. code-block:: python
  77. >>> import parso
  78. >>> module = parso.parse('hello + 1', version="3.9")
  79. >>> expr = module.children[0]
  80. >>> expr
  81. PythonNode(arith_expr, [<Name: hello@1,0>, <Operator: +>, <Number: 1>])
  82. >>> print(expr.get_code())
  83. hello + 1
  84. >>> name = expr.children[0]
  85. >>> name
  86. <Name: hello@1,0>
  87. >>> name.end_pos
  88. (1, 5)
  89. >>> expr.end_pos
  90. (1, 9)
  91. To list multiple issues:
  92. .. code-block:: python
  93. >>> grammar = parso.load_grammar()
  94. >>> module = grammar.parse('foo +\nbar\ncontinue')
  95. >>> error1, error2 = grammar.iter_errors(module)
  96. >>> error1.message
  97. 'SyntaxError: invalid syntax'
  98. >>> error2.message
  99. "SyntaxError: 'continue' not properly in loop"
  100. Resources
  101. =========
  102. - `Testing <https://parso.readthedocs.io/en/latest/docs/development.html#testing>`_
  103. - `PyPI <https://pypi.python.org/pypi/parso>`_
  104. - `Docs <https://parso.readthedocs.org/en/latest/>`_
  105. - Uses `semantic versioning <https://semver.org/>`_
  106. Installation
  107. ============
  108. .. code-block:: bash
  109. pip install parso
  110. Future
  111. ======
  112. - There will be better support for refactoring and comments. Stay tuned.
  113. - There's a WIP PEP8 validator. It's however not in a good shape, yet.
  114. Known Issues
  115. ============
  116. - `async`/`await` are already used as keywords in Python3.6.
  117. - `from __future__ import print_function` is not ignored.
  118. Acknowledgements
  119. ================
  120. - Guido van Rossum (@gvanrossum) for creating the parser generator pgen2
  121. (originally used in lib2to3).
  122. - Salome Schneider for the extremely awesome parso logo.
  123. .. _jedi: https://github.com/davidhalter/jedi
  124. .. :changelog:
  125. Changelog
  126. ---------
  127. Unreleased
  128. ++++++++++
  129. 0.8.6 (2026-02-09)
  130. ++++++++++++++++++
  131. - Switch the type checker to Zuban. It's faster and now also checks untyped
  132. code.
  133. 0.8.5 (2025-08-23)
  134. ++++++++++++++++++
  135. - Add a fallback grammar for Python 3.14+
  136. 0.8.4 (2024-04-05)
  137. ++++++++++++++++++
  138. - Add basic support for Python 3.13
  139. 0.8.3 (2021-11-30)
  140. ++++++++++++++++++
  141. - Add basic support for Python 3.11 and 3.12
  142. 0.8.2 (2021-03-30)
  143. ++++++++++++++++++
  144. - Various small bugfixes
  145. 0.8.1 (2020-12-10)
  146. ++++++++++++++++++
  147. - Various small bugfixes
  148. 0.8.0 (2020-08-05)
  149. ++++++++++++++++++
  150. - Dropped Support for Python 2.7, 3.4, 3.5
  151. - It's possible to use ``pathlib.Path`` objects now in the API
  152. - The stubs are gone, we are now using annotations
  153. - ``namedexpr_test`` nodes are now a proper class called ``NamedExpr``
  154. - A lot of smaller refactorings
  155. 0.7.1 (2020-07-24)
  156. ++++++++++++++++++
  157. - Fixed a couple of smaller bugs (mostly syntax error detection in
  158. ``Grammar.iter_errors``)
  159. This is going to be the last release that supports Python 2.7, 3.4 and 3.5.
  160. 0.7.0 (2020-04-13)
  161. ++++++++++++++++++
  162. - Fix a lot of annoying bugs in the diff parser. The fuzzer did not find
  163. issues anymore even after running it for more than 24 hours (500k tests).
  164. - Small grammar change: suites can now contain newlines even after a newline.
  165. This should really not matter if you don't use error recovery. It allows for
  166. nicer error recovery.
  167. 0.6.2 (2020-02-27)
  168. ++++++++++++++++++
  169. - Bugfixes
  170. - Add Grammar.refactor (might still be subject to change until 0.7.0)
  171. 0.6.1 (2020-02-03)
  172. ++++++++++++++++++
  173. - Add ``parso.normalizer.Issue.end_pos`` to make it possible to know where an
  174. issue ends
  175. 0.6.0 (2020-01-26)
  176. ++++++++++++++++++
  177. - Dropped Python 2.6/Python 3.3 support
  178. - del_stmt names are now considered as a definition
  179. (for ``name.is_definition()``)
  180. - Bugfixes
  181. 0.5.2 (2019-12-15)
  182. ++++++++++++++++++
  183. - Add include_setitem to get_definition/is_definition and get_defined_names (#66)
  184. - Fix named expression error listing (#89, #90)
  185. - Fix some f-string tokenizer issues (#93)
  186. 0.5.1 (2019-07-13)
  187. ++++++++++++++++++
  188. - Fix: Some unicode identifiers were not correctly tokenized
  189. - Fix: Line continuations in f-strings are now working
  190. 0.5.0 (2019-06-20)
  191. ++++++++++++++++++
  192. - **Breaking Change** comp_for is now called sync_comp_for for all Python
  193. versions to be compatible with the Python 3.8 Grammar
  194. - Added .pyi stubs for a lot of the parso API
  195. - Small FileIO changes
  196. 0.4.0 (2019-04-05)
  197. ++++++++++++++++++
  198. - Python 3.8 support
  199. - FileIO support, it's now possible to use abstract file IO, support is alpha
  200. 0.3.4 (2019-02-13)
  201. +++++++++++++++++++
  202. - Fix an f-string tokenizer error
  203. 0.3.3 (2019-02-06)
  204. +++++++++++++++++++
  205. - Fix async errors in the diff parser
  206. - A fix in iter_errors
  207. - This is a very small bugfix release
  208. 0.3.2 (2019-01-24)
  209. +++++++++++++++++++
  210. - 20+ bugfixes in the diff parser and 3 in the tokenizer
  211. - A fuzzer for the diff parser, to give confidence that the diff parser is in a
  212. good shape.
  213. - Some bugfixes for f-string
  214. 0.3.1 (2018-07-09)
  215. +++++++++++++++++++
  216. - Bugfixes in the diff parser and keyword-only arguments
  217. 0.3.0 (2018-06-30)
  218. +++++++++++++++++++
  219. - Rewrote the pgen2 parser generator.
  220. 0.2.1 (2018-05-21)
  221. +++++++++++++++++++
  222. - A bugfix for the diff parser.
  223. - Grammar files can now be loaded from a specific path.
  224. 0.2.0 (2018-04-15)
  225. +++++++++++++++++++
  226. - f-strings are now parsed as a part of the normal Python grammar. This makes
  227. it way easier to deal with them.
  228. 0.1.1 (2017-11-05)
  229. +++++++++++++++++++
  230. - Fixed a few bugs in the caching layer
  231. - Added support for Python 3.7
  232. 0.1.0 (2017-09-04)
  233. +++++++++++++++++++
  234. - Pulling the library out of Jedi. Some APIs will definitely change.