[Bug 275167] security/py-service-identity: merge duplicate of security/py-service_identity

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 20 Nov 2023 08:30:03 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275167

--- Comment #8 from John Hein <jcfyecrayz@liamekaens.com> ---
(In reply to Palle Girgensohn from comment #6)
The package indeed installs to site-packages/service_identity.  Installing to
site-packages/service-identity breaks when you do 'import service-identity'
since identifier names cannot include hyphens.  There are ways to import
modules if the directory name has hyphens, but it's better if you don't do so.

PyPI package names are another story. You can use hyphens there although some
style guides recommend just using alphabetic lowercase (see 'Package and Module
Names' PEP 8). There are lots of package names that use uppercase and hyphens
at pypi.org that do not follow that guideline, however - see
https://packaging.python.org/en/latest/specifications/name-normalization/
(which allows underscores and hyphens and uppercase).  Maybe I am misreading
PEP 8 (specifically what is considered a "package name").  But note that after
the "name normalization" described in the 'Python Packaging User Guide', names
with hyphens and underscores are considered equal in certain contexts (e.g.,
when provided to importlib.metadata functions).

-- 
You are receiving this mail because:
You are the assignee for the bug.