dcor-shared 0.10.0__tar.gz → 0.10.2__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 (30) hide show
  1. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/CHANGELOG +4 -0
  2. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/PKG-INFO +1 -1
  3. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared/_version_save.py +1 -1
  4. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared/data.py +9 -3
  5. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared/s3cc.py +2 -2
  6. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared/testing.py +2 -2
  7. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared.egg-info/PKG-INFO +1 -1
  8. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared.egg-info/requires.txt +1 -1
  9. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/setup.py +1 -1
  10. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/LICENSE +0 -0
  11. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/MANIFEST.in +0 -0
  12. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/README.rst +0 -0
  13. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared/__init__.py +0 -0
  14. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared/_version.py +0 -0
  15. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared/ckan.py +0 -0
  16. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared/dcinst.py +0 -0
  17. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared/mime.py +0 -0
  18. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared/parse.py +0 -0
  19. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared/paths.py +0 -0
  20. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared/s3.py +0 -0
  21. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared.egg-info/SOURCES.txt +0 -0
  22. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared.egg-info/dependency_links.txt +0 -0
  23. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/dcor_shared.egg-info/top_level.txt +0 -0
  24. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/setup.cfg +0 -0
  25. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/tests/test_basic.py +0 -0
  26. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/tests/test_ckan.py +0 -0
  27. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/tests/test_data.py +0 -0
  28. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/tests/test_s3.py +0 -0
  29. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/tests/test_s3cc.py +0 -0
  30. {dcor_shared-0.10.0 → dcor_shared-0.10.2}/tests/test_testing.py +0 -0
@@ -1,3 +1,7 @@
1
+ 0.10.2
2
+ - setup: bump dclab to 0.58.6
3
+ 0.10.1
4
+ - fix: handle case in wait_for_resource when resource is not yet in CKAN
1
5
  0.10.0
2
6
  - BREAKING CHANGE: presigned URLs for uploading resources now work
3
7
  differently. For small files (< 1 GiB), a single upload URL for
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dcor_shared
3
- Version: 0.10.0
3
+ Version: 0.10.2
4
4
  Summary: Functionalities shared by the DCOR CKAN extensions
5
5
  Home-page: https://github.com/DCOR-dev/dcor_shared
6
6
  Author: Paul Müller
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env python
2
2
  # This file was created automatically
3
- longversion = '0.10.0'
3
+ longversion = '0.10.2'
@@ -64,9 +64,15 @@ def wait_for_resource(resource_id: str,
64
64
  t0 = time.time()
65
65
  ld = len(DUMMY_BYTES)
66
66
  while True:
67
- res_dict = resource_show(context={'ignore_auth': True,
68
- 'user': 'default'},
69
- data_dict={"id": resource_id})
67
+ try:
68
+ res_dict = resource_show(context={'ignore_auth': True,
69
+ 'user': 'default'},
70
+ data_dict={"id": resource_id})
71
+ except logic.NotFound:
72
+ # Other processes are still working on getting the resource
73
+ # online. We have to wait.
74
+ time.sleep(0.1)
75
+ continue
70
76
 
71
77
  s3_ok = res_dict.get("s3_available", None)
72
78
  if time.time() - t0 > timeout:
@@ -181,9 +181,9 @@ def get_s3_dc_handle(resource_id):
181
181
  s3_url = get_s3_url_for_artifact(resource_id)
182
182
  ds = fmt_s3.RTDC_S3(
183
183
  url=s3_url,
184
- secret_id=get_ckan_config_option(
184
+ secret_access_key=get_ckan_config_option(
185
185
  "dcor_object_store.access_key_id"),
186
- secret_key=get_ckan_config_option(
186
+ access_key_id=get_ckan_config_option(
187
187
  "dcor_object_store.secret_access_key"),
188
188
  # Disable basins, because they could point to files on the
189
189
  # local file system (security).
@@ -296,10 +296,10 @@ def upload_presigned_to_s3(
296
296
  # Finish the multipart upload
297
297
  c_xml = "<CompleteMultipartUpload>\n"
298
298
  for ii, etag in enumerate(etags):
299
- c_xml += (f" <Part>\n"
299
+ c_xml += (" <Part>\n"
300
300
  + f" <PartNumber>{ii + 1}</PartNumber>\n"
301
301
  + f" <ETag>{etag}</ETag>\n"
302
- + f" </Part>\n"
302
+ + " </Part>\n"
303
303
  )
304
304
  c_xml += "</CompleteMultipartUpload>"
305
305
  resp = requests.post(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dcor-shared
3
- Version: 0.10.0
3
+ Version: 0.10.2
4
4
  Summary: Functionalities shared by the DCOR CKAN extensions
5
5
  Home-page: https://github.com/DCOR-dev/dcor_shared
6
6
  Author: Paul Müller
@@ -1,5 +1,5 @@
1
1
  boto3
2
- dclab[s3]>=0.57.5
2
+ dclab[s3]>=0.58.6
3
3
 
4
4
  [tests]
5
5
  requests
@@ -44,7 +44,7 @@ setup(
44
44
  long_description=open('README.rst').read() if exists('README.rst') else '',
45
45
  install_requires=[
46
46
  "boto3",
47
- "dclab[s3]>=0.57.5",
47
+ "dclab[s3]>=0.58.6",
48
48
  ],
49
49
  extras_require={
50
50
  # Required for the `dcor_shared.testing` submodule
File without changes
File without changes
File without changes
File without changes