re-vendor pluggy to 0.3.1 release and also fix the README

This commit is contained in:
holger krekel 2015-09-17 13:54:23 +02:00
parent 6520cf00e9
commit f4bfd571ee
2 changed files with 15 additions and 8 deletions

View File

@ -6,7 +6,7 @@ package, please see [this issue](https://github.com/pytest-dev/pytest/issues/944
To update the current version, execute: To update the current version, execute:
``` ```
$ pip install pluggy==<version> --no-compile --target=_pytest/vendored_packages $ pip install -U pluggy==<version> --no-compile --target=_pytest/vendored_packages
``` ```
And commit the modified files. The `pluggy-<version>.dist-info` directory And commit the modified files. The `pluggy-<version>.dist-info` directory

View File

@ -40,7 +40,7 @@ Pluggy currently consists of functionality for:
is possible to register plugins for which a hook specification is not yet is possible to register plugins for which a hook specification is not yet
known and validate all hooks when the system is in a more referentially known and validate all hooks when the system is in a more referentially
consistent state. Setting an "optionalhook" attribution to a hook consistent state. Setting an "optionalhook" attribution to a hook
implementation will avoid PluginValidationError's if a specifcation implementation will avoid PluginValidationError's if a specification
is missing. This allows to have optional integration between plugins. is missing. This allows to have optional integration between plugins.
- a "hook" relay object from which you can launch 1:N calls to - a "hook" relay object from which you can launch 1:N calls to
@ -67,7 +67,7 @@ Pluggy currently consists of functionality for:
import sys import sys
import inspect import inspect
__version__ = '0.3.0' __version__ = '0.3.1'
__all__ = ["PluginManager", "PluginValidationError", __all__ = ["PluginManager", "PluginValidationError",
"HookspecMarker", "HookimplMarker"] "HookspecMarker", "HookimplMarker"]
@ -763,8 +763,15 @@ class PluginValidationError(Exception):
""" plugin failed validation. """ """ plugin failed validation. """
def _formatdef(func): if hasattr(inspect, 'signature'):
return "%s%s" % ( def _formatdef(func):
func.__name__, return "%s%s" % (
inspect.formatargspec(*inspect.getargspec(func)) func.__name__,
) str(inspect.signature(func))
)
else:
def _formatdef(func):
return "%s%s" % (
func.__name__,
inspect.formatargspec(*inspect.getargspec(func))
)