diff --git a/providers/openai/README.rst b/providers/openai/README.rst index 924658f0cf7c1..02fb632237eb3 100644 --- a/providers/openai/README.rst +++ b/providers/openai/README.rst @@ -57,7 +57,7 @@ PIP package Version required ========================================== ================== ``apache-airflow`` ``>=2.11.0`` ``apache-airflow-providers-common-compat`` ``>=1.12.0`` -``openai[datalib]`` ``>=2.37.0`` +``openai`` ``>=2.37.0`` ========================================== ================== The changelog for the provider package can be found in the diff --git a/providers/openai/docs/changelog.rst b/providers/openai/docs/changelog.rst index bb3bcbb6b4b81..f9c3532d6fd50 100644 --- a/providers/openai/docs/changelog.rst +++ b/providers/openai/docs/changelog.rst @@ -20,6 +20,23 @@ Changelog --------- +.. Behavior note + +The ``[datalib]`` extra of the ``openai`` SDK is no longer part of this +provider's base install. That extra existed to support the SDK's legacy +``openai tools fine_tunes.prepare_data`` CLI (removed in openai 1.x) and +transitively pulled in ``numpy``, ``pandas``, and ``pandas-stubs`` for every +provider user. None of these packages are imported by the provider's +source, tests, or example DAGs, so the extra was pure transitive bloat. + +Users whose DAG code relied on ``numpy`` or ``pandas`` being installed as a +side-effect of installing this provider should declare those packages +explicitly, or install the SDK extra directly: + +.. code-block:: bash + + pip install 'openai[datalib]' + 1.7.5 ..... diff --git a/providers/openai/docs/index.rst b/providers/openai/docs/index.rst index 64b84cb315b1d..6df3953bceb67 100644 --- a/providers/openai/docs/index.rst +++ b/providers/openai/docs/index.rst @@ -98,7 +98,7 @@ PIP package Version required ========================================== ================== ``apache-airflow`` ``>=2.11.0`` ``apache-airflow-providers-common-compat`` ``>=1.12.0`` -``openai[datalib]`` ``>=2.37.0`` +``openai`` ``>=2.37.0`` ========================================== ================== Downloading official packages diff --git a/providers/openai/pyproject.toml b/providers/openai/pyproject.toml index 5e2f97bd29e83..f00229c1fce78 100644 --- a/providers/openai/pyproject.toml +++ b/providers/openai/pyproject.toml @@ -61,7 +61,13 @@ requires-python = ">=3.10" dependencies = [ "apache-airflow>=2.11.0", "apache-airflow-providers-common-compat>=1.12.0", - "openai[datalib]>=2.37.0", + # The ``[datalib]`` extra of the ``openai`` SDK pulls in numpy / pandas / + # pandas-stubs. It was historically used by the SDK's legacy + # ``openai tools fine_tunes.prepare_data`` CLI, which was removed in + # openai 1.x. Nothing in this provider (source, tests, example DAGs, or + # cross-provider example DAGs) uses pandas or numpy, so ``[datalib]`` is + # pure transitive bloat here and is not required at runtime. + "openai>=2.37.0", ] [dependency-groups]