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

Odd behaviour with packages included in both [packages] and [dev-packages]? #1411

Closed
Code0x58 opened this issue Feb 9, 2018 · 1 comment
Closed

Comments

@Code0x58
Copy link

Code0x58 commented Feb 9, 2018

I originally made this issue as I had Django pinned in [packages] but also as an extra [dev-packages]:

[packages]
django = "~=1.11.10"
[dev-packages]
hypothesis = {extras = ["django"]}

And the resulting Pipfile.lock:

{
    "_meta": {
        "…": ""
    },
    "default": {
        "…": "",
        "django": {
            "hashes": [
                "sha256:ac4c797a328a5ac8777ad61bcd00da279773455cc78b4058de2a9842a0eb6ee8",
                "sha256:22383567385a9c406d8a5ce080a2694c82c6b733e157922197e8b393bb3aacd9"
            ],
            "version": "==1.11.10"
        }
    },
    "develop": {
        "…": "",
        "django": {
            "hashes": [
                "sha256:7c8ff92285406fb349e765e9ade685eec7271d6f5c3f918e495a74768b765c99",
                "sha256:dc3b61d054f1bced64628c62025d480f655303aea9f408e5996c339a543b45f0"
            ],
            "version": "==2.0.2"
        }
}

The package is pinned twice with different versions and pipenv install merrily installs one of them based on whether or not --dev is used.

While looking at it a bit more I tested adding Django (this time not as an extra) with "~=2.0.2" in [dev-packages], it had the same kind of result.

This causing an unsatisfiable constraint would more sense to me at the moment. I think of [dev-packages] as being for development/testing related tools which are added on top of the environment specified in [packages], but that doesn't seem to be how things are handled at the moment.

At least for my case it was as simple as dropping the extra, but it took more poking around than I'd have liked. I think I would be happier if there was at a message at some point to highlight to that things may not be as the user expects.

Should [dev-packages] have the same constraints as [packages]? I am wondering if this is a side effect of something that is unreasonable to change, or if it is just odd behaviour that can be improved.

@Code0x58
Copy link
Author

Code0x58 commented Feb 9, 2018

Arg! After looking into things more to write the above I found this is the same as issue #1220, I was only looking for extras related issues before.

@Code0x58 Code0x58 closed this as completed Feb 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant