Page MenuHomeSoftware Heritage

swh-lister: Remove deprecated console scripts `swh-lister`
ClosedPublic

Authored by ardumont on Fri, Sep 20, 10:03 AM.

Details

Summary

Prior to this commit, the pip activation environment failed because the old cli
cli name got renamed to lister. It was fixed for the subcommand, not for
the command.

Avoid too much maintenance hassle, droping it.

Test Plan
  1. Play with virtualenv:
$ workon swh
Traceback (most recent call last):
  File "/home/tony/.virtualenvs/swh/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2442, in resolve
    return functools.reduce(getattr, self.attrs, module)
AttributeError: module 'swh.lister.cli' has no attribute 'cli'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/tony/.virtualenvs/swh/bin/swh-lister", line 11, in <module>
    load_entry_point('swh.lister', 'console_scripts', 'swh-lister')()
  File "/home/tony/.virtualenvs/swh/lib/python3.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/tony/.virtualenvs/swh/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
    return ep.load()
  File "/home/tony/.virtualenvs/swh/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2434, in load
    return self.resolve()
  File "/home/tony/.virtualenvs/swh/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2444, in resolve
    raise ImportError(str(exc))
ImportError: module 'swh.lister.cli' has no attribute 'cli'
$ # Fix by patching this diff
$ deactivate  # from within swh-env's virtualenv (or some such)
$ workon swh  # <- no more warning
$ which swh-lister
/home/tony/.virtualenvs/swh/bin/swh-lister  # \m/
  1. tox is still happy
tox

Diff Detail

Repository
rDLS Listers
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont created this revision.Fri, Sep 20, 10:03 AM
ardumont edited the test plan for this revision. (Show Details)Fri, Sep 20, 10:04 AM
ardumont edited the test plan for this revision. (Show Details)
ardumont updated this revision to Diff 6766.Fri, Sep 20, 11:12 AM

In the end, kill the deprecated and unused command

ardumont retitled this revision from setup.py: Fix wrong console scripts entry point for swh-lister command to swh-lister: Remove deprecated console scripts `swh-lister`.Fri, Sep 20, 11:13 AM
ardumont edited the summary of this revision. (Show Details)
anlambert accepted this revision.Fri, Sep 20, 11:18 AM
This revision is now accepted and ready to land.Fri, Sep 20, 11:18 AM
This revision was automatically updated to reflect the committed changes.