Oliver Bestwalter
Oliver Bestwalter
I think we should figure out what in general a command line tool using pluggy should output when `whatever --version` is invoked. tox current version (no pluggy information at all):...
So, basically not much different of what we now construct from `list_plugin_distinfo()` but standardized with all the pugyy insider knowledge right from the source, so as an hypothetic example: plugins...
for good measure - here is what devpi does: devpi --version devpi-client 2.7.0 current devpi server: https://devpi.net/ devpi-findlinks 2.0.0 devpi-server 4.3.1rc1 devpi-web 3.2.1rc1
I still think it would be good to consolidate this functionality into pluggy instead of everybody baking their own thing.
Can you explain that problem further? I don't get it. From the perspective of a maintainer of a project using pluggy I would like to have a convenience method to...
pytest: https://github.com/pytest-dev/pytest/blob/master/_pytest/helpconfig.py#L154 def getpluginversioninfo(config): lines = [] plugininfo = config.pluginmanager.list_plugin_distinfo() if plugininfo: lines.append("setuptools registered plugins:") for plugin, dist in plugininfo: loc = getattr(plugin, '__file__', repr(plugin)) content = "%s-%s at %s"...
looks like pytest even grew two ways of doing the same thing already? I did not look to closely but here it is: https://github.com/pytest-dev/pytest/blob/master/_pytest/terminal.py#L455 https://github.com/pytest-dev/pytest/blob/master/_pytest/terminal.py#L736 def _plugin_nameversions(plugininfo): values = []...
devpi server does save the generated output in a dict and sorts the stuff (good idea), but not fundamentally different: https://github.com/devpi/devpi/blob/master/server/devpi_server/main.py#L309 threadlog.info("Found plugin %s-%s (%s)." % ( distinfo.project_name, distinfo.version, distinfo.location))...
> it should be a helper function not part of the pluginmanager I think it should be part of the plugin manager, because `pluginmanager.list_plugin_distinfo()` is providing the same knowledge but...
Unless you are heading for test framework agnostic functionality, this use case is already well covered by pytest itself. The envisioned API was: ```python server = session.background("python", "-m", "webapp") session.run("pytest",...