Page MenuHomeSoftware Heritage

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

Authored by ardumont on Sep 20 2019, 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
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 7874
Build 11332: tox-on-jenkinsJenkins
Build 11331: arc lint + arc unit

Event Timeline

ardumont edited the test plan for this revision. (Show Details)

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`.Sep 20 2019, 11:13 AM
ardumont edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Sep 20 2019, 11:18 AM