Skip to content

Fix package mappings and plain directory import shadowing#540

Open
l46983284-cpu wants to merge 1 commit into
bndr:masterfrom
l46983284-cpu:fix/import-shadow-and-mappings
Open

Fix package mappings and plain directory import shadowing#540
l46983284-cpu wants to merge 1 commit into
bndr:masterfrom
l46983284-cpu:fix/import-shadow-and-mappings

Conversation

@l46983284-cpu

Copy link
Copy Markdown

Summary

  • stop treating every scanned directory name as a local import candidate; only real Python packages (__init__.py) and module files should hide imports from requirements output
  • update stale package mappings for currently published packages: docker, mysql-connector-python, streamlit-aggrid, pyro-ppl, and pyahocorasick
  • remove overly generic models and src mappings that can add unrelated packages for common local module/folder names
  • keep pinecone as the current official package name instead of adding the deprecated pinecone-client mapping

Issues

Fixes #187
Fixes #233
Fixes #438
Fixes #168
Fixes #177
Fixes #261
Fixes #281
Fixes #449
Related to #329 and #431.

Verification

  • python3 -m unittest tests.test_pipreqs.TestPipreqs.test_get_all_imports tests.test_pipreqs.TestPipreqs.test_get_all_imports_does_not_hide_imports_behind_plain_dirs tests.test_pipreqs.TestPipreqs.test_get_pkg_names tests.test_pipreqs.TestPipreqs.test_get_pkg_names_maps_current_package_aliases
  • python3 -m tox -e py311,flake8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment