File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,25 @@ def warn_deprecation_for_versions_less_than(
6262 next_supported_version : str ,
6363 message_template : Optional [str ] = None ,
6464):
65+ """Issue a deprecation warning for outdated versions of `dependency_name`.
66+
67+ If `dependency_name` is installed at a version less than
68+ `next_supported_versions`, this issues a warning using either a
69+ default `message_template` or one provided by the user. The
70+ default `message_template informs users that they will not receive
71+ future updates `dependent_package` if `dependency_name` is somehow
72+ pinned to a version lower than `next_supported_version`.
73+
74+ Args:
75+ dependent_package: The distribution name of the package that needs `dependency_name`.
76+ dependency_name: The distribution name oft he dependency to check.
77+ next_supported_version: The version number below which a deprecation warning will be logged.
78+ message_template: A custom default message template to replace
79+ the default. This `message_template` is treated as an
80+ f-string, where the following variables are defined:
81+ `dependency_name`, `dependent_package`,
82+ `next_supported_version`, and `version_used`.
83+ """
6584 if not dependent_package or not dependency_name or not next_supported_version :
6685 return
6786 version_used = get_dependency_version (dependency_name )
You can’t perform that action at this time.
0 commit comments