-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Reintroduce get_plugin_manager() for backward-compatibility #787
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
Conversation
68bb21d
to
077ef92
Compare
nicely done |
sure,a dding it back is fine but could you add a test noting pycharms needs it so the next person doesn't accidentally delete this method? |
077ef92
to
0e800e2
Compare
PyCharm pytest runner depends on this function existing (see #787).
Applied suggested changes. 😄 |
"""deprecated, backward-compatibility for pytest < 2.8 (see #787)""" | ||
warnings.warn('get_plugin_manager() is deprecated, use get_config().pluginmanager instead', | ||
DeprecationWarning, stacklevel=2) | ||
return get_config().pluginmanager |
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.
sorry i didn't say this earlier but i think we don't need to bother with deprecating it. @RonnyPfannschmidt , do you insist to deprecate it? I think it's ok to offer a method for IDEs and others to get a plugin manager instance.
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 agree we should just keep this around and remove the warning... waiting for @RonnyPfannschmidt's take on it.
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'm wondering more about having a pytest-controller package,
that would support running py.test slave processes in various configurations
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.
That's an interesting idea, but certainly out of the scope of this PR.
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.
Let's strike the deprecation and rather document get_plugin_manager() as official API (in plugins.txt i guess)
0e800e2
to
a7af2c8
Compare
PyCharm pytest runner depends on this function existing (see #787). Added reference to get_plugin_manager() and PluginManager/PytestPluginManager to docs
PyCharm pytest runner depends on this function existing (see #787). Added reference to get_plugin_manager() and PluginManager/PytestPluginManager to docs
a7af2c8
to
3c2fd83
Compare
Removed the deprecation warning and added a reference to While writing the docs for |
Decided to merge, we can decide on improving the documentation later. 😄 |
Reintroduce get_plugin_manager() for backward-compatibility
PyCharm depends on
get_plugin_manager()
for its pytest runner.Using the pytest runner in PyCharm as of
2.8.0.dev4
raises this exception:The related code in
PyCharm\helpers\pycharm\pytestrunner.py
is:get_plugin_manager
was removed during the refactoring that lead topluggy
, I guess.While it could be argued that PyCharm could fix it on their side, keeping backward compatibility in pytest is simple and would prevent a ton of PyCharm users not being able to run py.test tests when we release
2.8.0
, at least until a hotfix for PyCharm is released.