cli2 3.3.7__tar.gz → 3.3.9__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 (45) hide show
  1. {cli2-3.3.7/cli2.egg-info → cli2-3.3.9}/PKG-INFO +1 -1
  2. {cli2-3.3.7 → cli2-3.3.9}/cli2/client.py +12 -9
  3. {cli2-3.3.7 → cli2-3.3.9/cli2.egg-info}/PKG-INFO +1 -1
  4. {cli2-3.3.7 → cli2-3.3.9}/setup.py +1 -1
  5. {cli2-3.3.7 → cli2-3.3.9}/MANIFEST.in +0 -0
  6. {cli2-3.3.7 → cli2-3.3.9}/README.rst +0 -0
  7. {cli2-3.3.7 → cli2-3.3.9}/classifiers.txt +0 -0
  8. {cli2-3.3.7 → cli2-3.3.9}/cli2/__init__.py +0 -0
  9. {cli2-3.3.7 → cli2-3.3.9}/cli2/argument.py +0 -0
  10. {cli2-3.3.7 → cli2-3.3.9}/cli2/asyncio.py +0 -0
  11. {cli2-3.3.7 → cli2-3.3.9}/cli2/cli.py +0 -0
  12. {cli2-3.3.7 → cli2-3.3.9}/cli2/colors.py +0 -0
  13. {cli2-3.3.7 → cli2-3.3.9}/cli2/command.py +0 -0
  14. {cli2-3.3.7 → cli2-3.3.9}/cli2/configuration.py +0 -0
  15. {cli2-3.3.7 → cli2-3.3.9}/cli2/decorators.py +0 -0
  16. {cli2-3.3.7 → cli2-3.3.9}/cli2/display.py +0 -0
  17. {cli2-3.3.7 → cli2-3.3.9}/cli2/entry_point.py +0 -0
  18. {cli2-3.3.7 → cli2-3.3.9}/cli2/example_client.py +0 -0
  19. {cli2-3.3.7 → cli2-3.3.9}/cli2/example_client_complex.py +0 -0
  20. {cli2-3.3.7 → cli2-3.3.9}/cli2/example_nesting.py +0 -0
  21. {cli2-3.3.7 → cli2-3.3.9}/cli2/example_obj.py +0 -0
  22. {cli2-3.3.7 → cli2-3.3.9}/cli2/group.py +0 -0
  23. {cli2-3.3.7 → cli2-3.3.9}/cli2/logging.py +0 -0
  24. {cli2-3.3.7 → cli2-3.3.9}/cli2/node.py +0 -0
  25. {cli2-3.3.7 → cli2-3.3.9}/cli2/overrides.py +0 -0
  26. {cli2-3.3.7 → cli2-3.3.9}/cli2/sphinx.py +0 -0
  27. {cli2-3.3.7 → cli2-3.3.9}/cli2/table.py +0 -0
  28. {cli2-3.3.7 → cli2-3.3.9}/cli2/test.py +0 -0
  29. {cli2-3.3.7 → cli2-3.3.9}/cli2/test_cli.py +0 -0
  30. {cli2-3.3.7 → cli2-3.3.9}/cli2/test_client.py +0 -0
  31. {cli2-3.3.7 → cli2-3.3.9}/cli2/test_command.py +0 -0
  32. {cli2-3.3.7 → cli2-3.3.9}/cli2/test_configuration.py +0 -0
  33. {cli2-3.3.7 → cli2-3.3.9}/cli2/test_decorators.py +0 -0
  34. {cli2-3.3.7 → cli2-3.3.9}/cli2/test_display.py +0 -0
  35. {cli2-3.3.7 → cli2-3.3.9}/cli2/test_entry_point.py +0 -0
  36. {cli2-3.3.7 → cli2-3.3.9}/cli2/test_group.py +0 -0
  37. {cli2-3.3.7 → cli2-3.3.9}/cli2/test_inject.py +0 -0
  38. {cli2-3.3.7 → cli2-3.3.9}/cli2/test_node.py +0 -0
  39. {cli2-3.3.7 → cli2-3.3.9}/cli2/test_table.py +0 -0
  40. {cli2-3.3.7 → cli2-3.3.9}/cli2.egg-info/SOURCES.txt +0 -0
  41. {cli2-3.3.7 → cli2-3.3.9}/cli2.egg-info/dependency_links.txt +0 -0
  42. {cli2-3.3.7 → cli2-3.3.9}/cli2.egg-info/entry_points.txt +0 -0
  43. {cli2-3.3.7 → cli2-3.3.9}/cli2.egg-info/requires.txt +0 -0
  44. {cli2-3.3.7 → cli2-3.3.9}/cli2.egg-info/top_level.txt +0 -0
  45. {cli2-3.3.7 → cli2-3.3.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cli2
3
- Version: 3.3.7
3
+ Version: 3.3.9
4
4
  Summary: image:: https://yourlabs.io/oss/cli2/badges/master/pipeline.svg
5
5
  Home-page: https://yourlabs.io/oss/cli2
6
6
  Author: James Pic
@@ -943,7 +943,7 @@ class Client(metaclass=ClientMetaclass):
943
943
  while tries:
944
944
  try:
945
945
  return await self.client.request(*args, **kwargs)
946
- except httpx.RemoteProtocolError:
946
+ except (httpx.RemoteProtocolError, httpx.ReadTimeout):
947
947
  # enforce getting a new awaitable
948
948
  del self.client
949
949
  del self.token
@@ -976,7 +976,7 @@ class Client(metaclass=ClientMetaclass):
976
976
  """
977
977
  raise NotImplementedError()
978
978
 
979
- async def request(self, method, url, **kwargs):
979
+ async def request(self, method, url, quiet=False, **kwargs):
980
980
  """
981
981
  Request method
982
982
 
@@ -994,7 +994,8 @@ class Client(metaclass=ClientMetaclass):
994
994
  self.token_getting = False
995
995
 
996
996
  log = self.logger.bind(method=method, url=url)
997
- log.debug('request', **kwargs)
997
+ if not quiet:
998
+ log.debug('request', **kwargs)
998
999
 
999
1000
  semaphore = getattr(self, 'semaphore', None)
1000
1001
  if semaphore:
@@ -1003,13 +1004,15 @@ class Client(metaclass=ClientMetaclass):
1003
1004
  else:
1004
1005
  response = await self.request_safe(method, url, **kwargs)
1005
1006
 
1006
- _log = dict(status_code=response.status_code)
1007
- try:
1008
- _log['json'] = response.json()
1009
- except json.JSONDecodeError:
1010
- _log['content'] = response.content
1007
+ if not quiet:
1008
+ _log = dict(status_code=response.status_code)
1009
+
1010
+ try:
1011
+ _log['json'] = response.json()
1012
+ except json.JSONDecodeError:
1013
+ _log['content'] = response.content
1011
1014
 
1012
- log.info('response', **_log)
1015
+ log.info('response', **_log)
1013
1016
 
1014
1017
  response.raise_for_status()
1015
1018
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cli2
3
- Version: 3.3.7
3
+ Version: 3.3.9
4
4
  Summary: image:: https://yourlabs.io/oss/cli2/badges/master/pipeline.svg
5
5
  Home-page: https://yourlabs.io/oss/cli2
6
6
  Author: James Pic
@@ -3,7 +3,7 @@ from setuptools import setup
3
3
 
4
4
  setup(
5
5
  name='cli2',
6
- version='3.3.7',
6
+ version='3.3.9',
7
7
  setup_requires='setupmeta',
8
8
  install_requires=[
9
9
  'docstring_parser',
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
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
File without changes
File without changes
File without changes
File without changes