Skip to content

Commit

Permalink
feat!: Python 3.11 Upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
UsamaSadiq committed Sep 9, 2024
1 parent 5624d7f commit f838857
Show file tree
Hide file tree
Showing 16 changed files with 166 additions and 139 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ jobs:
os:
- ubuntu-20.04
python-version:
<<<<<<< Updated upstream
- 3.8
=======
- 3.11
>>>>>>> Stashed changes
targets: [ 'quality','main.test','docs' ]

steps:
Expand All @@ -40,7 +44,11 @@ jobs:
&& export TOXENV=django42 && make test.requirements tox.requirements ${{ matrix.targets }}"

- name: Run Coverage
<<<<<<< Updated upstream
if: matrix.python-version == '3.8' && matrix.targets=='main.test'
=======
if: matrix.python-version == '3.11' && matrix.targets=='main.test'
>>>>>>> Stashed changes
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
4 changes: 4 additions & 0 deletions .github/workflows/mysql8-migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ jobs:
strategy:
matrix:
os: [ ubuntu-20.04 ]
<<<<<<< Updated upstream
python-version: [ 3.8 ]
=======
python-version: [ 3.11 ]
>>>>>>> Stashed changes

steps:
- name: Checkout repo
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/upgrade-python-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
# team_reviewers: ""
email_address: "[email protected]"
send_success_notification: true
<<<<<<< Updated upstream
=======
python_version: 3.11
>>>>>>> Stashed changes
secrets:
requirements_bot_github_token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }}
requirements_bot_github_email: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }}
Expand Down
25 changes: 23 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,24 @@ FROM ubuntu:focal as base

# System requirements.

<<<<<<< Updated upstream
=======
# ENV variables for Python 3.11 support
ARG PYTHON_VERSION=3.11
ENV TZ=UTC
ENV TERM=xterm-256color
ENV DEBIAN_FRONTEND=noninteractive

# software-properties-common is needed to setup Python 3.12 env
RUN apt-get update && \
apt-get install -y software-properties-common && \
apt-add-repository -y ppa:deadsnakes/ppa

>>>>>>> Stashed changes
# pkg-config; mysqlclient>=2.2.0 requires pkg-config (https://github.com/PyMySQL/mysqlclient/issues/620)

RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt-get install -qy \
RUN apt-get update && \
apt-get install -qy \
curl \
vim \
language-pack-en \
Expand All @@ -18,6 +32,13 @@ RUN apt update && \
libssl-dev && \
rm -rf /var/lib/apt/lists/*

<<<<<<< Updated upstream
=======
# need to use virtualenv pypi package with Python 3.12
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION}
RUN pip install virtualenv

>>>>>>> Stashed changes
# Use UTF-8.
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
Expand Down
40 changes: 18 additions & 22 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#
<<<<<<< Updated upstream
# This file is autogenerated by pip-compile with Python 3.8
=======
# This file is autogenerated by pip-compile with Python 3.11
>>>>>>> Stashed changes
# by the following command:
#
# make upgrade
Expand All @@ -15,15 +19,15 @@ backports-zoneinfo==0.2.1
# djangorestframework
boto==2.49.0
# via -r requirements/base.in
boto3==1.35.8
boto3==1.35.14
# via -r requirements/base.in
botocore==1.35.8
botocore==1.35.14
# via
# boto3
# s3transfer
certifi==2024.7.4
certifi==2024.8.30
# via requests
cffi==1.17.0
cffi==1.17.1
# via
# cryptography
# pynacl
Expand All @@ -35,11 +39,11 @@ coreapi==2.3.3
# via -r requirements/base.in
coreschema==0.0.4
# via coreapi
cryptography==43.0.0
cryptography==43.0.1
# via
# django-fernet-fields-v2
# pyjwt
django==4.2.15
django==4.2.16
# via
# -c requirements/constraints.txt
# -r requirements/base.in
Expand Down Expand Up @@ -71,7 +75,7 @@ django-fernet-fields-v2==0.9
# via edx-enterprise-data
django-filter==24.3
# via edx-enterprise-data
django-model-utils==4.5.1
django-model-utils==5.0.0
# via
# edx-enterprise-data
# edx-rbac
Expand Down Expand Up @@ -113,35 +117,33 @@ edx-django-utils==5.15.0
# edx-drf-extensions
# edx-enterprise-data
# edx-rest-api-client
edx-drf-extensions==10.3.0
edx-drf-extensions==10.4.0
# via
# -r requirements/base.in
# edx-enterprise-data
# edx-rbac
edx-enterprise-data==8.11.0
edx-enterprise-data==8.11.1
# via -r requirements/base.in
edx-opaque-keys==2.10.0
edx-opaque-keys==2.11.0
# via
# -r requirements/base.in
# edx-ccx-keys
# edx-drf-extensions
# edx-enterprise-data
edx-rbac==1.10.0
# via edx-enterprise-data
edx-rest-api-client==5.7.1
edx-rest-api-client==6.0.0
# via
# -r requirements/base.in
# edx-enterprise-data
factory-boy==3.3.1
# via edx-enterprise-data
faker==28.0.0
faker==28.4.1
# via factory-boy
html5lib==1.1
# via -r requirements/base.in
idna==3.8
# via requests
importlib-metadata==8.4.0
# via markdown
inflection==0.5.1
# via drf-yasg
itypes==1.2.0
Expand Down Expand Up @@ -208,8 +210,7 @@ requests==2.32.3
# edx-drf-extensions
# edx-enterprise-data
# edx-rest-api-client
# slumber
rules==3.4
rules==3.5
# via edx-enterprise-data
s3transfer==0.10.2
# via boto3
Expand All @@ -222,8 +223,6 @@ six==1.16.0
# edx-rbac
# html5lib
# python-dateutil
slumber==0.7.1
# via edx-rest-api-client
sqlparse==0.5.1
# via django
stevedore==5.3.0
Expand All @@ -243,16 +242,13 @@ uritemplate==4.1.1
# via
# coreapi
# drf-yasg
urllib3==1.26.19
urllib3==2.2.2
# via
# -c requirements/constraints.txt
# -r requirements/base.in
# botocore
# requests
webencodings==0.5.1
# via html5lib
zipp==3.20.1
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# setuptools
4 changes: 4 additions & 0 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#
<<<<<<< Updated upstream
# This file is autogenerated by pip-compile with Python 3.8
=======
# This file is autogenerated by pip-compile with Python 3.11
>>>>>>> Stashed changes
# by the following command:
#
# make upgrade
Expand Down
5 changes: 5 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,10 @@ elasticsearch-dsl>=7.2.1,<8.0.0
pylint==2.4.4
pylint-django==2.0.11

<<<<<<< Updated upstream
# botocore 1.34.144 depends on urllib3<1.27 and >=1.25.4; python_version < "3.10"
urllib3<2.0.0
=======
# path>16.14.0 has removed the deprecated abspath function, which is breaking the docs build
path<16.15.0
>>>>>>> Stashed changes
38 changes: 17 additions & 21 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#
<<<<<<< Updated upstream
# This file is autogenerated by pip-compile with Python 3.8
=======
# This file is autogenerated by pip-compile with Python 3.11
>>>>>>> Stashed changes
# by the following command:
#
# make upgrade
Expand All @@ -15,15 +19,15 @@ backports-zoneinfo==0.2.1
# djangorestframework
boto==2.49.0
# via -r requirements/base.in
boto3==1.35.8
boto3==1.35.14
# via -r requirements/base.in
botocore==1.35.8
botocore==1.35.14
# via
# boto3
# s3transfer
certifi==2024.7.4
certifi==2024.8.30
# via requests
cffi==1.17.0
cffi==1.17.1
# via
# cryptography
# pynacl
Expand All @@ -35,11 +39,11 @@ coreapi==2.3.3
# via -r requirements/base.in
coreschema==0.0.4
# via coreapi
cryptography==43.0.0
cryptography==43.0.1
# via
# django-fernet-fields-v2
# pyjwt
django==4.2.15
django==4.2.16
# via
# -c requirements/constraints.txt
# -r requirements/base.in
Expand Down Expand Up @@ -71,7 +75,7 @@ django-fernet-fields-v2==0.9
# via edx-enterprise-data
django-filter==24.3
# via edx-enterprise-data
django-model-utils==4.5.1
django-model-utils==5.0.0
# via
# edx-enterprise-data
# edx-rbac
Expand Down Expand Up @@ -113,35 +117,33 @@ edx-django-utils==5.15.0
# edx-drf-extensions
# edx-enterprise-data
# edx-rest-api-client
edx-drf-extensions==10.3.0
edx-drf-extensions==10.4.0
# via
# -r requirements/base.in
# edx-enterprise-data
# edx-rbac
edx-enterprise-data==8.11.1
# via -r requirements/base.in
edx-opaque-keys==2.10.0
edx-opaque-keys==2.11.0
# via
# -r requirements/base.in
# edx-ccx-keys
# edx-drf-extensions
# edx-enterprise-data
edx-rbac==1.10.0
# via edx-enterprise-data
edx-rest-api-client==5.7.1
edx-rest-api-client==6.0.0
# via
# -r requirements/base.in
# edx-enterprise-data
factory-boy==3.3.1
# via edx-enterprise-data
faker==28.0.0
faker==28.4.1
# via factory-boy
html5lib==1.1
# via -r requirements/base.in
idna==3.8
# via requests
importlib-metadata==8.4.0
# via markdown
inflection==0.5.1
# via drf-yasg
itypes==1.2.0
Expand Down Expand Up @@ -210,8 +212,7 @@ requests==2.32.3
# edx-drf-extensions
# edx-enterprise-data
# edx-rest-api-client
# slumber
rules==3.4
rules==3.5
# via edx-enterprise-data
s3transfer==0.10.2
# via boto3
Expand All @@ -224,8 +225,6 @@ six==1.16.0
# edx-rbac
# html5lib
# python-dateutil
slumber==0.7.1
# via edx-rest-api-client
sqlparse==0.5.1
# via django
stevedore==5.3.0
Expand All @@ -245,16 +244,13 @@ uritemplate==4.1.1
# via
# coreapi
# drf-yasg
urllib3==1.26.19
urllib3==2.2.2
# via
# -c requirements/constraints.txt
# -r requirements/base.in
# botocore
# requests
webencodings==0.5.1
# via html5lib
zipp==3.20.1
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# setuptools
2 changes: 1 addition & 1 deletion requirements/django.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
django==4.2.15
django==4.2.16
Loading

0 comments on commit f838857

Please sign in to comment.