From bbebd27f0b47a5fcf58055e139c84c89e70b0331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Thu, 22 Jun 2023 10:33:22 +0200 Subject: [PATCH] Drop support for Python 3.7 (#5695) --- .github/workflows/build.yaml | 12 ++++++------ .github/workflows/test.yaml | 8 +------- holoviews/core/data/ibis.py | 4 ++-- holoviews/plotting/util.py | 2 -- holoviews/tests/plotting/test_plotutils.py | 2 +- pyproject.toml | 2 +- setup.py | 3 +-- tox.ini | 2 +- 8 files changed, 13 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 084b83ff7f..8d4a312fac 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,8 +20,8 @@ jobs: shell: bash -l {0} env: CHANS_DEV: "-c pyviz/label/dev -c bokeh" - PKG_TEST_PYTHON: "--test-python=py37" - PYTHON_VERSION: "3.7" + PKG_TEST_PYTHON: "--test-python=py38" + PYTHON_VERSION: "3.8" CHANS: "-c pyviz" MPLBACKEND: "Agg" CONDA_UPLOAD_TOKEN: ${{ secrets.CONDA_UPLOAD_TOKEN }} @@ -32,7 +32,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v2 with: miniconda-version: "latest" - python-version: 3.8 + python-version: 3.9 - name: Fetch unshallow run: git fetch --prune --tags --unshallow -f - name: Set output @@ -60,8 +60,8 @@ jobs: shell: bash -l {0} env: CHANS_DEV: "-c pyviz/label/dev -c bokeh" - PKG_TEST_PYTHON: "--test-python=py37" - PYTHON_VERSION: "3.7" + PKG_TEST_PYTHON: "--test-python=py38" + PYTHON_VERSION: "3.8" CHANS: "-c pyviz" MPLBACKEND: "Agg" PPU: ${{ secrets.PPU }} @@ -74,7 +74,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v2 with: miniconda-version: "latest" - python-version: 3.8 + python-version: 3.9 - name: Fetch unshallow run: git fetch --prune --tags --unshallow -f - name: conda setup diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4f8381dd0c..9becbd5822 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -38,14 +38,8 @@ jobs: fail-fast: false matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.7', '3.8', '3.11'] + python-version: ['3.8', '3.11'] bokeh-version: ['2', '3'] - exclude: - # Bokeh 3 does not support Python 3.7 - - bokeh-version: '3' - python-version: '3.7' - - bokeh-version: '2' - python-version: '3.8' timeout-minutes: 120 defaults: run: diff --git a/holoviews/core/data/ibis.py b/holoviews/core/data/ibis.py index cb35db2a90..2041a57d2d 100644 --- a/holoviews/core/data/ibis.py +++ b/holoviews/core/data/ibis.py @@ -12,13 +12,13 @@ from .util import cached -@lru_cache() +@lru_cache def ibis_version(): import ibis return Version(ibis.__version__) -@lru_cache() +@lru_cache def ibis4(): return ibis_version() >= Version("4.0") diff --git a/holoviews/plotting/util.py b/holoviews/plotting/util.py index 3d8ce8a6d3..a1c28dc5d8 100644 --- a/holoviews/plotting/util.py +++ b/holoviews/plotting/util.py @@ -557,8 +557,6 @@ def mplcmap_to_palette(cmap, ncolors=None, categorical=False): cmap = cmap.replace('Category', 'tab') if Version(mpl.__version__) < Version("3.5"): - # This will stop working and can be removed - # when we do not support python 3.7 from matplotlib import cm try: cmap = cm.get_cmap(cmap) diff --git a/holoviews/tests/plotting/test_plotutils.py b/holoviews/tests/plotting/test_plotutils.py index c153f1771f..ee307090b4 100644 --- a/holoviews/tests/plotting/test_plotutils.py +++ b/holoviews/tests/plotting/test_plotutils.py @@ -481,7 +481,7 @@ def test_mpl_colormap_instance(self): cmap = colormaps.get('Greys') except ImportError: # This will stop working and can be removed - # when we do not support python 3.7 + # when we only support Matplotlib >= 3.5 from matplotlib.cm import get_cmap cmap = get_cmap('Greys') diff --git a/pyproject.toml b/pyproject.toml index 47318f5399..2204dbcef8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ filterwarnings = [ run.concurrency = ["greenlet"] [tool.ruff] -target-version = "py37" +target-version = "py38" select = [ "E", diff --git a/setup.py b/setup.py index 688b6c4c83..e8129e2f90 100644 --- a/setup.py +++ b/setup.py @@ -154,7 +154,7 @@ def get_setup_version(reponame): dict( name="holoviews", version=get_setup_version("holoviews"), - python_requires=">=3.7", + python_requires=">=3.8", install_requires=install_requires, extras_require=extras_require, description="Stop plotting your data - annotate your data and let it visualize itself.", @@ -176,7 +176,6 @@ def get_setup_version(reponame): classifiers=[ "License :: OSI Approved :: BSD License", "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", diff --git a/tox.ini b/tox.ini index 00b3e55be7..03419678da 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ [tox] # python version test group extra envs extra commands -envlist = {py37,py38,py39,py310,py311}-{unit,ui,examples,all_recommended,simple}-{default}-{dev,pkg} +envlist = {py38,py39,py310,py311}-{unit,ui,examples,all_recommended,simple}-{default}-{dev,pkg} [_simple] description = Install holoviews without any optional dependencies