pytest-dev / py

Python development support library (note: maintenance only)
MIT License
67 stars 106 forks source link

Maintenance mode, is there an alternative? #178

Closed wolph closed 6 years ago

wolph commented 6 years ago

Hi guys,

I just noticed that this library is not recommended for new projects anymore which is too bad since I quite like the features provided by py.path. So I'm wondering, what's the reasoning behind this? Is there an alternative library to use?

Especially in small shell scripts it can be far more convenient (and clearer) to do:

path.join('something').write('some text', ensure=True)

Than writing:

if not os.path.isdir(path):
    os.makedirs(path)

with open(os.path.join(path, 'something'), 'w') as fh:
    fh.write('some text')
RonnyPfannschmidt commented 6 years ago

for path operations i generally suggest pathlib/pathlib2

wolph commented 6 years ago

I didn't consider pathlib because I wasn't aware there were backports available. That helps a lot :)

Should that recommendation (and perhaps others) be added to the readme as well? I can't be the only one that has this question

jsmedmar commented 6 years ago

py.path is very nice :), pathlib/pathlib2 recommendation would be great in readme