accli 0.5.5__tar.gz → 0.5.6__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: accli
3
- Version: 0.5.5
3
+ Version: 0.5.6
4
4
  Summary: IIASA Accelerator Client
5
5
  Author-email: Wrufesh S <wrufesh@gmail.com>
6
6
  License: The MIT License (MIT)
@@ -54,6 +54,18 @@ class AcceleratorJobProjectService:
54
54
 
55
55
  def http_client_request(self, *args, **kwargs):
56
56
 
57
+ if urllib3.__version__.startswith('1.'):
58
+ if 'json' in kwargs:
59
+ json_dict = kwargs.pop('json')
60
+
61
+ assert isinstance(json_dict, dict), (
62
+ f"urllib request: json keyword argument should be dict."
63
+ )
64
+
65
+ encoded_data = json.dumps(json_dict).encode('utf-8')
66
+
67
+ kwargs['body'] = encoded_data
68
+
57
69
  res = self.http_client.request(*args, **kwargs)
58
70
 
59
71
  if str(res.status)[0] in ['4', '5']:
@@ -1,3 +1,3 @@
1
1
  # Please strictly put double quote to use this info for git tag
2
2
  # Read developer guide for git tag command with regex
3
- VERSION = "v0.5.5"
3
+ VERSION = "v0.5.6"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: accli
3
- Version: 0.5.5
3
+ Version: 0.5.6
4
4
  Summary: IIASA Accelerator Client
5
5
  Author-email: Wrufesh S <wrufesh@gmail.com>
6
6
  License: The MIT License (MIT)
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