Your message dated Fri, 26 Sep 2025 13:37:20 +0000
with message-id <[email protected]>
and subject line Bug#1108456: fixed in pybel 0.15.5-2
has caused the Debian Bug report #1108456,
regarding pybel: Drop python3-click (build) dependency
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1108456: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1108456
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: pybel
Version: 0.15.5-1
Severity: important
Tags: upstream patch forky sid
Control: block 1108453 by -1

Dear Maintainer,

Please drop the python3-click-plugins (build) dependency, the package will be 
removed during the forky development cycle.

Upstream ended maintenance of click-plugins and now recommends users to vendor 
it, the attached patch does so.

Kind Regards,

Bas
diff -Nru pybel-0.15.5/debian/control pybel-0.15.5/debian/control
--- pybel-0.15.5/debian/control 2024-11-30 02:49:02.000000000 +0100
+++ pybel-0.15.5/debian/control 2025-06-29 08:53:24.000000000 +0200
@@ -9,7 +9,6 @@
                pybuild-plugin-pyproject,
                python3-all,
                python3-setuptools,
-               python3-click-plugins,
                python3-humanize,
                python3-jinja2,
                python3-jsonschema,
@@ -38,7 +37,6 @@
          ${misc:Depends},
          libjs-jquery,
          libjs-d3,
-         python3-click-plugins,
          python3-networkx,
          python3-pyparsing,
          python3-ratelimit,
diff -Nru pybel-0.15.5/debian/patches/pr503-click-plugins.patch 
pybel-0.15.5/debian/patches/pr503-click-plugins.patch
--- pybel-0.15.5/debian/patches/pr503-click-plugins.patch       1970-01-01 
01:00:00.000000000 +0100
+++ pybel-0.15.5/debian/patches/pr503-click-plugins.patch       2025-06-29 
08:53:16.000000000 +0200
@@ -0,0 +1,279 @@
+Description: Vendor click-plugins, PyPI package no longer maintained.
+Author: Bas Couwenberg <[email protected]>
+Bug: https://github.com/pybel/pybel/pull/503
+
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -57,7 +57,6 @@ install_requires =
+     networkx>=2.4
+     sqlalchemy
+     click
+-    click-plugins
+     bel_resources>=0.0.3
+     more_itertools
+     requests
+--- a/src/pybel/cli.py
++++ b/src/pybel/cli.py
+@@ -21,11 +21,11 @@ import time
+ from typing import List, Optional
+ 
+ import click
+-from click_plugins import with_plugins
+ from pkg_resources import iter_entry_points
+ from tqdm.autonotebook import tqdm
+ 
+ from .canonicalize import to_bel_script
++from .click_plugins import with_plugins
+ from .constants import get_cache_connection
+ from .examples import (
+     braf_graph,
+--- /dev/null
++++ b/src/pybel/click_plugins.py
+@@ -0,0 +1,247 @@
++# This file is part of 'click-plugins': 
https://github.com/click-contrib/click-plugins
++#
++# New BSD License
++#
++# Copyright (c) 2015-2025, Kevin D. Wurster, Sean C. Gillies
++# All rights reserved.
++#
++# Redistribution and use in source and binary forms, with or without
++# modification, are permitted provided that the following conditions are met:
++#
++# * Redistributions of source code must retain the above copyright notice, 
this
++#   list of conditions and the following disclaimer.
++#
++# * Redistributions in binary form must reproduce the above copyright notice,
++#   this list of conditions and the following disclaimer in the documentation
++#   and/or other materials provided with the distribution.
++#
++# * Neither click-plugins nor the names of its contributors may not be used to
++#   endorse or promote products derived from this software without specific 
prior
++#   written permission.
++#
++# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
++# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
ARE
++# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
++# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
++# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
++# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY,
++# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
USE
++# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++
++
++"""Support CLI plugins with click and entry points.
++
++See :func:`with_plugins`.
++"""
++
++
++import importlib.metadata
++import os
++import sys
++import traceback
++
++import click
++
++
++__version__ = '2.0'
++
++
++def with_plugins(entry_points):
++
++    """Decorator for loading and attaching plugins to a ``click.Group()``.
++
++    Plugins are loaded from an ``importlib.metadata.EntryPoint()``. Each entry
++    point must point to a ``click.Command()``. An entry point that fails to
++    load will be wrapped in a ``BrokenCommand()`` to allow the CLI user to
++    discover and potentially debug the problem.
++
++    >>> from importlib.metadata import entry_points
++    >>>
++    >>> import click
++    >>> from click_plugins import with_plugins
++    >>>
++    >>> @with_plugins('group_name')
++    >>> @click.group()
++    >>> def group():
++    ...     '''Group'''
++    >>>
++    >>> @with_plugins(entry_points('group_name'))
++    >>> @click.group()
++    >>> def group():
++    ...     '''Group'''
++    >>>
++    >>> @with_plugins(importlib.metadata.EntryPoint(...))
++    >>> @click.group()
++    >>> def group():
++    ...     '''Group'''
++    >>>
++    >>> @with_plugins("group1")
++    >>> @with_plugins("group2")
++    >>> def group():
++    ...     '''Group'''
++
++    :param str or EntryPoint or sequence[EntryPoint] entry_points:
++        Entry point group name, a single ``importlib.metadata.EntryPoint()``,
++        or a sequence of ``EntryPoint()``s.
++
++    :rtype function:
++    """
++
++    # Note that the explicit full path reference to:
++    #
++    #     importlib.metadata.entry_points()
++    #
++    # in this function allows the call to be mocked in the tests. Replacing
++    # with:
++    #
++    # from importlib.metadata import entry_points
++    #
++    # breaks this ability.
++
++    def decorator(group):
++        if not isinstance(group, click.Group):
++            raise TypeError(
++                f"plugins can only be attached to an instance of"
++                f" 'click.Group()' not: {repr(group)}")
++
++        # Load 'EntryPoint()' objects.
++        if isinstance(entry_points, str):
++
++            # Older versions of Python do not support filtering.
++            if sys.version_info >= (3, 10):
++                all_entry_points = importlib.metadata.entry_points(
++                    group=entry_points)
++
++            else:
++                all_entry_points = importlib.metadata.entry_points()
++                all_entry_points = all_entry_points[entry_points]
++
++        # A single 'importlib.metadata.EntryPoint()'
++        elif isinstance(entry_points, importlib.metadata.EntryPoint):
++            all_entry_points = [entry_points]
++
++        # Sequence of 'EntryPoints()'.
++        else:
++            all_entry_points = entry_points
++
++        for ep in all_entry_points:
++
++            try:
++                group.add_command(ep.load())
++
++            # Catch all exceptions (technically not 'BaseException') and
++            # instead register a special 'BrokenCommand()'. Otherwise, a 
single
++            # plugin that fails to load and/or register will make the CLI
++            # inoperable. 'BrokenCommand()' explains the situation to users.
++            except Exception as e:
++                group.add_command(BrokenCommand(ep, e))
++
++        return group
++
++    return decorator
++
++
++class BrokenCommand(click.Command):
++
++    """Represents a plugin ``click.Command()`` that failed to load.
++
++    Can be executed just like a ``click.Command()``, but prints information
++    for debugging and exits with an error code.
++    """
++
++    def __init__(self, entry_point, exception):
++
++        """
++        :param importlib.metadata.EntryPoint entry_point:
++            Entry point that failed to load.
++        :param Exception exception:
++            Raised when attempting to load the entry point associated with
++            this instance.
++        """
++
++        super().__init__(entry_point.name)
++
++        # There are several ways to get a traceback from an exception, but
++        # 'TracebackException()' seems to be the most portable across actively
++        # supported versions of Python.
++        tbe = traceback.TracebackException.from_exception(exception)
++
++        # A message for '$ cli command --help'. Contains full traceback and a
++        # helpful note. The intention is to nudge users to figure out which
++        # project should get a bug report since users are likely to report the
++        # issue to the developers of the CLI utility they are directly
++        # interacting with. These are not necessarily the right developers.
++        self.help = (
++            "{ls}ERROR: entry point '{module}:{name}' could not be loaded."
++            " Contact its author for help.{ls}{ls}{tb}").format(
++            module=_module(entry_point),
++            name=entry_point.name,
++            ls=os.linesep,
++            tb=''.join(tbe.format())
++        )
++
++        # Replace the broken command's summary with a warning about how it
++        # was not loaded successfully. The idea is that '$ cli --help' should
++        # include a clear indicator that a subcommand is not functional, and
++        # a little hint for what to do about it. U+2020 is a "dagger", whose
++        # modern use typically indicates a footnote.
++        self.short_help = (
++            f"\u2020 Warning: could not load plugin. Invoke command with"
++            f" '--help' for traceback."
++        )
++
++    def invoke(self, ctx):
++
++        """Print traceback and debugging message.
++
++        :param click.Context ctx:
++            Active context.
++        """
++
++        click.echo(self.help, color=ctx.color, err=True)
++        ctx.exit(1)
++
++    def parse_args(self, ctx, args):
++
++        """Pass arguments along without parsing.
++
++        :param click.Context ctx:
++            Active context.
++        :param list args:
++            List of command line arguments.
++        """
++
++        # Do not attempt to parse these arguments. We do not know why the
++        # entry point failed to load, but it is reasonable to assume that
++        # argument parsing will not work. Ultimately the goal is to get the
++        # 'Command.invoke()' method (overloaded in this class) to execute
++        # and provide the user with a bit of debugging information.
++
++        return args
++
++
++def _module(ep):
++
++    """Module name for a given entry point.
++
++    Parameters
++    ----------
++    ep : importlib.metadata.EntryPoint
++        Determine parent module for this entry point.
++
++    Returns
++    -------
++    str
++    """
++
++    if sys.version_info >= (3, 10):
++        module = ep.module
++
++    else:
++        # From 'importlib.metadata.EntryPoint.module'.
++        match = ep.pattern.match(ep.value)
++        module = match.group('module')
++
++    return module
diff -Nru pybel-0.15.5/debian/patches/series pybel-0.15.5/debian/patches/series
--- pybel-0.15.5/debian/patches/series  2024-11-30 02:42:01.000000000 +0100
+++ pybel-0.15.5/debian/patches/series  2025-06-29 08:52:29.000000000 +0200
@@ -1,3 +1,4 @@
 not_testing_what_fails.patch
 more_click_is_not_packaged.patch
 remove_psycopg2-binary
+pr503-click-plugins.patch

--- End Message ---
--- Begin Message ---
Source: pybel
Source-Version: 0.15.5-2
Done: Alexandre Detiste <[email protected]>

We believe that the bug you reported is fixed in the latest version of
pybel, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alexandre Detiste <[email protected]> (supplier of updated pybel package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 26 Sep 2025 15:05:17 +0200
Source: pybel
Architecture: source
Version: 0.15.5-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Med Packaging Team 
<[email protected]>
Changed-By: Alexandre Detiste <[email protected]>
Closes: 1108456
Changes:
 pybel (0.15.5-2) unstable; urgency=medium
 .
   * Team upload.
 .
   [ Bas Couwenberg ]
   * vendor python3-click-plugins dependency (Closes: #1108456)
Checksums-Sha1:
 51af97880965c5cbd094cb8c9e0e229b21fe1df9 2328 pybel_0.15.5-2.dsc
 d7fed52bdb0d8e7c0afae35917b80c4ded2d8b43 8672 pybel_0.15.5-2.debian.tar.xz
 edd5530e9174633c57c99e87fed4292a14f11736 8645 pybel_0.15.5-2_source.buildinfo
Checksums-Sha256:
 02ba756ee45ef5510e9695ac58684dd8089697d9cf855fda502df5bcb4fa4f6f 2328 
pybel_0.15.5-2.dsc
 e374966390835ed8a7f17939f8e0ffc934e742e40d80210d9683823ce76a3f51 8672 
pybel_0.15.5-2.debian.tar.xz
 1422aeedac009a9b903d17242301578024675a1dd787ee5b767e188aee726a40 8645 
pybel_0.15.5-2_source.buildinfo
Files:
 fe44e373ca469b246b3049729978f0d4 2328 science optional pybel_0.15.5-2.dsc
 6863ae39416c5dbae67e7c08e783276d 8672 science optional 
pybel_0.15.5-2.debian.tar.xz
 a00b267980c61e0d063040d7d37acc58 8645 science optional 
pybel_0.15.5-2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJFBAEBCgAvFiEEj23hBDd/OxHnQXSHMfMURUShdBoFAmjWkiURHHRjaGV0QGRl
Ymlhbi5vcmcACgkQMfMURUShdBpn8g//dtf9XHhdJQJkoVbKoJJx1C2Sf76eCG7U
shfVr5TCzM8nYF1qXUzXG80tSrn2INfEMsMANRmk9vC50sxqSad93nGwivh9XOae
+qbwGOp3JzNVQdO1GP1AZbHotanMs6MW6ewc5qN1G/NCRW1RI92xz1Qz0eMsbJeT
+V8ot1Dk0p8+7Tw7kYUGV/0SOx6aLu5vgHZX0+wdKOZsyu/v0D+z3w+Qdz+IboU/
fP71Rmfd7ceF8jQhPQSef86/Ks4VcwMr36hpwusCzGuySEwLq2D9nPg71nK7sXHU
MZ27NYeCX0pVlQ6o8cJZ1mi80QbSoPHBKZNUE/rGlE8WifA1zCz+mrD1YgIUiSjG
QIP7dcc2ViTUcjeETIxP5E89iYPomeeg8tHQ2bY/Qy0of3h6eP3q/pZ4rZMQO+EM
R7A6yADN8zkRfEFcuXmVIPJR5uXSjrSlkK6S0XI4+AnKjBIdsF2ZdNpPDTR6u9Fv
npgun5kJZtdkT6RBpGV1qWg0cC5qfLyupZ3ljKtod3MGqltB53nYnahCKjQm+uPN
7VRHQVnJ0VQigCkjOemiEvgoRt3lfhi8ehl9jC8ycUXO68lmDuq6FwzxvVL4jJww
BNeI2at+FAFcy7AXzG0UlPdiM+iMP0/ZuZEEuf2RNVGVtmVg10Rh4uPwR0wlDzKY
BvgwbtlJkDs=
=/c2Q
-----END PGP SIGNATURE-----

Attachment: pgpj9hxPX2Reu.pgp
Description: PGP signature


--- End Message ---

Reply via email to