Skip to content

Remove CLI pkg_resources dependency - #253

Open
siddicky wants to merge 1 commit into
achillean:masterfrom
siddicky:fix/remove-pkg-resources
Open

Remove CLI pkg_resources dependency#253
siddicky wants to merge 1 commit into
achillean:masterfrom
siddicky:fix/remove-pkg-resources

Conversation

@siddicky

Copy link
Copy Markdown

Summary

  • replace CLI metadata and plugin discovery calls with importlib.metadata
  • use the importlib-metadata backport below Python 3.8
  • support both legacy group mappings and modern selectable entry points
  • add regression coverage for isolated CLI startup, version output, and legacy plugin discovery

This is a smaller alternative to #248 that removes the pkg_resources fallback entirely, following the backport suggestion in that PR.

Fixes #252.
Related: #243, #245, #246, #248.

Verification

  • uv run --isolated --python 3.14 --with . python -m unittest tests.test_cli: 3 tests passed
  • basedpyright tests/test_cli.py: 0 errors, 0 warnings
  • uv build: sdist and wheel built successfully
  • clean wheel install with uv/Python 3.14: shodan --help and shodan version both exit 0
  • production source contains no pkg_resources references

The existing live-API suite still has unrelated failures caused by stale Exploits/host fixtures and changed account/filter behavior; all new CLI tests pass.

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

Successfully merging this pull request may close these issues.

Remove pkg_resources dependency from CLI metadata and plugin discovery

1 participant