Repository navigation
Conversation
A default package whose markers exclude the locking platform is locked as "version": "*". get_constraints_from_resolved_deps turned that into the constraint "colorama*", which pip rejects, so locking any Pipfile with such a package and [dev-packages] failed with "Invalid requirement: 'colorama*'" since 2026.4.0. There is no pin to carry over for these packages, so skip them like get_constraints_from_deps does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The issue
Since 2026.4.0,
pipenv lockfails for a Pipfile that has a default package whose markers exclude the current platform, if the Pipfile also has[dev-packages]:Pipenv locks the skipped default package as
{"markers": "sys_platform == 'win32'", "version": "*"}. When it resolves the develop category,get_constraints_from_resolved_deps(added in #6610) turns each locked default entry into a pin withf"{canonical}{version}". For this entry the result iscolorama*, which pip rejects when it parses the constraints file.Bisected with the published releases on the Pipfile above: 2026.2.2 locks; 2026.4.0, 2026.9.1 and 2026.10.0 fail.
The fix
get_constraints_from_resolved_depsnow skips entries whose version is*, the same wayget_constraints_from_depsalready handles*. Such a package wasn't installed on the locking platform, so there's no pin to carry over to the develop resolution.Testing
TestGetConstraintsFromResolvedDeps.test_skips_wildcard_versions. It failed before the change with{'colorama*', 'normal==1.0'} != {'normal==1.0'}.pytest tests/unit: the only failure istest_manifest_cache.py::TestCorruptionRobustness::test_expires_at_wrong_type_treated_as_miss. It fails intermittently on main too (1 of 3 runs of that file on 81d6b14) and passes when run alone.test_release_tasks.pyandtest_vendor.pyfail to import in both runs because the release and vendoring tools aren't installed.ruff checkon the changed files: clean.packagingandrequests[socks], Python 3.13 on Linux):pipenv locknow succeeds, withcoloramalocked as before ("version": "*"with its marker).pipenv requirementswith no flags,--dev,--hash,--dev --hash,--dev-onlyand--categories packages,dev-packagesall produce files thatpip install --dry-run -raccepts (with--require-hashesfor the hashed ones).The checklist
news/directory (news/0000.bugfix.rst, to be renamed to the PR number)This PR was prepared with an AI coding assistant (Claude Code), which also wrote the change and the test and ran the checks above.
🤖 Generated with Claude Code