From f226af87801308b67df7c4837d9e7de23c3c2afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Tue, 25 Apr 2023 10:09:42 +0200 Subject: [PATCH 1/2] Make Python 3.8 lower pin --- .github/workflows/build.yaml | 12 ++++++------ .github/workflows/test.yaml | 6 +----- holoviews/plotting/util.py | 2 -- holoviews/tests/plotting/test_plotutils.py | 2 +- pyproject.toml | 2 +- setup.py | 3 +-- tox.ini | 2 +- 7 files changed, 11 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 379496996c..62c134600b 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 @@ -58,8 +58,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 }} @@ -72,7 +72,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 6a1777e1f6..8dbad6ffea 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -39,12 +39,8 @@ jobs: matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] # Run on the full set on schedule, workflow_dispatch and push&tags events, otherwise on a subset. - python-version: ${{ ( github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || ( github.event_name == 'push' && github.ref_type == 'tag' ) ) && fromJSON('["3.7", "3.8", "3.9", "3.10", "3.11"]') || fromJSON('["3.7", "3.9", "3.11"]') }} + python-version: ${{ ( github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || ( github.event_name == 'push' && github.ref_type == 'tag' ) ) && fromJSON('["3.8", "3.9", "3.10", "3.11"]') || fromJSON('["3.8", "3.10", "3.11"]') }} bokeh-version: ['2', '3'] - exclude: - # Bokeh 3 does not support Python 3.7 - - bokeh-version: '3' - python-version: '3.7' timeout-minutes: 120 defaults: run: diff --git a/holoviews/plotting/util.py b/holoviews/plotting/util.py index 08df1e6c5d..88a8fb5502 100644 --- a/holoviews/plotting/util.py +++ b/holoviews/plotting/util.py @@ -558,8 +558,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 8d5e4cae0a..aac75e0fb1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ filterwarnings = [ ] [tool.ruff] -target-version = "py37" +target-version = "py38" select = [ "E", diff --git a/setup.py b/setup.py index a2d8b8d6a0..1f91d53e12 100644 --- a/setup.py +++ b/setup.py @@ -173,7 +173,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.", @@ -195,7 +195,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 a4e2590583..f404639f8e 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,examples,all_recommended,simple}-{default}-{dev,pkg} +envlist = {py38,py39,py310,py311}-{unit,examples,all_recommended,simple}-{default}-{dev,pkg} [_simple] description = Install holoviews without any optional dependencies From 8a7523f541edd2fce36801c27ddda75ced42a37f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Wed, 21 Jun 2023 18:28:09 +0200 Subject: [PATCH 2/2] Fix lint --- holoviews/core/data/ibis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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")