-
Notifications
You must be signed in to change notification settings - Fork 127
Silently eats DistributionNotFound errors #174
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
Comments
@matthijskooijman its absolutely unclear why @hpk42 keept that "diaper" thing in |
It is unclear indeed. I propose that we drop the try/except and let the error propagate; I can't think we would ever want to silently discard plugin errors. |
…otFound`` errors Fix pytest-dev#174
@nicoddemus just letting them bubble without some extra intervention in pytest will be a breaking api change |
Can we capture that in pytest ourselves and show a warning perhaps?
Em dom, 19 de ago de 2018 04:01, Ronny Pfannschmidt <
[email protected]> escreveu:
… @nicoddemus <https://github.com/nicoddemus> just letting them bubble
without some extra intervention in pytest will be a breaking api change
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#174 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABCO_LS8PDdcwpsrv0U7BicAyglNBOwtks5uSQ1cgaJpZM4V9Ji8>
.
|
One problem with catching that error in pytest, is that the exception will have broken the loop, so any entry points that come after the problematic one, will be skipped. |
just hit that since pip and setuptools normalize distribution names differently and a requirement that worked fine with pip triggered a hard setuptools failure in not finding the package name since pip finds |
Apparently |
I was running into an issue with pluggy, because it eats
DistributionNotFound
errors. In my case, this prevented most of my installed pytest plugins from being used, without any indication as to why.The root cause of the
DistributionNotFound
error was a missing dependency. I installed pytest from a [Pipfile.lock] that was (presumably) generated on a Unix system, where pytest does not depend on thecolorama
package. However, I was running on a Windows system, so pytest was installed without all of its dependencies. When pluggy tries to load pytest plugins, which (I presume) depend again on pytest,pkg_resources
notices this missing dependency and raises aDistributionNotFound
error, which is silently eaten by pluggy.For reference, here is the traceback that's being eaten (by adding a
traceback.print_exc()
inside pluggy):Why does pluggy eat this error? I traced the history back to the pytest repo and the change was introduced in this commit: pytest-dev/pytest@1bc444d, but that does not really tell me why it was introduced....
The text was updated successfully, but these errors were encountered: