Skip to content

Conversation

@ichard26
Copy link
Member

@ichard26 ichard26 commented Apr 15, 2025

The formatters are exclusively used by the pygments CLI which is already broken because it depends on lexers we've trimmed a long time ago.

~/dev/oss/pip ❯ python -m pip._vendor.pygments
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/ichard26/dev/oss/pip/src/pip/_vendor/pygments/__main__.py", line 12, in <module>
    from pip._vendor.pygments.cmdline import main
  File "/home/ichard26/dev/oss/pip/src/pip/_vendor/pygments/cmdline.py", line 23, in <module>
    from pip._vendor.pygments.lexers.special import TextLexer
ModuleNotFoundError: No module named 'pip._vendor.pygments.lexers.special'

For context: while rich is great and it makes improving our CLI output much easier, we were never happy with how it ballooned the size of our vendored dependencies.

The formatters are exclusively used by the pygments CLI which is already
broken because it depends on lexers we've trimmed a long time ago.
@ichard26 ichard26 added skip news Does not need a NEWS file entry (eg: trivial changes) project: vendored dependency Related to a vendored dependency labels Apr 15, 2025
@ichard26 ichard26 added this to the 25.1 milestone Apr 17, 2025
@pfmoore
Copy link
Member

pfmoore commented Apr 19, 2025

I merged the vendoring updates for 25.1 to ensure this won't have merge conflicts.

@ichard26 ichard26 merged commit d14ace5 into pypa:main Apr 19, 2025
29 checks passed
@ichard26 ichard26 deleted the removal/trim-pygments branch April 19, 2025 13:39
@ichard26
Copy link
Member Author

Thanks for the reviews @pfmoore and @pradyunsg !

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

project: vendored dependency Related to a vendored dependency skip news Does not need a NEWS file entry (eg: trivial changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants