From ae3bfef534586ebb0eec9a772b01c8574c5b3cb4 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Wed, 16 Mar 2022 21:04:44 -0400 Subject: [PATCH 1/4] Attempt at fixing the failing git protocol tests. --- tests/integration/test_install_uri.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_install_uri.py b/tests/integration/test_install_uri.py index 7db10bfb..3105a209 100644 --- a/tests/integration/test_install_uri.py +++ b/tests/integration/test_install_uri.py @@ -36,7 +36,7 @@ def test_basic_vcs_install(PipenvInstance): @pytest.mark.needs_internet def test_git_vcs_install(PipenvInstance): with PipenvInstance(chdir=True) as p: - c = p.pipenv("install git+git://github.com/benjaminp/six.git@1.11.0#egg=six") + c = p.pipenv("install git+git@github.com/benjaminp/six.git@1.11.0#egg=six") assert c.returncode == 0 assert "six" in p.pipfile["packages"] assert "git" in p.pipfile["packages"]["six"] @@ -52,7 +52,7 @@ def test_git_vcs_install(PipenvInstance): @pytest.mark.needs_internet def test_git_vcs_install_with_env_var(PipenvInstance): with PipenvInstance(chdir=True) as p: - p._pipfile.add("six", {"git": "git://${GIT_HOST}/benjaminp/six.git", "ref": "1.11.0"}) + p._pipfile.add("six", {"git": "git@${GIT_HOST}/benjaminp/six.git", "ref": "1.11.0"}) os.environ["GIT_HOST"] = "github.com" c = p.pipenv("install") assert c.returncode == 0 From 7e465f358d433828575f74514ad370bb7faa4c2b Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Wed, 16 Mar 2022 21:09:44 -0400 Subject: [PATCH 2/4] take 2 --- tests/integration/test_install_uri.py | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/tests/integration/test_install_uri.py b/tests/integration/test_install_uri.py index 3105a209..ae453fc8 100644 --- a/tests/integration/test_install_uri.py +++ b/tests/integration/test_install_uri.py @@ -34,32 +34,16 @@ def test_basic_vcs_install(PipenvInstance): @pytest.mark.vcs @pytest.mark.install @pytest.mark.needs_internet -def test_git_vcs_install(PipenvInstance): +def test_basic_vcs_install_with_env_var(PipenvInstance): with PipenvInstance(chdir=True) as p: - c = p.pipenv("install git+git@github.com/benjaminp/six.git@1.11.0#egg=six") - assert c.returncode == 0 - assert "six" in p.pipfile["packages"] - assert "git" in p.pipfile["packages"]["six"] - assert p.lockfile["default"]["six"] == { - "git": "git://github.com/benjaminp/six.git", - "ref": "15e31431af97e5e64b80af0a3f598d382bcdd49a", - } - - -@flaky -@pytest.mark.vcs -@pytest.mark.install -@pytest.mark.needs_internet -def test_git_vcs_install_with_env_var(PipenvInstance): - with PipenvInstance(chdir=True) as p: - p._pipfile.add("six", {"git": "git@${GIT_HOST}/benjaminp/six.git", "ref": "1.11.0"}) - os.environ["GIT_HOST"] = "github.com" + p._pipfile.add("six", {"git": "{GIT_HOST}/benjaminp/six.git", "ref": "1.11.0"}) + os.environ["GIT_HOST"] = "https://github.com" c = p.pipenv("install") assert c.returncode == 0 assert "six" in p.pipfile["packages"] assert "git" in p.pipfile["packages"]["six"] assert p.lockfile["default"]["six"] == { - "git": "git://${GIT_HOST}/benjaminp/six.git", + "git": "${GIT_HOST}/benjaminp/six.git", "ref": "15e31431af97e5e64b80af0a3f598d382bcdd49a", } From b605989746aec20dc08c7469c58b3edf311fd7e7 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Wed, 16 Mar 2022 21:31:10 -0400 Subject: [PATCH 3/4] fix remaining failng test due to git:// protocol deprecation. --- tests/integration/test_install_uri.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/test_install_uri.py b/tests/integration/test_install_uri.py index ae453fc8..fd143562 100644 --- a/tests/integration/test_install_uri.py +++ b/tests/integration/test_install_uri.py @@ -36,14 +36,14 @@ def test_basic_vcs_install(PipenvInstance): @pytest.mark.needs_internet def test_basic_vcs_install_with_env_var(PipenvInstance): with PipenvInstance(chdir=True) as p: - p._pipfile.add("six", {"git": "{GIT_HOST}/benjaminp/six.git", "ref": "1.11.0"}) - os.environ["GIT_HOST"] = "https://github.com" + p._pipfile.add("six", {"git": "https://${GIT_HOST}/benjaminp/six.git", "ref": "1.11.0"}) + os.environ["GIT_HOST"] = "github.com" c = p.pipenv("install") assert c.returncode == 0 assert "six" in p.pipfile["packages"] assert "git" in p.pipfile["packages"]["six"] assert p.lockfile["default"]["six"] == { - "git": "${GIT_HOST}/benjaminp/six.git", + "git": "https://${GIT_HOST}/benjaminp/six.git", "ref": "15e31431af97e5e64b80af0a3f598d382bcdd49a", } From 506b9b40b9b96c96c40420f3c9f0ed1737b3e0c9 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Wed, 16 Mar 2022 21:53:11 -0400 Subject: [PATCH 4/4] Remove remaining references to git:// --- tests/unit/test_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 9139c8c3..f2514c2e 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -17,16 +17,16 @@ DEP_PIP_PAIRS = [ ( { "pinax": { - "git": "git://github.com/pinax/pinax.git", + "git": "https://github.com/pinax/pinax.git", "ref": "1.4", "editable": True, } }, - "-e git+git://github.com/pinax/pinax.git@1.4#egg=pinax", + "-e git+https://github.com/pinax/pinax.git@1.4#egg=pinax", ), ( - {"pinax": {"git": "git://github.com/pinax/pinax.git", "ref": "1.4"}}, - "git+git://github.com/pinax/pinax.git@1.4#egg=pinax", + {"pinax": {"git": "https://github.com/pinax/pinax.git", "ref": "1.4"}}, + "git+https://github.com/pinax/pinax.git@1.4#egg=pinax", ), ( # Mercurial. {