Skip to content

Commit

Permalink
feat!: Update cookiecutters to Python 3.12
Browse files Browse the repository at this point in the history
Even thought we were previously running tests on python 3.11, the
cookiecutters themselves were not updated to run on 3.11.  So they
failed when 3.8 was not available on the host system.

Update everything to run on python 3.12 including the defaults for the
cookiecut repos so that any new systems are creted with the latest
version of python we support as a community.
  • Loading branch information
feanil committed Sep 18, 2024
1 parent 46948ba commit 995f7ab
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 18 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ jobs:
matrix:
os: [ubuntu-20.04]
python-version:
- '3.8'
- '3.11'
- '3.12'
toxenv: [py, quality]

steps:
Expand Down Expand Up @@ -53,8 +52,7 @@ jobs:
matrix:
os: [ubuntu-20.04]
python-version:
- '3.8'
- '3.11'
- '3.12'
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ test: ## run tests on every supported Python version
tox

validate: ## run tests and quality checks
tox -e quality,py38
tox -e quality,py
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Using the cookiecutters
cd edx-cookiecutters
# Set up a virtualenv using virtualenvwrapper with the same name as the repo and activate it
mkvirtualenv -p python3.8 edx-cookiecutters
mkvirtualenv -p python3.12 edx-cookiecutters
2. Create a cookiecutter Repository
===================================
Expand Down Expand Up @@ -77,7 +77,7 @@ Directions for contributing to this repository
cd edx-cookiecutters
# Set up a virtualenv using virtualenvwrapper with the same name as the repo and activate it
mkvirtualenv -p python3.8 edx-cookiecutters
mkvirtualenv -p python3.12 edx-cookiecutters
# Activate the virtualenv
workon edx-cookiecutters
Expand Down
5 changes: 2 additions & 3 deletions cookiecutter-django-app/{{cookiecutter.repo_name}}/tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-django{32,40}
envlist = py312-django{42}

[doc8]
; D001 = Line too long
Expand Down Expand Up @@ -36,8 +36,7 @@ norecursedirs = .* docs requirements site-packages

[testenv]
deps =
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
django42: Django>=4.0,<5.0
-r{toxinidir}/requirements/test.txt
commands =
python manage.py check
Expand Down
5 changes: 2 additions & 3 deletions cookiecutter-django-ida/{{cookiecutter.repo_name}}/tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-django{32,40}, quality, docs, pii_check
envlist = py312-django{42}, quality, docs, pii_check
skipsdist = true

[doc8]
Expand Down Expand Up @@ -43,8 +43,7 @@ filterwarnings =

[testenv]
deps =
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
django42: Django>=4.0,<5.0
-r{toxinidir}/requirements/test.txt
commands =
pytest {posargs}
Expand Down
5 changes: 2 additions & 3 deletions cookiecutter-xblock/{{cookiecutter.repo_name}}/tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-django{32,40}, quality, docs
envlist = py312-django{42}, quality, docs
skipsdist = true

[doc8]
Expand Down Expand Up @@ -37,8 +37,7 @@ norecursedirs = .* docs requirements site-packages

[testenv]
deps =
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
django42: Django>=4.0,<5.0
-r{toxinidir}/requirements/test.txt
allowlist_externals =
mkdir
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{38}
envlist = py{312}

[doc8]
; D001 = Line too long
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 = py{38,311,312}
envlist = py{312}
skipsdist = true

[isort]
Expand Down

0 comments on commit 995f7ab

Please sign in to comment.