Hi, How do plugins support multiple pytest versions when the hook api changes? Or should they?
Example. pytest-json-report ytest_warning_captured, which was deprecated in pytest 6. Looks like there's a new hook, pytest_warning_recorded, with similar enough API. I haven't tested it to see if the behavior is close enough to work as a drop in replacement. But even if it is, switching to the new api makes the plugin only work on pytest 6.0 and above. Is it recommended that plugin authors try to force users to always use the latest pytest? What if they want to support older versions also? Is there a recommended way to say this? if pytest version < 6, use one hook else use new hook Thanks, Brian
_______________________________________________ pytest-dev mailing list pytest-dev@python.org https://mail.python.org/mailman/listinfo/pytest-dev