-
Notifications
You must be signed in to change notification settings - Fork 13
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
pytest 6 support #12
Comments
See #10. But it stopped working with Pytest 6.1 |
Any plans to fix this @bitprophet? All of your projects depending on pytest-relaxed currently fail with pytest 6. |
This has been broken with pytest-dev/pytest@daca174 |
That's what you get for using private functions |
To be fair, most of my projects tend to pin their deps in requirements.txt and if they don't, they should! But thanks for bringing this up. @bnavigator I've been around a while; I would never use a private function if there was an obviously workable public one :( but when one is a client of code that doesn't have the right extension hooks for what you want (not to knock pytest, they put a lot of work into that and pytest-relaxed's use case is a bit of an outlier) sometimes you gotta make do. I am going around and doing some maintenance upkeep for my projects so I'll try to fit this in somewhere. |
Pinning is not an option for rolling distros. Regardless, you are free to do so. These bug reports are merely a hint for you, that your requirements specify old versions, and you need to take action if you want to support newer software. Luckily, only your own projects seem to rely on pytest-relaxed and at openSUSE Tumbleweed we are able to provide pytest5 as alternative for newest pytest (despite you officially only support pytest 4 now!).
Sure, as long as you are aware of the fact that it can break any time without notice. (In this case Pytest even mentioned the deprecation of the way you collect items a long time ago: https://docs.pytest.org/en/stable/changelog.html#pytest-3-9-0-2018-10-15-not-published-due-to-a-release-automation-bug) |
Fedora maintainer here. We maintain an alternate old version of pytest just because paramiko and invoke use pytest-relaxed. However this also means we need to fix the old pytest version for new Pythons. If "pin an old pytest version" is the recommended solution, at a certain point it might be easier for us to patch pytest-relaxed out of paramiko (it only uses the |
Thanks @hroncok - that's good context to have (I wish I was more in touch with y'all OS level maintainers). FWIW my statements earlier shouldn't be construed a "I won't do this" - just explaining why this hasn't been a top priority among my large pile of top priorities (😩 ). I may find time for this as I migrate my projects to newer CI setups and drop Python 2 support, which is next on my plate after some lingering feature releases currently underway. |
Cool, thanks! I'd wish I could help, but there's too much pytest internal magic going on here. I could however test the impact on paramiko/invoke. |
I'm not 100% sure but looks like I've just hit the same bug in my distribtion sqlalchemy/sqlalchemy#6335 |
FreeBSD ports hit this too (mea culpa) https://cgit.freebsd.org/ports/commit/?id=0c6ce3c9c26d878acf943d53fb2a01ba602b71c2, luckily it's a leaf package with no rev deps. |
Hello everyone. Just for the record: No pytest 6 support also means no Python 3.10 support. So the only option from here on is @hroncok's proposed approach "patch pytest-relaxed out of paramiko (it only uses the raises decorator) and ship invoke untested". We at openSUSE have already implemented the former a while ago and will soon require to follow with the latter. |
SpecInstance relys on _makeitem to construct any instance, which was removed in pytest 6.1. Instead of overriding that method, define a collect method that knows how to recurse. Fixes bitprophet#12
i can't enable the test suite in the debian package because of this as well. |
Python 3.10 requires Pytest 6.2.5 and above: pytest-dev/pytest#8540 |
Using
SpecModule
constructor directly is deprecatedThe text was updated successfully, but these errors were encountered: