accli 0.5.4__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.4
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']:
@@ -616,7 +628,7 @@ class Fs:
616
628
  if not source_path.exists():
617
629
  raise ValueError("Source path does not exist")
618
630
 
619
- with open(source, 'wb') as fstream:
631
+ with open(source, 'rb') as fstream:
620
632
  if (user_token and server_url):
621
633
  Fs.write_stream_remote(fstream, dest_filepath, user_token, server_url)
622
634
  else:
@@ -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.4"
3
+ VERSION = "v0.5.6"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: accli
3
- Version: 0.5.4
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