Skip to content

Conversation

@notatallshaw
Copy link
Contributor

Related to #51702.

There is a resolution "knot" involving protobuf when pip 25.1 attempts to resolve dependencies during CI. Many Google dependencies require protobuf, but grpcio-status and opentelemetry-proto often have conflicting version requirements, for example:

  • grpcio-status 1.73.0 requires protobuf<7.0.0,>=6.30.0
  • opentelemetry-proto 1.27.0 requires protobuf<5.0,>=3.19

Because so many packages depend on protobuf, pip's heuristics struggle to correctly identify which packages to backtrack on, leading to resolution too deep errors.

This change introduces a workaround by adding opentelemetry-proto with an upper bound to the dependency list. This signals to pip that the package should be resolved early, while the use of a very high upper bound ensures that it doesn't meaningfully restrict user environments. I considered using a requirement like opentelemetry-proto<2!0, but decided against it, as it felt too magical and might break tools that are not fully PEP 440 compliant.

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

Whoa!

@potiuk potiuk merged commit ac3eb80 into apache:main Jun 14, 2025
51 checks passed
@potiuk
Copy link
Member

potiuk commented Jun 14, 2025

Let's see if our canary build likes it :)

@potiuk
Copy link
Member

potiuk commented Jun 15, 2025

Thanks @notatallshaw -> it helped of course though it's still a bit non-obvious how :). Looking forward to 25.2 !

@amoghrajesh
Copy link
Contributor

Thats really nice! Thanks

@notatallshaw
Copy link
Contributor Author

it helped of course though it's still a bit non-obvious how

Yeah, unfortunately it only becomes obvious when you look into the internal state of resolvelib.

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.

3 participants