Skip to content

Commit

Permalink
Drop support for <3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
branchvincent committed Jan 18, 2024
1 parent e60cf07 commit de4b5d1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 123 deletions.
118 changes: 10 additions & 108 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,130 +9,32 @@ on:
- master

jobs:
tests-ubuntu:
name: "Test: py${{ matrix.python-version }}, Ubuntu"
runs-on: ${{ matrix.os }}
tests:
name: "Test: py${{ matrix.python-version }}, ${{ matrix.os }}"
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: '3.6'
os: ubuntu-20.04
tox-env: min
- python-version: '3.6'
os: ubuntu-20.04
tox-env: py
- python-version: '3.7'
os: ubuntu-latest
tox-env: py
- python-version: '3.8'
os: ubuntu-latest
tox-env: py
- python-version: '3.9'
os: ubuntu-latest
tox-env: py
- python-version: '3.10'
os: ubuntu-latest
tox-env: py
- python-version: '3.11'
os: ubuntu-latest
tox-env: py
- python-version: '3.12'
os: ubuntu-latest
tox-env: py
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [Ubuntu, macOS, Windows]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e ${{ matrix.tox-env }}
run: tox -e py

- name: Upload coverage report
if: matrix.os == 'Ubuntu'
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov
tests-macos:
name: "Test: py${{ matrix.python-version }}, macOS"
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: '3.6'
tox-env: min
- python-version: '3.6'
tox-env: py
- python-version: '3.7'
tox-env: py
- python-version: '3.8'
tox-env: py
- python-version: '3.9'
tox-env: py
- python-version: '3.10'
tox-env: py
- python-version: '3.11'
tox-env: py
- python-version: '3.12'
tox-env: py

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e ${{ matrix.tox-env }}

tests-windows:
name: "Test: py${{ matrix.python-version }}, Windows"
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: '3.6'
tox-env: min
- python-version: '3.6'
tox-env: py
- python-version: '3.7'
tox-env: py
- python-version: '3.8'
tox-env: py
- python-version: '3.9'
tox-env: py
- python-version: '3.10'
tox-env: py
- python-version: '3.11'
tox-env: py
- python-version: '3.12'
tox-env: py

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e ${{ matrix.tox-env }}
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ without leaving the command line.
Requirements
------------

* Python >= 3.6
* Python >= 3.8


Installation
Expand All @@ -36,8 +36,8 @@ the Python Package Index::

pip install shub

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

We also supply stand-alone binaries. You can find them in our `latest GitHub
release`_.
Expand Down
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
},
include_package_data=True,
zip_safe=False,
python_requires='>=3.6',
python_requires='>=3.8',
install_requires=[
'click',
'docker',
'importlib-metadata; python_version < "3.8"',
'packaging',
'pip',
'PyYAML',
'retrying',
'requests',
'setuptools; python_version >= "3.12"',
'scrapinghub>=2.3.1',
'tqdm==4.55.1',
'toml',
Expand All @@ -45,8 +45,6 @@
'Natural Language :: English',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'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
5 changes: 1 addition & 4 deletions shub/image/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
ShubDeprecationWarning, print_warning, BadParameterException,
)

if sys.version_info < (3, 8):
import importlib_metadata as metadata
else:
from importlib import metadata
from importlib import metadata


DEFAULT_DOCKER_API_VERSION = '1.21'
Expand Down
4 changes: 0 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ deps =
commands =
pytest --cov=shub --cov-report=term-missing --cov-report=html --cov-report=xml {posargs:shub tests}

[testenv:min]
deps =
{[testenv]deps}

[testenv:freeze]
install_command =
python -m pip install {opts} {packages}
Expand Down

0 comments on commit de4b5d1

Please sign in to comment.