Skip to content

Commit

Permalink
Drop Python 3.6, default to running on 3.10
Browse files Browse the repository at this point in the history
Python 3.6 is well beyond end-of-life (December 2021). While 3.7
is still supported, it doesn't have long left (mid 2023). We should
therefore still support using it, but there's no compelling reason
to default to it.
  • Loading branch information
PeterJCLaw committed Sep 24, 2022
1 parent a1b114d commit 2a3d355
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 29 deletions.
38 changes: 11 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ references:
PG_DB: routemaster
PG_USER: routemaster
PG_PASS: routemaster
TOXENV: py36
TOXENV: py37
COVERALLS: true

# Set up a cached virtualenv in which to install our CI dependencies
Expand Down Expand Up @@ -70,15 +70,15 @@ references:
done
- restore_cache:
name: Restore .tox cache
key: deps-tox-{{ .Branch }}-{{ .Environment.CIRCLE_STAGE }}-{{ checksum ".checksum" }}
key: deps-tox-1-{{ .Branch }}-{{ .Environment.CIRCLE_STAGE }}-{{ checksum ".checksum" }}
- run:
name: Test
command: |
. venv/bin/activate
tox
- save_cache:
name: Save .tox cache
key: deps-tox-{{ .Branch }}-{{ .Environment.CIRCLE_STAGE }}-{{ checksum ".checksum" }}
key: deps-tox-1-{{ .Branch }}-{{ .Environment.CIRCLE_STAGE }}-{{ checksum ".checksum" }}
paths:
- ".tox"

Expand All @@ -96,17 +96,6 @@ references:
coveralls
jobs:
test-36:
<<: *test-template
docker:
- image: cimg/python:3.6
environment:
<<: *steps-environment
TOXENV: py36
COVERALLS: true

- *postgres-container

test-37:
<<: *test-template
docker:
Expand Down Expand Up @@ -147,14 +136,14 @@ jobs:
environment:
<<: *steps-environment
TOXENV: py310
COVERALLS: false
COVERALLS: true

- *postgres-container

lint:
working_directory: ~/routemaster
docker:
- image: cimg/python:3.6
- image: cimg/python:3.7
steps:
- checkout

Expand All @@ -164,15 +153,15 @@ jobs:

- restore_cache:
name: Restore .tox cache
key: deps-tox-{{ checksum "scripts/linting/requirements.txt" }}
key: deps-tox-1-{{ checksum "scripts/linting/requirements.txt" }}
- run:
name: Lint
command: |
. venv/bin/activate
TOXENV=lint tox
- save_cache:
name: Save .tox cache
key: deps-tox-{{ checksum "scripts/linting/requirements.txt" }}
key: deps-tox-1-{{ checksum "scripts/linting/requirements.txt" }}
paths:
- ".tox"
- store_test_results:
Expand All @@ -181,7 +170,7 @@ jobs:
typecheck:
working_directory: ~/routemaster
docker:
- image: cimg/python:3.6
- image: cimg/python:3.7
steps:
- checkout

Expand All @@ -191,15 +180,15 @@ jobs:

- restore_cache:
name: Restore .tox cache
key: deps-tox-{{ checksum "scripts/typechecking/requirements.txt" }}
key: deps-tox-1-{{ checksum "scripts/typechecking/requirements.txt" }}
- run:
name: Typecheck
command: |
. venv/bin/activate
TOXENV=mypy tox
- save_cache:
name: Save .tox cache
key: deps-tox-{{ checksum "scripts/typechecking/requirements.txt" }}
key: deps-tox-1-{{ checksum "scripts/typechecking/requirements.txt" }}
paths:
- ".tox"
- store_test_results:
Expand All @@ -208,7 +197,7 @@ jobs:
release:
working_directory: ~/routemaster
docker:
- image: cimg/python:3.6
- image: cimg/python:3.7
steps:
- checkout

Expand Down Expand Up @@ -275,10 +264,6 @@ workflows:
version: 2
build-release:
jobs:
- test-36:
filters:
tags:
only: /.*/
- test-37:
filters:
tags:
Expand All @@ -305,7 +290,6 @@ workflows:
only: /.*/
- release:
requires:
- test-36
- test-37
- test-38
- test-39
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.6-stretch
FROM python:3.10-bullseye

ENV PYTHONUNBUFFERED 1

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py36,py37,py38,py39,py310,mypy,lint
envlist = py37,py38,py39,py310,mypy,lint

[testenv]
deps =
Expand Down

0 comments on commit 2a3d355

Please sign in to comment.