[Bug] Outdated cryptography version ceiling prevents upgrading to v51
Maintainer thường phản hồi trong vòng 7 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 75/100
Hướng nghiên cứu
Đọc khai báo phụ thuộc trong setup.cfg và bài kiểm tra chính sách giới hạn trong tests/test_cryptography.py. Kiểm tra cách bài kiểm tra đó xác định giới hạn N+3 dự kiến, rồi chạy bài kiểm tra này cùng với các bài kiểm tra tương thích về xử lý chứng chỉ. Công việc hoàn tất khi giới hạn được khai báo tuân theo chính sách và các bài kiểm tra tương thích đạt với phiên bản cryptography được đề xuất.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
MSAL Python v1.39.0 currently declares the following dependency constraint in setup.cfg:
cryptography>=2.5,<51
With the release of cryptography v51.0.0, this upper bound prevents downstream applications from upgrading to the latest major version.
The same constraint is currently present on the dev branch.
According to the compatibility policy documented in setup.cfg and the corresponding test in tests/test_cryptography.py, the upper bound is intended to follow an N+3 strategy, where N is the latest major version of cryptography.
With v51.0.0 available, the expected upper bound under this policy would be <54, subject to compatibility validation.
To Reproduce
This is a dependency resolution issue rather than a runtime authentication issue, so no authentication sample, credentials, or Azure configuration should be necessary.
The conflict can be reproduced independently of Azure Identity or any downstream application using uv:
uv pip install --dry-run --python 3.14 "msal==1.39.0" "cryptography==51.0.0"
Alternatively, using pip in a Python 3.14 environment:
python -m pip install --dry-run "msal==1.39.0" "cryptography==51.0.0"
Expected behavior
MSAL should support installing alongside cryptography v51.0.0, provided its existing compatibility tests pass.
In accordance with MSAL's documented N+3 policy, the dependency constraint would be updated from:
cryptography>=2.5,<51
To:
cryptography>=2.5,<54
What you see instead
Dependency resolution fails because MSAL v1.39.0 requires cryptography>=2.5,<51, which excludes cryptography v51.0.0.
error: No solution found when resolving dependencies
cause: Because msal>=1.39.0 depends on cryptography>=2.5,<51 and you require msal==1.39.0, we can conclude that you require cryptography>=2.5,<51.
And because you require cryptography==51.0.0, we can conclude that your requirements are unsatisfiable.
This also affects downstream consumers of MSAL through packages such as azure-identity, even though Azure Identity itself does not declare an upper bound on cryptography.
The MSAL Python version you are using
- MSAL: 1.39.0
- Azure Identity: 1.27.1
- Current cryptography: 50.0.2
- Target cryptography: 51.0.0
- Python: 3.14
- Dependency manager: uv
Additional context
This appears to be a recurrence of #914, which addressed the previous version ceiling increase from <50 to <51.
The current upper bound also appears to have fallen behind the N+3 policy before the release of v51:
| Cryptography major version | Expected upper bound |
|---|---|
| 48 | <51 |
| 49 | <52 |
| 50 | <53 |
| 51 | <54 |
The repository already contains a test named test_ceiling_should_be_latest_cryptography_version_plus_three, which detects discrepancies between the current dependency ceiling and the expected N+3 ceiling by emitting a warning.
The existing certificate-handling compatibility tests could be used to validate the proposed increase.
I am not suggesting removing the upper bound entirely, but rather updating it in accordance with the project's existing compatibility policy.
Relevant references:
- [MSAL v1.39.0 dependency declaration](https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/1.39.0/setup.cfg)
- [Current development branch dependency declaration](https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/dev/setup.cfg)
- [Existing cryptography compatibility tests](https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/dev/tests/test_cryptography.py)
- [Cryptography deprecation policy](https://cryptography.io/en/latest/api-stability/#deprecation)
- [Cryptography v51.0.0](https://pypi.org/project/cryptography/51.0.0/)
Thank you for maintaining MSAL Python!
- Ngôn ngữ chính
- Python
- Star
- 971
- Fork
- 223
- Merge trung bình
- 4 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của AzureAD/microsoft-authentication-library-for-python
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
AzureAD/microsoft-authentication-library-for-python#980 ·
Maintainer thường phản hồi trong vòng 7 ngày
-
[Bug] User Realm Discovery drops the authority's port, so username/password sign-in fails on non-443 authoritiesCó thể đã có người làm @THEtheChad đã nhận 20 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
AzureAD/microsoft-authentication-library-for-python#989 ·
Maintainer thường phản hồi trong vòng 7 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
AzureAD/microsoft-authentication-library-for-python#984 ·
Maintainer thường phản hồi trong vòng 7 ngày
-
[Bug] Support library-agnostic HTTP clients for Service Fabric managed identityCó thể đã có người làm @4gust đã nhận 20 ngày trước. Đang mởAzureSDK bug P1
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
AzureAD/microsoft-authentication-library-for-python#965 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 7 ngày
-
http_client docstring does not say that timeout, verify and proxies only configure the default sessionCó thể đã có người làm @HardMax71 đã nhận 84 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 25/100
AzureAD/microsoft-authentication-library-for-python#960 ·
Maintainer thường phản hồi trong vòng 7 ngày
Tất cả issue của AzureAD/microsoft-authentication-library-for-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
bad-antics/lateralus-lang#1623 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
fossguild/thelifesnake#82 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Unfitted DialectClassifier crashes with a confusing ValueError: raise a clear "not fitted" errorĐang mởgood first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
omarelshamy25x/shamy-arabic-nlp#111 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
pietbarber/Manage2Soar#1189 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
BUG: write_netcdf fails on Tutorial 3 BEM output with pandas CategoricalDtype DOF coordinatesCó thể đã có người làm @dtgaebe đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
sandialabs/WecOptTool#467 ·