New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of pylib #930
Comments
Thanks for the detailed summary. I already started to get rid of many pylib uses. Currently devpi-client still supports Python 2.7. No one is paying to support it anymore as of a few weeks ago though. So it will go away as soon as there are bigger issues running the tests for it. I think py.path.local will proba be the hardest, as it is used everywhere and I also like it. I might go the vendoring route for it. Everything else is mostly a matter of cleanup. Please don’t feel obligated to keep pylib alive for devpi. I knew it was going away eventually for quite some time.
|
Out of curiosity, what do you like about it over pathlib.Path? For almost everything I've used (though admittedly only in a testsuite, via pytest), I've found an easy 1:1 pathlib replacement. Given that pathlib is in the stdlib, and far more likely to be known by contributors already, I find it hard to find a good argument for keeping py.path.local around (other than the one-time cost of migrating, which I realize isn't exactly small - I still haven't fully gotten rid of it in the qutebrowser testsuite either!). |
I did some more work on this:
|
I released devpi-client and devpi-common without pylib dependencies. The remaining use of pylib is now in devpi-server and devpi-web and those will be fixed for the next major releases which still need some unrelated work before they can be released. |
This is affecting us because we are now using the server as a mirror and
Is there an ETA for the next release? |
That part of |
FYI, there have been various discussions in pylib recently on how to finally get rid of it (it's been in maintenance mode for a while):
py
and releasing v2.0 pytest-dev/py#288Efforts to get rid of it in pytest have been going on since ~2018, and with today's v7.2.0 release, we decided to go forward by removing it and vendoring the only remaining
py.path
part: pytest-dev/pytest#10396Similarly, tox has made efforts to get rid of "py" for its v4 rewrite:
After that's released at some point, I expect devpi to be the only remaining big project depending on it (other than a couple of pytest plugins). At some point, we probably will archive the py project (from what I can gather, people would love to do that immediately, actually).
I can see various usages across the codebase:
py.builtin
should be easy (Python 2 support is a thing of the past, so that might be a search/replace actually)py.path.local
is a bit harder, but should be replaceable entirely by pathlib, and probablyshutil.which
forsysfind
. Not sure aboutmake_numbered_dir
, pytest seems to have added its own implementation. That should also renderpy.error
useless.py.iniconfig
was split into a standalone project for pytest 6 (mid-2020)py.io
are probably Python 2 compat.py.io.StdCaptureFD
seems to be used in tests. Maybe consider private-importing from pytest instead?py.io.TerminalWriter
is probably the hardest part of it all... maybe rich instead or something?py.xml
andpy.xml.html
I have no idea about. Probably needs an alternative library if you're building HTML with it.The text was updated successfully, but these errors were encountered: