Skip to content

fix(dependency): add back typing-extensions for 3.9#1358

Merged
zsol merged 1 commit intoInstagram:mainfrom
Lee-W:add-back-type-extention-as-needed-by-python-3.9
Jun 12, 2025
Merged

fix(dependency): add back typing-extensions for 3.9#1358
zsol merged 1 commit intoInstagram:mainfrom
Lee-W:add-back-type-extention-as-needed-by-python-3.9

Conversation

@Lee-W
Copy link
Contributor

@Lee-W Lee-W commented Jun 11, 2025

Summary

Missing typing-extensions breaks "from libcst.codemod import CodemodContext"

This can be verified by

uv run --python 3.9 --with libcst==1.8.1 python -c "from libcst.codemod import CodemodContext"

it raises the following error

    from typing_extensions import ParamSpec
ModuleNotFoundError: No module named 'typing_extensions'

while it works fine for 3.10

uv run --python 3.10 --with libcst==1.8.1 python -c "from libcst.codemod import CodemodContext"

Test Plan

Missing typing-extensions breaks "from libcst.codemod import CodemodContext"
@facebook-github-bot
Copy link

Hi @Lee-W!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 11, 2025
@zsol
Copy link
Contributor

zsol commented Jun 12, 2025

Hmm looks like this was broken in 1.8.0 (specifically in #1294), but why didn't the tests catch it?

@zsol
Copy link
Contributor

zsol commented Jun 12, 2025

Ah I see, the test dependencies transitively include typing-extensions. Unfortunate.

@zsol zsol merged commit 67ba746 into Instagram:main Jun 12, 2025
37 checks passed
@zsol
Copy link
Contributor

zsol commented Jun 12, 2025

Thanks for the fix!

@zsol
Copy link
Contributor

zsol commented Jun 12, 2025

I've put up #1359 to make sure this never happens again

@Lee-W
Copy link
Contributor Author

Lee-W commented Jun 13, 2025

Thanks for helping us merge it! It seems we excluded 1.8.0 last time (I wasn't aware), and this time 1.8.1 breaks my PR, which is why I find it. Glad to know 1.8.2 would work fine!

jorenham pushed a commit to jorenham/LibCST that referenced this pull request Feb 3, 2026
Missing typing-extensions breaks "from libcst.codemod import CodemodContext"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants