Skip to content
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

Release 0.7.1 #160

Merged
merged 5 commits into from
Jul 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,74 @@
pluggy 0.7.1 (2018-07-28)
=========================

Deprecations and Removals
-------------------------

- `#116 <https://github.com/pytest-dev/pluggy/issues/116>`_: Deprecate the ``implprefix`` kwarg to ``PluginManager`` and instead
expect users to start using explicit ``HookimplMarker`` everywhere.



Features
--------

- `#122 <https://github.com/pytest-dev/pluggy/issues/122>`_: Add ``.plugin`` member to ``PluginValidationError`` to access failing plugin during post-mortem.


- `#138 <https://github.com/pytest-dev/pluggy/issues/138>`_: Add per implementation warnings support for hookspecs allowing for both
deprecation and future warnings of legacy and (future) experimental hooks
respectively.



Bug Fixes
---------

- `#110 <https://github.com/pytest-dev/pluggy/issues/110>`_: Fix a bug where ``_HookCaller.call_historic()`` would call the ``proc``
arg even when the default is ``None`` resulting in a ``TypeError``.

- `#160 <https://github.com/pytest-dev/pluggy/issues/160>`_: Fix problem when handling ``VersionConflict`` errors when loading setuptools plugins.



Improved Documentation
----------------------

- `#123 <https://github.com/pytest-dev/pluggy/issues/123>`_: Document how exceptions are handled and how the hook call loop
terminates immediately on the first error which is then delivered
to any surrounding wrappers.


- `#136 <https://github.com/pytest-dev/pluggy/issues/136>`_: Docs rework including a much better introduction and comprehensive example
set for new users. A big thanks goes out to @obestwalter for the great work!



Trivial/Internal Changes
------------------------

- `#117 <https://github.com/pytest-dev/pluggy/issues/117>`_: Break up the main monolithic package modules into separate modules by concern


- `#131 <https://github.com/pytest-dev/pluggy/issues/131>`_: Automate ``setuptools`` wheels building and PyPi upload using TravisCI.


- `#153 <https://github.com/pytest-dev/pluggy/issues/153>`_: Reorganize tests more appropriately by modules relating to each
internal component/feature. This is in an effort to avoid (future)
duplication and better separation of concerns in the test set.


- `#156 <https://github.com/pytest-dev/pluggy/issues/156>`_: Add ``HookImpl.__repr__()`` for better debugging.


- `#66 <https://github.com/pytest-dev/pluggy/issues/66>`_: Start using ``towncrier`` and a custom ``tox`` environment to prepare releases!


pluggy 0.7.0 (Unreleased)
=========================

* `#160 <https://github.com/pytest-dev/pluggy/issues/160>`_: We discovered a deployment issue so this version was never released to PyPI, only the tag exists.

0.6.0
-----
- Add CI testing for the features, release, and master
Expand Down
2 changes: 0 additions & 2 deletions changelog/110.bugfix.rst

This file was deleted.

2 changes: 0 additions & 2 deletions changelog/116.removal.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/117.trivial.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/122.feature.rst

This file was deleted.

3 changes: 0 additions & 3 deletions changelog/123.doc.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/131.feature.rst

This file was deleted.

2 changes: 0 additions & 2 deletions changelog/136.doc.rst

This file was deleted.

3 changes: 0 additions & 3 deletions changelog/138.feature.rst

This file was deleted.

3 changes: 0 additions & 3 deletions changelog/153.trivial.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/156.trivial.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/66.feature.rst

This file was deleted.

3 changes: 2 additions & 1 deletion pluggy/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ def load_setuptools_entrypoints(self, entrypoint_name):
continue
except VersionConflict as e:
raise PluginValidationError(
"Plugin %r could not be loaded: %s!" % (ep.name, e))
plugin=None,
message="Plugin %r could not be loaded: %s!" % (ep.name, e))
self.register(plugin, name=ep.name)
self._plugin_distinfo.append((plugin, ep.dist))
return len(self._plugin_distinfo)
Expand Down
4 changes: 2 additions & 2 deletions scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def pre_release(version):
"""Generates new docs, release announcements and creates a local tag."""
repo = create_branch(version)
changelog(version, write_out=True)
repo.index.add(['CHANGELOG.rst', 'changelog'])
repo.index.commit(f"Preparing release {version}")

check_call(['git', 'commit', '-a', '-m', f"Preparing release {version}"])

print()
print(f"{Fore.GREEN}Please push your branch to your fork and open a PR.")
Expand Down
22 changes: 22 additions & 0 deletions testing/test_pluginmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,28 @@ class PseudoPlugin(object):
assert pm.list_plugin_distinfo() == [(plugin, None)]


def test_load_setuptools_version_conflict(monkeypatch, pm):
"""Check that we properly handle a VersionConflict problem when loading entry points"""
pkg_resources = pytest.importorskip("pkg_resources")

def my_iter(name):
assert name == "hello"

class EntryPoint(object):
name = "myname"
dist = None

def load(self):
raise pkg_resources.VersionConflict('Some conflict')

return iter([EntryPoint()])

monkeypatch.setattr(pkg_resources, 'iter_entry_points', my_iter)
with pytest.raises(PluginValidationError,
match="Plugin 'myname' could not be loaded: Some conflict!"):
pm.load_setuptools_entrypoints("hello")


def test_load_setuptools_not_installed(monkeypatch, pm):
monkeypatch.setitem(
sys.modules, 'pkg_resources',
Expand Down