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

should the project/package name be prometheus-client rather than prometheus_client #1092

Open
calestyo opened this issue Feb 21, 2025 · 3 comments

Comments

@calestyo
Copy link

Hey.

I stumbled over the question what to use when one specifies the Prometheus Client as a dependency= in pyproject.toml?

The actual package build/installation seems to work with both names.

For me the whole Python packaging standard are like big mess ^^... but, if I understand correctly the following possibly means:

The name should be lowercased with all runs of the characters ., -, or _ replaced with a single - character.

that the name should be with hypen.

So maybe that should be changed in pyproject.toml and many other places like e.g.:

and perhaps more in tox.ini and mypy.ini?

Cheers,
Chris.

@ethanschen
Copy link
Contributor

As mentioned in Names and normalization:

This means that the following names are all equivalent:

  • friendly-bard (normalized form)
  • Friendly-Bard
  • FRIENDLY-BARD
  • friendly.bard
  • friendly_bard
  • friendly--bard
  • FrIeNdLy-._.-bArD (a terrible way to write a name, but it is valid)

Whether the project name is prometheus_client or even PrOmEtHeUs-._.-ClIeNt(a terrible way to write a name, but it is valid), it will be normalized as prometheus-client when built into a pypi package.

@calestyo
Copy link
Author

calestyo commented Mar 1, 2025

Yes, but since it's anyway normalised and since the recommendation is to use -, I figured maybe it should be changed for clarity. :-)

@csmarchbanks
Copy link
Member

Yeah, as mentioned they are equivalent. I would be ok with updating pyproject.toml and other locations to use the normalized form if that helps reduce any confusion.

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

No branches or pull requests

3 participants