Skip to content

Releases: Instagram/LibCST

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

LibCST 0.3.23 Release - 2021-11-23

23 Nov 13:07
9d611f9
Compare
Choose a tag to compare

What's Changed

  • Fixes incorrectly missing annotations by @lpetre in #561

Full Changelog: v0.3.22...v0.3.23

LibCST 0.3.22 Release - 2021-11-22

22 Nov 14:22
3895925
Compare
Choose a tag to compare

Notable changes

See in the CHANGELOG.md

All changes

  • Add --indent-string option to libcst.tool print by @jreese in #525
  • Fix documentation typos by @MapleCCC in #527
  • Fix incorrect m.OneOf() docs by @Zac-HD in #529
  • Remove a dead method in ApplyTypeAnnotationsVisitor by @stroxler in #533
  • Count the information we add in ApplyTypeAnnotationsVisitor by @stroxler in #537
  • Use QualifiedNameProvider to handle stub types by @stroxler in #536
  • Use from __future__ import annotations in ATAV by @stroxler in #540
  • Fix typing errors on ATAV by @stroxler in #542
  • Don't gather metadata if the wrapper already contains it by @lpetre in #545
  • Support relative imports in ATAV qualifier handling by @stroxler in #538
  • Upgrade black to fix errors in 3.9.8 by @lpetre in #547
  • Pass absolute path to codemod test by @lpetre in #549
  • Swallow parsing errors in string annotations. by @lpetre in #548
  • Stop parsing string annotations when no longer in a typing call by @lpetre in #546
  • Publish test packages by @lpetre in #550
  • disable setuptools local scheme when env var is set by @zsol in #551
  • Test overwriting imports w/ global and nonlocal stmts by @lpetre in #553
  • Pin accesses to import alias node by @giomeg in #554
  • Correct and simplify logic of recording assignments by @giomeg in #556
  • Move find_qualified_names_for in the Assignment class. by @giomeg in #557
  • Remove remnants of circleci by @lpetre in #552
  • bump version to 0.3.22 by @zsol in #559

New Contributors

Full Changelog: 0.3.21...v0.3.22