-
Notifications
You must be signed in to change notification settings - Fork 216
clean up code that was only there to support Python 2.6 + avoid syntax warnings when parsing py2vs3/py.p2 with Python 3.x #3788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
9e8ce6d
df225fc
657c765
1610469
61daad9
846a0f9
8ba3ba2
912f1a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,7 +37,6 @@ | |
| import subprocess | ||
| import sys | ||
| import urllib.request as std_urllib # noqa | ||
| from collections import OrderedDict # noqa | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can't/shouldn't make a breaking change like this in EasyBuild 4.x, it will break any
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense. Reverted that change |
||
| from collections.abc import Mapping # noqa | ||
| from functools import cmp_to_key | ||
| from importlib.util import spec_from_file_location, module_from_spec | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,7 +41,6 @@ | |
| from easybuild.tools.filetools import read_file | ||
| from easybuild.tools.repository.filerepo import FileRepository | ||
| from easybuild.tools.repository.gitrepo import GitRepository | ||
| from easybuild.tools.repository.hgrepo import HgRepository | ||
| from easybuild.tools.repository.svnrepo import SvnRepository | ||
| from easybuild.tools.repository.repository import init_repository | ||
| from easybuild.tools.run import run_cmd | ||
|
|
@@ -129,27 +128,6 @@ def test_svnrepo(self): | |
| self.assertExists(os.path.join(repo.wc, 'trunk', 'README.md')) | ||
| shutil.rmtree(repo.wc) | ||
|
|
||
| # this test is disabled because it fails in Travis as a result of bitbucket disabling TLS 1.0/1.1 | ||
| # we can consider re-enabling it when moving to a more recent Ubuntu version in the Travis config | ||
| # (which implies dropping support for Python 2.6) | ||
| # cfr. https://github.com/easybuilders/easybuild-framework/pull/2678 | ||
| def DISABLED_test_hgrepo(self): | ||
| """Test using HgRepository.""" | ||
| # only run this test if pysvn Python module is available | ||
| try: | ||
| import hglib # noqa | ||
| except ImportError: | ||
| print("(skipping HgRepository test)") | ||
| return | ||
|
|
||
| # GitHub also supports SVN | ||
| test_repo_url = 'https://[email protected]/kehoste/testrepository' | ||
|
|
||
| repo = HgRepository(test_repo_url) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not testing this anymore means we should also deprecate the use of
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We haven't tested this for ages, I just removed the dead code. No idea if you want to deprecate this as Mercury isn't exactly dead but I don't really care. If it works why not keep it. Might add a test later or deprecate it later. PS: I love the comment above a mercury bitbucket URL about github and SVN ;) |
||
| repo.init() | ||
| self.assertExists(os.path.join(repo.wc, 'README')) | ||
| shutil.rmtree(repo.wc) | ||
|
|
||
| def test_init_repository(self): | ||
| """Test use of init_repository function.""" | ||
| repo = init_repository('FileRepository', self.path) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.