Apply patch for install_search_all_sources = True (#5895)

* Apply patch for install_search_all_sources = True
* patch the patch
* Add news fragment
* add back test of install_search_all_sources
This commit is contained in:
Matt Davis
2023-08-31 20:16:07 -04:00
committed by GitHub
parent bf542b1f04
commit 4cf36f82a7
6 changed files with 52 additions and 13 deletions
+4 -2
View File
@@ -139,8 +139,8 @@ six = "*"
@pytest.mark.install
@pytest.mark.needs_internet
@pytest.mark.skipif(sys.version_info >= (3, 12), reason="Package does not work with Python 3.12")
def test_install_specifying_index_url(pipenv_instance_pypi):
with pipenv_instance_pypi() as p:
def test_install_specifying_index_url(pipenv_instance_private_pypi):
with pipenv_instance_private_pypi() as p:
with open(p.pipfile_path, "w") as f:
contents = """
[[source]]
@@ -153,6 +153,8 @@ six = "*"
[dev-packages]
[pipenv]
install_search_all_sources = true
""".strip()
f.write(contents)
c = p.pipenv("install pipenv-test-private-package --index https://test.pypi.org/simple")
+28
View File
@@ -646,3 +646,31 @@ dataclasses-json = {extras = ["dev"], version = "==0.5.7"}
assert "dataclasses-json" in p.pipfile["packages"]
assert "dataclasses-json" in p.lockfile["default"]
assert p.lockfile["default"]["dataclasses-json"].get("markers", "") is not None
@pytest.mark.index
@pytest.mark.install # private indexes need to be uncached for resolution
@pytest.mark.skip_lock
@pytest.mark.needs_internet
def test_private_index_skip_lock(pipenv_instance_private_pypi):
with pipenv_instance_private_pypi() as p:
with open(p.pipfile_path, 'w') as f:
contents = """
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[[source]]
url = "https://test.pypi.org/simple"
verify_ssl = true
name = "testpypi"
[packages]
pipenv-test-private-package = {version = "*", index = "testpypi"}
[pipenv]
install_search_all_sources = true
""".strip()
f.write(contents)
c = p.pipenv('install --skip-lock')
assert c.returncode == 0