question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

os.PathLike support for Python >=3.6

See original GitHub issue

Since 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:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
quantologycommented, Apr 6, 2020

For posterity’s sake: this has been implemented by @sretlawd in a gist (see discussion in fsspec here).

0reactions
martindurantcommented, May 29, 2019

Closing as old and not convincing; feel free to propose __fspath__ in fsspec.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found