Skip to content

Commit

Permalink
build(python): drop support for Python 3.6 and 3.7 (#453)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: drop support for Python 3.6 and 3.7

Closes reanahub/reana#784
  • Loading branch information
mdonadoni committed May 29, 2024
1 parent a7bcf7a commit 85cca11
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 27 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: "3.8"

- name: Check Python code formatting
run: |
Expand All @@ -71,7 +71,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: "3.8"

- name: Check compliance with pep8, pyflakes and circular complexity
run: |
Expand All @@ -87,7 +87,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: "3.8"

- name: Check compliance with Python docstring conventions
run: |
Expand All @@ -103,7 +103,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: "3.8"

- name: Check Python manifest completeness
run: |
Expand All @@ -119,7 +119,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: "3.8"

- name: Install system dependencies
run: |
Expand All @@ -143,7 +143,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- name: Checkout
Expand Down
15 changes: 3 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,12 @@
"yadage": ["adage~=0.10.1", "yadage~=0.20.1", "yadage-schemas~=0.10.6"],
"cwl": ["cwltool==3.1.20210628163208"],
"snakemake": [
"snakemake==6.15.5 ; python_version<'3.7'", # Snakemake v7 requires Python 3.7+
"snakemake==7.32.4 ; python_version>='3.7'",
"tabulate<0.9",
"snakemake==7.32.4",
"pulp>=2.7.0,<2.8.0",
"smart-open<7 ; python_version<'3.7'", # see https://github.com/piskvorky/smart_open/issues/806
],
"snakemake-reports": [
"snakemake[reports]==6.15.5 ; python_version<'3.7'",
"snakemake[reports]==7.32.4 ; python_version>='3.7'",
"pygraphviz<1.8",
"tabulate<0.9", # tabulate 0.9 crashes snakemake, more info: https://github.com/snakemake/snakemake/issues/1899
"snakemake[reports]==7.32.4",
"pulp>=2.7.0,<2.8.0",
"smart-open<7 ; python_version<'3.7'", # see https://github.com/piskvorky/smart_open/issues/806
],
}

Expand Down Expand Up @@ -104,7 +97,7 @@
],
zip_safe=False,
include_package_data=True,
python_requires=">=3.6",
python_requires=">=3.8",
install_requires=install_requires,
extras_require=extras_require,
setup_requires=setup_requires,
Expand All @@ -116,8 +109,6 @@
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
11 changes: 2 additions & 9 deletions tests/test_workspace.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
#
# This file is part of REANA.
# Copyright (C) 2022 CERN.
# Copyright (C) 2022, 2024 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Workspace utilities tests"""

import contextlib
from contextlib import nullcontext as does_not_raise
import os
from pathlib import Path

Expand All @@ -16,13 +16,6 @@
from reana_commons import workspace


# FIXME: use `contextlib.nullcontext` when moving to Python 3.7
@contextlib.contextmanager
def does_not_raise():
"""Context manager that does nothing."""
yield None


@pytest.fixture()
def test_workspace(tmp_path: Path):
"""Workspace containing test files."""
Expand Down

0 comments on commit 85cca11

Please sign in to comment.