-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
Broken compatibility with pytest<7 (pytest.Parser type annotation) #755
Comments
It's possible to use the future annotations features Plus and conditional TYPE_CHECKING imports to sidestep this Since those old pytest versions are unmaintained it's best if someone affected steps up for changing this There's need for feedback form the primary maintainers as they are well within reason to just set requires-python |
I think we should require |
Well, pytest 6 is maintained in the enterprise linux world. Allow me to explain the Fedora packaing as best I can: I'm looking into refactoring the rpm packaging with the latest testinfra version in mind now, which is how I found the issue in the first place. (I'm not the maintainer, just contributing). And I believe this one line with type annotation is preventing the el9 package from being built. It would be a shame if the rpm version would have to include patches instead of using upstream sources 'as is'. I'd be happy to step-up! :) Unless there is a fundamental incompability with pytest 6.2. Will try to run some tests later on.
Required minimal python is already 3.9 here afaik. |
So it was indeed only one future annotations import in the plugin.py. [unrelated] I've also noticed flake8 check is broken on Python 3.12. Will take a look later. Hopefully there are no objections against using ruff :) |
I'd like to make it abundantly clear that pytest 6 is upstream eol Open source projects in general can't be expected to pay the enterprise tax The expectation is that the enterprise vendor will have to handle the details |
Nobody says otherwise.
I mean, there is no minimal pytest version set here currently, so what tax are you talking about? :) That said, it makes perfect sense to require pytest>=7, I just thought it would be cool to have parity with EPEL9 rpm (and let people use pytest6 if they wish so for whatever reason) |
The parser annotation in plugin.py introduced in 10.0 does not work with pytest 6.
pytest-testinfra/testinfra/plugin.py
Line 40 in dc48cd9
pytest.Parser
is only available from pytest 7.0.0While specifying minimal pytest version would be a solution, I would rather recommend finding another solution, as RHEL-9/Alma Linux 9/CentOS Stream 9 are running pytest 6 (and Python 3.9).
I'd be happy to help with finding a solution, should you decide to keep pytest 6 compatibility.
The text was updated successfully, but these errors were encountered: