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

uv init normalize directory name #5292

Merged
merged 3 commits into from
Jul 22, 2024
Merged

Conversation

j178
Copy link
Contributor

@j178 j178 commented Jul 22, 2024

Summary

Resolves #5255

@charliermarsh
Copy link
Member

Do we reject packages with invalid names, like uv init "foo bar"? What happens there?

@konstin
Copy link
Member

konstin commented Jul 22, 2024

We may need to revisit the normalization for dots (e.g. foo.bar) later, but always using underscores doesn't seems correcter than the current solution

@konstin konstin enabled auto-merge (squash) July 22, 2024 16:01
@konstin konstin added the bug Something isn't working label Jul 22, 2024
@j178
Copy link
Contributor Author

j178 commented Jul 22, 2024

Do we reject packages with invalid names, like uv init "foo bar"? What happens there?

error: Not a valid package or extra name: "foo bar". Names must start and end with a letter or digit and may only contain -, _, ., and alphanumeric characters.

It gets rejected during parsing to PackageName.

@konstin konstin merged commit c52b767 into astral-sh:main Jul 22, 2024
54 checks passed
@j178 j178 deleted the init-normalize branch July 22, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uv init creates unimportable package subdirectory
3 participants