-
-
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
Stop vendoring pluggy #2719
Stop vendoring pluggy #2719
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.
Thanks a lot @tgoodlet!
setup.py
Outdated
@@ -43,7 +43,7 @@ def has_environment_marker_support(): | |||
|
|||
|
|||
def main(): | |||
install_requires = ['py>=1.4.33', 'six>=1.10.0','setuptools'] # pluggy is vendored in _pytest.vendored_packages | |||
install_requires = ['py>=1.4.33', 'six>=1.10.0','setuptools', 'pluggy==0.4.0'] |
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.
Perhaps 'pluggy>=0.4.0,<0.5'
?
_pytest/_pluggy.py
Outdated
@@ -1,11 +1,6 @@ | |||
""" | |||
imports symbols from vendored "pluggy" if available, otherwise | |||
falls back to importing "pluggy" from the default namespace. | |||
Import symbols from ``pluggy`` |
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.
I think we can get rid of this module altogether and just import pluggy
docs normally no?
doc/en/writing_plugins.rst
Outdated
@@ -454,7 +454,7 @@ hook wrappers and passes the same arguments as to the regular hooks. | |||
|
|||
At the yield point of the hook wrapper pytest will execute the next hook | |||
implementations and return their result to the yield point in the form of | |||
a :py:class:`CallOutcome <_pytest.vendored_packages.pluggy._CallOutcome>` instance which encapsulates a result or | |||
a :py:class:`CallOutcome <_pytest._pluggy._CallOutcome>` instance which encapsulates a result or |
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.
Could you please create the docs locally (tox -e docs
) to ensure the changes links still work?
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.
@nicoddemus yep I'll test it out
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.
seems to have worked 👍
_pytest/_pluggy.py
Outdated
from pluggy import * # noqa | ||
from pluggy import __version__ # noqa | ||
from pluggy import * | ||
from pluggy import __version__ |
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.
we might want to consider just directly inlining the imports as a followup
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.
I think we can do it in the same PR if @tgoodlet is willing
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.
@nicoddemus @RonnyPfannschmidt yup no problem guys.
I'll take a look this morning.
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.
Awesome, thanks!
@RonnyPfannschmidt @nicoddemus alright made the changes. |
personally i like the history intact, but please add a changelog fragment |
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.
Thanks, looks good!
Just missing adding a trivial
changelog entry like @RonnyPfannschmidt asked and then is good to merge from my POV.
Regarding history, I like to tidy the history (and always do on my PRs), so we can leave that to you. 😁
@nicoddemus @RonnyPfannschmidt I noticed in the
Are we doing that as well or do I just need to add a |
IMO just the |
@nicoddemus good enough? |
Yep, thanks! |
@nicoddemus I'm assuming those CI failures are expected? |
That seems odd - I opened HypothesisWorks/hypothesis#822 |
Thanks @The-Compiler :) |
Once you guys merge this I'll put up a new PR to bring in |
another item to consider, we could now cython-ize pluggy for cpython ^^ |
@RonnyPfannschmidt good idea. |
If this is too much let me know guys ;)
Pretty sure I got everything but someone should double check.