cloud-files 6.4.2__tar.gz → 6.4.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.
- {cloud_files-6.4.2 → cloud_files-6.4.4}/AUTHORS +1 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/ChangeLog +6 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/PKG-INFO +2 -2
- {cloud_files-6.4.2 → cloud_files-6.4.4}/automated_test.py +18 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloud_files.egg-info/PKG-INFO +2 -2
- cloud_files-6.4.4/cloud_files.egg-info/pbr.json +1 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloud_files.egg-info/requires.txt +3 -1
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles/compression.py +20 -4
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles/monitoring.py +10 -3
- {cloud_files-6.4.2 → cloud_files-6.4.4}/requirements.txt +1 -1
- cloud_files-6.4.2/cloud_files.egg-info/pbr.json +0 -1
- {cloud_files-6.4.2 → cloud_files-6.4.4}/.github/workflows/test-suite.yml +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/LICENSE +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/MANIFEST.in +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/README.md +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloud_files.egg-info/SOURCES.txt +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloud_files.egg-info/dependency_links.txt +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloud_files.egg-info/entry_points.txt +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloud_files.egg-info/not-zip-safe +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloud_files.egg-info/top_level.txt +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles/__init__.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles/cloudfiles.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles/connectionpools.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles/exceptions.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles/gcs.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles/interfaces.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles/lib.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles/paths.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles/resumable_tools.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles/scheduler.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles/secrets.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles/threaded_queue.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles/typing.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles_cli/LICENSE +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles_cli/__init__.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles_cli/cloudfiles_cli.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/cloudfiles_cli/listing_db.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/setup.cfg +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.4}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cloud-files
|
|
3
|
-
Version: 6.4.
|
|
3
|
+
Version: 6.4.4
|
|
4
4
|
Summary: Fast access to cloud storage and local FS.
|
|
5
5
|
Home-page: https://github.com/seung-lab/cloud-files/
|
|
6
6
|
Author: William Silversmith
|
|
@@ -40,9 +40,9 @@ Requires-Dist: six>=1.14.0
|
|
|
40
40
|
Requires-Dist: tenacity>=4.10.0
|
|
41
41
|
Requires-Dist: tqdm
|
|
42
42
|
Requires-Dist: urllib3>=1.26.3
|
|
43
|
-
Requires-Dist: zstandard
|
|
44
43
|
Requires-Dist: rsa>=4.7.2
|
|
45
44
|
Requires-Dist: fasteners
|
|
45
|
+
Requires-Dist: zstandard; python_version < "3.14"
|
|
46
46
|
Provides-Extra: test
|
|
47
47
|
Requires-Dist: pytest; extra == "test"
|
|
48
48
|
Requires-Dist: moto>=5; extra == "test"
|
|
@@ -1458,3 +1458,21 @@ class TestTransmissionMonitor:
|
|
|
1458
1458
|
|
|
1459
1459
|
assert new_monitor.total_bytes() == 100
|
|
1460
1460
|
assert hasattr(new_monitor, '_lock')
|
|
1461
|
+
|
|
1462
|
+
def test_slow_clock_tick(self, tx_monitor):
|
|
1463
|
+
import time
|
|
1464
|
+
|
|
1465
|
+
real_monotonic = time.monotonic
|
|
1466
|
+
time.monotonic = lambda: 1
|
|
1467
|
+
|
|
1468
|
+
flight_id = tx_monitor.start_io(100)
|
|
1469
|
+
time.sleep(0.01)
|
|
1470
|
+
tx_monitor.end_io(flight_id, 100)
|
|
1471
|
+
|
|
1472
|
+
assert len(tx_monitor._in_flight) == 0
|
|
1473
|
+
assert tx_monitor._in_flight_bytes == 0
|
|
1474
|
+
assert tx_monitor._total_bytes_landed == 100
|
|
1475
|
+
assert len(tx_monitor._intervaltree) == 1
|
|
1476
|
+
|
|
1477
|
+
time.monotonic = real_monotonic
|
|
1478
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cloud-files
|
|
3
|
-
Version: 6.4.
|
|
3
|
+
Version: 6.4.4
|
|
4
4
|
Summary: Fast access to cloud storage and local FS.
|
|
5
5
|
Home-page: https://github.com/seung-lab/cloud-files/
|
|
6
6
|
Author: William Silversmith
|
|
@@ -40,9 +40,9 @@ Requires-Dist: six>=1.14.0
|
|
|
40
40
|
Requires-Dist: tenacity>=4.10.0
|
|
41
41
|
Requires-Dist: tqdm
|
|
42
42
|
Requires-Dist: urllib3>=1.26.3
|
|
43
|
-
Requires-Dist: zstandard
|
|
44
43
|
Requires-Dist: rsa>=4.7.2
|
|
45
44
|
Requires-Dist: fasteners
|
|
45
|
+
Requires-Dist: zstandard; python_version < "3.14"
|
|
46
46
|
Provides-Extra: test
|
|
47
47
|
Requires-Dist: pytest; extra == "test"
|
|
48
48
|
Requires-Dist: moto>=5; extra == "test"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"git_version": "7814dde", "is_release": true}
|
|
@@ -12,7 +12,12 @@ except ImportError:
|
|
|
12
12
|
deflate = None
|
|
13
13
|
|
|
14
14
|
import brotli
|
|
15
|
-
|
|
15
|
+
|
|
16
|
+
if sys.version_info >= (3, 14):
|
|
17
|
+
from compression import zstd # PEP 784
|
|
18
|
+
else:
|
|
19
|
+
zstd = None
|
|
20
|
+
import zstandard
|
|
16
21
|
|
|
17
22
|
from tqdm import tqdm
|
|
18
23
|
|
|
@@ -221,15 +226,26 @@ def brotli_decompress(content):
|
|
|
221
226
|
return brotli.decompress(content)
|
|
222
227
|
|
|
223
228
|
def zstd_compress(content, level=None):
|
|
229
|
+
if level is not None:
|
|
230
|
+
level = int(level)
|
|
231
|
+
|
|
232
|
+
# The stdlib ZstdCompressor.compress() buffers its output
|
|
233
|
+
# by default, so use the one-shot function instead.
|
|
234
|
+
if zstd is not None:
|
|
235
|
+
return zstd.compress(content, level=level)
|
|
236
|
+
|
|
224
237
|
kwargs = {}
|
|
225
238
|
if level is not None:
|
|
226
|
-
kwargs['level'] =
|
|
239
|
+
kwargs['level'] = level
|
|
227
240
|
|
|
228
|
-
ctx =
|
|
241
|
+
ctx = zstandard.ZstdCompressor(**kwargs)
|
|
229
242
|
return ctx.compress(content)
|
|
230
243
|
|
|
231
244
|
def zstd_decompress(content):
|
|
232
|
-
|
|
245
|
+
if zstd is not None:
|
|
246
|
+
return zstd.decompress(content)
|
|
247
|
+
|
|
248
|
+
ctx = zstandard.ZstdDecompressor()
|
|
233
249
|
return ctx.decompress(content)
|
|
234
250
|
|
|
235
251
|
|
|
@@ -10,6 +10,8 @@ import intervaltree
|
|
|
10
10
|
import numpy as np
|
|
11
11
|
import numpy.typing as npt
|
|
12
12
|
|
|
13
|
+
EPSILON_SEC = 1e-7
|
|
14
|
+
|
|
13
15
|
class IOEnum(enum.Enum):
|
|
14
16
|
RX = 1
|
|
15
17
|
TX = 2
|
|
@@ -63,6 +65,8 @@ class TransmissionMonitor:
|
|
|
63
65
|
|
|
64
66
|
with self._lock:
|
|
65
67
|
start_us = int(self._in_flight.pop(flight_id) * 1e6)
|
|
68
|
+
if start_us == end_us:
|
|
69
|
+
end_us += 1
|
|
66
70
|
self._in_flight_bytes -= num_bytes
|
|
67
71
|
self._intervaltree.addi(start_us, end_us, [flight_id, num_bytes])
|
|
68
72
|
self._total_bytes_landed += num_bytes
|
|
@@ -662,7 +666,7 @@ class IOSampler:
|
|
|
662
666
|
time.monotonic()
|
|
663
667
|
time.monotonic()
|
|
664
668
|
e = time.monotonic()
|
|
665
|
-
return (e - s) / 5
|
|
669
|
+
return ((e - s) / 5) or EPSILON_SEC
|
|
666
670
|
|
|
667
671
|
time_correction = measure_correction()
|
|
668
672
|
psutil.net_io_counters.cache_clear()
|
|
@@ -679,12 +683,15 @@ class IOSampler:
|
|
|
679
683
|
recorrection_start = time.monotonic()
|
|
680
684
|
|
|
681
685
|
e = time.monotonic()
|
|
686
|
+
elapsed = (e-s) or EPSILON_SEC
|
|
682
687
|
|
|
683
|
-
wait = interval -
|
|
688
|
+
wait = interval - elapsed
|
|
684
689
|
if wait > 0:
|
|
685
690
|
time.sleep(wait)
|
|
686
691
|
|
|
687
|
-
|
|
692
|
+
elapsed = (time.monotonic() - e) or EPSILON_SEC
|
|
693
|
+
|
|
694
|
+
if (interval * 0.5) < elapsed:
|
|
688
695
|
self._do_sample(time_correction)
|
|
689
696
|
|
|
690
697
|
def is_sampling(self):
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"git_version": "fff3997", "is_release": true}
|
|
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
|