@@ -71,12 +71,12 @@ def __init__(
7171# Characters allowed in a Scope's key and value.
7272# These are the URL safe characters, except for `.` which we use as separator between
7373# key and value of Scope components.
74- SCOPE_ALLOWED_CHARS = set (string .ascii_letters + string .digits + "-_()$!+*'" )
74+ SCOPE_VALUE_ALLOWED_CHARS = set (string .ascii_letters + string .digits + "-_()$!+*'" )
7575
7676
7777@dataclass
7878class _ConnectionDefaults :
79- retries : urllib3 .Retry = urllib3 .Retry (connect = 3 , redirect = 5 , read = 0 )
79+ retries : urllib3 .Retry = urllib3 .Retry (connect = 3 , read = 0 )
8080 """We only retry connection problems, as we cannot rewind our compression stream."""
8181
8282 timeout : urllib3 .Timeout = urllib3 .Timeout (connect = 0.5 , read = 0.5 )
@@ -106,7 +106,6 @@ def __init__(
106106 if retries :
107107 connection_kwargs_to_use ["retries" ] = urllib3 .Retry (
108108 connect = retries ,
109- redirect = retries ,
110109 # we only retry connection problems, as we cannot rewind our
111110 # compression stream
112111 read = 0 ,
@@ -150,17 +149,17 @@ def session(self, usecase: Usecase, **scopes: str | int | bool) -> Session:
150149
151150 parts = []
152151 for key , value in scopes .items ():
153- if any (c not in SCOPE_ALLOWED_CHARS for c in key ):
152+ if any (c not in SCOPE_VALUE_ALLOWED_CHARS for c in key ):
154153 raise ValueError (
155154 f"Invalid scope key { key } . The valid character set is: "
156- f"{ '' .join (SCOPE_ALLOWED_CHARS )} "
155+ f"{ '' .join (SCOPE_VALUE_ALLOWED_CHARS )} "
157156 )
158157
159158 value = str (value )
160- if any (c not in SCOPE_ALLOWED_CHARS for c in value ):
159+ if any (c not in SCOPE_VALUE_ALLOWED_CHARS for c in value ):
161160 raise ValueError (
162161 f"Invalid scope value { value } . The valid character set is: "
163- f"{ '' .join (SCOPE_ALLOWED_CHARS )} "
162+ f"{ '' .join (SCOPE_VALUE_ALLOWED_CHARS )} "
164163 )
165164
166165 formatted = f"{ key } .{ value } "
0 commit comments