Merge pull request #1020 from hpk42/pluggy031

re-vendor pluggy to 0.3.1 release and also fix the README
This commit is contained in:
Florian Bruhin 2015-09-17 14:41:32 +02:00
commit fe8def98e4
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:
```
$ 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

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
known and validate all hooks when the system is in a more referentially
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.
- 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 inspect
__version__ = '0.3.0'
__version__ = '0.3.1'
__all__ = ["PluginManager", "PluginValidationError",
"HookspecMarker", "HookimplMarker"]
@ -763,8 +763,15 @@ class PluginValidationError(Exception):
""" plugin failed validation. """
def _formatdef(func):
return "%s%s" % (
func.__name__,
inspect.formatargspec(*inspect.getargspec(func))
)
if hasattr(inspect, 'signature'):
def _formatdef(func):
return "%s%s" % (
func.__name__,
str(inspect.signature(func))
)
else:
def _formatdef(func):
return "%s%s" % (
func.__name__,
inspect.formatargspec(*inspect.getargspec(func))
)