Skip to content

Commit de4b5d1

Browse files
committed
Drop support for <3.8
1 parent e60cf07 commit de4b5d1

File tree

5 files changed

+16
-123
lines changed

5 files changed

+16
-123
lines changed

Diff for: .github/workflows/tests.yml

+10-108
Original file line numberDiff line numberDiff line change
@@ -9,130 +9,32 @@ on:
99
- master
1010

1111
jobs:
12-
tests-ubuntu:
13-
name: "Test: py${{ matrix.python-version }}, Ubuntu"
14-
runs-on: ${{ matrix.os }}
12+
tests:
13+
name: "Test: py${{ matrix.python-version }}, ${{ matrix.os }}"
14+
runs-on: ${{ matrix.os }}-latest
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
include:
19-
- python-version: '3.6'
20-
os: ubuntu-20.04
21-
tox-env: min
22-
- python-version: '3.6'
23-
os: ubuntu-20.04
24-
tox-env: py
25-
- python-version: '3.7'
26-
os: ubuntu-latest
27-
tox-env: py
28-
- python-version: '3.8'
29-
os: ubuntu-latest
30-
tox-env: py
31-
- python-version: '3.9'
32-
os: ubuntu-latest
33-
tox-env: py
34-
- python-version: '3.10'
35-
os: ubuntu-latest
36-
tox-env: py
37-
- python-version: '3.11'
38-
os: ubuntu-latest
39-
tox-env: py
40-
- python-version: '3.12'
41-
os: ubuntu-latest
42-
tox-env: py
18+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
19+
os: [Ubuntu, macOS, Windows]
4320

4421
steps:
45-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
4623

4724
- name: Set up Python ${{ matrix.python-version }}
48-
uses: actions/setup-python@v2
25+
uses: actions/setup-python@v5
4926
with:
5027
python-version: ${{ matrix.python-version }}
51-
28+
5229
- name: Install tox
5330
run: pip install tox
5431

5532
- name: Run tests
56-
run: tox -e ${{ matrix.tox-env }}
33+
run: tox -e py
5734

5835
- name: Upload coverage report
36+
if: matrix.os == 'Ubuntu'
5937
run: |
6038
curl -Os https://uploader.codecov.io/latest/linux/codecov
6139
chmod +x codecov
6240
./codecov
63-
64-
tests-macos:
65-
name: "Test: py${{ matrix.python-version }}, macOS"
66-
runs-on: macos-latest
67-
strategy:
68-
fail-fast: false
69-
matrix:
70-
include:
71-
- python-version: '3.6'
72-
tox-env: min
73-
- python-version: '3.6'
74-
tox-env: py
75-
- python-version: '3.7'
76-
tox-env: py
77-
- python-version: '3.8'
78-
tox-env: py
79-
- python-version: '3.9'
80-
tox-env: py
81-
- python-version: '3.10'
82-
tox-env: py
83-
- python-version: '3.11'
84-
tox-env: py
85-
- python-version: '3.12'
86-
tox-env: py
87-
88-
steps:
89-
- uses: actions/checkout@v2
90-
91-
- name: Set up Python ${{ matrix.python-version }}
92-
uses: actions/setup-python@v2
93-
with:
94-
python-version: ${{ matrix.python-version }}
95-
96-
- name: Install tox
97-
run: pip install tox
98-
99-
- name: Run tests
100-
run: tox -e ${{ matrix.tox-env }}
101-
102-
tests-windows:
103-
name: "Test: py${{ matrix.python-version }}, Windows"
104-
runs-on: windows-latest
105-
strategy:
106-
fail-fast: false
107-
matrix:
108-
include:
109-
- python-version: '3.6'
110-
tox-env: min
111-
- python-version: '3.6'
112-
tox-env: py
113-
- python-version: '3.7'
114-
tox-env: py
115-
- python-version: '3.8'
116-
tox-env: py
117-
- python-version: '3.9'
118-
tox-env: py
119-
- python-version: '3.10'
120-
tox-env: py
121-
- python-version: '3.11'
122-
tox-env: py
123-
- python-version: '3.12'
124-
tox-env: py
125-
126-
steps:
127-
- uses: actions/checkout@v2
128-
129-
- name: Set up Python ${{ matrix.python-version }}
130-
uses: actions/setup-python@v2
131-
with:
132-
python-version: ${{ matrix.python-version }}
133-
134-
- name: Install tox
135-
run: pip install tox
136-
137-
- name: Run tests
138-
run: tox -e ${{ matrix.tox-env }}

Diff for: README.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ without leaving the command line.
2525
Requirements
2626
------------
2727

28-
* Python >= 3.6
28+
* Python >= 3.8
2929

3030

3131
Installation
@@ -36,8 +36,8 @@ the Python Package Index::
3636

3737
pip install shub
3838

39-
Please note that if you are using Python < 3.6,
40-
you should pin `shub` to `2.13.0` or lower.
39+
Please note that if you are using Python < 3.8,
40+
you should pin to `shub<=2.15.2`.
4141

4242
We also supply stand-alone binaries. You can find them in our `latest GitHub
4343
release`_.

Diff for: setup.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
},
2626
include_package_data=True,
2727
zip_safe=False,
28-
python_requires='>=3.6',
28+
python_requires='>=3.8',
2929
install_requires=[
3030
'click',
3131
'docker',
32-
'importlib-metadata; python_version < "3.8"',
3332
'packaging',
3433
'pip',
3534
'PyYAML',
3635
'retrying',
3736
'requests',
37+
'setuptools; python_version >= "3.12"',
3838
'scrapinghub>=2.3.1',
3939
'tqdm==4.55.1',
4040
'toml',
@@ -45,8 +45,6 @@
4545
'Natural Language :: English',
4646
'License :: OSI Approved :: BSD License',
4747
'Programming Language :: Python',
48-
'Programming Language :: Python :: 3.6',
49-
'Programming Language :: Python :: 3.7',
5048
'Programming Language :: Python :: 3.8',
5149
'Programming Language :: Python :: 3.9',
5250
'Programming Language :: Python :: 3.10',

Diff for: shub/image/utils.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
ShubDeprecationWarning, print_warning, BadParameterException,
1717
)
1818

19-
if sys.version_info < (3, 8):
20-
import importlib_metadata as metadata
21-
else:
22-
from importlib import metadata
19+
from importlib import metadata
2320

2421

2522
DEFAULT_DOCKER_API_VERSION = '1.21'

Diff for: tox.ini

-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ deps =
1010
commands =
1111
pytest --cov=shub --cov-report=term-missing --cov-report=html --cov-report=xml {posargs:shub tests}
1212

13-
[testenv:min]
14-
deps =
15-
{[testenv]deps}
16-
1713
[testenv:freeze]
1814
install_command =
1915
python -m pip install {opts} {packages}

0 commit comments

Comments
 (0)