From df5d516e34efafc699783008c007cfcc691b164c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20J=C3=B8rgensen?= Date: Tue, 27 Jun 2023 13:42:18 +0200 Subject: [PATCH] Pin `pandas` to version 1.5.3 to all spark images (#1925) * 1. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add note * typo * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove test * >=1.5.3 and <2.0.0 * update test * Update pyspark-notebook/Dockerfile Co-authored-by: Ayaz Salikhov * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update pyspark-notebook/Dockerfile Co-authored-by: Ayaz Salikhov * move test to file * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add pandas to EXCLUDED_PACKAGES * add 1.5.3,<2.0.0 and sort list * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add ' * "pandas[version='>" * Rename test_pandas_version.py to unit_pandas_version.py --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ayaz Salikhov --- pyspark-notebook/Dockerfile | 2 ++ tests/base-notebook/test_packages.py | 1 + tests/pyspark-notebook/units/unit_pandas_version.py | 6 ++++++ 3 files changed, 9 insertions(+) create mode 100644 tests/pyspark-notebook/units/unit_pandas_version.py diff --git a/pyspark-notebook/Dockerfile b/pyspark-notebook/Dockerfile index ce7f7872..ad981103 100644 --- a/pyspark-notebook/Dockerfile +++ b/pyspark-notebook/Dockerfile @@ -65,7 +65,9 @@ RUN fix-permissions "/etc/ipython/" USER ${NB_UID} # Install pyarrow +# Temporarily pin pandas to version 1.5.3, see: https://github.com/jupyter/docker-stacks/issues/1924 RUN mamba install --yes \ + 'pandas>=1.5.3,<2.0.0' \ 'pyarrow' && \ mamba clean --all -f -y && \ fix-permissions "${CONDA_DIR}" && \ diff --git a/tests/base-notebook/test_packages.py b/tests/base-notebook/test_packages.py index e4c9abfd..f6f9c085 100644 --- a/tests/base-notebook/test_packages.py +++ b/tests/base-notebook/test_packages.py @@ -71,6 +71,7 @@ EXCLUDED_PACKAGES = [ "hdf5", "jupyterlab-git", "openssl", + "pandas[version='>", "protobuf", "python", "r-irkernel", diff --git a/tests/pyspark-notebook/units/unit_pandas_version.py b/tests/pyspark-notebook/units/unit_pandas_version.py new file mode 100644 index 00000000..5f650a3b --- /dev/null +++ b/tests/pyspark-notebook/units/unit_pandas_version.py @@ -0,0 +1,6 @@ +# Copyright (c) Jupyter Development Team. +# Distributed under the terms of the Modified BSD License. + +import pandas + +assert pandas.__version__ == "1.5.3"