Repository navigation
{Packaging} pytest version restricted- #10534 - #10535
Merged
mansoor sarfraz (msarfraz) merged 1 commit intoOct 29, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the CI change that constrains pytest to avoid the reported pytest-forked incompatibility.
No open issues 🎉
What changed in this PR
This PR constrains pytest in Azure CLI Extensions CI to avoid the reported pytest 9.2 incompatibility with pytest-forked.
Changes:
- Adds a shared dependency constraint requiring
pytest<9.2. - Sets
PIP_CONSTRAINTduring azdev setup and persists it as a pipeline variable for subsequent installation steps.
| File | Description |
|---|---|
.azure-pipelines/templates/azdev_setup.yml |
Applies and persists the pip constraint file path. |
.azure-pipelines/constraints.txt |
Defines the pytest version limit and documents its purpose. |
Review effort: Balanced
Yong Zhang (yonzhan)
approved these changes
Oct 29, 2026
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
4 tasks
Merged
2 tasks done
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.
🤖 PR Validation — ️✔️ All clear
Background
The Azure CLI Extensions unit tests are failing
Root Cause
The failures are caused by an incompatibility between pytest 9.2.0 and pytest-forked 1.7.5,
What breaks
The installation logs explain why this appeared suddenly: azdev allows pytest>=5.0.0, so fresh environments automatically installed 9.2.0. Pinning the azdev Git commit does not pin its transitive dependencies.
Immediate Solution
constrain pytest to 9.1.1 or pytest<9.2. Apply a CI dependency constraint such as pytest<9.2 during installation, and retain it across subsequent dependency-installation steps.