Summary: | python-utils-r1.eclass: epytest should set PYTEST_DISABLE_PLUGIN_AUTOLOAD | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Matt Whitlock <gentoo> |
Component: | Eclasses | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED CANTFIX | ||
Severity: | normal | CC: | gentoo, ionen, mgorny, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Matt Whitlock
2022-03-14 23:19:13 UTC
I thought I'd remembered mgorny exploring this but maybe not (might be thinking of https://github.com/gentoo/gentoo/commit/f10588909c89639ce3a68ed2bcff6d7b05da1ba8, which just disables some plugins). I've been thinking about this in the past but I think the breakage is too large. I mean, figuring out all the test failures and finding the right set of plugins is a huge undertaking. It doesn't help that usually the resulting failures and errors are far from explanatory. It doesn't help that some packages use some plugins optionally but don't check correctly for them. For example, they enable xdist-related code if 'import xdist' works, which causes the package to explode when xdist plugin is not actually loaded. (if at all, it can only happen in a new EAPI) Finally, there's the problem of indirect pytest tests that would be affected by the envvar but can't be trivially fixed to load the right set of plugins. All good points. Thank you for your consideration. Perhaps just recommend setting the envvar as a best practice in your Python development guide, although you're right that the errors that result from not having a plugin loaded when it's needed (and also having a plugin loaded when it's not expected!) are far from explanatory. In my case, the autoloading of the pytest-twisted plugin was breaking dynamic class method dispatch in the python-bitcointx library, a totally non-obvious and perplexing side effect. While I'm for adding this wherever we can, I don't think it's possible or even reasonable to force it everywhere. |