Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Make azure-identity an optional dependency

未關閉
#862 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
48/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
python, sqlalchemy
領域
database

研究方向

Start by reading the dependency declarations for PyPI and the Microsoft conda package, then inspect the existing pyarrow extra and the lazy Entra ID imports in auth.py and db_connection.py. Decide how the conda add-on should be handled, update the dependency metadata and missing-package error guidance, and verify that SQL/Kerberos installs no longer pull in azure-identity while Entra ID users can install the documented extra.

由索引模型根據 Issue 內容生成。

描述

triage needed

mssql-python declares azure-identity>=1.12.0 as a hard runtime dependency on both PyPI and the microsoft conda channel, but only imports it lazily inside the Entra ID auth paths (auth.py, db_connection.py). SQL auth and Kerberos users never load it.

On PyPI this costs seven small pure-Python wheels. On conda it is far worse: the conda-forge azure-core and msal_extensions recipes declare runtime dependencies the wheels do not (flask, pygobject, libsecret), so azure-identity cascades into ~60 packages and ~350 MB of celery, boto3, cairo and X11 libraries. Installing mssql-python 1.16.0 into a minimal linux-64 env grows it from ~860 MB to ~1.2 GB.

The feedstock problem is not yours to fix, but the only robust fix on your side is to not require azure-identity unconditionally.

Request

Move azure-identity to an extra, matching the existing pyarrow extra:

  • PyPI: pip install mssql-python[azure]
  • conda: drop azure-identity from run: and document it as a user-installed add-on, or publish a mssql-python-azure metapackage

The lazy imports are already in place. The Entra code paths just need a clear ImportError pointing at the extra when it is missing.

Environment: linux-64, conda-forge + microsoft channels, mssql-python 1.16.0.

主要語言
Python
星號
479
分支
62
平均合併
2 天 16 小時
30 天內合併 PR
15

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

microsoft/mssql-python 的其他 Issue

查看 microsoft/mssql-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。