-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Load plugins from paths in 'pythonpath' option #12536
Conversation
204e433
to
7843f28
Compare
Can't figure out how to resolve the codecov failure, which seems to be illegitimate anyway since it removed the incorrect "not covered by tests" annotations. Otherwise, this is ready for review. |
@millerdev Since the issue is closed, could you explain your use case for this change? I'm asking because we generally prefer to put functionality in plugins, so we'd like to understand the reasoning before moving to the core. |
@bluetech I am trying to load a plugin that implements early hooks like
The |
@bluetech were you able to consider my use case requirements? Is there anything else blocking for this PR that I should address before it can be merged? |
2b319c1
to
dfa49d0
Compare
@millerdev in summary your requirement is that you need to load plugins which are implemented in files in |
@nicoddemus That is correct. Thank you for taking a look! |
I see, thanks for clarifying. I understand (from a glance, don't have much time now to look deeply into it) you basically removed the Hard to tell if this might cause regressions or not, my gut feeling is that this is OK because it only affects those already using In general I think it makes sense to set What do others think? @RonnyPfannschmidt @Pierre-Sassoulas @bluetech |
6a07028
to
2163ca1
Compare
2163ca1
to
6c04963
Compare
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
We need to make note to turn this into a early plugin late (similar to what coverage needs) |
Seems there is a use case for moving this functionality to core, but that means it can't be a plugin. We prefer functionality to be in plugins because it keeps the core cleaner and leaner. So the question is, is it worth complicating the core in order to accommodate the use case? IMO the answer is no. The use case and constraints (not being able to set BTW: Apologies for being slow to follow up @millerdev. |
I'm OK with this, given the implementation is really simple, and it solves one pain point that is avoiding have to configure So if it is OK with @bluetech I would like to get this in. |
Thanks @millerdev for the contribution! |
@nicoddemus Thank you for getting this in! |
@nicoddemus in what version of pytest is this expected to be released? |
Version |
Real fix for #11118