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

Lockfile does not generate correct version requirements for 3.9 when run locked on 3.8, under certain circumstances #5043

Closed
gitpushdashf opened this issue Apr 12, 2022 · 7 comments
Labels
triage Type: Possible Bug This issue describes a possible bug in pipenv.

Comments

@gitpushdashf
Copy link

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

[packages]
rich = "*"

[dev-packages]
mypy = "*"

If I generate the lockfile (pipenv 2022.3.28 or 2022.4.8) on Python 3.8, it looks like this:

% tail -n 10 Pipfile.lock
        "typing-extensions": {
            "hashes": [
                "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42",
                "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"
            ],
            "markers": "python_version < '3.9'",
            "version": "==4.1.1"
        }
    }
}

If I generate the lockfile on Python 3.9, it correctly looks like this:

% tail -n 10 Pipfile.lock
        "typing-extensions": {
            "hashes": [
                "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42",
                "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"
            ],
            "markers": "python_version >= '3.6'",
            "version": "==4.1.1"
        }
    }
}

This seems to be caused by rich requiring typing-extensions only on Python 3.8 and older, whereas mypy always requires it: https://github.com/python/mypy/blob/master/mypy-requirements.txt#L1

rich: https://github.com/Textualize/rich/blob/master/pyproject.toml#L30

This breaks mypy when installed alongside rich on 3.9+, when the lockfile is generated on 3.8.

@matteius
Copy link
Member

@gitpushdashf I believe this is similar to another reported issue #4967 that I believe will be fixed, or at least deterministic when the vendoring to pip 22.0.4 can be completed. At least I will have you re-test when we can get to that point.

@matteius matteius added the Status: In Progress This item is in progress. label Apr 13, 2022
@gitpushdashf
Copy link
Author

Sounds good, thank you!

@matteius
Copy link
Member

Please check with pipenv==2022.4.20

@gitpushdashf
Copy link
Author

Still having the same issue.

@matteius matteius added triage Type: Possible Bug This issue describes a possible bug in pipenv. and removed Status: In Progress This item is in progress. labels Apr 22, 2022
@matteius
Copy link
Member

@gitpushdashf This may be solved by the nondeterminism in markers issue -- there is a branch out for it you could check: #5373

@matteius
Copy link
Member

@gitpushdashf marker determinism should be solved with pipenv==2022.9.24

@gitpushdashf
Copy link
Author

Awesome! Thank you so much! Will test later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Type: Possible Bug This issue describes a possible bug in pipenv.
Projects
None yet
Development

No branches or pull requests

2 participants