diff --git a/twine/repository.py b/twine/repository.py
index <HASH>..<HASH> 100644
--- a/twine/repository.py
+++ b/twine/repository.py
@@ -77,12 +77,19 @@ class Repository:
 
     @staticmethod
     def _make_adapter_with_retries() -> adapters.HTTPAdapter:
-        retry = urllib3.Retry(
+        retry_kwargs = dict(
             connect=5,
             total=10,
-            method_whitelist=["GET"],
             status_forcelist=[500, 501, 502, 503],
         )
+
+        try:
+            retry = urllib3.Retry(allowed_methods=["GET"], **retry_kwargs)
+        except TypeError:  # pragma: no cover
+            # Avoiding DeprecationWarning starting in urllib3 1.26
+            # Remove when that's the mininum version
+            retry = urllib3.Retry(method_whitelist=["GET"], **retry_kwargs)
+
         return adapters.HTTPAdapter(max_retries=retry)
 
     @staticmethod
Avoid DeprecationWarning from urllib3 (#<I>)

* Avoid DeprecationWarning from urllib3



* Don't use a version check



* Add coverage of deprecated kwarg



* Skip deprecation coverage