os.PathLike support for Python >=3.6
See original GitHub issueSince regular Python filesystem interface supports pathlib.Path
, it would make sense to create S3-version of this class by extending os.PathLike
(called e.g. S3Path
). Would it be something you consider useful? I can work on a PR.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
os — Miscellaneous operating system interfaces — Python ...
Changed in version 3.6: Support added to accept objects implementing the os.PathLike interface. os.fspath(path)¶. Return ...
Read more >os.PathLike support for Python >=3.6 #166 - fsspec/s3fs - GitHub
Ok, I see two things here: support for using pathlib.PurePath in s3fs (and fsspec ); creating classes that implement os.PathLike interface for ...
Read more >What's New In Python 3.6 - 3.7.9 Documentation
A new file system path protocol has been implemented to support path-like objects. All standard library functions operating on paths have been updated...
Read more >python 3.5 - AttributeError: module 'os' has no attribute 'PathLike'
Welcome to dependency hell. Since python 3.5 is depreciated many new version of modules are using 3.6 syntax which causes problems like this ......
Read more >What's New in Python 3.6 - More New Features - Andy Pearce
These include a new secrets module, a new implementation of the dict object and better support for path-like objects.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For posterity’s sake: this has been implemented by @sretlawd in a gist (see discussion in fsspec here).
Closing as old and not convincing; feel free to propose
__fspath__
in fsspec.