Remove unused [datalib] extra from OpenAI provider base install#69408
Open
YAshhh29 wants to merge 3 commits into
Open
Remove unused [datalib] extra from OpenAI provider base install#69408YAshhh29 wants to merge 3 commits into
YAshhh29 wants to merge 3 commits into
Conversation
kaxil
approved these changes
Jul 6, 2026
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
apache-airflow-providers-openaipackage pulls in the[datalib]extra of the
openaiSDK — which transitively installsnumpy,pandas,and
pandas-stubs— for every user of this provider. That extra has nofunctional use inside this provider today, so it is pure bloat and CVE
noise for anyone installing the provider.
Investigation
I audited every code path that could depend on
numpy/pandasreachingusers through this provider:
providers/openai/src/**/*.pyproviders/openai/tests/unit/**providers/openai/tests/system/openai/example_*.pypendulum+ Airflow importsproviders/openai/docs/**operators/openai.pylist[float],str,str | None— no DataFramesproviders/{pgvector,pinecone,weaviate}/tests/system/**/example_*_openai.pyproviders/weaviate/pyproject.tomlgit log providers/openai/pyproject.toml[datalib]was carried forward across every major version bump (openai 0.x → 1.x → 2.x); recent PR #69068 just bumpedopenai[datalib]>=1.66.0→openai[datalib]>=2.37.0without justifying the extraopenai/openai-pythonREADME (SDK 2.x)[datalib]is not mentioned anywhere in the modern SDK docs ([aiohttp],[bedrock],[realtime]are —[datalib]is not)Why it was there in the first place
[datalib]was the extra used by OpenAI SDK 0.x's legacy CLI(
openai tools fine_tunes.prepare_data), which processed JSONLfine-tuning files via pandas. That CLI was removed when OpenAI SDK 1.x
shipped in 2023, but the extra remained in the package for backward
compatibility. This Airflow provider carried the extra forward across
every subsequent version bump without re-evaluating whether it was
still needed — a classic transitive fossil dependency.
What changes
providers/openai/pyproject.toml: base dep is nowopenai>=2.37.0(no[datalib]); inline comment records the rationale so it doesn't get re-added by the next version bump.providers/openai/README.rstandproviders/openai/docs/index.rst: dep table updated to reflect the base dep.providers/openai/docs/changelog.rst: behavior note under theChangelogheader explaining the change and pointing users atpip install 'openai[datalib]'if they had unknowingly relied on the transitivenumpy/pandasinstall for their DAG code.Impact for users
numpy,pandas, andpandas-stubstransitively — smaller Docker images, smallerpip-auditsurfaces.OpenAIHook,OpenAIEmbeddingOperator,OpenAIResponseOperator, and the batch operators are unaffected — none of their code paths use pandas/numpy.import pandasand was relying on this provider to bring pandas along transitively. The changelog note points those users at the exact one-line fix.