github fpgmaas/deptry 0.9.0

latest releases: 0.21.0, 0.20.0, 0.19.1...
18 months ago

What's Changed

Breaking changes

Python 3.7 support dropped

Support for Python 3.7 has been dropped in #352, given that it will reach end of life soon, and that PyPI stats show a really low usage of it. If you are using deptry on Python 3.7, consider upgrading to 3.8, or staying on <0.9.0.

Behaviour changes in package name guessing

In case packages don't provide the Python modules they expose, deptry tries to guess the package name by converting - to _, as a best effort, and warns about it in the logs. Before #337, deptry always guessed the module name, regardless of if the package provided the necessary information or not. Now, it will only guess the module name if the package does not provide the information and no mapping has been provided using the new --package-module-name-map flag (or package_module_name_map option in pyproject.toml).

Handling modules without __init__.py

With #285, deptry will now consider the following things as local modules:

  • directories without __init__.py (and at least one Python file)
  • single Python files

Previously, deptry only considered directories as local modules if an __init__.py was present, and did not account for cases where a single Python file could also be a local module, alongside directories.

Features

  • Drop support for Python 3.7 by @mkniewallner in #352
  • Only try to guess module associated to a dependency as a fallback for when the package doesn't provide such information by @akeeman in #337
  • Handle local modules without __init__.py by @mkniewallner in #285
  • Ability to configure a map of package names to module names by @akeeman in #333

Bug Fixes

Miscellaneous

Full Changelog: 0.8.0...0.9.0

Don't miss a new deptry release

NewReleases is sending notifications on new releases.