Skip to content

Fix Issue 6347: default constraints not applying to other categories #6364

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

matteius
Copy link
Member

@matteius matteius commented Mar 20, 2025

Fix issue with default constraints not applying to other categories + tests.

The issue

Fixes #6347

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix.rst, .feature.rst, .behavior.rst, .doc.rst. .vendor.rst. or .trivial.rst (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

@matteius matteius requested a review from Copilot April 21, 2025 09:01
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes issue #6347 by ensuring that default package constraints are always applied when installing dev packages. Key changes include:

  • Updating the resolver to always add and use default constraints for dev packages.
  • Adding integration tests in tests/integration/test_dev_package_constraints.py to verify that the default constraints are correctly enforced.
  • Modifying constraint resolution logic in pipenv/utils/resolver.py to include locked versions from default packages for dev packages.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/integration/test_dev_package_constraints.py Adds integration tests validating the proper enforcement of default constraints on dev packages.
pipenv/utils/resolver.py Updates constraint logic to always apply default constraints for dev packages and propagate default package locked versions.
Comments suppressed due to low confidence (1)

pipenv/utils/resolver.py:921

  • [nitpick] Consider replacing this direct console print with a logging mechanism (or gating it behind a verbosity flag) to avoid unintended debug output in production environments.
st.console.print(f"Adding constraint: {pkg_name}{version}")

@matteius matteius changed the title Issue 6347 issue with default constraints not applying to other categories Fix Issue 6347: default constraints not applying to other categories Apr 21, 2025
@matteius matteius marked this pull request as ready for review April 21, 2025 09:03
@matteius matteius requested a review from oz123 April 21, 2025 09:04
@matteius matteius marked this pull request as draft April 21, 2025 09:38
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

Successfully merging this pull request may close these issues.

pipenv locks incompatible versions
1 participant