Skip to content

Commit

Permalink
deprecate Python 3.7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianegli committed Mar 27, 2023
1 parent c655a60 commit f6a19eb
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ body:
* Executor _(eg. slurm, local, awsbatch)_
* OS _(eg. CentOS Linux, macOS, Linux Mint)_
* Version of nf-core/tools _(eg. 1.1, 1.5, 1.8.2)_
* Python version _(eg. 3.7, 3.8)_
* Python version _(eg. 3.10, 3.11)_
4 changes: 2 additions & 2 deletions .github/workflows/create-test-wf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
- uses: actions/checkout@v3
name: Check out source-code repository

- name: Set up Python 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8

- name: Install python dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
- uses: actions/checkout@v3
name: Check out source-code repository

- name: Set up Python 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8

- name: Install python dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tools-api-docs-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
- name: Check out source-code repository
uses: actions/checkout@v3

- name: Set up Python 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8

- name: Install python dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tools-api-docs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- name: Check out source-code repository
uses: actions/checkout@v3

- name: Set up Python 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8

- name: Install python dependencies
run: |
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
- Only check that a pipeline name doesn't contain dashes if the name is provided by prompt of `--name`. Don't check if a template file is used. ([#2123](https://github.com/nf-core/tools/pull/2123))
- Deprecate `--enable_conda` parameter. Use `conda.enable` instead ([#2131](https://github.com/nf-core/tools/pull/2131))
- Handle `json.load()` exceptions ([#2134](https://github.com/nf-core/tools/pull/2134))
- Deprecate Python 3.7 support because it reaches EOL

## [v2.7.1 - Mercury Eagle Patch](https://github.com/nf-core/tools/releases/tag/2.7.1) - [2022-12-08]

Expand Down
13 changes: 3 additions & 10 deletions nf_core/modules/test_yml_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,9 @@ def check_if_empty_file(self, fname):
g_f = gzip.GzipFile(fileobj=fh, mode="rb")
if g_f.read() == b"":
return True
except Exception as e:
# Python 3.8+
if hasattr(gzip, "BadGzipFile"):
if isinstance(e, gzip.BadGzipFile):
pass
# Python 3.7
elif isinstance(e, OSError):
pass
else:
raise e
except gzip.BadGzipFile:
pass

return False

def _md5(self, fname):
Expand Down
13 changes: 3 additions & 10 deletions nf_core/subworkflows/test_yml_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,9 @@ def check_if_empty_file(self, fname):
g_f = gzip.GzipFile(fileobj=fh, mode="rb")
if g_f.read() == b"":
return True
except Exception as e:
# Python 3.8+
if hasattr(gzip, "BadGzipFile"):
if isinstance(e, gzip.BadGzipFile):
pass
# Python 3.7
elif isinstance(e, OSError):
pass
else:
raise e
except gzip.BadGzipFile:
pass

return False

def _md5(self, fname):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"console_scripts": ["nf-core=nf_core.__main__:run_nf_core"],
"refgenie.hooks.post_update": ["nf-core-refgenie=nf_core.refgenie:update_config"],
},
python_requires=">=3.7, <4",
python_requires=">=3.8, <4",
install_requires=required,
packages=find_packages(exclude=("docs")),
include_package_data=True,
Expand Down

0 comments on commit f6a19eb

Please sign in to comment.