Skip to content

Commit

Permalink
Merge pull request #1634 from sammdot/drop-py37
Browse files Browse the repository at this point in the history
Drop support for Python 3.7
  • Loading branch information
sammdot authored Sep 27, 2023
2 parents 8a8d360 + a8ac363 commit 6949a2a
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 109 deletions.
71 changes: 1 addition & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
job_cache_extra_deps=(); job_id=test_linux; job_name='Test (Linux)'; job_needs=(); job_os=Linux; job_platform=ubuntu-22.04; job_python=3.9; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_linux_py-3.9_ubuntu-22.04; job_skip_cache_path=.skip_cache_test_linux; job_skiplists=(job_test os_linux); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant=Linux; analyze_set_job_skip_cache_key
job_cache_extra_deps=(osx/deps.sh); job_id=test_macos; job_name='Test (macOS)'; job_needs=(); job_os=macOS; job_platform=macos-12; job_python=3.9; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_macos_py-3.9_macos-12; job_skip_cache_path=.skip_cache_test_macos; job_skiplists=(job_test os_macos); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant=macOS; analyze_set_job_skip_cache_key
job_cache_extra_deps=(); job_id=test_windows; job_name='Test (Windows)'; job_needs=(); job_os=Windows; job_platform=windows-2022; job_python=3.9; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_windows_py-3.9_windows-2022; job_skip_cache_path=.skip_cache_test_windows; job_skiplists=(job_test os_windows); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant=Windows; analyze_set_job_skip_cache_key
job_cache_extra_deps=(); job_id=test_python_37; job_name='Test (Python 3.7)'; job_needs=(); job_os=Linux; job_platform=ubuntu-latest; job_python=3.7; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_python_37_py-3.7_ubuntu-latest; job_skip_cache_path=.skip_cache_test_python_37; job_skiplists=(job_test os_linux os_macos os_windows); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant='Python 3.7'; analyze_set_job_skip_cache_key
job_cache_extra_deps=(); job_id=test_python_38; job_name='Test (Python 3.8)'; job_needs=(); job_os=Linux; job_platform=ubuntu-latest; job_python=3.8; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_python_38_py-3.8_ubuntu-latest; job_skip_cache_path=.skip_cache_test_python_38; job_skiplists=(job_test os_linux os_macos os_windows); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant='Python 3.8'; analyze_set_job_skip_cache_key
job_cache_extra_deps=(); job_id=test_python_310; job_name='Test (Python 3.10)'; job_needs=(); job_os=Linux; job_platform=ubuntu-latest; job_python=3.10; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_python_310_py-3.10_ubuntu-latest; job_skip_cache_path=.skip_cache_test_python_310; job_skiplists=(job_test os_linux os_macos os_windows); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant='Python 3.10'; analyze_set_job_skip_cache_key
job_cache_extra_deps=(); job_id=test_qt_gui; job_name='Test (Qt GUI)'; job_needs=(); job_os=Linux; job_platform=ubuntu-22.04; job_python=3.9; job_reqs=(reqs/dist.txt reqs/dist_extra_gui_qt.txt reqs/test.txt); job_skip_cache_name=skip_test_qt_gui_py-3.9_ubuntu-22.04; job_skip_cache_path=.skip_cache_test_qt_gui; job_skiplists=(job_test_gui_qt); job_test_args=test/gui_qt; job_type=test_gui_qt; job_variant='Qt GUI'; analyze_set_job_skip_cache_key
Expand Down Expand Up @@ -71,14 +70,6 @@ jobs:
restore-keys:
0_${{ steps.set_cache.outputs.test_windows_skip_cache_key }}

- name: Check skip cache for Test (Python 3.7)
uses: actions/cache@v3
with:
path: .skip_cache_test_python_37
key: 0_check_${{ steps.set_cache.outputs.test_python_37_skip_cache_key }}_${{ github.run_id }}
restore-keys:
0_${{ steps.set_cache.outputs.test_python_37_skip_cache_key }}

- name: Check skip cache for Test (Python 3.8)
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -144,7 +135,6 @@ jobs:
job_cache_extra_deps=(); job_id=test_linux; job_name='Test (Linux)'; job_needs=(); job_os=Linux; job_platform=ubuntu-22.04; job_python=3.9; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_linux_py-3.9_ubuntu-22.04; job_skip_cache_path=.skip_cache_test_linux; job_skiplists=(job_test os_linux); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant=Linux; analyze_set_job_skip_job
job_cache_extra_deps=(osx/deps.sh); job_id=test_macos; job_name='Test (macOS)'; job_needs=(); job_os=macOS; job_platform=macos-12; job_python=3.9; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_macos_py-3.9_macos-12; job_skip_cache_path=.skip_cache_test_macos; job_skiplists=(job_test os_macos); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant=macOS; analyze_set_job_skip_job
job_cache_extra_deps=(); job_id=test_windows; job_name='Test (Windows)'; job_needs=(); job_os=Windows; job_platform=windows-2022; job_python=3.9; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_windows_py-3.9_windows-2022; job_skip_cache_path=.skip_cache_test_windows; job_skiplists=(job_test os_windows); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant=Windows; analyze_set_job_skip_job
job_cache_extra_deps=(); job_id=test_python_37; job_name='Test (Python 3.7)'; job_needs=(); job_os=Linux; job_platform=ubuntu-latest; job_python=3.7; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_python_37_py-3.7_ubuntu-latest; job_skip_cache_path=.skip_cache_test_python_37; job_skiplists=(job_test os_linux os_macos os_windows); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant='Python 3.7'; analyze_set_job_skip_job
job_cache_extra_deps=(); job_id=test_python_38; job_name='Test (Python 3.8)'; job_needs=(); job_os=Linux; job_platform=ubuntu-latest; job_python=3.8; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_python_38_py-3.8_ubuntu-latest; job_skip_cache_path=.skip_cache_test_python_38; job_skiplists=(job_test os_linux os_macos os_windows); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant='Python 3.8'; analyze_set_job_skip_job
job_cache_extra_deps=(); job_id=test_python_310; job_name='Test (Python 3.10)'; job_needs=(); job_os=Linux; job_platform=ubuntu-latest; job_python=3.10; job_reqs=(reqs/dist.txt reqs/test.txt); job_skip_cache_name=skip_test_python_310_py-3.10_ubuntu-latest; job_skip_cache_path=.skip_cache_test_python_310; job_skiplists=(job_test os_linux os_macos os_windows); job_test_args='-p no:pytest-qt --ignore=test/gui_qt'; job_type=test; job_variant='Python 3.10'; analyze_set_job_skip_job
job_cache_extra_deps=(); job_id=test_qt_gui; job_name='Test (Qt GUI)'; job_needs=(); job_os=Linux; job_platform=ubuntu-22.04; job_python=3.9; job_reqs=(reqs/dist.txt reqs/dist_extra_gui_qt.txt reqs/test.txt); job_skip_cache_name=skip_test_qt_gui_py-3.9_ubuntu-22.04; job_skip_cache_path=.skip_cache_test_qt_gui; job_skiplists=(job_test_gui_qt); job_test_args=test/gui_qt; job_type=test_gui_qt; job_variant='Qt GUI'; analyze_set_job_skip_job
Expand All @@ -162,8 +152,6 @@ jobs:
test_macos_skip_cache_key: ${{ steps.set_cache.outputs.test_macos_skip_cache_key }}
test_windows_skip_job: ${{ steps.set_ouputs.outputs.test_windows_skip_job }}
test_windows_skip_cache_key: ${{ steps.set_cache.outputs.test_windows_skip_cache_key }}
test_python_37_skip_job: ${{ steps.set_ouputs.outputs.test_python_37_skip_job }}
test_python_37_skip_cache_key: ${{ steps.set_cache.outputs.test_python_37_skip_cache_key }}
test_python_38_skip_job: ${{ steps.set_ouputs.outputs.test_python_38_skip_job }}
test_python_38_skip_cache_key: ${{ steps.set_cache.outputs.test_python_38_skip_cache_key }}
test_python_310_skip_job: ${{ steps.set_ouputs.outputs.test_python_310_skip_job }}
Expand Down Expand Up @@ -353,62 +341,6 @@ jobs:
run: list_cache
# }}}

# Job: Test (Python 3.7) {{{
test_python_37:

name: Test (Python 3.7)
runs-on: ubuntu-latest
needs: [analyze, ]
if: >-
!cancelled()
&& needs.analyze.outputs.test_python_37_skip_job == 'no'
steps:

- name: Checkout
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.7'

- name: Set cache name
id: set_cache
run: setup_cache_name '3.7' 'ubuntu-latest'

- name: Setup cache
uses: actions/cache@v3
with:
path: .cache
key: 0_${{ steps.set_cache.outputs.cache_name }}_${{ hashFiles('reqs/constraints.txt', 'reqs/dist.txt', 'reqs/test.txt') }}

- name: Setup pip options
run: setup_pip_options

- name: Setup Python environment
run: setup_python_env -c reqs/constraints.txt -r reqs/dist.txt -r reqs/test.txt
# Test {{{

- name: Run tests
run: run_tests -p no:pytest-qt --ignore=test/gui_qt


# }}}

- name: Update skip cache 1
uses: actions/cache@v3
with:
path: .skip_cache_test_python_37
key: 0_${{ needs.analyze.outputs.test_python_37_skip_cache_key }}

- name: Update skip cache 2
run: run_eval "echo 'https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID' >'.skip_cache_test_python_37'"

- name: List cache contents
run: list_cache
# }}}

# Job: Test (Python 3.8) {{{
test_python_38:

Expand Down Expand Up @@ -904,13 +836,12 @@ jobs:
name: Release
environment: release
runs-on: ubuntu-latest
needs: [analyze, test_linux, test_macos, test_windows, test_python_37, test_python_38, test_python_310, test_qt_gui, test_packaging, build_linux, build_macos, build_windows]
needs: [analyze, test_linux, test_macos, test_windows, test_python_38, test_python_310, test_qt_gui, test_packaging, build_linux, build_macos, build_windows]
if: >-
!cancelled()
&& needs.test_linux.result == 'success'
&& needs.test_macos.result == 'success'
&& needs.test_windows.result == 'success'
&& needs.test_python_37.result == 'success'
&& needs.test_python_38.result == 'success'
&& needs.test_python_310.result == 'success'
&& needs.test_qt_gui.result == 'success'
Expand Down
50 changes: 23 additions & 27 deletions .github/workflows/ci/workflow_context.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ skippy_enabled: true
vars:
- &dist_linux
variant: Linux
python: '3.9'
python: "3.9"
os: Linux
platform: ubuntu-22.04

- &dist_macos
variant: macOS
python: '3.9'
python: "3.9"
os: macOS
platform: macos-12

- &dist_win
variant: Windows
python: '3.9'
python: "3.9"
os: Windows
platform: windows-2022

Expand All @@ -32,67 +32,63 @@ vars:
platform: ubuntu-latest

jobs:

# Platform tests.
- &test
<<: *dist_linux
type: test
reqs: ['dist', 'test']
skiplists: ['job_test', 'os_linux']
reqs: ["dist", "test"]
skiplists: ["job_test", "os_linux"]
test_args: -p no:pytest-qt --ignore=test/gui_qt
- <<: *test
<<: *dist_macos
cache_extra_deps: ['osx/deps.sh']
skiplists: ['job_test', 'os_macos']
cache_extra_deps: ["osx/deps.sh"]
skiplists: ["job_test", "os_macos"]
- <<: *test
<<: *dist_win
skiplists: ['job_test', 'os_windows']
skiplists: ["job_test", "os_windows"]

# Python tests.
- &python_test
<<: *test
<<: *dist_other
variant: Python 3.7
python: '3.7'
skiplists: ['job_test', 'os_linux', 'os_macos', 'os_windows']
- <<: *python_test
variant: Python 3.8
python: '3.8'
python: "3.8"
skiplists: ["job_test", "os_linux", "os_macos", "os_windows"]
- <<: *python_test
variant: Python 3.10
python: '3.10'
python: "3.10"

# Qt GUI tests.
- <<: *test
type: test_gui_qt
variant: Qt GUI
reqs: ['dist', 'dist_extra_gui_qt', 'test']
skiplists: ['job_test_gui_qt']
reqs: ["dist", "dist_extra_gui_qt", "test"]
skiplists: ["job_test_gui_qt"]
test_args: test/gui_qt

# Packaging tests.
- <<: *dist_other
type: test_packaging
variant: Packaging
python: '3.9'
reqs: ['packaging', 'setup']
skiplists: ['job_test_packaging']
python: "3.9"
reqs: ["packaging", "setup"]
skiplists: ["job_test_packaging"]

# Platform builds.
- &build
<<: *dist_linux
type: build
needs: [test_linux]
reqs: ['build', 'setup']
cache_extra_deps: ['reqs/dist_*.txt', 'linux/appimage/deps.sh']
skiplists: ['job_build', 'os_linux']
reqs: ["build", "setup"]
cache_extra_deps: ["reqs/dist_*.txt", "linux/appimage/deps.sh"]
skiplists: ["job_build", "os_linux"]
- <<: *build
<<: *dist_macos
needs: [test_macos]
cache_extra_deps: ['reqs/dist_*.txt', 'osx/deps.sh']
skiplists: ['job_build', 'os_macos']
cache_extra_deps: ["reqs/dist_*.txt", "osx/deps.sh"]
skiplists: ["job_build", "os_macos"]
- <<: *build
<<: *dist_win
needs: [test_windows]
cache_extra_deps: ['reqs/dist_*.txt', 'windows/dist_deps.sh']
skiplists: ['job_build', 'os_windows']
cache_extra_deps: ["reqs/dist_*.txt", "windows/dist_deps.sh"]
skiplists: ["job_build", "os_windows"]
17 changes: 8 additions & 9 deletions doc/developer_guide.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Environment setup

You need Python >= 3.7 installed, and you need [tox](https://pypi.org/project/tox/) >= 4.0.
You need Python >= 3.8 installed, and you need [tox](https://pypi.org/project/tox/) >= 4.0.

Using tox takes care of all the details of creating and managing an isolated
virtual environment, installing the necessary dependencies, and isolating
Expand All @@ -10,12 +10,13 @@ The command for using tox is: `tox r {-e envlist} {-- arguments}`. Use `tox -a
-v` to get a list of available environments.

The same virtual environment is reused by the following tox environments:

- `tox r -e test -- ARGS`: run the testsuite. This is the default environment
when not provided.
- `tox r -e launch -- ARGS`: run Plover from source.
- `tox r -e setup -- COMMAND`: run `./setup.py COMMAND`.
- `tox r -e packaging_checks`: run the same packaging checks as the CI (add `--
-n` to see a dry-run of the exact checks).
-n` to see a dry-run of the exact checks).
- `tox r -e plugins_install`: install the distribution plugins (or the specified
plugins when run with `tox -e plugins_install -- REQS`). Note that this does
not use the plugins manager for installing.
Expand All @@ -30,11 +31,10 @@ The actual virtual environment lives in `.tox/dev`, and can be ["activated" like
any other virtual environment](https://virtualenv.pypa.io/en/latest/user_guide.html#activators).

The configuration also provides support for lightweight tests only environment:
`pyX`, where `X` is the version of the Python interpreter to use. E.g. running
`pyX`, where `X` is the version of the Python interpreter to use. E.g. running
`tox r -e 'py3,py36,py37,py38,py39` will execute the testsuite for each version of Python we
support.


# Creating a binary distribution

A number of commands are provided by `setup.py` for creating binary
Expand All @@ -47,7 +47,6 @@ distributions (which include all the necessary dependencies):

Use `bdist_xxx --help` to get more information on each command supported options.


# Making a pull request

When making a pull request, please include a short summary of the changes
Expand All @@ -63,7 +62,7 @@ description of the substantive changes in the PR.
They should be named `<section>/<pr_number>.<category>.md`, where the sections
/ categories are:

* `feature`: New features:
- `feature`: New features:

- `core`: Core changes.
- `dict`: Updates to the default dictionaries.
Expand All @@ -72,9 +71,9 @@ They should be named `<section>/<pr_number>.<category>.md`, where the sections
- `osx`: macOS specific changes.
- `windows`: Windows specific changes.

* `bugfix`: For bugfixes, support the same categories as for `feature`.
- `bugfix`: For bugfixes, support the same categories as for `feature`.

* `api`: For documenting changes to the public/plugins API:
- `api`: For documenting changes to the public/plugins API:

- `break`: For breaking (backward incompatible) changes.
- `dnr`: For deprecations of an existing feature or behavior.
Expand All @@ -86,7 +85,7 @@ case two fragments should be added. It is not necessary to make a separate
documentation fragment for documentation changes accompanying the relevant
code changes. See the following for an example news fragment:

``` bash
```bash
$ cat news.d/bugfix/1041.ui.md
Fix possible crash when changing machine parameters in the configuration dialog.
```
1 change: 1 addition & 0 deletions news.d/api/1634.break.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dropped support for Python 3.7.
1 change: 0 additions & 1 deletion reqs/test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
mock>=3.0.0; python_version <= "3.7"
pytest
pytest-qt

Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ maintainer = Ted Morin
maintainer_email = [email protected]
classifiers =
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Expand All @@ -32,7 +31,7 @@ project_urls =

[options]
include_package_data = True
python_requires = >=3.7
python_requires = >=3.8
zip_safe = True
packages =
plover
Expand Down

0 comments on commit 6949a2a

Please sign in to comment.