Skip to content

Remove typing-extensions as a runtime dependency #3763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

notatallshaw
Copy link
Contributor

@notatallshaw notatallshaw commented Jun 15, 2025

Fixes #3762

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

Remove typing-extensions as a runtime dependency by:

  1. Removed all sys.version_info >= (3, 8) blocks as rich no longer supports Python 3.7
  2. Moved the one remaining typing_extensions import into a TYPE_CHECKING block
  3. Move typing-extensions from a runtime dependency to a dev dependency in the pyproject.toml file

I did have some problems running pre-commit locally, hopefully that was just a local issue, I will fix any CI issues if they come up.

@notatallshaw notatallshaw force-pushed the remove-typing-extensions-runtime branch from 113bc1f to 3f5425e Compare June 15, 2025 15:38
@codecov-commenter
Copy link

codecov-commenter commented Jun 15, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.97%. Comparing base (225cb07) to head (3423cb2).
Report is 49 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3763      +/-   ##
==========================================
- Coverage   98.24%   97.97%   -0.27%     
==========================================
  Files          74       74              
  Lines        8105     8118      +13     
==========================================
- Hits         7963     7954       -9     
- Misses        142      164      +22     
Flag Coverage Δ
unittests 97.97% <100.00%> (-0.27%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ichard26
Copy link

FWIW, I already filed a PR for this here and on pip's end: #3700 and pypa/pip#13336.

@notatallshaw
Copy link
Contributor Author

🤦 forgot / missed this sorry.

Copy link
Member

@willmcgugan willmcgugan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REQUEST] Remove typing_extensions as a run time dependency
4 participants