Skip to content

Commit

Permalink
⬆️(backend) upgrade to python 3.11
Browse files Browse the repository at this point in the history
The application was running in python 3.10, it was about time to upgrade it
into python 3.11. In this upgrade, we have upgraded  the cookiecutter
folder the version of python to 3.11 too.
  • Loading branch information
jonathanreveille committed May 16, 2024
1 parent 4035b01 commit 3a992ff
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 20 deletions.
24 changes: 12 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
# Check that the git history is clean and complies with our expectations
lint-git:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
auth:
username: $DOCKER_USER
password: $DOCKER_PASS
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
# Build backend development environment
build-back:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
auth:
username: $DOCKER_USER
password: $DOCKER_PASS
Expand All @@ -177,7 +177,7 @@ jobs:
# Build backend translations
build-back-i18n:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
auth:
username: $DOCKER_USER
password: $DOCKER_PASS
Expand All @@ -203,7 +203,7 @@ jobs:

lint-back:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
auth:
username: $DOCKER_USER
password: $DOCKER_PASS
Expand Down Expand Up @@ -248,7 +248,7 @@ jobs:

test-back-mysql-8:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
auth:
username: $DOCKER_USER
password: $DOCKER_PASS
Expand Down Expand Up @@ -341,7 +341,7 @@ jobs:
test-back-postgresql:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
auth:
username: $DOCKER_USER
password: $DOCKER_PASS
Expand Down Expand Up @@ -422,7 +422,7 @@ jobs:
test-back-postgresql-es6:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
auth:
username: $DOCKER_USER
password: $DOCKER_PASS
Expand Down Expand Up @@ -504,7 +504,7 @@ jobs:
# ---- Packaging jobs ----
check-versions:
docker:
- image: cimg/python:3.10-node
- image: cimg/python:3.11-node
auth:
username: $DOCKER_USER
password: $DOCKER_PASS
Expand Down Expand Up @@ -549,7 +549,7 @@ jobs:
package-back:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
auth:
username: $DOCKER_USER
password: $DOCKER_PASS
Expand Down Expand Up @@ -580,7 +580,7 @@ jobs:
# environment variables in CircleCI UI (with your PyPI credentials)
pypi:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
auth:
username: $DOCKER_USER
password: $DOCKER_PASS
Expand Down Expand Up @@ -707,7 +707,7 @@ jobs:
cookiecutter-bootstrap:
docker:
- image: cimg/python:3.10-node
- image: cimg/python:3.11-node
auth:
username: $DOCKER_USER
password: $DOCKER_PASS
Expand Down Expand Up @@ -831,7 +831,7 @@ jobs:
# environment variables in CircleCI UI (with your PyPI credentials)
npm:
docker:
- image: cimg/python:3.10-node
- image: cimg/python:3.11-node
auth:
username: $DOCKER_USER
password: $DOCKER_PASS
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Versioning](https://semver.org/spec/v2.0.0.html).

## Changed

- Upgrade to Python 3.11
- Upgrade to Django version 4.2 (pin version < 5)
- Migrate to Sentry SDK 2.0

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#

# ---- Base image to inherit from ----
FROM python:3.10-buster as base
FROM python:3.11-bookworm as base

# ---- Front-end builder image ----
FROM node:20.11 as front-builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-back:
site:
type: string
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
working_directory: ~/fun/sites/<< parameters.site >>
steps:
- checkout:
Expand All @@ -30,7 +30,7 @@ lint-back:
site:
type: string
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
working_directory: ~/fun/sites/<< parameters.site >>/src/backend/
steps:
- checkout:
Expand Down Expand Up @@ -62,7 +62,7 @@ test-back:
site:
type: string
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
environment:
DJANGO_SETTINGS_MODULE: << parameters.site >>.settings
PYTHONPATH: /home/circleci/fun/src/backend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Check that the git history is clean and complies with our expectations
lint-git:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
working_directory: ~/fun
steps:
- checkout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG SITE
ARG DOCKER_USER=10000

# ---- base image to inherit from ----
FROM python:3.10-buster as base
FROM python:3.11-bookworm as base

# ---- front-end builder image ----
FROM node:20.11 as front-builder
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10"
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
requires-python = ">=3.8"
dependencies = [
"arrow",
"Django<5",
Expand Down
2 changes: 1 addition & 1 deletion tests/apps/search/test_indexers_courses.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ def test_indexers_courses_get_es_document_no_image_icon_picture(self):
course_icons_placeholder,
CategoryPlugin,
"en",
**{"page": category.extended_object}
**{"page": category.extended_object},
)
course.extended_object.publish("en")
# Make sure we associate an image-less picture with the category through
Expand Down

0 comments on commit 3a992ff

Please sign in to comment.