Skip to content
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

Cache parsing of version and names #726

Closed
wants to merge 1 commit into from
Closed

Conversation

bdraco
Copy link

@bdraco bdraco commented Oct 4, 2023

extracted from pypa/pip#12316

@uranusjr
Copy link
Member

uranusjr commented Oct 4, 2023

I’m not sure packaging is the right layer for this tbh.

@bdraco
Copy link
Author

bdraco commented Oct 4, 2023

I’m not sure packaging is the right layer for this tbh.

Do you have a suggestion on where else it should go?

I was hoping it could be done in pip but its the Version object construction that is expensive and they are nearly all created in packaging it self so I didn't find a way to do something like the below in pip:

https://github.com/pypa/pip/blob/dfaac0a6886872088d565b3c77cb4c6328a1f941/src/pip/_internal/utils/packaging.py#L37

@bdraco bdraco marked this pull request as ready for review October 4, 2023 22:29
@brettcannon
Copy link
Member

I also agree that we shouldn't be the caching layer for anyone; this package is way too low-level to making those sorts of decisions for projects.

@brettcannon brettcannon closed this Oct 5, 2023
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.

3 participants