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
Prepare for upcoming pytest 7.0 deprecations #42
Conversation
I hope this can be merged and released to unblock the pytest PR. But it's OK if not, we can add an ignore on our side, it's not a problem. |
Apparently we never moved this repo from Travis to GitHub Actions. We should try to do that first. |
Sure, I'll try to do it now. |
`collect` is not called on the Item, but on the File.
Since pytest-flakes depends on pytest>=5.0, the check is not necessary.
Since pytest-flakes required python>=3.5, and tokenize.open was added in python 3.2, it's no longer needed.
pytest-flakes is checked as part of pytest's CI. In pytest 7.0 (previously 6.3), `py.path.local`-based arguments to hooks & node ctors are deprecated, so switch to the `pathlib` based replacements on pytest 7.
Thanks. Should I make a release with this or are more changes forthcoming? |
Except #44, nothing more from me, thanks! |
Just released 4.0.4 with your changes. |
This follows up asmeurer#42, we decided that using just `fspath` as the new parameter that users should use would be confusing because it is too close to `path` and also we have `fspath` already in some places of the pytest public API (see pytest-dev/pytest#9283). This PR updates the hook affected by this new change in pytest-dev/pytest#9363.
This plugin has had to endure a lot of deprecations from pytest, sorry about that :(
pytest-flakes is checked as part of pytest's CI. In pytest 7.0 (previously 6.3),
py.path.local
-based arguments to hooks & node ctors are deprecated, so switch to thepathlib
based replacements on pytest 7.I also cleaned up some no-longer-needed backward compat checks, see the separate commits for those.
Refs pytest-dev/pytest#9232