Skip to content

Remove vendored typing-extensions #13336

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
merged 2 commits into from
Jul 26, 2025

Conversation

ichard26
Copy link
Member

It's a shockingly large dependency that does effectively nothing at runtime for us.

Depends on Textualize/rich#3700.

@ichard26 ichard26 added type: refactor Refactoring code project: vendored dependency Related to a vendored dependency labels Apr 15, 2025

if TYPE_CHECKING:
# TODO: import from typing once Python 3.10 is dropped.
from pip._vendor.typing_extensions import ParamSpec
Copy link
Member

Choose a reason for hiding this comment

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

I think this should import directly from typing_extensions and then add it's to the mypy pre commit additional dependencies:

additional_dependencies: [

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I need to fix the vendoring imports. vendoring is complaining because pip._vendor.typing_extensions does not exist anymore. I'll do that once Rich accepts my PR and cuts a new release.

@pfmoore
Copy link
Member

pfmoore commented Apr 15, 2025

Please be aware of #13313. I have been holding off on merging it, so that I can include any last minute upgrades to our dependencies before the release, but I don't want to get in a merge mess with this.

If you're hoping for this to go into 25.1, let me know and I can merge #13313, to give you a stable basis to work from.

@pfmoore
Copy link
Member

pfmoore commented Apr 15, 2025

Ah, I just noticed this relies on the rich PR, so I imagine it won't make it into 25.1 - that would need the rich PR to land, and a new release of rich, all within a week.

@ichard26
Copy link
Member Author

I imagine it won't make it into 25.1

Yup :)

@ichard26 ichard26 added the state: blocked Can not be done until something else is done label Apr 25, 2025
@notatallshaw
Copy link
Member

I completely missed this and raised my own rich PR which has now landed Textualize/rich#3763.

I'm going to add this to the 25.2 milestone to remind us, can be removed if rich doesn't make a release (I imagine their releases will be less frequent with the business side of textualize having wound down).

@ichard26
Copy link
Member Author

It's clear that rich is effectively stable and not going to see a release anytime soon. I'm removing this from 25.2 milestone.

@ichard26 ichard26 removed this from the 25.2 milestone Jul 21, 2025
@piotr-dobrogost
Copy link

It's clear that rich is effectively stable and not going to see a release anytime soon. I'm removing this from 25.2 milestone.

How about labelling it with waiting-for-rich-release or something so that it will stay on radar?

@notatallshaw
Copy link
Member

How about labelling it with waiting-for-rich-release or something so that it will stay on radar?

I don't think anyone is monitoring at random labels on pip. I however am keeping tabs on rich releases for my professional job, so I'll ping back here on a new release.

@pfmoore
Copy link
Member

pfmoore commented Jul 22, 2025

It's clear that rich is effectively stable

What makes you say that? It's had a number of commits about a month ago, and 4 months since the last release isn't that long. The necessary PR was merged in June. It feels a bit harsh to write rich off just because the commercial side of the development has wound down.

Yes, we may not see a release in time for pip 25.2, so I'm fine with removing it from the 25.2 milestone, but why not just move it to the 25.3 milestone and check in when that comes up?

@notatallshaw
Copy link
Member

@pfmoore there's been some recent developments with the maintainer: https://textual.textualize.io/blog/2025/05/07/the-future-of-textualize/

I've seen comments on GitHub issues that they're not taking on any new features that they think could be implemented outside the library. I expect release pace to slow.

@pfmoore
Copy link
Member

pfmoore commented Jul 22, 2025

I was aware of that, but there's the final comment in that post:

I will be maintaining Textual and Rich as I have always done. Software is never finished, but Textual is mature and battle-tested. I'm confident transitioning from a full-time funded project to a community project won't have a negative impact.

It's not as if we're waiting on a new feature, or even a PR to be merged. We just need a release, and I don't see any indication that they've stopped doing releases (although the need for releases will have slowed).

Anyway, we can wait and see. IMO, keeping this in our upcoming release milestone keeps it on the radar - the saving we get justifies that, IMO. We can just do a quick ckeck each release, and push this forward if there's no change.

@notatallshaw notatallshaw added this to the 25.3 milestone Jul 22, 2025
@ichard26
Copy link
Member Author

I just forgot to add it to the 25.3 milestone. And yes, I regret my tone. It did come off more harshly than I intended. I just don't think this PR is worth my time given rich doesn't has any plans to cut a release soon.

@TomJGooding
Copy link

Rich v14.1.0 has just released FYI: https://github.com/Textualize/rich/releases/tag/v14.1.0

@ichard26 ichard26 force-pushed the removal/typing-extensions branch from 770c092 to f68454b Compare July 25, 2025 23:33
@ichard26 ichard26 removed the state: blocked Can not be done until something else is done label Jul 25, 2025
@ichard26 ichard26 force-pushed the removal/typing-extensions branch from f68454b to 4af2afe Compare July 25, 2025 23:36
@ichard26 ichard26 marked this pull request as ready for review July 25, 2025 23:38
@ichard26
Copy link
Member Author

@pfmoore If you have time for a review, I'd be happy to include this in the 25.2 release. It should be a relatively straight-forward change. Feel free to say no though! I understand you're tight on free time 🙂

@ichard26 ichard26 merged commit 28bb1b8 into pypa:main Jul 26, 2025
29 checks passed
@ichard26 ichard26 deleted the removal/typing-extensions branch July 26, 2025 18:47
@ichard26
Copy link
Member Author

ichard26 commented Jul 26, 2025

Wheee, thanks @ichard26 @pfmoore !

edit: whoops :p

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

Successfully merging this pull request may close these issues.

5 participants