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.
Files changed (31) hide show
  1. {drb_driver_http-1.3.3/drb_driver_http.egg-info → drb_driver_http-1.3.4}/PKG-INFO +1 -1
  2. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/drivers/http/_version.py +3 -3
  3. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/drivers/http/http.py +16 -8
  4. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4/drb_driver_http.egg-info}/PKG-INFO +1 -1
  5. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/LICENCE.txt +0 -0
  6. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/README.md +0 -0
  7. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/drivers/http/__init__.py +0 -0
  8. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/drivers/http/oauth2/HTTPOAuth2.py +0 -0
  9. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/drivers/http/oauth2/__init__.py +0 -0
  10. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/drivers/http/oauth2/oauth2.py +0 -0
  11. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/exceptions/http.py +0 -0
  12. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/topics/http/__init__.py +0 -0
  13. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb/topics/http/cortex.yml +0 -0
  14. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb_driver_http.egg-info/SOURCES.txt +0 -0
  15. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb_driver_http.egg-info/dependency_links.txt +0 -0
  16. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb_driver_http.egg-info/entry_points.txt +0 -0
  17. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb_driver_http.egg-info/not-zip-safe +0 -0
  18. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb_driver_http.egg-info/requires.txt +0 -0
  19. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/drb_driver_http.egg-info/top_level.txt +0 -0
  20. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/pyproject.toml +0 -0
  21. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/requirements.txt +0 -0
  22. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/setup.cfg +0 -0
  23. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/setup.py +0 -0
  24. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/tests/test_drb_http_basic_auth.py +0 -0
  25. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/tests/test_drb_http_bearer.py +0 -0
  26. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/tests/test_drb_http_factory.py +0 -0
  27. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/tests/test_drb_http_keyring.py +0 -0
  28. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/tests/test_drb_http_signature.py +0 -0
  29. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/tests/test_drb_https_signature.py +0 -0
  30. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/tests/test_drb_impl_http.py +0 -0
  31. {drb_driver_http-1.3.3 → drb_driver_http-1.3.4}/versioneer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: drb-driver-http
3
- Version: 1.3.3
3
+ Version: 1.3.4
4
4
  Summary: DRB Http driver
5
5
  Author: GAEL Systems
6
6
  Author-email: drb-python@gael.fr
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2024-07-17T16:46:34+0200",
11
+ "date": "2024-07-18T15:06:45+0200",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "01ab0f4e348f4e8040b143a8b51ae258bb9c7662",
15
- "version": "1.3.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
- service_name=self.path.path,
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
- credential.username,
304
- credential.password
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):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: drb-driver-http
3
- Version: 1.3.3
3
+ Version: 1.3.4
4
4
  Summary: DRB Http driver
5
5
  Author: GAEL Systems
6
6
  Author-email: drb-python@gael.fr