-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Backward compatibility of pytest 7.2.0 and import py.test
#10459
Comments
Line 66 in 50b232b
|
Perhaps we need to include a cc @asottile |
Note that the problem is not the entry point, but code which does this: import py
try:
from rpython.rtyper.test.test_llinterp import interpret
except ImportError:
pytestmark = py.test.mark.skip("Needs RPython to be on the PYTHONPATH") |
I don't think this is different than the advice for the other |
good point |
To complement: @frenzymadness those libraries use the There are two possible fixes to be done on those libraries:
Closing for now, feel free to follow up with other questions. (Pinning this issue too). |
I understand that this is technically not a problem in pytest but py provided some functionality for pytest which is now gone when py is not installed. I also completely understand that it's mostly a problem with the dependencies of the mentioned libraries. But in the end, there is no transition period for codebases still importing |
option 2 is an infinite transition period -- the |
i would say we are happy to merge a pr that adds a reasonable deprecation trigger for using py.test (which should return the pytest module an trigger a warning ) |
if we're going to do that we should bring back py.xml and such too (we should not do that) |
@asottile im not proposing to copy all of pylib, im just proposing that the only alias that we can provide without copying legacy code should be something we accept as external contribution |
I don't think we should accept that either |
i can understand the sentiment |
I understand your point of view. Moreover, I'm thinking about it and I don't see a possible solution that would not require reintroducing the dependency on py and raising the warning from there, unfortunately. |
I'm not sure whether this is a bug or not but because changelog says that pytest follows semantic versioning, it might be a bug/regression. I'm testing pytest 7.2.0 with couple hundreds of RPM packages in Fedora Linux and it turned out that some of them are using
py.test
instead ofpytest
in their tests. For example rply or notario. But you can find more via grep.app.This worked because of this file: https://github.com/pytest-dev/py/blob/master/py/test.py
I don't know how this can be workarounded in the py.py module but having something in py package raising a deprecation warning first for some time would be great.
The text was updated successfully, but these errors were encountered: