Skip to content

Commit ba5c6b6

Browse files
authored
Merge pull request #105 from martindurant/nix_fspath
Remove fspath from AbstractFile since broke some pyarrow
2 parents 76c0260 + 5f80772 commit ba5c6b6

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

fsspec/implementations/cached.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class CachingFileSystem(AbstractFileSystem):
1818
MMapCache), so only the data which is accessed takes up space.
1919
2020
Restrictions:
21+
2122
- the block-size must be the same for each access of a given file, unless
2223
all blocks of the file have already been read
2324
- caching can only be applied to file-systems which produce files

fsspec/spec.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,9 +1163,6 @@ def __del__(self):
11631163
def __str__(self):
11641164
return "<File-like object %s, %s>" % (type(self.fs).__name__, self.path)
11651165

1166-
def __fspath__(self):
1167-
return self.fs.protocol + "://" + self.path
1168-
11691166
__repr__ = __str__
11701167

11711168
def __enter__(self):

fsspec/tests/test_core.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ def test_openfile_api(m):
2424
m.open('somepath', 'wb').write(b'data')
2525
of = OpenFile(m, 'somepath')
2626
assert str(of) == "<OpenFile 'somepath'>"
27-
assert os.fspath(of) == 'somepath'
2827
f = of.open()
2928
assert f.read() == b'data'
3029
f.close()

0 commit comments

Comments
 (0)