@@ -72,7 +72,7 @@ def get_dependency_version(
7272
7373
7474def warn_deprecation_for_versions_less_than (
75- dependent_import_package : str ,
75+ consumer_import_package : str ,
7676 dependency_import_package : str ,
7777 minimum_fully_supported_version : str ,
7878 recommended_version : Optional [str ] = None ,
@@ -84,12 +84,12 @@ def warn_deprecation_for_versions_less_than(
8484 `minimum_fully_supported_version`, this issues a warning using either a
8585 default `message_template` or one provided by the user. The
8686 default `message_template` informs the user that they will not receive
87- future updates for `dependent_import_package ` if
87+ future updates for `consumer_import_package ` if
8888 `dependency_import_package` is somehow pinned to a version lower
8989 than `minimum_fully_supported_version`.
9090
9191 Args:
92- dependent_import_package : The import name of the package that
92+ consumer_import_package : The import name of the package that
9393 needs `dependency_import_package`.
9494 dependency_import_package: The import name of the dependency to check.
9595 minimum_fully_supported_version: The dependency_import_package version number
@@ -99,19 +99,19 @@ def warn_deprecation_for_versions_less_than(
9999 message_template: A custom default message template to replace
100100 the default. This `message_template` is treated as an
101101 f-string, where the following variables are defined:
102- `dependency_import_package`, `dependent_import_package ` and
102+ `dependency_import_package`, `consumer_import_package ` and
103103 `dependency_distribution_package` and
104- `dependent_distribution_package ` and `dependency_package`,
105- `dependent_package ` , which contain the import packages, the
104+ `consumer_distribution_package ` and `dependency_package`,
105+ `consumer_package ` , which contain the import packages, the
106106 distribution packages, and pretty string with both the
107107 distribution and import packages for the dependency and the
108- dependent , respectively; and `minimum_fully_supported_version`,
108+ consumer , respectively; and `minimum_fully_supported_version`,
109109 `version_used`, and `version_used_string`, which refer to supported
110110 and currently-used versions of the dependency.
111111
112112 """
113113 if (
114- not dependent_import_package
114+ not consumer_import_package
115115 or not dependency_import_package
116116 or not minimum_fully_supported_version
117117 ): # pragma: NO COVER
@@ -125,37 +125,37 @@ def warn_deprecation_for_versions_less_than(
125125 dependency_distribution_package ,
126126 ) = _get_distribution_and_import_packages (dependency_import_package )
127127 (
128- dependent_package ,
129- dependent_distribution_package ,
130- ) = _get_distribution_and_import_packages (dependent_import_package )
128+ consumer_package ,
129+ consumer_distribution_package ,
130+ ) = _get_distribution_and_import_packages (consumer_import_package )
131131
132132 recommendation = (
133133 " (we recommend {recommended_version})" if recommended_version else ""
134134 )
135135 message_template = message_template or _flatten_message (
136136 """
137- DEPRECATION: Package {dependent_package } depends on
137+ DEPRECATION: Package {consumer_package } depends on
138138 {dependency_package}, currently installed at version
139139 {version_used_string}. Future updates to
140- {dependent_package } will require {dependency_package} at
140+ {consumer_package } will require {dependency_package} at
141141 version {minimum_fully_supported_version} or
142142 higher{recommendation}. Please ensure that either (a) your
143143 Python environment doesn't pin the version of
144144 {dependency_package}, so that updates to
145- {dependent_package } can require the higher version, or (b)
145+ {consumer_package } can require the higher version, or (b)
146146 you manually update your Python environment to use at
147147 least version {minimum_fully_supported_version} of
148148 {dependency_package}.
149149 """
150150 )
151151 warnings .warn (
152152 message_template .format (
153- dependent_import_package = dependent_import_package ,
153+ consumer_import_package = consumer_import_package ,
154154 dependency_import_package = dependency_import_package ,
155- dependent_distribution_package = dependent_distribution_package ,
155+ consumer_distribution_package = consumer_distribution_package ,
156156 dependency_distribution_package = dependency_distribution_package ,
157157 dependency_package = dependency_package ,
158- dependent_package = dependent_package ,
158+ consumer_package = consumer_package ,
159159 minimum_fully_supported_version = minimum_fully_supported_version ,
160160 recommendation = recommendation ,
161161 version_used = dependency_version .version ,
@@ -165,18 +165,18 @@ def warn_deprecation_for_versions_less_than(
165165 )
166166
167167
168- def check_dependency_versions (dependent_import_package : str ):
168+ def check_dependency_versions (consumer_import_package : str ):
169169 """Bundle checks for all package dependencies.
170170
171171 This function can be called by all dependents of google.api_core,
172172 to emit needed deprecation warnings for any of their
173173 dependencies. The dependencies to check should be updated here.
174174
175175 Args:
176- dependent_import_package : The distribution name of the calling package, whose
176+ consumer_import_package : The distribution name of the calling package, whose
177177 dependencies we're checking.
178178
179179 """
180180 warn_deprecation_for_versions_less_than (
181- dependent_import_package , "google.protobuf" , "4.25.8" , recommended_version = "6.x"
181+ consumer_import_package , "google.protobuf" , "4.25.8" , recommended_version = "6.x"
182182 )
0 commit comments