Skip to content

Commit

Permalink
Merge pull request #328 from nicoddemus/release-1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Aug 25, 2021
2 parents e04816f + 4259fdd commit 776e8f7
Show file tree
Hide file tree
Showing 13 changed files with 81 additions and 51 deletions.
76 changes: 76 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,82 @@ Changelog

.. towncrier release notes start
pluggy 1.0.0 (2021-08-25)
=========================

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

- `#116 <https://github.com/pytest-dev/pluggy/issues/116>`_: Remove deprecated ``implprefix`` support.
Decorate hook implementations using an instance of HookimplMarker instead.
The deprecation was announced in release ``0.7.0``.


- `#120 <https://github.com/pytest-dev/pluggy/issues/120>`_: Remove the deprecated ``proc`` argument to ``call_historic``.
Use ``result_callback`` instead, which has the same behavior.
The deprecation was announced in release ``0.7.0``.


- `#265 <https://github.com/pytest-dev/pluggy/issues/265>`_: Remove the ``_Result.result`` property. Use ``_Result.get_result()`` instead.
Note that unlike ``result``, ``get_result()`` raises the exception if the hook raised.
The deprecation was announced in release ``0.6.0``.


- `#267 <https://github.com/pytest-dev/pluggy/issues/267>`_: Remove official support for Python 3.4.


- `#272 <https://github.com/pytest-dev/pluggy/issues/272>`_: Dropped support for Python 2.
Continue to use pluggy 0.13.x for Python 2 support.


- `#308 <https://github.com/pytest-dev/pluggy/issues/308>`_: Remove official support for Python 3.5.


- `#313 <https://github.com/pytest-dev/pluggy/issues/313>`_: The internal ``pluggy.callers``, ``pluggy.manager`` and ``pluggy.hooks`` are now explicitly marked private by a ``_`` prefix (e.g. ``pluggy._callers``).
Only API exported by the top-level ``pluggy`` module is considered public.


- `#59 <https://github.com/pytest-dev/pluggy/issues/59>`_: Remove legacy ``__multicall__`` recursive hook calling system.
The deprecation was announced in release ``0.5.0``.



Features
--------

- `#282 <https://github.com/pytest-dev/pluggy/issues/282>`_: When registering a hookimpl which is declared as ``hookwrapper=True`` but whose
function is not a generator function, a ``PluggyValidationError`` exception is
now raised.

Previously this problem would cause an error only later, when calling the hook.

In the unlikely case that you have a hookwrapper that *returns* a generator
instead of yielding directly, for example:

.. code-block:: python
def my_hook_real_implementation(arg):
print("before")
yield
print("after")
@hookimpl(hookwrapper=True)
def my_hook(arg):
return my_hook_implementation(arg)
change it to use ``yield from`` instead:

.. code-block:: python
@hookimpl(hookwrapper=True)
def my_hook(arg):
yield from my_hook_implementation(arg)
- `#309 <https://github.com/pytest-dev/pluggy/issues/309>`_: Add official support for Python 3.9.


pluggy 0.13.1 (2019-11-21)
==========================

Expand Down
4 changes: 2 additions & 2 deletions HOWTORELEASE.rst → RELEASING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Release Procedure

This will create the branch ready to be pushed.

#. Open a PR targeting ``master``.
#. Open a PR targeting ``main``.

#. All tests must pass and the PR must be approved by at least another maintainer.

Expand All @@ -20,4 +20,4 @@ Release Procedure

#. Make sure it is `available on PyPI <https://pypi.org/project/pluggy>`_.

#. Merge the PR into ``master``, either manually or using GitHub's web interface.
#. Merge the PR into ``main``, either manually or using GitHub's web interface.
3 changes: 0 additions & 3 deletions changelog/116.removal.rst

This file was deleted.

3 changes: 0 additions & 3 deletions changelog/120.removal.rst

This file was deleted.

3 changes: 0 additions & 3 deletions changelog/265.removal.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/267.removal.rst

This file was deleted.

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

This file was deleted.

28 changes: 0 additions & 28 deletions changelog/282.feature.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/308.removal.rst

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

6 changes: 3 additions & 3 deletions scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@


def create_branch(version):
"""Create a fresh branch from upstream/master"""
"""Create a fresh branch from upstream/main"""
repo = Repo.init(".")
if repo.is_dirty(untracked_files=True):
raise RuntimeError("Repository is dirty, please commit/stash your changes.")

branch_name = f"release-{version}"
print(f"{Fore.CYAN}Create {branch_name} branch from upstream master")
print(f"{Fore.CYAN}Create {branch_name} branch from upstream main")
upstream = get_upstream(repo)
upstream.fetch()
release_branch = repo.create_head(branch_name, upstream.refs.master, force=True)
release_branch = repo.create_head(branch_name, upstream.refs.main, force=True)
release_branch.checkout()
return repo

Expand Down

0 comments on commit 776e8f7

Please sign in to comment.