black/src/blib2to3
2025-05-29 14:10:29 -07:00
..
pgen2 Fix CI mypyc 1.16 failure (#4671) 2025-05-29 14:10:29 -07:00
__init__.py Refactor black into packages in src/ dir (#1376) 2020-05-08 08:50:50 -07:00
Grammar.txt Fix parser for TypeVar bounds (#4602) 2025-03-03 00:20:23 -08:00
LICENSE Refactor black into packages in src/ dir (#1376) 2020-05-08 08:50:50 -07:00
PatternGrammar.txt Refactor black into packages in src/ dir (#1376) 2020-05-08 08:50:50 -07:00
pygram.py Add PEP 701 support (#3822) 2024-04-22 08:19:19 -07:00
pytree.py Update deprecated type aliases (#4486) 2024-10-23 07:00:55 -07:00
README Fix most blib2to3 lint (#3794) 2023-07-16 21:33:58 -07:00

A subset of lib2to3 taken from Python 3.7.0b2. Commit hash:
9c17e3a1987004b8bcfbe423953aad84493a7984

Reasons for forking:

- consistent handling of f-strings for users of Python < 3.6.2
- backport of BPO-33064 that fixes parsing files with trailing commas after \*args and
  \*\*kwargs
- backport of GH-6143 that restores the ability to reformat legacy usage of `async`
- support all types of string literals
- better ability to debug (better reprs)
- INDENT and DEDENT don't hold whitespace and comment prefixes
- ability to Cythonize

Change Log:

- Changes default logger used by Driver
- Backported the following upstream parser changes:
  - "bpo-42381: Allow walrus in set literals and set comprehensions (GH-23332)"
    https://github.com/python/cpython/commit/cae60187cf7a7b26281d012e1952fafe4e2e97e9
  - "bpo-42316: Allow unparenthesized walrus operator in indexes (GH-23317)"
    https://github.com/python/cpython/commit/b0aba1fcdc3da952698d99aec2334faa79a8b68c
- Tweaks to help mypyc compile faster code (including inlining type information,
  "Final-ing", etc.)