Commit graph

1052 commits

Author SHA1 Message Date
Zsolt Dollenstein
287a43ba9b
remove mypy_extensions import 2024-04-03 21:08:23 +01:00
Zsolt Dollenstein
8b33474001
bump version to 1.3.0
Summary:

Test Plan:
2024-04-03 19:54:30 +01:00
Zsolt Dollenstein
2ffca10845
remove typing dependencies (#1126)
Summary:
This PR removes the `typing_extensions` and `typing_inspect` dependencies as we can now rely on the built-in `typing` module since Python 3.9.

Test Plan:
existing tests
2024-04-03 19:50:14 +01:00
Zsolt Dollenstein
a35a05f056
ci: only build host-native wheels for macos 2024-03-22 09:05:20 -07:00
Zsolt Dollenstein
ffdea4d157
Build native mac arm64 wheels (#1121) 2024-03-21 17:11:45 -07:00
dependabot[bot]
5a50be26f1
Bump pypa/cibuildwheel from 2.16.5 to 2.17.0 (#1119)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.16.5 to 2.17.0.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.16.5...v2.17.0)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 16:57:57 -07:00
dependabot[bot]
36e791ebe5
Bump usort from 1.0.7 to 1.0.8.post1 (#1109)
Bumps [usort](https://github.com/facebook/usort) from 1.0.7 to 1.0.8.post1.
- [Changelog](https://github.com/facebook/usort/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/usort/compare/v1.0.7...v1.0.8.post1)

---
updated-dependencies:
- dependency-name: usort
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 17:39:10 -08:00
dependabot[bot]
f6493dbe8d
Bump ufmt from 2.3.0 to 2.5.1 (#1114)
Bumps [ufmt](https://github.com/omnilib/ufmt) from 2.3.0 to 2.5.1.
- [Changelog](https://github.com/omnilib/ufmt/blob/main/CHANGELOG.md)
- [Commits](https://github.com/omnilib/ufmt/compare/v2.3.0...v2.5.1)

---
updated-dependencies:
- dependency-name: ufmt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 21:11:33 +00:00
Zsolt Dollenstein
627bb0c4ab
bump version to 1.2.0 (#1110) 2024-02-19 12:04:43 +00:00
Dimitris Iliopoulos
fa9300e3a3
Upgrade pyo3 to 0.20 (#1106)
Co-authored-by: Dimitris Iliopoulos <diliopoulos@fb.com>
2024-02-15 09:08:09 +00:00
Zsolt Dollenstein
8a19d05538
remove comment 2024-02-03 12:30:39 +00:00
Zsolt Dollenstein
a4fb999774
ci: build linux-arm64 wheels using emulation (#1102)
Stop using self-hosted runner
2024-02-03 11:39:41 +00:00
Zsolt Dollenstein
e5cc07c342
ci: upgrade to cibuildwheel 2.16.5 (#1101)
This fixes wheel build failures on Windows.
2024-02-03 09:52:16 +00:00
Zsolt Dollenstein
68f98c676c
ci: various tweaks (#1100) 2024-02-03 09:40:04 +00:00
Zsolt Dollenstein
724026aa65
Remove reference to distutil (#1099)
Distutil has been removed in Python 3.12.

Tested by:
```
py -m libcst.tool codemod noop.NOOPCommand .\libcst\tool.py
Calculating full-repo metadata...
Executing codemod...
Finished codemodding 1 files!
 - Transformed 1 files successfully.
 - Skipped 0 files.
 - Failed to codemod 0 files.
 - 0 warnings were generated.
```
2024-02-02 20:58:56 +00:00
Zsolt Dollenstein
55f3e34dfc
Add roundtrip tests from Python (#1098)
Our current roundtrip tests only excerise the Rust codepaths. This PR runs the same roundtrip scenarios but from Python.
2024-02-02 20:50:07 +00:00
Zsolt Dollenstein
c854c986b6
Fix parsing list matchers without explicit brackets (#1097)
```
match a:
  case 1, 2: pass
```

This is parsed correctly by the grammar, but the default values of `MatchList.lbracket` and `MatchList.rbracket` are inconsistent between Python and Rust, causing the above snippet to round-trip (from Python) to:
```
match a:
  case [1, 2]: pass
```

Fixes #1096.
2024-02-02 20:49:25 +00:00
Amethyst Reese
a2a60c147c
Make readme example use python syntax highlighting (#1092) 2024-01-18 19:09:52 +00:00
Amethyst Reese
fad448eb81
Upgrade rust to version 1.70 in readthedocs config (#1091)
Readthedocs builds are currently failing because the libcst wheel fails
to build, hitting an error when trying to get rust dependencies:

```
running build_rust
  Updating crates.io index
error: failed to select a version for the requirement `regex = "=1.9.3"`
candidate versions found which didn't match: 1.8.4, 1.8.3, 1.8.2, ...
location searched: crates.io index
required by package `libcst v1.1.0 (/home/docs/checkouts/readthedocs.org/user_builds/libcst/checkouts/latest/native/libcst)`
error: `cargo metadata --manifest-path native/libcst/Cargo.toml --format-version 1` failed with code 101
```

Assuming this is related to current configuration requesting rust v1.55,
rather than 1.70 that is currently offered.
2024-01-16 21:15:47 +00:00
dependabot[bot]
f5fe4eb25a
Bump flake8 from 6.1.0 to 7.0.0 (#1088)
Bumps [flake8](https://github.com/pycqa/flake8) from 6.1.0 to 7.0.0.
- [Commits](https://github.com/pycqa/flake8/compare/6.1.0...7.0.0)

---
updated-dependencies:
- dependency-name: flake8
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-16 09:02:10 -08:00
dependabot[bot]
c5ef75d0c3
Bump jinja2 from 3.1.2 to 3.1.3 (#1090)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.2...3.1.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-16 09:01:32 -08:00
dependabot[bot]
dfcba1ff03
Bump ufmt from 2.2.0 to 2.3.0 (#1047)
Bumps [ufmt](https://github.com/omnilib/ufmt) from 2.2.0 to 2.3.0.
- [Changelog](https://github.com/omnilib/ufmt/blob/main/CHANGELOG.md)
- [Commits](https://github.com/omnilib/ufmt/compare/v2.2.0...v2.3.0)

---
updated-dependencies:
- dependency-name: ufmt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 14:06:02 +00:00
dependabot[bot]
266f531de1
Bump fixit from 2.0.0.post1 to 2.1.0 (#1087)
Bumps [fixit](https://github.com/Instagram/Fixit) from 2.0.0.post1 to 2.1.0.
- [Changelog](https://github.com/Instagram/Fixit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Instagram/Fixit/compare/v2.0.0.post1...v2.1.0)

---
updated-dependencies:
- dependency-name: fixit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 14:05:38 +00:00
dependabot[bot]
c6fa092565
Update maturin requirement from <0.16,>=0.8.3 to >=0.8.3,<1.5 (#1059)
Updates the requirements on [maturin](https://github.com/pyo3/maturin) to permit the latest version.
- [Release notes](https://github.com/pyo3/maturin/releases)
- [Changelog](https://github.com/PyO3/maturin/blob/main/Changelog.md)
- [Commits](https://github.com/pyo3/maturin/compare/v0.8.3...v1.4.0)

---
updated-dependencies:
- dependency-name: maturin
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-05 09:39:05 +00:00
Wilfred Hughes
c011a48a24
Allow Element::codegen to be used by external users (#1071)
The `Codegen` trait is `pub`, but users wanting to explicitly perform
codegen for `Element` had to copy-paste this part of the code.
2024-01-04 19:26:27 +00:00
Zsolt Dollenstein
a5f1f9a231
ci: use separate artifact names (#1085) 2024-01-04 12:42:15 +00:00
Alvaro Leiva geisse
1757e0f5b4
installing rustc/cargo for mybinder demo (#1083)
when we switch to the rust compiler by default, mybinder stop working, as reoported in https://github.com/Instagram/LibCST/issues/1054 this is because the binder docker image does not have a rust compiler or tools, this install them by using the apt.txt file

Co-authored-by: Alvaro Leiva Geisse <aleivag@meta.com>
2024-01-03 22:16:52 +00:00
anonymousdouble
dbbfe1e0b8
Update test_fix_pyre_directives.py (#1082)
* Update test_fix_pyre_directives.py

refactor with fstring to format string to make code more Pythonic.

* Update test_fix_pyre_directives.py

refactor with fstring to format string to make code more Pythonic.

* Update test_fix_pyre_directives.py

refactor with fstring to format string to make code more Pythonic.

* Update test_fix_pyre_directives.py

refactor with fstring to format string to make code more Pythonic.

* Update test_fix_pyre_directives.py

refactor with chain constant value assignment to make code more Pythonic

* Update test_fix_pyre_directives.py

refactor with chain constant value assignment to make code more Pythonic
2024-01-03 13:06:33 -08:00
Zsolt Dollenstein
30df6fcdab
remove 3.8 support (#1073)
This PR also starts using 3.12 properly in CI
2024-01-03 12:06:37 -08:00
dependabot[bot]
4b31d3db49
Bump actions/setup-python from 4 to 5 (#1060)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-03 10:10:35 -08:00
dependabot[bot]
dc329f29ac
Bump actions/upload-artifact from 3 to 4 (#1065)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-03 10:05:13 -08:00
dependabot[bot]
976b84c618
Bump actions/download-artifact from 3 to 4 (#1066)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-03 10:02:15 -08:00
dependabot[bot]
5a8650b92e
Bump black from 23.9.1 to 23.12.1 (#1077)
Bumps [black](https://github.com/psf/black) from 23.9.1 to 23.12.1.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/23.9.1...23.12.1)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-03 10:01:27 -08:00
Zsolt Dollenstein
43a27b1222
cI: remove rust cache (#1074) 2023-12-20 22:23:21 +00:00
Zsolt Dollenstein
ce5903f4cb
ci: update rust toolchain GHA (#1072)
`actions-rs` is unmaintained
2023-12-20 16:58:39 +00:00
David Tolnay
d97fb9be80
Update syn to v2 (#1064) 2023-12-20 15:53:54 +00:00
David Tolnay
52bbff6dfc
Set repository metadata entry for Rust crates (#1063) 2023-12-12 22:40:40 +00:00
dependabot[bot]
f8a9b80d9e
Bump rustix from 0.38.9 to 0.38.19 in /native (#1043)
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.38.9 to 0.38.19.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.9...v0.38.19)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-18 15:07:17 -07:00
dependabot[bot]
9dd3ea7ec7
Bump pypa/cibuildwheel from 2.16.1 to 2.16.2 (#1041)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.16.1 to 2.16.2.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.16.1...v2.16.2)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 11:14:31 +01:00
Zsolt Dollenstein
693c6dc947
upgrade flake8 (#1040) 2023-10-06 10:01:06 -07:00
Itamar Oren
88d0b36cdd
Update pyproject.toml for Python 3.12 support (#1038)
* Update pyproject.toml for Python 3.12 support

add 3.12 classifier and update description to correctly reflect supported Python versions

* Update pyproject.toml

make the stated parsable versions range consistent with the README
2023-10-05 20:36:12 -07:00
Kyle Into
83f0daed42
fix filepathprovider generic type (#1036)
* fix filepathprovider type

* remove extra import
2023-10-05 20:18:39 -07:00
Itamar Oren
19c2862ea3
Update README.rst (#1039)
update Python parseable versions range to include 3.12
2023-10-05 20:18:05 -07:00
Zsolt Dollenstein
8d4229d959
bump version to 1.1.0 (#1037) 2023-10-05 19:16:12 -07:00
Sergii Dymchenko
7ca5d7f173
Fix link in type_inference_provider.py (#1035)
Same change as https://github.com/Instagram/LibCST/pull/913, but in the docstring.
2023-10-05 15:46:25 -07:00
Zsolt Dollenstein
5df1569a40
Parse multiline expressions in f-strings (#1027) 2023-10-02 10:33:29 -07:00
Zsolt Dollenstein
738dc2f893
Upgrade pyre (#1032)
* Upgrade pyre

* regen fixtures
2023-10-02 09:43:17 -07:00
Zsolt Dollenstein
face393db0
eliminate relative paths from Cargo.toml (#1031)
* eliminate relative paths from Cargo.toml

* fix paths in LICENSE files
2023-10-02 08:05:33 -07:00
dependabot[bot]
74e8a0e7c0
Bump pypa/cibuildwheel from 2.16.0 to 2.16.1 (#1029)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.16.0 to 2.16.1.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.16.0...v2.16.1)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 08:03:49 -07:00
Zsolt Dollenstein
03179b55eb
Parse arbitrarily nested f-strings (#1026) 2023-10-01 20:58:40 +01:00