Skip to content

Fix(Pip, Pipenv): Pipenv applies for all selections - #16526

Open
aoyako wants to merge 1 commit into
dependabot:mainfrom
aoyako:fix/pipenv-develop-selections
Open

aoyako wants to merge 1 commit into
dependabot:mainfrom
aoyako:fix/pipenv-develop-selections

Conversation

@aoyako

@aoyako aoyako commented Oct 10, 2026

Copy link
Copy Markdown

What are you trying to accomplish?

Fixes Pipenv dependency resolution for all dependency groups.
The issue I am trying to resolve: #16523 - also includes an example of a test repo with issue reproduction.

When the same dependency exists in both [packages] and [dev-packages], Dependabot parses both requirements, but PipenvRunner currently only uses the first requirement group when running pipenv upgrade.

As a result, only one section of Pipfile.lock is updated.

How will you know you've accomplished your goal?

I run Dependabot for my test repo that reproduces the issue:
bin/dry-run.rb pip aoyako/dependabot-test --dep=requests

Before: only [packages] are updated

=> bump requests from 2.30.0 to 2.34.2

聽 聽 卤 Pipfile.lock
聽 聽 ~~~
聽 聽 --- /tmp/original20261010-122141-5e7l9y	2026-10-10 07:59:51.340578009 +0000
聽 聽 +++ /tmp/updated20261010-122141-pc12gq	2026-10-10 07:59:51.340578009 +0000
聽 聽 @@ -1,7 +1,7 @@
聽聽 聽 {
聽聽 聽 聽 聽 "_meta": {
聽聽 聽 聽 聽 聽 聽 "hash": {
聽 聽 -聽 聽 聽 聽 聽 聽 "sha256": "08b75b63f7328c20f03e6d85477337c35b16d584a6241d7894ee896f9283efab"
聽 聽 +聽 聽 聽 聽 聽 聽 "sha256": "7c1a614d578ea337264271b2d01159f6c9effd110600ff6466c0f7e34924fa37"
聽聽 聽 聽 聽 聽 聽 },
聽聽 聽 聽 聽 聽 聽 "pipfile-spec": 6,
聽聽 聽 聽 聽 聽 聽 "requires": {},
聽 聽 @@ -210,12 +210,12 @@
聽聽 聽 聽 聽 聽 聽 },
聽聽 聽 聽 聽 聽 聽 "requests": {
聽聽 聽 聽 聽 聽 聽 聽 聽 "hashes": [
聽 聽 -聽 聽 聽 聽 聽 聽 聽 聽 "sha256:10e94cc4f3121ee6da529d358cdaeaff2f1c409cd377dbc72b825852f2f7e294",
聽 聽 -聽 聽 聽 聽 聽 聽 聽 聽 "sha256:239d7d4458afcb28a692cdd298d87542235f4ca8d36d03a15bfc128a6559a2f4"
聽 聽 +聽 聽 聽 聽 聽 聽 聽 聽 "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0",
聽 聽 +聽 聽 聽 聽 聽 聽 聽 聽 "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed"
聽聽 聽 聽 聽 聽 聽 聽 聽 ],
聽聽 聽 聽 聽 聽 聽 聽 聽 "index": "pypi",
聽 聽 -聽 聽 聽 聽 聽 聽 "markers": "python_version >= '3.7'",
聽 聽 -聽 聽 聽 聽 聽 聽 "version": "==2.30.0"
聽 聽 +聽 聽 聽 聽 聽 聽 "markers": "python_version >= '3.10'",
聽 聽 +聽 聽 聽 聽 聽 聽 "version": "==2.34.2"
聽聽 聽 聽 聽 聽 聽 },
聽聽 聽 聽 聽 聽 聽 "urllib3": {
聽聽 聽 聽 聽 聽 聽 聽 聽 "hashes": [
聽 聽 ~~~
聽 聽 6 insertions (+), 6 deletions (-)

After: both [packages] and [dev-packages] are updated

=> bump requests from 2.30.0 to 2.34.2

聽 聽 卤 Pipfile.lock
聽 聽 ~~~
聽 聽 --- /tmp/original20261010-11-micd1f	2026-10-10 08:02:06.822630002 +0000
聽 聽 +++ /tmp/updated20261010-11-rzsjxz	2026-10-10 08:02:06.822630002 +0000
聽 聽 @@ -1,7 +1,7 @@
聽聽 聽 {
聽聽 聽 聽 聽 "_meta": {
聽聽 聽 聽 聽 聽 聽 "hash": {
聽 聽 -聽 聽 聽 聽 聽 聽 "sha256": "08b75b63f7328c20f03e6d85477337c35b16d584a6241d7894ee896f9283efab"
聽 聽 +聽 聽 聽 聽 聽 聽 "sha256": "7c1a614d578ea337264271b2d01159f6c9effd110600ff6466c0f7e34924fa37"
聽聽 聽 聽 聽 聽 聽 },
聽聽 聽 聽 聽 聽 聽 "pipfile-spec": 6,
聽聽 聽 聽 聽 聽 聽 "requires": {},
聽 聽 @@ -210,12 +210,12 @@
聽聽 聽 聽 聽 聽 聽 },
聽聽 聽 聽 聽 聽 聽 "requests": {
聽聽 聽 聽 聽 聽 聽 聽 聽 "hashes": [
聽 聽 -聽 聽 聽 聽 聽 聽 聽 聽 "sha256:10e94cc4f3121ee6da529d358cdaeaff2f1c409cd377dbc72b825852f2f7e294",
聽 聽 -聽 聽 聽 聽 聽 聽 聽 聽 "sha256:239d7d4458afcb28a692cdd298d87542235f4ca8d36d03a15bfc128a6559a2f4"
聽 聽 +聽 聽 聽 聽 聽 聽 聽 聽 "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0",
聽 聽 +聽 聽 聽 聽 聽 聽 聽 聽 "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed"
聽聽 聽 聽 聽 聽 聽 聽 聽 ],
聽聽 聽 聽 聽 聽 聽 聽 聽 "index": "pypi",
聽 聽 -聽 聽 聽 聽 聽 聽 "markers": "python_version >= '3.7'",
聽 聽 -聽 聽 聽 聽 聽 聽 "version": "==2.30.0"
聽 聽 +聽 聽 聽 聽 聽 聽 "markers": "python_version >= '3.10'",
聽 聽 +聽 聽 聽 聽 聽 聽 "version": "==2.34.2"
聽聽 聽 聽 聽 聽 聽 },
聽聽 聽 聽 聽 聽 聽 "urllib3": {
聽聽 聽 聽 聽 聽 聽 聽 聽 "hashes": [
聽 聽 @@ -423,12 +423,12 @@
聽聽 聽 聽 聽 聽 聽 },
聽聽 聽 聽 聽 聽 聽 "requests": {
聽聽 聽 聽 聽 聽 聽 聽 聽 "hashes": [
聽 聽 -聽 聽 聽 聽 聽 聽 聽 聽 "sha256:10e94cc4f3121ee6da529d358cdaeaff2f1c409cd377dbc72b825852f2f7e294",
聽 聽 -聽 聽 聽 聽 聽 聽 聽 聽 "sha256:239d7d4458afcb28a692cdd298d87542235f4ca8d36d03a15bfc128a6559a2f4"
聽 聽 +聽 聽 聽 聽 聽 聽 聽 聽 "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0",
聽 聽 +聽 聽 聽 聽 聽 聽 聽 聽 "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed"
聽聽 聽 聽 聽 聽 聽 聽 聽 ],
聽聽 聽 聽 聽 聽 聽 聽 聽 "index": "pypi",
聽 聽 -聽 聽 聽 聽 聽 聽 "markers": "python_version >= '3.7'",
聽 聽 -聽 聽 聽 聽 聽 聽 "version": "==2.30.0"
聽 聽 +聽 聽 聽 聽 聽 聽 "markers": "python_version >= '3.10'",
聽 聽 +聽 聽 聽 聽 聽 聽 "version": "==2.34.2"
聽聽 聽 聽 聽 聽 聽 },
聽聽 聽 聽 聽 聽 聽 "urllib3": {
聽聽 聽 聽 聽 聽 聽 聽 聽 "hashes": [
聽 聽 ~~~
聽 聽 10 insertions (+), 10 deletions (-)

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
    One test is already failing, it is not related to that change.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@aoyako
aoyako requested a review from a team as a code owner October 10, 2026 12:27
@aoyako aoyako changed the title fix: pipenv applies for all selections Fix(Pip, Pipenv): Pipenv applies for all selections Oct 10, 2026
@aoyako
aoyako marked this pull request as draft October 10, 2026 12:52
@aoyako
aoyako marked this pull request as ready for review October 10, 2026 12:56

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pipenv dependency in both [packages] and [dev-packages] is only updated in default lockfile section

1 participant