Skip to content

chore: remove unused openpyxl runtime dependency - #1094

Open
loganwang007 wants to merge 1 commit into
databricks:mainfrom
loganwang007:fix/remove-openpyxl-dependency
Open

loganwang007 wants to merge 1 commit into
databricks:mainfrom
loganwang007:fix/remove-openpyxl-dependency

Conversation

@loganwang007

@loganwang007 loganwang007 commented Dec 4, 2026 •

Copy link
Copy Markdown

Fixes #316.

Problem

openpyxl = "^3.0.10" is declared as a required runtime dependency in pyproject.toml, pulling both openpyxl and its transitive dependency et-xmlfile into every installation of databricks-sql-connector. openpyxl was originally added for SQLAlchemy demo data (tests/sqlalchemy/demo_data/MOCK_DATA.xlsx in #57), which has since been removed from this repository; there are no remaining references to openpyxl or .xlsx anywhere in src/ or tests/.

Fix

  • Remove openpyxl = "^3.0.10" from [tool.poetry.dependencies] in pyproject.toml.
  • Update poetry.lock via poetry lock, which removes openpyxl and et-xmlfile without upgrading any other packages.

Tests

  • Verified zero remaining references across the repository (rg -i 'excel|\.xlsx|openpyxl' --glob '!poetry.lock').
  • poetry check: passed.
  • poetry install --extras pyarrow: installed cleanly without openpyxl (importlib.util.find_spec('openpyxl') is None).
  • poetry run pytest tests/unit -m 'not realkernel' -q: 1464 passed, 5 skipped, 11 deselected, 388 subtests passed.

Notes

  • Because openpyxl is no longer used in tests either, it is removed completely rather than moved to [tool.poetry.group.dev.dependencies].
  • Downstream applications that relied on databricks-sql-connector transitively installing openpyxl (e.g., for pandas.read_excel / to_excel) will need to declare openpyxl in their own dependencies.

Signed-off-by: Logan Wang loganwng@gmail.com

Copilot AI balanced review requested due to automatic review settings December 4, 2026 03:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the removal of the unused Excel dependency.

No open issues 🎉

What changed in this PR

Reduces the connector’s installation footprint by removing the unused Excel dependency, addressing #316.

Changes:

  • Removes openpyxl from runtime dependencies.
  • Removes openpyxl and its transitive dependency et-xmlfile from the lockfile.
File Description
pyproject.toml Removes the openpyxl runtime requirement.
poetry.lock Removes both packages and refreshes generated metadata and formatting.

Review effort: Balanced

@loganwang007
loganwang007 marked this pull request as draft December 4, 2026 03:28
Signed-off-by: Logan Wang <loganwng@gmail.com>
@loganwang007
loganwang007 force-pushed the fix/remove-openpyxl-dependency branch from 689e67e to d4dff56 Compare December 4, 2026 03:30
@loganwang007
loganwang007 marked this pull request as ready for review December 4, 2026 03:39

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove requirement: openpyxl

2 participants