feat: make pandas an optional dependency
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 72/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- pandas, python
- 领域
- backend, build-system
调研方向
从 pyproject.toml 开始,检查 client.dataframe.* 和 client.records.create(table, dataframe) 中对 pandas 的引用。验证核心安装不再需要 pandas,同时 dataframe extra 会恢复现有集成;不安装 extra 时导入 client.dataframe 应产生所提议的明确 ImportError。
由索引模型根据 Issue 内容生成。
描述
Summary
pandas is a required dependency (pandas>=2.0.0 in pyproject.toml) but is only used by the DataFrame integration (client.dataframe.*, client.records.create(table, dataframe)). The core SDK surface (client.tables.*, client.records.* with dict input, client.query.*) does not import pandas at all.
This makes the SDK unsuitable as a lightweight dependency for services that need only schema manipulation (e.g., table creation, column addition, relationship management) without DataFrame support. pandas adds ~30MB to the installed footprint.
Proposal
Move pandas to an optional extra:
` oml
[project]
dependencies = [
"azure-identity>=1.17.0",
"azure-core>=1.30.2",
"requests>=2.32.0",
]
[project.optional-dependencies]
dataframe = ["pandas>=2.0.0"]
`
Users who need DataFrame integration install pip install powerplatform-dataverse[dataframe]. The core SDK installs with zero heavy dependencies beyond azure-identity and requests.
Motivation
The Cowork (M365 Copilot) runtime is evaluating the SDK as the backend for Dataverse schema operations in the App Builder experience. The runtime already has azure-identity, azure-core, and requests -- but adding pandas (~30MB) as a transitive dependency for unused DataFrame features is a container footprint concern. Making pandas optional would unblock SDK adoption for schema-only use cases.
Backward compatibility
No breaking change: pip install powerplatform-dataverse[dataframe] gives the same behavior as today. Users who import client.dataframe without the extra get an ImportError with a clear message suggesting the extra.
- 主要语言
- Python
- 星标
- 60
- 派生
- 23
- 平均合并
- 13 小时 53 分钟
- 30 天内合并 PR
- 3
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/PowerPlatform-DataverseClient-Python 的其他 Issue
-
enhancement
难度 4/5 3-5 天 新手友好度 55/100
-
enhancement
难度 4/5 3-5 天 新手友好度 68/100
-
bug
microsoft/PowerPlatform-DataverseClient-Python#194 · 已指派 1 人 ·
-
microsoft/PowerPlatform-DataverseClient-Python#170 · 已指派 1 人 ·
-
bug
microsoft/PowerPlatform-DataverseClient-Python#166 · 1 条评论 · 已指派 1 人 ·
查看 microsoft/PowerPlatform-DataverseClient-Python 的全部 Issue
相似的 Issue
-
sponsored
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 86/100
Diaoul/subliminal#1382 ·
-
难度 1/5 1 小时以内 新手友好度 92/100
-
triage/confirmed
难度 2/5 1-3 小时 新手友好度 88/100
agentscope-ai/agentscope#2775 ·
-
难度 2/5 1-3 小时 新手友好度 84/100