upgrade to urllib3 >= 2.6.3

This commit is contained in:
Kevin 2026-07-09 16:26:44 +01:00
parent 3735dc003f
commit 9a2756e098
25 changed files with 42 additions and 25 deletions

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Administrative API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Agents API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Alerts API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK BGP Monitors API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Integrations API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Core"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -48,11 +48,12 @@ class ThousandEyesRetry(Retry):
history: Optional[tuple[RequestHistory, ...]] = None,
respect_retry_after_header: bool = True,
remove_headers_on_redirect: Collection[str] = Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT,
backoff_jitter: float = 0.0) -> None:
backoff_jitter: float = 0.0,
retry_after_max: int = Retry.DEFAULT_RETRY_AFTER_MAX) -> None:
super().__init__(total, connect, read, redirect, status, other, allowed_methods,
status_forcelist, backoff_factor, backoff_max, raise_on_redirect,
raise_on_status, history, respect_retry_after_header,
remove_headers_on_redirect, backoff_jitter)
remove_headers_on_redirect, backoff_jitter, retry_after_max)
def is_retry(self, method: str, status_code: int, has_retry_after: bool = False) -> bool:
# Always retry on 429, regardless of method or status_forcelist

View File

@ -41,3 +41,19 @@ def test_parse_reset_header_invalid():
retry = ThousandEyesRetry()
assert retry._parse_reset_header("invalid") is None
assert retry._parse_reset_header(None) is None
def test_retry_new_clones_with_retry_after_max():
retry = ThousandEyesRetry(retry_after_max=3600)
cloned = retry.new()
assert isinstance(cloned, ThousandEyesRetry)
assert cloned.retry_after_max == 3600
def test_retry_increment_on_429():
response = Mock(spec=HTTPResponse)
response.status = 429
response.headers = {"Retry-After": "0"}
retry = ThousandEyesRetry(total=1)
new_retry = retry.increment(method="GET", url="/test", response=response)
assert isinstance(new_retry, ThousandEyesRetry)

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Credentials API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Dashboards API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Emulation API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Endpoint Agents API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Endpoint Instant Scheduled Tests API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Endpoint Agent Labels API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Endpoint Test Results API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Endpoint Tests API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Event Detection API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Instant Tests API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Internet Insights API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Test Snapshots API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK ThousandEyes for OpenTelemetry API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Tags API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Test Results API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Tests API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",

View File

@ -9,7 +9,7 @@ description = "ThousandEyes SDK Usage API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"urllib3 >= 2.6.3",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",