Skip to content

build(python/adbc_driver_manager): drop runtime dependency on typing-extensions - #5026

Merged
lidavidm merged 5 commits into
apache:mainfrom
edgarrmondragon:adbc-driver-manager-remove-typing-extensions
Nov 13, 2026
Merged

lidavidm merged 5 commits into
apache:mainfrom
edgarrmondragon:adbc-driver-manager-remove-typing-extensions

Conversation

@edgarrmondragon

@edgarrmondragon edgarrmondragon commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

It's only needed for type checking, and type checkers ship its stubs. Users like me who were getting typing-extensions only through adbc-driver-manager will no longer get it installed.

ParamSpec and Self were added to the stdlib in Python 3.10 and 3.11, respectively, so it's safe to import them from typing unconditionally. types.CapsuleType was added in Python 3.13, so it's the only import that actually requires typing-extensions.

Closes #5025

@edgarrmondragon
edgarrmondragon marked this pull request as ready for review November 12, 2026 06:40
@edgarrmondragon
edgarrmondragon force-pushed the adbc-driver-manager-remove-typing-extensions branch from c493b07 to da27d1e Compare November 12, 2026 06:42
…extensions

It's only needed for type checking and type checkers ship its stubs.

Users who were getting `typing-extensions` only through adbc-driver-manager will no longer get it installed.

Signed-off-by: Edgar Ramírez-Mondragón <edgarrm358@gmail.com>
@edgarrmondragon
edgarrmondragon force-pushed the adbc-driver-manager-remove-typing-extensions branch from da27d1e to 0b76acb Compare November 12, 2026 06:42

@lidavidm lidavidm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for catching this.

readme = "README.md"
requires-python = ">=3.11"
dynamic = ["version"]
dependencies = ["typing-extensions"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we move this to test? And place a python_version specifier on the requirement?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 28b1b39.

Also set the floor to >=4.12 since that's when CapsuleType was added.

FWIW, the dbapi and test extras could be made into dependency groups. That's probably out of scope here though.

Signed-off-by: Edgar Ramírez-Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez-Mondragón <edgarrm358@gmail.com>
Signed-off-by: Edgar Ramírez-Mondragón <edgarrm358@gmail.com>
@lidavidm
lidavidm merged commit 89fe37c into apache:main Nov 13, 2026
87 checks passed
@edgarrmondragon
edgarrmondragon deleted the adbc-driver-manager-remove-typing-extensions branch November 13, 2026 02:49
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.

Drop runtime dependency on typing-extensions

2 participants