Skip to content

Releases: Instagram/LibCST

v0.4.9

10 Nov 21:16
fc6e0c6
Compare
Choose a tag to compare

Updated

  • Bump setuptools-rust version by @zsol in #809

Full Changelog: v0.4.8...v0.4.9

v0.4.8

10 Nov 09:42
c44b182
Compare
Choose a tag to compare

New Contributors

Fixed

  • Fix parse error message for number parsing by @zzl0 in #724
  • Fix problematic doc build, due to the new builder image provided by readthedocs doesn't has the graphviz-dev package pre-installed any more by @MapleCCC in #751
  • Fix docstring of FullRepoManager by @MapleCCC in #750
  • Fix bug when TypeOf is one of options in OneOf / AllOf by @MapleCCC in #756
  • Tighten the metadata type of ExpressionContextProvider by @MapleCCC in #760
  • Fix the bug that the use of formatter in codemods has undetermined target Python version, resulting in hard-to-reason-with behavior by @MapleCCC in #771

Added

  • Python 3.11 rutime support
  • Raise informative exception when metadata is unresolved in a metadata-based match by @MapleCCC in #757
  • Add AccessorProvider by @matthewshaer in #807

Full Changelog: v0.4.7...v0.4.8

v0.4.7

12 Jul 14:56
c85f9bf
Compare
Choose a tag to compare

New Contributors

Fixed

  • Fix get_qualified_names_for matching on prefixes of the given name by @lpetre in #719

Added

  • Implement lazy loading mechanism for expensive metadata providers by @Chenguang-Zhu in #720

Full Changelog: v0.4.6...v0.4.7

v0.4.6

04 Jul 16:11
7042623
Compare
Choose a tag to compare

New Contributors

Fixed

  • convert_type_comments now preserves comments following type comments by @superbobry in #702
  • QualifiedNameProvider optimizations
    • Cache the scope name prefix to prevent scope traversal in a tight loop by @lpetre in #708
    • Faster qualified name formatting by @lpetre in #710
    • Prevent unnecessary work in Scope.get_qualified_names_for_ by @lpetre in #709
  • Fix parsing of parenthesized empty tuples by @zsol in #712
  • Support whitespace after ParamSlash by @zsol in #713
  • [parser] bail on deeply nested expressions by @zsol in #718

v0.4.5

17 Jun 12:38
ea8d3d5
Compare
Choose a tag to compare

New Contributors

  • @zzl0 made their first contribution in #704

Fixes

  • Only skip supported escaped characters in f-strings by @zsol in #700
  • Escaping quote characters in raw string literals causes a tokenizer error by @zsol in #668
  • Corrected a code example in the documentation by @zzl0 in #703
  • Handle multiline strings that start with quotes by @zzl0 in #704
  • Fixed a performance regression in libcst.metadata.ScopeProvider by @lpetre in #698

Full Changelog: v0.4.4...v0.4.5

v0.4.4

13 Jun 18:08
7a6fa53
Compare
Choose a tag to compare

New Contributors

Added

Updated

  • parser: use references instead of smart pointers for Tokens by @zsol in #691

Full Changelog: v0.4.3...v0.4.4

v0.4.3

11 May 12:04
69a4f4e
Compare
Choose a tag to compare

Fixed

  • Restore the 0.4.1 behavior for libcst.helpers.get_absolute_module by @lpetre in #684

Full Changelog: v0.4.2...v0.4.3

v0.4.2

04 May 16:51
460698a
Compare
Choose a tag to compare

New Contributors

Fixed

  • native: Avoid crashing by making IntoPy conversion fallible by @zsol in #639
  • native: make sure ParserError's line is zero-indexed by @zsol in #681
  • Fix space validation for AsName and Await by @zsol in #641
  • Qualified Name Provider: Fix returned qname for symbols that are prefixes of each other by @wiyr in #669
  • Rename Codemod: Correct last renamed import from by @toofar in #675
  • Many changes to the Apply Type Comments codemod:

Added

Updated

  • Support module and package names in the codemod context by @lpetre in #662
  • Drop support for running libcst using a python 3.6 interpreter by @lpetre in #663
  • Update relative import logic to match cpython by @lpetre in #660
  • Scope Provider: Consider access information when computing qualified names for nodes by @lpetre in #682

Full Changelog: v0.4.1...v0.4.2

LibCST 0.4.1 Release - 2022-01-28

28 Jan 10:45
e0744c7
Compare
Choose a tag to compare

New Contributors

Added

  • Add docs about the native parts by @zsol in #601
  • Specify minimum rust toolchain version by @zsol in #614
  • build wheels on main branch for linux/arm64 by @zsol in #630

Updated

  • ApplyTypeAnnotationVisitor changes
    • Add support for methods with func type comment excluding self/cls by @stroxler in #622
    • Merge in TypeVars and Generic base classes in ApplyTypeAnnotationVisitor by @martindemello in #596
    • Full handling for applying type comments to Assign by @stroxler in #599
    • Add support for For and With by @stroxler in #607
    • Support FunctionDef transformations by @stroxler in #610
  • add slots to base classes, @add_slots takes bases into account by @ariebovenberg in #605
  • change pyo3 as optional dependency in native Python Parser by @sehz in #598
  • [native] Box most enums by @zsol in #632
  • [native] Return tuples instead of lists in CST nodes by @zsol in #631

Fixed

  • Allow trailing whitespace without newline at EOF by @zsol in #611
  • Handle ast.parse failures when converting function type comments by @stroxler in #616
  • [native] Don't redundantly nest StarredElement inside another Element by @isidentical in #624
  • [native] Allow unparenthesized tuples inside f-strings by @isidentical in #621
  • Don't require whitespace right after match by @isidentical in #628
  • Proxy both parentheses in some pattern matching nodes by @isidentical in #626

LibCST 0.4.0 Release - 2022-01-12

12 Jan 21:01
5f22b6c
Compare
Choose a tag to compare

This release contains a new parsing infrastructure that is turned off by default. You
can enable it by setting the LIBCST_PARSER_TYPE environment variable to native
before parsing an input with the usual LibCST APIs. Parsing Python 3.10 documents is
only supported in this new mode.

Note: the new parser is built as a native extension, so LibCST will ship with binary
wheels from now on.

Added

  • Implement a Python PEG parser in Rust by @zsol in #566
  • implement PEP-654: except* by @zsol in #571
  • Implement PEP-634 - Match statement by @zsol in #568
  • Add instructions to codegen test failures by @stroxler in #582
  • Support Parenthesized With Statements by @stroxler in #584
  • Support relative imports in AddImportsVisitor by @martindemello in #585
  • Codemod for PEP 484 Assign w / type comments -> PEP 526 AnnAssign by @stroxler in #594

Updated

  • Update license headers by @zsol in #560
  • Use precise signature matching when inserting function type annotations by @martindemello in #591