drb-driver-http 1.3.3__tar.gz → 1.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {drb_driver_http-1.3.3/drb_driver_http.egg-info → drb_driver_http-1.3.4}/PKG-INFO +1 -1
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/drivers/http/_version.py +3 -3
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/drivers/http/http.py +16 -8
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4/drb_driver_http.egg-info}/PKG-INFO +1 -1
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/LICENCE.txt +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/README.md +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/drivers/http/__init__.py +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/drivers/http/oauth2/HTTPOAuth2.py +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/drivers/http/oauth2/__init__.py +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/drivers/http/oauth2/oauth2.py +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/exceptions/http.py +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/topics/http/__init__.py +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/topics/http/cortex.yml +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb_driver_http.egg-info/SOURCES.txt +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb_driver_http.egg-info/dependency_links.txt +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb_driver_http.egg-info/entry_points.txt +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb_driver_http.egg-info/not-zip-safe +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb_driver_http.egg-info/requires.txt +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb_driver_http.egg-info/top_level.txt +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/pyproject.toml +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/requirements.txt +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/setup.cfg +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/setup.py +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/tests/test_drb_http_basic_auth.py +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/tests/test_drb_http_bearer.py +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/tests/test_drb_http_factory.py +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/tests/test_drb_http_keyring.py +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/tests/test_drb_http_signature.py +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/tests/test_drb_https_signature.py +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/tests/test_drb_impl_http.py +0 -0
- {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/versioneer.py +0 -0
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2024-07-
|
|
11
|
+
"date": "2024-07-18T15:06:45+0200",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "1.3.
|
|
14
|
+
"full-revisionid": "7040fb7f6f65fd452bcae5937f5be5b47cf68b24",
|
|
15
|
+
"version": "1.3.4"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -21,6 +21,16 @@ from drb.exceptions.http import DrbHttpServerException, \
|
|
|
21
21
|
DrbHttpNodeException, DrbHttpAuthException
|
|
22
22
|
|
|
23
23
|
|
|
24
|
+
class EmptyAuth(AuthBase):
|
|
25
|
+
"""
|
|
26
|
+
This Empty credential class is used to handle no-credentials cases.
|
|
27
|
+
This class can be used instead of None auth that means credential
|
|
28
|
+
still not initialized.
|
|
29
|
+
"""
|
|
30
|
+
def __call__(self, r):
|
|
31
|
+
return r
|
|
32
|
+
|
|
33
|
+
|
|
24
34
|
@retry(stop=stop_after_attempt(5),
|
|
25
35
|
wait=wait_exponential(multiplier=2, min=1, max=10),
|
|
26
36
|
retry=retry_if_exception_type(DrbHttpServerException))
|
|
@@ -294,15 +304,13 @@ class DrbHttpNode(AbstractNode):
|
|
|
294
304
|
@property
|
|
295
305
|
def auth(self) -> AuthBase:
|
|
296
306
|
if self._auth is None:
|
|
297
|
-
credential = keyring.get_credential(
|
|
298
|
-
|
|
299
|
-
username=None
|
|
300
|
-
)
|
|
307
|
+
credential = keyring.get_credential(service_name=self.path.path,
|
|
308
|
+
username=None)
|
|
301
309
|
if credential is not None:
|
|
302
|
-
self._auth = HTTPBasicAuth(
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
)
|
|
310
|
+
self._auth = HTTPBasicAuth(credential.username,
|
|
311
|
+
credential.password)
|
|
312
|
+
else:
|
|
313
|
+
self._auth = EmptyAuth()
|
|
306
314
|
return self._auth
|
|
307
315
|
|
|
308
316
|
def __setitem__(self, key, value):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb_driver_http.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|