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 天 14 小时
30 天内合并 PR
16

环境准备

在 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 摘要。