From 534f21e562602a7dd34871a2c958d3b6bbc839ee Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Fri, 25 Oct 2024 17:50:01 +0500 Subject: [PATCH] feat!: Python 3.12 Upgrade --- .github/workflows/ci.yml | 6 +-- .github/workflows/mysql8-migrations.yml | 4 +- .../workflows/upgrade-python-requirements.yml | 2 +- .readthedocs.yaml | 4 +- Dockerfile | 4 +- requirements/base.txt | 35 ++++++++-------- requirements/ci.txt | 2 +- requirements/constraints.txt | 6 --- requirements/dev.txt | 37 ++++++++--------- requirements/doc.txt | 38 ++++++++--------- requirements/pip.txt | 4 +- requirements/pip_tools.txt | 2 +- requirements/production.txt | 41 +++++++++---------- requirements/test.txt | 37 ++++++++--------- requirements/tox.txt | 6 +-- tox.ini | 2 +- 16 files changed, 104 insertions(+), 126 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d607151..c4143787 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,9 +15,9 @@ jobs: strategy: matrix: os: - - ubuntu-20.04 + - ubuntu-22.04 python-version: - - 3.11 + - 3.12 targets: [ 'quality','main.test','docs' ] steps: @@ -40,7 +40,7 @@ jobs: && export TOXENV=django42 && make test.requirements tox.requirements ${{ matrix.targets }}" - name: Run Coverage - if: matrix.python-version == '3.11' && matrix.targets=='main.test' + if: matrix.python-version == '3.12' && matrix.targets=='main.test' uses: codecov/codecov-action@v1 with: fail_ci_if_error: true diff --git a/.github/workflows/mysql8-migrations.yml b/.github/workflows/mysql8-migrations.yml index d8f78c3f..c473b4a2 100644 --- a/.github/workflows/mysql8-migrations.yml +++ b/.github/workflows/mysql8-migrations.yml @@ -13,8 +13,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-20.04 ] - python-version: [ 3.11 ] + os: [ ubuntu-22.04 ] + python-version: [ 3.12 ] steps: - name: Checkout repo diff --git a/.github/workflows/upgrade-python-requirements.yml b/.github/workflows/upgrade-python-requirements.yml index f846ee96..28c1303e 100644 --- a/.github/workflows/upgrade-python-requirements.yml +++ b/.github/workflows/upgrade-python-requirements.yml @@ -15,7 +15,7 @@ jobs: uses: openedx/.github/.github/workflows/upgrade-python-requirements.yml@master with: branch: ${{ github.event.inputs.branch || 'master' }} - python_version: "3.11" + python_version: "3.12" # optional parameters below; fill in if you'd like github or email notifications # user_reviewers: "" # team_reviewers: "" diff --git a/.readthedocs.yaml b/.readthedocs.yaml index c45084fa..a0ebc7c1 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -6,9 +6,9 @@ version: 2 build: - os: "ubuntu-20.04" + os: "ubuntu-22.04" tools: - python: "3.8" + python: "3.12" # Build documentation in the docs/ directory with Sphinx sphinx: diff --git a/Dockerfile b/Dockerfile index 8728e588..df5f76c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ FROM ubuntu:focal as base # System requirements. -# ENV variables for Python 3.11 support -ARG PYTHON_VERSION=3.11 +# ENV variables for Python 3.12 support +ARG PYTHON_VERSION=3.12 ENV TZ=UTC ENV TERM=xterm-256color ENV DEBIAN_FRONTEND=noninteractive diff --git a/requirements/base.txt b/requirements/base.txt index 0c2f0cec..d0b76c33 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -11,9 +11,9 @@ asgiref==3.8.1 # django-countries boto==2.49.0 # via -r requirements/base.in -boto3==1.35.41 +boto3==1.35.48 # via -r requirements/base.in -botocore==1.35.41 +botocore==1.35.48 # via # boto3 # s3transfer @@ -31,7 +31,7 @@ coreapi==2.3.3 # via -r requirements/base.in coreschema==0.0.4 # via coreapi -cryptography==43.0.1 +cryptography==43.0.3 # via # django-fernet-fields-v2 # pyjwt @@ -91,13 +91,11 @@ djangorestframework-csv==3.0.2 # via # -r requirements/base.in # edx-enterprise-data -dnspython==2.6.1 - # via - # -c requirements/constraints.txt - # pymongo +dnspython==2.7.0 + # via pymongo drf-jwt==1.19.2 # via edx-drf-extensions -drf-yasg==1.21.7 +drf-yasg==1.21.8 # via edx-api-doc-tools edx-api-doc-tools==2.0.0 # via -r requirements/base.in @@ -105,18 +103,18 @@ edx-ccx-keys==1.3.0 # via -r requirements/base.in edx-django-release-util==1.4.0 # via -r requirements/base.in -edx-django-utils==6.1.0 +edx-django-utils==7.0.0 # via # -r requirements/base.in # edx-drf-extensions # edx-enterprise-data # edx-rest-api-client -edx-drf-extensions==10.4.0 +edx-drf-extensions==10.5.0 # via # -r requirements/base.in # edx-enterprise-data # edx-rbac -edx-enterprise-data==9.6.0 +edx-enterprise-data==10.0.1 # via -r requirements/base.in edx-opaque-keys==2.11.0 # via @@ -132,7 +130,7 @@ edx-rest-api-client==6.0.0 # edx-enterprise-data factory-boy==3.3.1 # via edx-enterprise-data -faker==30.4.0 +faker==30.8.1 # via factory-boy html5lib==1.1 # via -r requirements/base.in @@ -150,13 +148,13 @@ jmespath==1.0.1 # botocore markdown==3.7 # via -r requirements/base.in -markupsafe==3.0.1 +markupsafe==3.0.2 # via jinja2 mysql-connector-python==9.1.0 # via edx-enterprise-data newrelic==10.2.0 # via edx-django-utils -numpy==1.24.4 +numpy==2.1.2 # via # edx-enterprise-data # pandas @@ -164,11 +162,11 @@ ordered-set==4.1.0 # via -r requirements/base.in packaging==24.1 # via drf-yasg -pandas==2.0.3 +pandas==2.2.3 # via edx-enterprise-data pbr==6.1.0 # via stevedore -psutil==6.0.0 +psutil==6.1.0 # via edx-django-utils pycparser==2.22 # via cffi @@ -236,9 +234,8 @@ uritemplate==4.1.1 # via # coreapi # drf-yasg -urllib3==1.26.20 +urllib3==2.2.3 # via - # -c requirements/constraints.txt # -r requirements/base.in # botocore # requests diff --git a/requirements/ci.txt b/requirements/ci.txt index 1f4abdbc..9ab7f504 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 51c70e6b..440b0005 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -21,11 +21,5 @@ elasticsearch < 7.14.0 # elasticsearch-dsl depends on elasticsearch >=7.8.0,<8.0.0 elasticsearch-dsl>=7.2.1,<8.0.0 -# botocore 1.35.14 has requirement urllib3<1.27,>=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 - -# dnspython 2.7.0 Requires-Python >=3.9 -dnspython<2.7.0 diff --git a/requirements/dev.txt b/requirements/dev.txt index db00882b..6b1a86a2 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -11,9 +11,9 @@ asgiref==3.8.1 # django-countries boto==2.49.0 # via -r requirements/base.in -boto3==1.35.41 +boto3==1.35.48 # via -r requirements/base.in -botocore==1.35.41 +botocore==1.35.48 # via # boto3 # s3transfer @@ -31,7 +31,7 @@ coreapi==2.3.3 # via -r requirements/base.in coreschema==0.0.4 # via coreapi -cryptography==43.0.1 +cryptography==43.0.3 # via # django-fernet-fields-v2 # pyjwt @@ -91,13 +91,11 @@ djangorestframework-csv==3.0.2 # via # -r requirements/base.in # edx-enterprise-data -dnspython==2.6.1 - # via - # -c requirements/constraints.txt - # pymongo +dnspython==2.7.0 + # via pymongo drf-jwt==1.19.2 # via edx-drf-extensions -drf-yasg==1.21.7 +drf-yasg==1.21.8 # via edx-api-doc-tools edx-api-doc-tools==2.0.0 # via -r requirements/base.in @@ -105,18 +103,18 @@ edx-ccx-keys==1.3.0 # via -r requirements/base.in edx-django-release-util==1.4.0 # via -r requirements/base.in -edx-django-utils==6.1.0 +edx-django-utils==7.0.0 # via # -r requirements/base.in # edx-drf-extensions # edx-enterprise-data # edx-rest-api-client -edx-drf-extensions==10.4.0 +edx-drf-extensions==10.5.0 # via # -r requirements/base.in # edx-enterprise-data # edx-rbac -edx-enterprise-data==9.6.0 +edx-enterprise-data==10.0.1 # via -r requirements/base.in edx-opaque-keys==2.11.0 # via @@ -132,7 +130,7 @@ edx-rest-api-client==6.0.0 # edx-enterprise-data factory-boy==3.3.1 # via edx-enterprise-data -faker==30.4.0 +faker==30.8.1 # via factory-boy html5lib==1.1 # via -r requirements/base.in @@ -150,15 +148,15 @@ jmespath==1.0.1 # botocore markdown==3.7 # via -r requirements/base.in -markupsafe==3.0.1 +markupsafe==3.0.2 # via jinja2 mysql-connector-python==9.1.0 # via edx-enterprise-data -mysqlclient==2.2.4 +mysqlclient==2.2.5 # via -r requirements/dev.in newrelic==10.2.0 # via edx-django-utils -numpy==1.24.4 +numpy==2.1.2 # via # edx-enterprise-data # pandas @@ -166,11 +164,11 @@ ordered-set==4.1.0 # via -r requirements/base.in packaging==24.1 # via drf-yasg -pandas==2.0.3 +pandas==2.2.3 # via edx-enterprise-data pbr==6.1.0 # via stevedore -psutil==6.0.0 +psutil==6.1.0 # via edx-django-utils pycparser==2.22 # via cffi @@ -238,9 +236,8 @@ uritemplate==4.1.1 # via # coreapi # drf-yasg -urllib3==1.26.20 +urllib3==2.2.3 # via - # -c requirements/constraints.txt # -r requirements/base.in # botocore # requests diff --git a/requirements/doc.txt b/requirements/doc.txt index 2106069a..ea7183b2 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -21,9 +21,9 @@ beautifulsoup4==4.12.3 # via pydata-sphinx-theme boto==2.49.0 # via -r requirements/base.in -boto3==1.35.41 +boto3==1.35.48 # via -r requirements/base.in -botocore==1.35.41 +botocore==1.35.48 # via # boto3 # s3transfer @@ -41,7 +41,7 @@ coreapi==2.3.3 # via -r requirements/base.in coreschema==0.0.4 # via coreapi -cryptography==43.0.1 +cryptography==43.0.3 # via # django-fernet-fields-v2 # pyjwt @@ -101,17 +101,15 @@ djangorestframework-csv==3.0.2 # via # -r requirements/base.in # edx-enterprise-data -dnspython==2.6.1 - # via - # -c requirements/constraints.txt - # pymongo +dnspython==2.7.0 + # via pymongo docutils==0.21.2 # via # pydata-sphinx-theme # sphinx drf-jwt==1.19.2 # via edx-drf-extensions -drf-yasg==1.21.7 +drf-yasg==1.21.8 # via edx-api-doc-tools edx-api-doc-tools==2.0.0 # via -r requirements/base.in @@ -119,18 +117,18 @@ edx-ccx-keys==1.3.0 # via -r requirements/base.in edx-django-release-util==1.4.0 # via -r requirements/base.in -edx-django-utils==6.1.0 +edx-django-utils==7.0.0 # via # -r requirements/base.in # edx-drf-extensions # edx-enterprise-data # edx-rest-api-client -edx-drf-extensions==10.4.0 +edx-drf-extensions==10.5.0 # via # -r requirements/base.in # edx-enterprise-data # edx-rbac -edx-enterprise-data==9.6.0 +edx-enterprise-data==10.0.1 # via -r requirements/base.in edx-opaque-keys==2.11.0 # via @@ -146,7 +144,7 @@ edx-rest-api-client==6.0.0 # edx-enterprise-data factory-boy==3.3.1 # via edx-enterprise-data -faker==30.4.0 +faker==30.8.1 # via factory-boy html5lib==1.1 # via -r requirements/base.in @@ -168,13 +166,13 @@ jmespath==1.0.1 # botocore markdown==3.7 # via -r requirements/base.in -markupsafe==3.0.1 +markupsafe==3.0.2 # via jinja2 mysql-connector-python==9.1.0 # via edx-enterprise-data newrelic==10.2.0 # via edx-django-utils -numpy==1.24.4 +numpy==2.1.2 # via # edx-enterprise-data # pandas @@ -183,9 +181,8 @@ ordered-set==4.1.0 packaging==24.1 # via # drf-yasg - # pydata-sphinx-theme # sphinx -pandas==2.0.3 +pandas==2.2.3 # via edx-enterprise-data path==16.14.0 # via @@ -193,11 +190,11 @@ path==16.14.0 # -r requirements/doc.in pbr==6.1.0 # via stevedore -psutil==6.0.0 +psutil==6.1.0 # via edx-django-utils pycparser==2.22 # via cffi -pydata-sphinx-theme==0.15.4 +pydata-sphinx-theme==0.16.0 # via sphinx-book-theme pygments==2.18.0 # via @@ -293,9 +290,8 @@ uritemplate==4.1.1 # via # coreapi # drf-yasg -urllib3==1.26.20 +urllib3==2.2.3 # via - # -c requirements/constraints.txt # -r requirements/base.in # botocore # requests diff --git a/requirements/pip.txt b/requirements/pip.txt index 50a4783d..2f65c836 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # pip-compile --allow-unsafe --output-file=requirements/pip.txt requirements/pip.in @@ -10,5 +10,5 @@ wheel==0.44.0 # The following packages are considered to be unsafe in a requirements file: pip==24.2 # via -r requirements/pip.in -setuptools==75.1.0 +setuptools==75.2.0 # via -r requirements/pip.in diff --git a/requirements/pip_tools.txt b/requirements/pip_tools.txt index 2b9a54d2..f73196e7 100644 --- a/requirements/pip_tools.txt +++ b/requirements/pip_tools.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade diff --git a/requirements/production.txt b/requirements/production.txt index 473e6a86..47e7276f 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -11,9 +11,9 @@ asgiref==3.8.1 # django-countries boto==2.49.0 # via -r requirements/base.in -boto3==1.35.41 +boto3==1.35.48 # via -r requirements/base.in -botocore==1.35.41 +botocore==1.35.48 # via # boto3 # s3transfer @@ -31,7 +31,7 @@ coreapi==2.3.3 # via -r requirements/base.in coreschema==0.0.4 # via coreapi -cryptography==43.0.1 +cryptography==43.0.3 # via # django-fernet-fields-v2 # pyjwt @@ -91,13 +91,11 @@ djangorestframework-csv==3.0.2 # via # -r requirements/base.in # edx-enterprise-data -dnspython==2.6.1 - # via - # -c requirements/constraints.txt - # pymongo +dnspython==2.7.0 + # via pymongo drf-jwt==1.19.2 # via edx-drf-extensions -drf-yasg==1.21.7 +drf-yasg==1.21.8 # via edx-api-doc-tools edx-api-doc-tools==2.0.0 # via -r requirements/base.in @@ -105,18 +103,18 @@ edx-ccx-keys==1.3.0 # via -r requirements/base.in edx-django-release-util==1.4.0 # via -r requirements/base.in -edx-django-utils==6.1.0 +edx-django-utils==7.0.0 # via # -r requirements/base.in # edx-drf-extensions # edx-enterprise-data # edx-rest-api-client -edx-drf-extensions==10.4.0 +edx-drf-extensions==10.5.0 # via # -r requirements/base.in # edx-enterprise-data # edx-rbac -edx-enterprise-data==9.6.0 +edx-enterprise-data==10.0.1 # via -r requirements/base.in edx-opaque-keys==2.11.0 # via @@ -132,9 +130,9 @@ edx-rest-api-client==6.0.0 # edx-enterprise-data factory-boy==3.3.1 # via edx-enterprise-data -faker==30.4.0 +faker==30.8.1 # via factory-boy -gevent==24.10.2 +gevent==24.10.3 # via -r requirements/production.in greenlet==3.1.1 # via gevent @@ -156,17 +154,17 @@ jmespath==1.0.1 # botocore markdown==3.7 # via -r requirements/base.in -markupsafe==3.0.1 +markupsafe==3.0.2 # via jinja2 mysql-connector-python==9.1.0 # via edx-enterprise-data -mysqlclient==2.2.4 +mysqlclient==2.2.5 # via -r requirements/production.in newrelic==10.2.0 # via # -r requirements/production.in # edx-django-utils -numpy==1.24.4 +numpy==2.1.2 # via # edx-enterprise-data # pandas @@ -176,13 +174,13 @@ packaging==24.1 # via # drf-yasg # gunicorn -pandas==2.0.3 +pandas==2.2.3 # via edx-enterprise-data path-py==8.2.1 # via -r requirements/production.in pbr==6.1.0 # via stevedore -psutil==6.0.0 +psutil==6.1.0 # via edx-django-utils pycparser==2.22 # via cffi @@ -251,9 +249,8 @@ uritemplate==4.1.1 # via # coreapi # drf-yasg -urllib3==1.26.20 +urllib3==2.2.3 # via - # -c requirements/constraints.txt # -r requirements/base.in # botocore # requests @@ -261,7 +258,7 @@ webencodings==0.5.1 # via html5lib zope-event==5.0 # via gevent -zope-interface==7.1.0 +zope-interface==7.1.1 # via gevent # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/test.txt b/requirements/test.txt index 1f588c7d..00648f60 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -13,9 +13,9 @@ astroid==3.3.5 # via pylint boto==2.49.0 # via -r requirements/base.in -boto3==1.35.41 +boto3==1.35.48 # via -r requirements/base.in -botocore==1.35.41 +botocore==1.35.48 # via # boto3 # s3transfer @@ -35,11 +35,11 @@ coreapi==2.3.3 # via -r requirements/base.in coreschema==0.0.4 # via coreapi -coverage[toml]==7.6.3 +coverage[toml]==7.6.4 # via # -r requirements/test.in # pytest-cov -cryptography==43.0.1 +cryptography==43.0.3 # via # django-fernet-fields-v2 # pyjwt @@ -106,13 +106,11 @@ djangorestframework-csv==3.0.2 # via # -r requirements/base.in # edx-enterprise-data -dnspython==2.6.1 - # via - # -c requirements/constraints.txt - # pymongo +dnspython==2.7.0 + # via pymongo drf-jwt==1.19.2 # via edx-drf-extensions -drf-yasg==1.21.7 +drf-yasg==1.21.8 # via edx-api-doc-tools edx-api-doc-tools==2.0.0 # via -r requirements/base.in @@ -120,18 +118,18 @@ edx-ccx-keys==1.3.0 # via -r requirements/base.in edx-django-release-util==1.4.0 # via -r requirements/base.in -edx-django-utils==6.1.0 +edx-django-utils==7.0.0 # via # -r requirements/base.in # edx-drf-extensions # edx-enterprise-data # edx-rest-api-client -edx-drf-extensions==10.4.0 +edx-drf-extensions==10.5.0 # via # -r requirements/base.in # edx-enterprise-data # edx-rbac -edx-enterprise-data==9.6.0 +edx-enterprise-data==10.0.1 # via -r requirements/base.in edx-opaque-keys==2.11.0 # via @@ -147,7 +145,7 @@ edx-rest-api-client==6.0.0 # edx-enterprise-data factory-boy==3.3.1 # via edx-enterprise-data -faker==30.4.0 +faker==30.8.1 # via factory-boy freezegun==1.5.1 # via -r requirements/test.in @@ -173,7 +171,7 @@ jmespath==1.0.1 # botocore markdown==3.7 # via -r requirements/base.in -markupsafe==3.0.1 +markupsafe==3.0.2 # via jinja2 mccabe==0.7.0 # via pylint @@ -181,7 +179,7 @@ mysql-connector-python==9.1.0 # via edx-enterprise-data newrelic==10.2.0 # via edx-django-utils -numpy==1.24.4 +numpy==2.1.2 # via # edx-enterprise-data # pandas @@ -191,7 +189,7 @@ packaging==24.1 # via # drf-yasg # pytest -pandas==2.0.3 +pandas==2.2.3 # via edx-enterprise-data pbr==6.1.0 # via stevedore @@ -201,7 +199,7 @@ pluggy==1.5.0 # via # diff-cover # pytest -psutil==6.0.0 +psutil==6.1.0 # via edx-django-utils pycodestyle==2.12.1 # via -r requirements/test.in @@ -295,9 +293,8 @@ uritemplate==4.1.1 # via # coreapi # drf-yasg -urllib3==1.26.20 +urllib3==2.2.3 # via - # -c requirements/constraints.txt # -r requirements/base.in # botocore # requests diff --git a/requirements/tox.txt b/requirements/tox.txt index e188877b..b76a8977 100644 --- a/requirements/tox.txt +++ b/requirements/tox.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -28,7 +28,7 @@ pluggy==1.5.0 # via tox pyproject-api==1.8.0 # via tox -tox==4.22.0 +tox==4.23.2 # via -r requirements/tox.in -virtualenv==20.26.6 +virtualenv==20.27.0 # via tox diff --git a/tox.ini b/tox.ini index 7296da4e..fc024728 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] skipsdist = True -envlist = py311-django{42} +envlist = py312-django{42} [testenv] passenv =