FabioCalcinelli
FabioCalcinelli

Reputation: 1

Why does pipenv lock fail if a package is in "dev-packages", and succeed if it is "packages"?

I have a Pipfile structured as follows:

[[source]]
... my source 1 ...

[[source]]
... my source 2...

[packages]
package_1 = { version = "~=1.6", index = my_source }
[dev-packages]
package_2 = { version = "==0.2.0", index = my_source }

[scripts]

[requires]
python_version = "3.10"

[pipenv]
allow_prereleases = true

If I run pipenv lock --dev --verbose I get an error which includes:

The conflict is caused by:
    package_2 0.2.0 depends on package_1~=1.4
    The user requested (constraint) package_1~=1.6

Isn't this wrong? Aren't these two versions supposed to be compatible?

What is even stranger is that if I change the Pipfile to look like this:

[[source]]
... my source 1 ...

[[source]]
... my source 2...

[packages]
package_1 = { version = "~=1.6", index = my_source }
package_2 = { version = "==0.2.0", index = my_source }
[dev-packages]

[scripts]

[requires]
python_version = "3.10"

[pipenv]
allow_prereleases = true

then everything works like a charm. Any ideas?

I expect the pipfile lock --dev --verbose command to also work when package_2 is placed in [dev-packages].

Upvotes: 0

Views: 31

Answers (0)

Related Questions