diff --git a/providers/openai/README.rst b/providers/openai/README.rst index 9faea5840c837..82cf7a720470e 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 ad42f7740ac13..2dfae17aec05b 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.8.0 ..... diff --git a/providers/openai/docs/index.rst b/providers/openai/docs/index.rst index 678075f53e30b..b39317fc48afb 100644 --- a/providers/openai/docs/index.rst +++ b/providers/openai/docs/index.rst @@ -139,7 +139,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 e2421f0aea57f..cf7f5a2879926 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]