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

Error when handling normalised names for package extras #119

Open
mhentz opened this issue May 17, 2024 · 0 comments
Open

Error when handling normalised names for package extras #119

mhentz opened this issue May 17, 2024 · 0 comments

Comments

@mhentz
Copy link

mhentz commented May 17, 2024

I use a package that provides the extra async_s3. The underscore is how it's defined in the external package's setup.py. I prefer to use normalised names though, i.e. with hyphens, so in my requirements.txt I specify the extra as async-s3. Running the license check on my requirements file then raises an error that looks like this:

pkg_resources.UnknownExtra: foo-bar 0.0.1 has no such extra feature 'async-s3'

The source of the error is

Traceback (most recent call last):
  File "/path/to/site-packages/pkg_resources/__init__.py", line 2791, in requires
    deps.extend(dm[safe_extra(ext)])
                ~~^^^^^^^^^^^^^^^^^
KeyError: 'async-s3'

The error occurs in the deprecated package pkg_resources (importlib modules are the intended replacement; see https://setuptools.pypa.io/en/latest/pkg_resources.html) so this issue must presumably be resolved here.

Hope you find the time to help with this issue, thanks!

I am running Python 3.11.9 and liccheck version 0.9.2.

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

1 participant