Skip to content

Commit c6a234b

Browse files
LFicteamLFicteam
andauthored
fix(components): Replace deprecated method_whitelist with allowed_methods in urllib3 Retry. Fixes #12134 (#12397)
- Replace deprecated 'method_whitelist' parameter with 'allowed_methods' in dataproc_util.py - This fixes compatibility with urllib3 2.x where method_whitelist was deprecated - Maintains the same functionality while using the modern API - Resolves the breaking issue for users running PySpark jobs on Dataproc The change ensures compatibility with urllib3 2.4.0+ which is used in the base image gcr.io/ml-pipeline/google-cloud-pipeline-components:2.20.1. Signed-off-by: LFicteam <[email protected]> Co-authored-by: LFicteam <[email protected]>
1 parent ff97283 commit c6a234b

File tree

1 file changed

+1
-1
lines changed
  • components/google-cloud/google_cloud_pipeline_components/container/v1/dataproc/utils

1 file changed

+1
-1
lines changed

components/google-cloud/google_cloud_pipeline_components/container/v1/dataproc/utils/dataproc_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def _get_session(self) -> Session:
7777
total=_CONNECTION_ERROR_RETRY_LIMIT,
7878
status_forcelist=[429, 503],
7979
backoff_factor=_CONNECTION_RETRY_BACKOFF_FACTOR,
80-
method_whitelist=['GET', 'POST'],
80+
allowed_methods=['GET', 'POST'],
8181
)
8282
adapter = HTTPAdapter(max_retries=retry)
8383
session = requests.Session()

0 commit comments

Comments
 (0)