Skip to content
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

Upgrade to new-style hook wrappers #216

Open
ConorMacBride opened this issue Dec 17, 2023 · 3 comments · Fixed by #219
Open

Upgrade to new-style hook wrappers #216

ConorMacBride opened this issue Dec 17, 2023 · 3 comments · Fixed by #219
Milestone

Comments

@ConorMacBride
Copy link
Member

Pytest 8 will use the new-style hook wrappers so we should add a version check to update the decorator for our pytest_runtest_call hooks.

See also: pytest-dev/pytest#11714

Also re-enable the pytestdev test environment.

@pllim
Copy link
Contributor

pllim commented Jan 10, 2024

Actually I didn't really upgrade to new style. I simply copy-pasted the suggested workaround by pytest dev, so maybe you should re-open this issue. I apologize for any inconvenience caused.

@ConorMacBride
Copy link
Member Author

Yes, I realised that, but I think how you fixed it is better. The pluggy documentation now recommends using force_exception so we are effectively adding proper support for newer pluggy versions, regardless of the pytest version installed.

To add the new-style hook wrappers we'd need to do version checks on pytest to decide which kwargs to pass to the hooks, which might be unnecessary mess? The old-style hook wrappers will likely be supported for a long time yet. I'll reopen this issue though, as we should upgrade at some point. v1.0.0 would probably make sense.

@neutrinoceros
Copy link
Contributor

Pluggy 1.4.0 (just released) now warns about old-style hook wrappers (xref #221). This breaks any CI that treats warnings as errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants