Giter VIP home page Giter VIP logo

Comments (10)

bluetech avatar bluetech commented on June 5, 2024

The plugins need to update, but we didn't issue proper deprecation warnings for it, so we've yanked the 8.1.0 release for now.

from pytest.

mtelka avatar mtelka commented on June 5, 2024

I'm sorry, but I believe that plugins (and their update) have nothing to do with this. Or, are you trying to suggest that plugins should no longer use the pytest11 entry point?

I think this might be related: pytest-dev/pluggy#457.

from pytest.

bluetech avatar bluetech commented on June 5, 2024

Ah, I thought you were complaining about the failure itself, but you were complaining that disabling the plugin didn't fix the failure.

Yeah, it seems like the pluggy issue.

from pytest.

mtelka avatar mtelka commented on June 5, 2024

Failures reported above are something new. I do not see these failures with pytest 8.0.2, while everything else in the testing environment is same. So this is clear regression caused by some change in pytest. I know the 8.1.0 is yanked, but there is high possibility that this will appear again in some new future version.

I believe this new issue is not the same as pytest-dev/pluggy#457. Maybe they are related, but definitely not the same (and pluggy claims the bug is in pytest :-)).

from pytest.

bluetech avatar bluetech commented on June 5, 2024

There are two issues:

  • pytest 8.1.0 removed some stuff without proper deprecation which caused some plugins to fail. This causes the pluggy._manager.PluginValidationError: Plugin 'black' for hook 'pytest_collect_file' error. This version has been yanked and proper deprecation will be introduced.

  • Even when a setuptools plugin is disabled with -p no:foo the error still happens. This is pytest-dev/pluggy#457.

I know the 8.1.0 is yanked, but there is high possibility that this will appear again in some new future version.

Hopefully after we introduce the deprecations the plugin will be fixed and when we remove the deprecated stuff again it will be OK.

from pytest.

mtelka avatar mtelka commented on June 5, 2024

Okay, hopefully you are right.

But still, are you sure that pytest-dev/pluggy#457 is really a bug at the pluggy side? How should pluggy know that it should not load some plugins from the following?

../prototype/i386/usr/lib/python3.9/vendor-packages/_pytest/config/__init__.py:1377: in _preparse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")

How pytest pass the information about disabled plugins to pluggy?

from pytest.

bluetech avatar bluetech commented on June 5, 2024

But still, are you sure that pytest-dev/pluggy#457 is really a bug at the pluggy side?

I am not.

How pytest pass the information about disabled plugins to pluggy?

IIRC it uses https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluginManager.set_blocked

from pytest.

mtelka avatar mtelka commented on June 5, 2024

How pytest pass the information about disabled plugins to pluggy?

IIRC it uses https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluginManager.set_blocked

Great info! Thank you for that. Quick search in pytest sources shows the set_blocked is never called.

from pytest.

nicoddemus avatar nicoddemus commented on June 5, 2024

Actually it is called here:

def consider_pluginarg(self, arg: str) -> None:
""":meta private:"""
if arg.startswith("no:"):
name = arg[3:]
if name in essential_plugins:
raise UsageError("plugin %s cannot be disabled" % name)
# PR #4304: remove stepwise if cacheprovider is blocked.
if name == "cacheprovider":
self.set_blocked("stepwise")
self.set_blocked("pytest_stepwise")
self.set_blocked(name)
if not name.startswith("pytest_"):
self.set_blocked("pytest_" + name)
else:
name = arg
# Unblock the plugin.
self.unblock(name)
if not name.startswith("pytest_"):
self.unblock("pytest_" + name)
self.import_plugin(arg, consider_entry_points=True)

from pytest.

mtelka avatar mtelka commented on June 5, 2024

Actually it is called here:

Indeed. I do not know why I failed to find it. I assume the information about disabled plugins is not passed down to the runpytest call.

from pytest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.