diff --git a/jaraco/vcs/__init__.py b/jaraco/vcs/__init__.py index dd9cb6d..745ace5 100644 --- a/jaraco/vcs/__init__.py +++ b/jaraco/vcs/__init__.py @@ -9,11 +9,6 @@ from .subprocess import Mercurial, Git -__all__ = ['Repo', 'repo'] +__all__ = ['Repo', 'repo', 'Mercurial', 'Git'] repo = Repo.detect - -# for compatibility -RepoManager = Repo -MercurialManager = Mercurial -GitManager = Git diff --git a/jaraco/vcs/base.py b/jaraco/vcs/base.py index 45b9dba..7e5cabc 100755 --- a/jaraco/vcs/base.py +++ b/jaraco/vcs/base.py @@ -49,9 +49,6 @@ def detect(location='.'): e.args = ("No source repo or suitable VCS version found",) raise - # for compatibility - get_first_valid_manager = detect - @staticmethod def existing_only(managers): """ diff --git a/newsfragments/+22b83231.removal.rst b/newsfragments/+22b83231.removal.rst new file mode 100644 index 0000000..fde84a3 --- /dev/null +++ b/newsfragments/+22b83231.removal.rst @@ -0,0 +1 @@ +Removed legacy names. \ No newline at end of file diff --git a/tests/test_managers.py b/tests/test_managers.py index bfcac09..0b5854c 100644 --- a/tests/test_managers.py +++ b/tests/test_managers.py @@ -7,17 +7,18 @@ def test_existing_only(): """ Test the static method RepoManager.existing_only. + + Presumably, '/' is never an hg repo; at least for testing + purposes, that's a reasonable assumption. """ - # presumably, '/' is never an hg repo - at least for our purposes, that's - # a reasonable assumption. - mgrs = vcs.Repo.get_valid_managers('/') + mgrs = vcs.Repo.detect('/') existing = list(vcs.Repo.existing_only(mgrs)) assert not existing @mock.patch.object( vcs.Repo, - 'get_valid_managers', + 'detect', classmethod(lambda cls, location: iter(())), ) def test_no_valid_managers(): @@ -26,5 +27,5 @@ def test_no_valid_managers(): a nice message. """ with pytest.raises(StopIteration) as err: - vcs.Repo.get_first_valid_manager() + vcs.Repo.detect() assert 'no source repo' in str(err).lower()