You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pathlib offers a higher-level abstraction of paths than os.path, including a Path object. Moving to pathlib would make the code cleaner, and would make it simpler for us to expose (via type-hints and docstrings) when certain functions expect paths.
Request attributes
Would this be a refactor of existing code?
Does this proposal require new package dependencies?
Would this change break backwards compatibility?
Related issues
N/A
Solution description
Migrate existing uses of os.path to pathlib
Update interfaces to accept Path or os.PathLike instead of str
Additional notes
If applied generally, I think this would break backwards compatibility -- some functions accepting strings should probably accept a Path (or os.PathLike).
The text was updated successfully, but these errors were encountered:
Feature/behavior summary
pathlib
offers a higher-level abstraction of paths thanos.path
, including aPath
object. Moving topathlib
would make the code cleaner, and would make it simpler for us to expose (via type-hints and docstrings) when certain functions expect paths.Request attributes
Related issues
N/A
Solution description
os.path
topathlib
Path
oros.PathLike
instead ofstr
Additional notes
If applied generally, I think this would break backwards compatibility -- some functions accepting strings should probably accept a
Path
(oros.PathLike
).The text was updated successfully, but these errors were encountered: