-
-
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
Change -p so it is possible to early load setuptools plugins #4727
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while this works, this breaks refactoring where a plugin is moved but the plugin name doesn't change
we definitively should look if a plugin name is a entrypoint instead
Hmm that did not occur to me, could you provide an example?
Not sure I get this, can you elaborate? |
if someone moves
when passing |
Oh got it! Sure sure, that makes much more sense. 👍 I was not 100% happy with the solution either because it is not explicitly obvious what the user should be passing. I will get to it. |
806788f
to
d3c9d77
Compare
Codecov Report
@@ Coverage Diff @@
## features #4727 +/- ##
============================================
+ Coverage 95.61% 95.64% +0.02%
============================================
Files 113 113
Lines 25163 25216 +53
Branches 2498 2504 +6
============================================
+ Hits 24060 24117 +57
+ Misses 776 775 -1
+ Partials 327 324 -3
Continue to review full report at Codecov.
|
d3c9d77
to
cbc07ab
Compare
src/_pytest/config/__init__.py
Outdated
if attempt_entry_point: | ||
infos = len(self.list_plugin_distinfo()) | ||
new_infos = self.load_setuptools_entrypoints("pytest11", name=modname) | ||
loaded = new_infos > infos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this allows 2 extra kex features a s followup
a) putting pytests own plugins into entrypoints (using a own entrypoint limited to pytest core)
b) inventing a naming mechanism for plugins that do not autoload, but should have a short name to autoload
it may be necessary to go a step further on pluggy and externalizing the plugin loader concept for a better behavioral envelope
1f64faa
to
e30a8b5
Compare
Applied all the changes I wanted. This works locally when using together with pytest-dev/pluggy#189, so we will have to wait for that to get merged and released before we can merge this one. 👍 |
Excited to see this land! Thanks for all of this! |
e30a8b5
to
a020727
Compare
Rebased now that |
Related to pytest-dev/pluggy#189Fixes #4718