From fc6395ca27d5deb008db250da57a23dd40bc93a4 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 25 Aug 2021 12:06:06 -0300 Subject: [PATCH 1/4] Fix scripts/release.py to use main instead of master --- scripts/release.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/release.py b/scripts/release.py index 1340480d..e09b8c77 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -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 From 56eb23c89aa0a43fa7b139894fbf6142684c2969 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 25 Aug 2021 12:06:34 -0300 Subject: [PATCH 2/4] Rename HOWTORELEASE to RELEASING to follow pytest --- HOWTORELEASE.rst => RELEASING.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename HOWTORELEASE.rst => RELEASING.rst (81%) diff --git a/HOWTORELEASE.rst b/RELEASING.rst similarity index 81% rename from HOWTORELEASE.rst rename to RELEASING.rst index a0cc4fde..ee0d1331 100644 --- a/HOWTORELEASE.rst +++ b/RELEASING.rst @@ -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. @@ -20,4 +20,4 @@ Release Procedure #. Make sure it is `available on PyPI `_. -#. 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. From 906abca9bb403729f4df44d02142698ddd54d5b5 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 25 Aug 2021 12:06:42 -0300 Subject: [PATCH 3/4] Preparing release 1.0.0 --- CHANGELOG.rst | 74 +++++++++++++++++++++++++++++++++++++++ changelog/116.removal.rst | 3 -- changelog/120.removal.rst | 3 -- changelog/265.removal.rst | 3 -- changelog/267.removal.rst | 1 - changelog/272.removal.rst | 2 -- changelog/282.feature.rst | 28 --------------- changelog/308.removal.rst | 1 - changelog/309.feature.rst | 1 - changelog/313.removal.rst | 2 -- changelog/59.removal.rst | 2 -- 11 files changed, 74 insertions(+), 46 deletions(-) delete mode 100644 changelog/116.removal.rst delete mode 100644 changelog/120.removal.rst delete mode 100644 changelog/265.removal.rst delete mode 100644 changelog/267.removal.rst delete mode 100644 changelog/272.removal.rst delete mode 100644 changelog/282.feature.rst delete mode 100644 changelog/308.removal.rst delete mode 100644 changelog/309.feature.rst delete mode 100644 changelog/313.removal.rst delete mode 100644 changelog/59.removal.rst diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0536dda0..ae5cec4d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,80 @@ Changelog .. towncrier release notes start +pluggy 1.0.0 (2021-08-25) +Deprecations and Removals +------------------------- + +- `#116 `_: Remove deprecated ``implprefix`` support. + Decorate hook implementations using an instance of HookimplMarker instead. + The deprecation was announced in release ``0.7.0``. + + +- `#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 `_: 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 `_: Remove official support for Python 3.4. + + +- `#272 `_: Dropped support for Python 2. + Continue to use pluggy 0.13.x for Python 2 support. + + +- `#308 `_: Remove official support for Python 3.5. + + +- `#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 `_: Remove legacy ``__multicall__`` recursive hook calling system. + The deprecation was announced in release ``0.5.0``. + + + +Features +-------- + +- `#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 `_: Add official support for Python 3.9. + + pluggy 0.13.1 (2019-11-21) ========================== diff --git a/changelog/116.removal.rst b/changelog/116.removal.rst deleted file mode 100644 index 8f83ee63..00000000 --- a/changelog/116.removal.rst +++ /dev/null @@ -1,3 +0,0 @@ -Remove deprecated ``implprefix`` support. -Decorate hook implementations using an instance of HookimplMarker instead. -The deprecation was announced in release ``0.7.0``. diff --git a/changelog/120.removal.rst b/changelog/120.removal.rst deleted file mode 100644 index 36aa2910..00000000 --- a/changelog/120.removal.rst +++ /dev/null @@ -1,3 +0,0 @@ -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``. diff --git a/changelog/265.removal.rst b/changelog/265.removal.rst deleted file mode 100644 index 1b882a30..00000000 --- a/changelog/265.removal.rst +++ /dev/null @@ -1,3 +0,0 @@ -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``. diff --git a/changelog/267.removal.rst b/changelog/267.removal.rst deleted file mode 100644 index 122c31b3..00000000 --- a/changelog/267.removal.rst +++ /dev/null @@ -1 +0,0 @@ -Remove official support for Python 3.4. diff --git a/changelog/272.removal.rst b/changelog/272.removal.rst deleted file mode 100644 index 4c43df1b..00000000 --- a/changelog/272.removal.rst +++ /dev/null @@ -1,2 +0,0 @@ -Dropped support for Python 2. -Continue to use pluggy 0.13.x for Python 2 support. diff --git a/changelog/282.feature.rst b/changelog/282.feature.rst deleted file mode 100644 index d5f2b9bc..00000000 --- a/changelog/282.feature.rst +++ /dev/null @@ -1,28 +0,0 @@ -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) diff --git a/changelog/308.removal.rst b/changelog/308.removal.rst deleted file mode 100644 index 45be5729..00000000 --- a/changelog/308.removal.rst +++ /dev/null @@ -1 +0,0 @@ -Remove official support for Python 3.5. diff --git a/changelog/309.feature.rst b/changelog/309.feature.rst deleted file mode 100644 index b4d95695..00000000 --- a/changelog/309.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Add official support for Python 3.9. diff --git a/changelog/313.removal.rst b/changelog/313.removal.rst deleted file mode 100644 index 0df4bbb2..00000000 --- a/changelog/313.removal.rst +++ /dev/null @@ -1,2 +0,0 @@ -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. diff --git a/changelog/59.removal.rst b/changelog/59.removal.rst deleted file mode 100644 index e5b12479..00000000 --- a/changelog/59.removal.rst +++ /dev/null @@ -1,2 +0,0 @@ -Remove legacy ``__multicall__`` recursive hook calling system. -The deprecation was announced in release ``0.5.0``. From 4259fdd799d64f953631e47ddcb69c3074a15c13 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 25 Aug 2021 12:10:49 -0300 Subject: [PATCH 4/4] Fix CHANGELOG title manually --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ae5cec4d..13a388c4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,8 @@ Changelog .. towncrier release notes start pluggy 1.0.0 (2021-08-25) +========================= + Deprecations and Removals -------------------------