megfile 3.1.6.post1__py3-none-any.whl → 3.1.7__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.
megfile/smart.py CHANGED
@@ -995,11 +995,12 @@ def smart_load_content(
995
995
  return s3_load_content(path, start, stop)
996
996
 
997
997
  with smart_open(path, "rb") as fd:
998
- if start:
998
+ if start is not None:
999
999
  fd.seek(start)
1000
1000
  offset = -1
1001
- if start and stop:
1002
- offset = stop - start
1001
+ if stop is not None:
1002
+ offset = stop - (start or 0) # start may be None
1003
+ assert offset >= 0, "stop should be greater than start"
1003
1004
  return fd.read(offset) # pytype: disable=bad-return-type
1004
1005
 
1005
1006
 
megfile/version.py CHANGED
@@ -1 +1 @@
1
- VERSION = "3.1.6.post1"
1
+ VERSION = "3.1.7"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: megfile
3
- Version: 3.1.6.post1
3
+ Version: 3.1.7
4
4
  Summary: Megvii file operation library
5
5
  Author-email: megvii <megfile@megvii.com>
6
6
  Project-URL: Homepage, https://github.com/megvii-research/megfile
@@ -27,10 +27,10 @@ Requires-Dist: requests
27
27
  Requires-Dist: paramiko
28
28
  Requires-Dist: tqdm
29
29
  Requires-Dist: pyyaml
30
- Provides-Extra: cli
31
- Requires-Dist: click; extra == "cli"
32
30
  Provides-Extra: hdfs
33
31
  Requires-Dist: hdfs; extra == "hdfs"
32
+ Provides-Extra: cli
33
+ Requires-Dist: click; extra == "cli"
34
34
 
35
35
  megfile - Megvii FILE library
36
36
  ---
@@ -15,11 +15,11 @@ megfile/s3.py,sha256=7SdfLjAePVh-bpRyuj566VB4Qa7KP86rCJGzYANR7wQ,13008
15
15
  megfile/s3_path.py,sha256=kOrP45zQbxCxNQcoovd060QARkP8QWYKd8BQGfxGY2g,95447
16
16
  megfile/sftp.py,sha256=vyDnYXX3i1j2fhXMC8YCeX-66MDb9wrBQQjQVhZx0uo,13004
17
17
  megfile/sftp_path.py,sha256=4tByWvUJK1KBJoa3t5aoWYnZpaRWN9nQIE6ZyiGHrbk,53519
18
- megfile/smart.py,sha256=Vr4R7HpjXjt587KOc2-1QGbQ5EsZ48YRzCaK0rz3IS0,36108
18
+ megfile/smart.py,sha256=vfWhPgL26KrF4s9K5oV55R3zvAyCr9nvD9CsYFWVA9g,36218
19
19
  megfile/smart_path.py,sha256=Wsn6fR9g7NTwNwwvZ_0H39NLHIlOLnCqK-ZY0n5CvKk,7812
20
20
  megfile/stdio.py,sha256=UYe-h440Wc4f5COOzOTG1svnp5nFzrfpixehJ0_0_NY,653
21
21
  megfile/stdio_path.py,sha256=7jzVdreamO18yBWZM7Pp71cO7GmrYb0M0qyQde2Ypq4,2706
22
- megfile/version.py,sha256=XtGruYz10E7g9ijesLiQ9efrLMwPQjA29gsjMfo552o,25
22
+ megfile/version.py,sha256=n9Z_RgYWmzkUHtPVhIWP6RlF4L6HnKS2N0unpIEw86U,19
23
23
  megfile/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
24
  megfile/lib/base_prefetch_reader.py,sha256=CaYWuiKmlk4Utr0IFDPwPC58wV2jBAhqpxhwhRHc734,13652
25
25
  megfile/lib/combine_reader.py,sha256=uSzo3PmhD5ck6_Vv6dFU5vVx4boeA97VS-puPyhF_BE,4657
@@ -46,10 +46,10 @@ megfile/utils/__init__.py,sha256=RAj8dAJZX5TkWKJu3Ip78uhA5XZ8wpir61eCm6bAnd4,108
46
46
  megfile/utils/mutex.py,sha256=asb8opGLgK22RiuBJUnfsvB8LnMmodP8KzCVHKmQBWA,2561
47
47
  scripts/convert_results_to_sarif.py,sha256=nDiOfsedb22Ps7ZodmYdlXZlxv54fRxCQgOZsB2OkNk,2833
48
48
  scripts/generate_file.py,sha256=-mTcBiqiQ1juvqojVfVZ-uZWgpANHJNdhrF7s68zNfc,10903
49
- megfile-3.1.6.post1.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
50
- megfile-3.1.6.post1.dist-info/LICENSE.pyre,sha256=9lf5nT-5ZH25JijpYAequ0bl8E8z5JmZB1qrjiUMp84,1080
51
- megfile-3.1.6.post1.dist-info/METADATA,sha256=AEZWwtG0zg1mZzAIyM9YHZ5JmbS0Bwc6YCMsGFrTYDo,9184
52
- megfile-3.1.6.post1.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
53
- megfile-3.1.6.post1.dist-info/entry_points.txt,sha256=M6ZWSSv5_5_QtIpZafy3vq7WuOJ_5dSGQQnEZbByt2Q,49
54
- megfile-3.1.6.post1.dist-info/top_level.txt,sha256=oTnYXo1Z3V61qSWAKtnY9RkDgRSHvfRN38FQae6E0W0,50
55
- megfile-3.1.6.post1.dist-info/RECORD,,
49
+ megfile-3.1.7.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
50
+ megfile-3.1.7.dist-info/LICENSE.pyre,sha256=9lf5nT-5ZH25JijpYAequ0bl8E8z5JmZB1qrjiUMp84,1080
51
+ megfile-3.1.7.dist-info/METADATA,sha256=IOh1sm_PB6oLFwTJwWMZx3tvIfyiIFaYG6d0IPTlt1Q,9178
52
+ megfile-3.1.7.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
53
+ megfile-3.1.7.dist-info/entry_points.txt,sha256=M6ZWSSv5_5_QtIpZafy3vq7WuOJ_5dSGQQnEZbByt2Q,49
54
+ megfile-3.1.7.dist-info/top_level.txt,sha256=fVg49lk5B9L7jyfWUXWxb0DDSuw5pbr0OU62Tvx8J8M,44
55
+ megfile-3.1.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.5.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,6 +1,5 @@
1
1
  dist
2
2
  docs
3
- empty
4
3
  html_cov
5
4
  html_doc
6
5
  megfile