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

Added packaging.utils.create_wheel_filename and create_sdist_filename functions #409

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

e2thenegpii
Copy link

@e2thenegpii e2thenegpii commented Mar 6, 2021

Closes #408

@e2thenegpii

This comment was marked as outdated.

Comment on lines +105 to +106
),
],
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a test putting numpy-1.23.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl through parse_..., and putting the result through create_...?

@@ -119,6 +144,10 @@ def parse_wheel_filename(
return (name, version, build, tags)


def create_sdist_filename(name: str, version: Version) -> str:
Copy link
Member

Choose a reason for hiding this comment

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

The parse -> create feels... asymmetric. My instinctive answer for an alternative to create is compose and a Google search got me to https://stackoverflow.com/questions/148857/what-is-the-opposite-of-parse as the first result, which makes me feel validated. :)

Let's change to this naming scheme:

Suggested change
def create_sdist_filename(name: str, version: Version) -> str:
def compose_sdist_filename(name: str, version: Version) -> str:

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

Successfully merging this pull request may close these issues.

Utility functions to compose file distribution names
3 participants