Closed mshuffett closed 7 years ago
How are you using py.path? FWIW, we plan to replace it by pathlib in pytest in the long run, and at that point, it'll most likely not see much new development anyways.
I've been using it pretty commonly just in my general code. The ensure method is particularly convenient. I tried to switch to pathlib but I wasn't happy with the codebase and found a breaking bug in the way resolve worked which deterred me but I helped to get that fixed so it is probably usable now.
Thanks for letting me know. If it isn't going to be developed much in the future I'll probably move away from it.
On Wed, Aug 9, 2017, 12:46 AM Florian Bruhin notifications@github.com wrote:
How are you using py.path? FWIW, we plan to replace it by pathlib in pytest in the long run, and at that point, it'll most likely not see much new development anyways.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pytest-dev/py/issues/150#issuecomment-321151586, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBV0dGot-yHcunZVBnpeiU_yR-DCE9Dks5sWTmxgaJpZM4OxT7P .
@mshuffett currently those are called parts()
and dirpath()
Yeah. I should probably just use parts more, Thanks.
I commonly have to access the parent multiple levels above a path, but the
py.path.local
module does not seem to have a convenient way to do it.I would like to request / add two new attributes parent and parents which mirror the API of
pathlib
. https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.parents