Skip to content
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

Pipenv does not sync indexes to lockfile #5508

Closed
NicoStellwag opened this issue Nov 28, 2022 · 3 comments · Fixed by #5512
Closed

Pipenv does not sync indexes to lockfile #5508

NicoStellwag opened this issue Nov 28, 2022 · 3 comments · Fixed by #5512
Labels
Priority: High This item is high priority and should be resolved quickly. Type: Bug 🐛 This issue is a bug. Type: Regression This issue is a regression of a previous behavior.

Comments

@NicoStellwag
Copy link

NicoStellwag commented Nov 28, 2022

Issue description

When specifying an addtitional index as described here, pipenv install does not synchronize the additional index to the lockfile, resulting in the following error:

...
Installing dependencies from Pipfile.lock (4204ea)...
Traceback (most recent call last):
  File "c:\python\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
...
    install_source = next(filter(lambda s: s["name"] == index_name, sources))
StopIteration

System:
OS: Windows Server 2019
Python: 3.9.1
Pipenv: 2022.11.25

When updating Pipfile.lock manually, everything works as expected.

Expected result

Pipfile.lock:

...
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            },
            {
                "name": "pytorch",
                "url": "https://download.pytorch.org/whl/cu116",
                "verify_ssl": false
            }
        ]
...

Actual result

Pipfile.lock:

...
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
...

Steps to replicate

Minimal Pipfile:

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[[source]]
url = "https://download.pytorch.org/whl/cu116"
verify_ssl = false
name = "pytorch"

[packages]
torch = {version = "*", index = "pytorch"}

[dev-packages]

[requires]
python_version = "3.9"
python_full_version = "3.9.1"


Unfortunately I cannot provide pipenv --support from my work PC.

@matteius matteius added Type: Regression This issue is a regression of a previous behavior. Type: Bug 🐛 This issue is a bug. Priority: High This item is high priority and should be resolved quickly. labels Nov 29, 2022
@matteius
Copy link
Member

If possible, could you help validate the branch for this? I will work on adding a unit test here if possible, as well.

@NicoStellwag
Copy link
Author

When I'm back at work I will take a look.

@matteius
Copy link
Member

new release has been published

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High This item is high priority and should be resolved quickly. Type: Bug 🐛 This issue is a bug. Type: Regression This issue is a regression of a previous behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants