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

Use pytest.hookimpl in pytest_configure #49

Merged
merged 1 commit into from
Nov 30, 2022
Merged

Conversation

danigm
Copy link
Contributor

@danigm danigm commented Nov 30, 2022

Fix #47

pytest.PytestDeprecationWarning: The hookimpl pytest_configure uses
old-style configuration options (marks or attributes).

Please use the pytest.hookimpl(tryfirst=True) decorator instead to
configure the hooks.
See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers

Fix aio-libs#47
@webknjaz
Copy link
Member

Thanks for the patch! Does this change the lowest supported pytest version?

@danigm
Copy link
Contributor Author

danigm commented Nov 30, 2022

Thanks for the patch! Does this change the lowest supported pytest version?

The hookimpl was added for version 2.8.0, so this change should work correctly with pytest 6, https://docs.pytest.org/en/stable/changelog.html#id440

@webknjaz webknjaz changed the title Use pytest.hookimpl in pytest_configure Use pytest.hookimpl in pytest_configure Nov 30, 2022
@webknjaz webknjaz merged commit a6a2533 into aio-libs:master Nov 30, 2022
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Dec 13, 2022
https://build.opensuse.org/request/show/1039049
by user dgarcia + dimstar_suse
- Add pytest72.patch to make it compatible with pytest 7.2.0
  gh#aio-libs/pytest-aiohttp#49
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 this pull request may close these issues.

PytestDeprecationWarning with pytest 7.2.0
2 participants