Skip to content

Commit

Permalink
feat!: Python 3.12 Upgrade (#284)
Browse files Browse the repository at this point in the history
* feat!: python and django update
* fix: updated python update constraint
---------

Co-authored-by: Usama Sadiq <[email protected]>
  • Loading branch information
huniafatima-arbi and UsamaSadiq authored Dec 9, 2024
1 parent 13574c8 commit b1e03fb
Show file tree
Hide file tree
Showing 19 changed files with 502 additions and 741 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-reserved-keywords.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.12

- name: Install pip
run: pip install -r requirements/pip.txt
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
python-version: ['3.12']
toxenv: [django42, quality, docs, pii_check]
permissions:
# Gives the action the necessary permissions for publishing new
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:

- name: Report coverage
id: coverage_comment
if: matrix.python-version == '3.8' && matrix.toxenv == 'django42'
if: matrix.python-version == '3.12' && matrix.toxenv == 'django42'
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ github.token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.12

- name: Install pip
run: pip install -r requirements/pip.txt
Expand Down
3 changes: 2 additions & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ disable =
django-not-configured,
consider-using-with,
bad-option-value,
too-many-positional-arguments

[REPORTS]
output-format = text
Expand Down Expand Up @@ -387,4 +388,4 @@ int-import-graph =
[EXCEPTIONS]
overgeneral-exceptions = builtins.Exception

# c7aa11095d3af8c5ffe7c05c3048b8ac45fdbc57
# b23ca960adcfedcbb4d66893ab4094db594ffca4
1 change: 1 addition & 0 deletions pylintrc_tweaks
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ DISABLE+=
django-not-configured,
consider-using-with,
bad-option-value,
too-many-positional-arguments

[FORMAT]
ignore-long-lines = ^\s*(#\s*)?((<?https?://\S+>?)|(\.\. \w+: .*))$
97 changes: 42 additions & 55 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
Expand All @@ -11,29 +11,21 @@ asgiref==3.7.2
# -r requirements/base.in
# django
# django-cors-headers
async-timeout==4.0.3
# via redis
attrs==23.2.0
attrs==24.2.0
# via -r requirements/base.in
backoff==2.2.1
# via segment-analytics-python
backports-zoneinfo[tzdata]==0.2.1
# via
# celery
# django
# djangorestframework
# kombu
billiard==4.2.0
billiard==4.2.1
# via celery
celery[redis]==5.4.0
# via -r requirements/base.in
certifi==2024.6.2
certifi==2024.8.30
# via requests
cffi==1.16.0
cffi==1.17.1
# via
# cryptography
# pynacl
charset-normalizer==3.3.2
charset-normalizer==3.4.0
# via requests
click==8.1.7
# via
Expand All @@ -56,7 +48,7 @@ coreapi==2.3.3
# openapi-codec
coreschema==0.0.4
# via coreapi
cryptography==42.0.8
cryptography==43.0.3
# via
# pyjwt
# social-auth-core
Expand All @@ -66,7 +58,7 @@ defusedxml==0.8.0rc2
# via
# python3-openid
# social-auth-core
django==4.2.13
django==4.2.16
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
Expand All @@ -83,7 +75,7 @@ django==4.2.13
# edx-drf-extensions
# openedx-filters
# social-auth-app-django
django-cors-headers==4.4.0
django-cors-headers==4.6.0
# via -r requirements/base.in
django-crum==0.7.9
# via edx-django-utils
Expand All @@ -102,78 +94,78 @@ djangorestframework==3.15.2
# django-rest-swagger
# drf-jwt
# edx-drf-extensions
dnspython==2.6.1
dnspython==2.7.0
# via pymongo
drf-jwt==1.19.2
# via edx-drf-extensions
edx-auth-backends==4.3.0
edx-auth-backends==4.4.0
# via -r requirements/base.in
edx-braze-client==0.2.5
# via -r requirements/base.in
edx-django-release-util==1.4.0
# via -r requirements/base.in
edx-django-utils==5.14.2
edx-django-utils==7.0.0
# via
# -r requirements/base.in
# edx-drf-extensions
# edx-rest-api-client
edx-drf-extensions==10.3.0
edx-drf-extensions==10.5.0
# via -r requirements/base.in
edx-opaque-keys==2.10.0
edx-opaque-keys==2.11.0
# via edx-drf-extensions
edx-rest-api-client==5.7.1
edx-rest-api-client==6.0.0
# via -r requirements/base.in
idna==3.7
idna==3.10
# via requests
itypes==1.2.0
# via coreapi
jinja2==3.1.4
# via coreschema
kombu==5.3.7
kombu==5.4.2
# via celery
markupsafe==2.1.5
markupsafe==3.0.2
# via
# jinja2
# werkzeug
marshmallow==3.21.3
marshmallow==3.23.0
# via
# commercetools
# marshmallow-enum
marshmallow-enum==1.5.1
# via commercetools
mysqlclient==2.2.4
mysqlclient==2.2.5
# via -r requirements/base.in
newrelic==9.11.0
newrelic==10.2.0
# via edx-django-utils
oauthlib==3.2.2
# via
# requests-oauthlib
# social-auth-core
openapi-codec==1.3.2
# via django-rest-swagger
openedx-filters==1.9.0
openedx-filters==1.11.0
# via -r requirements/base.in
packaging==24.1
# via marshmallow
pbr==6.0.0
pbr==6.1.0
# via stevedore
pillow==10.3.0
pillow==11.0.0
# via -r requirements/base.in
prompt-toolkit==3.0.47
prompt-toolkit==3.0.48
# via click-repl
psutil==6.0.0
psutil==6.1.0
# via edx-django-utils
pycparser==2.22
# via cffi
pyjwt[crypto]==2.8.0
pyjwt[crypto]==2.9.0
# via
# drf-jwt
# edx-auth-backends
# edx-drf-extensions
# edx-rest-api-client
# segment-analytics-python
# social-auth-core
pymongo==4.7.3
pymongo==4.10.1
# via edx-opaque-keys
pynacl==1.5.0
# via edx-django-utils
Expand All @@ -184,13 +176,13 @@ python-dateutil==2.9.0.post0
# segment-analytics-python
python3-openid==3.2.0
# via social-auth-core
pytz==2024.1
pytz==2024.2
# via
# -r requirements/base.in
# commercetools
pyyaml==6.0.1
pyyaml==6.0.2
# via edx-django-release-util
redis==5.0.7
redis==5.2.0
# via celery
requests==2.32.3
# via
Expand All @@ -201,7 +193,6 @@ requests==2.32.3
# requests-mock
# requests-oauthlib
# segment-analytics-python
# slumber
# social-auth-core
# stripe
requests-mock==1.12.1
Expand All @@ -210,46 +201,42 @@ requests-oauthlib==2.0.0
# via
# commercetools
# social-auth-core
segment-analytics-python==2.3.2
segment-analytics-python==2.3.3
# via -r requirements/base.in
semantic-version==2.10.0
# via edx-drf-extensions
simplejson==3.19.2
simplejson==3.19.3
# via django-rest-swagger
six==1.16.0
# via
# edx-auth-backends
# edx-django-release-util
# python-dateutil
slumber==0.7.1
# via edx-rest-api-client
social-auth-app-django==5.4.1
social-auth-app-django==5.4.2
# via edx-auth-backends
social-auth-core==4.5.4
# via
# edx-auth-backends
# social-auth-app-django
sqlparse==0.5.0
sqlparse==0.5.1
# via django
stevedore==5.2.0
stevedore==5.3.0
# via
# edx-django-utils
# edx-opaque-keys
stripe==10.0.0
stripe==11.2.0
# via -r requirements/base.in
typing-extensions==4.12.2
# via
# asgiref
# edx-opaque-keys
# kombu
# stripe
tzdata==2024.1
tzdata==2024.2
# via
# backports-zoneinfo
# celery
# kombu
uritemplate==4.1.1
# via coreapi
urllib3==2.2.2
urllib3==2.2.3
# via requests
vine==5.1.0
# via
Expand All @@ -258,9 +245,9 @@ vine==5.1.0
# kombu
wcwidth==0.2.13
# via prompt-toolkit
webob==1.8.7
webob==1.8.9
# via commercetools
werkzeug==3.0.3
werkzeug==3.0.6
# via commercetools
wrapt==1.16.0
# via commercetools
20 changes: 8 additions & 12 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -1,38 +1,34 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
#
cachetools==5.3.3
cachetools==5.5.0
# via tox
chardet==5.2.0
# via tox
colorama==0.4.6
# via tox
distlib==0.3.8
distlib==0.3.9
# via virtualenv
filelock==3.15.4
filelock==3.16.1
# via
# tox
# virtualenv
packaging==24.1
# via
# pyproject-api
# tox
platformdirs==4.2.2
platformdirs==4.3.6
# via
# tox
# virtualenv
pluggy==1.5.0
# via tox
pyproject-api==1.7.1
pyproject-api==1.8.0
# via tox
tomli==2.0.1
# via
# pyproject-api
# tox
tox==4.15.1
tox==4.23.2
# via -r requirements/ci.in
virtualenv==20.26.3
virtualenv==20.27.1
# via tox
19 changes: 11 additions & 8 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,19 @@ Django<5.0

# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process.
# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html
# See https://github.com/openedx/edx-platform/issues/35126 for more info
elasticsearch<7.14.0

# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected
django-simple-history==3.0.0

# opentelemetry requires version 6.x at the moment:
# https://github.com/open-telemetry/opentelemetry-python/issues/3570
# Normally this could be added as a constraint in edx-django-utils, where we're
# adding the opentelemetry dependency. However, when we compile pip-tools.txt,
# that uses version 7.x, and then there's no undoing that when compiling base.txt.
# So we need to pin it globally, for now.
# Ticket for unpinning: https://github.com/openedx/edx-lint/issues/407
importlib-metadata<7
# Cause: https://github.com/openedx/event-tracking/pull/290
# event-tracking 2.4.1 upgrades to pymongo 4.4.0 which is not supported on edx-platform.
# We will pin event-tracking to do not break existing installations
# This can be unpinned once https://github.com/openedx/edx-platform/issues/34586
# has been resolved and edx-platform is running with pymongo>=4.4.0
event-tracking<2.4.1

# Cause: https://github.com/openedx/edx-lint/issues/458
# This can be unpinned once https://github.com/openedx/edx-lint/issues/459 has been resolved.
pip<24.3
Loading

0 comments on commit b1e03fb

Please sign in to comment.