You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Pipfile with two sources: pypi and internal for a company. In packages declared dependencies from the internal index. Additionally there is the dev-packages that declares one dep:
[[source]]
name = "pypi"url = "https://pypi.org/simple"verify_ssl = true
[[source]]
name = "internal"url = "https://artifactory.example.net/artifactory/api/pypi/internal/simple"verify_ssl = true
[requires]
python_version = "3.11"
[packages]
internal-dependency = { version = "1.0.0", index = "internal" }
[dev-packages]
tox = "*"
Expected result
When making the pipenv lock it resolves deps and creates the Pipfile.lock.
Actual result
File "~/project/venv/lib/python3.11/site-packages/pipenv/patched/pip/_vendor/packaging/requirements.py", line 113, in __init__
raise InvalidRequirement(
pipenv.patched.pip._vendor.packaging.requirements.InvalidRequirement: Parse error at ""'1.0.0'"": Expected string_end
The requirement_string is internal-dependency=={'version': '1.0.0', 'index': 'internal'}.
It looks like the regexp REQUIREMENT doesn't expect the index at all:
But here it comes the most strange part: when I removed all deps from the dev-packages it started working well.
Anyway, let's add the requirement_string to the exception message because it's very complicated to figure out the problem because the temp file is removed and a user has nothing to see at all.
Quick question: If you repeat the internal dependency in dev, ie: internal-dependency = { version = "1.0.0", index = "internal" } does the lock succeed in that case?
Issue description
I have a
Pipfile
with two sources:pypi
andinternal
for a company. Inpackages
declared dependencies from theinternal
index. Additionally there is thedev-packages
that declares one dep:Expected result
When making the
pipenv lock
it resolves deps and creates thePipfile.lock
.Actual result
The exception thrown in the code:
The
requirement_string
isinternal-dependency=={'version': '1.0.0', 'index': 'internal'}
.It looks like the regexp
REQUIREMENT
doesn't expect theindex
at all:But here it comes the most strange part: when I removed all deps from the
dev-packages
it started working well.Anyway, let's add the
requirement_string
to the exception message because it's very complicated to figure out the problem because the temp file is removed and a user has nothing to see at all.$ pipenv --support
Pipenv version:
'2024.0.1'
OS Name:
'posix'
User pip version:
'24.0'
user Python installations found:
PEP 508 Information:
The text was updated successfully, but these errors were encountered: