py_research.reflect.deps module#
Utils for reflecting the Python dependencies.
- get_all_module_dependencies(module, _ext_deps=None, _int_deps=None)[source]#
Return all (indirect) dependency modules of given module.
- get_dist_requirements(dist)[source]#
Get a list of declared packages via pdm.
- Parameters:
dist (Distribution) –
- Return type:
list[Requirement] | None
- version_diff(v1, v2)[source]#
Get the difference between two versions (v1 - v2).
if v1 is smaller than v2, returns None.
- Parameters:
v1 (Version) –
v2 (Version) –
- Return type:
Version | None
- get_outdated_deps(dist, allowed_diff=<Specifier('<=1.1.1')>)[source]#
Get a list of outdated dependencies of a distribution.
- Parameters:
dist (Distribution | module) – Distribution to inspect. Can also be supplied as a module within the distribution in question.
allowed_diff (Specifier) – Allowed difference between current and latest version.
- Returns:
Dictionary of outdated package names with current and latest version.
- Return type: