Skip to content

Add a more comprehensive python deps test - #2675

Merged
pkwarren merged 2 commits into
mainfrom
pkw/improve-py-deps-test
Aug 21, 2026
Merged

Add a more comprehensive python deps test#2675
pkwarren merged 2 commits into
mainfrom
pkw/improve-py-deps-test

Conversation

@pkwarren

Copy link
Copy Markdown
Member

Instead of just verifying the versions are valid for an individual plugin, build a directory structure containing a plugin and its dependencies and attempt to resolve everything together. This catches issues like #2674 and also validates the requires-python values. The requires-python validation caught two issues in mypy plugins at the latest version.

Instead of just verifying the versions are valid for an individual
plugin, build a directory structure containing a plugin and its
dependencies and attempt to resolve everything together. This catches
issues like #2674 and also validates the requires-python values. The
requires-python validation caught two issues in mypy plugins at the
latest version.

@pkwarren pkwarren left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The test would've caught the previous issue:

--- FAIL: TestPyPIDependencies (1.91s)
    --- FAIL: TestPyPIDependencies/connectrpc/py@v0.11.1 (0.03s)
        plugins_test.go:506:
                Error Trace:    /Users/pkw/dev/plugins/tests/plugins_test.go:506
                Error:          Received unexpected error:
                                exit status 1
                Test:           TestPyPIDependencies/connectrpc/py@v0.11.1
                Messages:       uv lock failed - output: Using CPython 3.13.2
                                  × No solution found when resolving dependencies:
                                  ╰─▶ Because connectrpc>=0.11.1 depends on protobuf-py==0.1.1 and
                                      bufbuild-py==0.2.0 depends on protobuf-py>=0.2.0, we can conclude that
                                      bufbuild-py==0.2.0 and connectrpc>=0.11.1 are incompatible.
                                      And because only bufbuild-py==0.2.0 is available, we can conclude that
                                      all versions of bufbuild-py and connectrpc>=0.11.1 are incompatible.
                                      And because your project depends on bufbuild-py and connectrpc>=0.11.1,
                                      we can conclude that your project's requirements are unsatisfiable.

# https://github.com/nipunn1313/mypy-protobuf/blob/v5.1.0/pyproject.toml#L21
requires_python: ">=3.8"
# Bumped to match protobuf requirement.
requires_python: ">=3.9"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The protobuf version below requires 3.9 so needed to bump these.

@pkwarren
pkwarren requested a review from emcfarlane August 21, 2026 20:50
@pkwarren
pkwarren merged commit 8110a05 into main Aug 21, 2026
3 checks passed
@pkwarren
pkwarren deleted the pkw/improve-py-deps-test branch August 21, 2026 20:53
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