Conversation
|
I'd like to continue design discussion here. One thing I still would like to come back to is long Windows paths. Starting with Python 3.6, long paths are supported once you enable the option on Windows. I don't think it's worth the trouble of hacking this, especially given the difficulties of subclassing pathlib. Good documentation should go a long way here, and according to https://bugs.python.org/issue27731, python will throw an exception if you try to create a path >260 (without the windows flag set), which we can always try to work with if the docs aren't sufficient. Interestingly, the long_path flag is already enabled for me on fairly fresh Windows install (I know I didn't explicitly enable it myself), and I can confirm the long path behavior with pathlib works. Perhaps a reasonable solution is to not implement it, and then if it seems to still be a necessary feature (for whatever reason), then assess from there as a feature request. |
|
Also, since I'm doing an incremental transition to pathlib, I'd like to create some tests that assert the current path value received from the library (from an item or album) is the same as if I call pathlib.PurePath on it. In essence, my idea is to test something like Two questions:
Edit: this is a great article on pathlib and dealing with bytes |
|
How is progress coming along? I'd like to contribute if I have the free time. Is there a branch I can checkout for this migration? |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
|
It's been a while since I've looked at this, and I don't currently have any plans for continuing this. IIRC, I had a couple of issues implementing this
I'll close this PR, but hopefully these thoughts and the discussion in #1409 can be helpful for anyone that wants to attempt to make the transition in the future. |
Description
Works towards implementing pathlib everywhere #1409
An in progress pathlib implementation. My goal for this is to incrementally transition modules/plugins to using pathlib and the new path module over current methods. I don't expect pathlib to be used "everywhere" by the time this PR is able to be merged. This code should live alongside the existing path logic until all modules are fully transitioned.
The idea is also to create separate pull requests for each transition case to try and split up the review process. This branch should serve as a base for pathlib related code that has already been reviewed.
Implementation/Design Notes:
To Do
This pull request can be merged once python 2.7, 3.4, and 3.5 support are dropped (with v1.5.0) and the above checks are completed.