vocker 0.3.1__py3-none-any.whl → 0.3.2__py3-none-any.whl

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.
vocker/repo/io.py CHANGED
@@ -236,6 +236,15 @@ class RepoTransfer:
236
236
  req = self.make_manifest_link_request(digest, destination, dict(open_file_once=_open))
237
237
  self.dedup.run_batch([req])
238
238
 
239
+ if not reader.parser.eof:
240
+ # We skipped the download because we found cached content, so we need to feed the
241
+ # remaining cached content into the parser.
242
+ with destination.open("rb") as file:
243
+ file.seek(reader.input_position)
244
+ while block := file.read(65536):
245
+ _feed(block)
246
+ _feed(None)
247
+
239
248
  return digest, reader.out_verified_data
240
249
 
241
250
  @staticmethod
@@ -664,6 +673,10 @@ class ManifestNodeReader:
664
673
 
665
674
  self.out_verified_data = ManifestNode.from_cbor_decoded(hf, cbor2.loads(bytes(q2)))
666
675
 
676
+ @property
677
+ def input_position(self) -> int:
678
+ return self.parser.position + len(self.parser.queue)
679
+
667
680
  @classmethod
668
681
  def from_bytes(cls, data):
669
682
  (self := cls()).parser.feed(data).feed(None)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vocker
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Docker-like manager for virtualenvs
5
5
  Author-email: Eduard Christian Dumitrescu <eduard.c.dumitrescu@gmail.com>
6
6
  License: General Public License v3
@@ -12,8 +12,8 @@ vocker/util.py,sha256=1Escs1FSrzrTy3Rzhn9r41K75KTt9VjQV91iT3P_FyI,3275
12
12
  vocker/util_models.py,sha256=2bN5eousF92oH7BAv1ZFoyh6iqNAnJ_niiclp2_RaHI,395
13
13
  vocker/repo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  vocker/repo/compression.py,sha256=l2g1e6SaugpqORbg3zwRM1zwlEXedbYOihm5nDpCejU,6442
15
- vocker/repo/io.py,sha256=Juzt7vHjfd-H36tWpdYZNh7ucf-h0bC7_WwZ46liNx0,25614
16
- vocker-0.3.1.dist-info/METADATA,sha256=NUmG0yxLQmKnVUvsKM-8awDqd4d924LB_fVt9fdB67E,3835
17
- vocker-0.3.1.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
18
- vocker-0.3.1.dist-info/top_level.txt,sha256=5x7g7T2L44UKODxVZ4vmWjxDnnruxaZ5yloYi0wLoUg,7
19
- vocker-0.3.1.dist-info/RECORD,,
15
+ vocker/repo/io.py,sha256=tcv87DqGqmLAJ7Y0QHTzdQxjH7owwLfhZrNKDACFL_k,26116
16
+ vocker-0.3.2.dist-info/METADATA,sha256=aqR8I2BiQiImrx-2pUmO_hpFtUJg6R6yj4F5zma_Qmk,3835
17
+ vocker-0.3.2.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
18
+ vocker-0.3.2.dist-info/top_level.txt,sha256=5x7g7T2L44UKODxVZ4vmWjxDnnruxaZ5yloYi0wLoUg,7
19
+ vocker-0.3.2.dist-info/RECORD,,
File without changes