Skip to content

Commit

Permalink
Merge pull request #234 from openedx/pythonupgrade
Browse files Browse the repository at this point in the history
Add support for python 3.11
  • Loading branch information
Feanil Patel authored Apr 5, 2024
2 parents 922664a + aeed395 commit 9842a99
Show file tree
Hide file tree
Showing 14 changed files with 80 additions and 71 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ jobs:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [quality, docs, pii_check, django32, django40, django42]
python-version: ['3.8', '3.11']
toxenv: [quality, docs, pii_check, django42]

steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Change Log
Unreleased
~~~~~~~~~~

[2.5.0] - 2024-04-02
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Add support for Python 3.11. Dropped django32 support.
* Switch from ``edx-sphinx-theme`` to ``sphinx-book-theme`` since the former is
deprecated

Expand Down
2 changes: 1 addition & 1 deletion edx_when/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Central source of course block dates for the LMS.
"""

__version__ = '2.4.0'
__version__ = '2.5.0'
2 changes: 1 addition & 1 deletion edx_when/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def clean(self):

schedule = get_schedule_for_user(self.user.id, self.content_date.course_id) # pylint: disable=no-member
policy_date = self.content_date.policy.actual_date(schedule=schedule)
if self.rel_date is not None and self.rel_date.total_seconds() < 0:
if self.rel_date is not None and self.rel_date.total_seconds() < 0: # pylint: disable=no-member
raise ValidationError(_("Override date must be later than policy date"))
if self.abs_date is not None and isinstance(policy_date, datetime) and self.abs_date < policy_date:
raise ValidationError(_("Override date must be later than policy date"))
Expand Down
17 changes: 9 additions & 8 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ appdirs==1.4.4
# via fs
asgiref==3.8.1
# via django
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# django
# djangorestframework
certifi==2024.2.2
Expand Down Expand Up @@ -37,7 +38,7 @@ django==4.2.11
# edx-drf-extensions
django-crum==0.7.9
# via edx-django-utils
django-model-utils==4.4.0
django-model-utils==4.5.0
# via -r requirements/base.in
django-waffle==4.1.0
# via
Expand All @@ -49,11 +50,11 @@ djangorestframework==3.15.1
# edx-drf-extensions
drf-jwt==1.19.2
# via edx-drf-extensions
edx-django-utils==5.11.0
edx-django-utils==5.12.0
# via
# -r requirements/base.in
# edx-drf-extensions
edx-drf-extensions==10.2.0
edx-drf-extensions==10.3.0
# via -r requirements/base.in
edx-opaque-keys==2.5.1
# via
Expand All @@ -63,21 +64,21 @@ fs==2.4.16
# via xblock
idna==3.6
# via requests
lxml==5.1.0
lxml==5.2.1
# via xblock
mako==1.3.2
# via xblock
markupsafe==2.1.5
# via
# mako
# xblock
newrelic==9.7.1
newrelic==9.8.0
# via edx-django-utils
pbr==6.0.0
# via stevedore
psutil==5.9.8
# via edx-django-utils
pycparser==2.21
pycparser==2.22
# via cffi
pyjwt[crypto]==2.8.0
# via
Expand Down Expand Up @@ -115,7 +116,7 @@ typing-extensions==4.10.0
# edx-opaque-keys
urllib3==2.2.1
# via requests
web-fragments==2.1.0
web-fragments==2.2.0
# via xblock
webob==1.8.7
# via xblock
Expand Down
3 changes: 3 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
# but diff-cover latest has a pin (pluggy<1.0.0a1)
# Using the same version of diff-cover which is being used currently in edx-platform to avoid this conflict.
diff-cover==4.0.0

# Temporary pin.
backports-zoneinfo==0.2.1;python_version < "3.9"
36 changes: 17 additions & 19 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#
# make upgrade
#
annotated-types==0.6.0
# via pydantic
appdirs==1.4.4
# via
# -r requirements/quality.txt
Expand All @@ -19,12 +17,13 @@ astroid==3.1.0
# -r requirements/quality.txt
# pylint
# pylint-celery
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/quality.txt
# django
# djangorestframework
build==1.1.1
build==1.2.1
# via
# -r requirements/pip-tools.txt
# pip-tools
Expand Down Expand Up @@ -92,7 +91,7 @@ django-crum==0.7.9
# via
# -r requirements/quality.txt
# edx-django-utils
django-model-utils==4.4.0
django-model-utils==4.5.0
# via -r requirements/quality.txt
django-waffle==4.1.0
# via
Expand All @@ -108,11 +107,11 @@ drf-jwt==1.19.2
# via
# -r requirements/quality.txt
# edx-drf-extensions
edx-django-utils==5.11.0
edx-django-utils==5.12.0
# via
# -r requirements/quality.txt
# edx-drf-extensions
edx-drf-extensions==10.2.0
edx-drf-extensions==10.3.0
# via -r requirements/quality.txt
edx-i18n-tools==1.3.0
# via -r requirements/dev.in
Expand Down Expand Up @@ -140,7 +139,8 @@ importlib-metadata==6.11.0
# -r requirements/pip-tools.txt
# build
# path-py
inflect==7.0.0
# typeguard
inflect==7.2.0
# via jinja2-pluralize
iniconfig==2.0.0
# via
Expand All @@ -158,7 +158,7 @@ jinja2==3.1.3
# jinja2-pluralize
jinja2-pluralize==0.3.0
# via diff-cover
lxml==5.1.0
lxml==5.2.1
# via
# -r requirements/quality.txt
# edx-i18n-tools
Expand All @@ -179,7 +179,9 @@ mccabe==0.7.0
# pylint
mock==5.1.0
# via -r requirements/quality.txt
newrelic==9.7.1
more-itertools==10.2.0
# via inflect
newrelic==9.8.0
# via
# -r requirements/quality.txt
# edx-django-utils
Expand Down Expand Up @@ -216,14 +218,10 @@ psutil==5.9.8
# edx-django-utils
pycodestyle==2.11.1
# via -r requirements/quality.txt
pycparser==2.21
pycparser==2.22
# via
# -r requirements/quality.txt
# cffi
pydantic==2.6.4
# via inflect
pydantic-core==2.16.3
# via pydantic
pydocstyle==6.3.0
# via -r requirements/quality.txt
pygments==2.17.2
Expand Down Expand Up @@ -343,22 +341,22 @@ tomlkit==0.12.4
# via
# -r requirements/quality.txt
# pylint
typeguard==4.2.1
# via inflect
typing-extensions==4.10.0
# via
# -r requirements/quality.txt
# annotated-types
# asgiref
# astroid
# edx-opaque-keys
# inflect
# pydantic
# pydantic-core
# pylint
# typeguard
urllib3==2.2.1
# via
# -r requirements/quality.txt
# requests
web-fragments==2.1.0
web-fragments==2.2.0
# via
# -r requirements/quality.txt
# xblock
Expand Down
21 changes: 11 additions & 10 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ babel==2.14.0
# via
# pydata-sphinx-theme
# sphinx
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# django
# djangorestframework
Expand Down Expand Up @@ -73,7 +74,7 @@ django-crum==0.7.9
# via
# -r requirements/test.txt
# edx-django-utils
django-model-utils==4.4.0
django-model-utils==4.5.0
# via -r requirements/test.txt
django-waffle==4.1.0
# via
Expand All @@ -98,11 +99,11 @@ drf-jwt==1.19.2
# via
# -r requirements/test.txt
# edx-drf-extensions
edx-django-utils==5.11.0
edx-django-utils==5.12.0
# via
# -r requirements/test.txt
# edx-drf-extensions
edx-drf-extensions==10.2.0
edx-drf-extensions==10.3.0
# via -r requirements/test.txt
edx-opaque-keys==2.5.1
# via
Expand Down Expand Up @@ -134,7 +135,7 @@ iniconfig==2.0.0
# via
# -r requirements/test.txt
# pytest
jaraco-classes==3.3.1
jaraco-classes==3.4.0
# via keyring
jaraco-context==4.3.0
# via keyring
Expand All @@ -149,9 +150,9 @@ jinja2==3.1.3
# -r requirements/test.txt
# code-annotations
# sphinx
keyring==25.0.0
keyring==25.1.0
# via twine
lxml==5.1.0
lxml==5.2.1
# via
# -r requirements/test.txt
# xblock
Expand All @@ -175,7 +176,7 @@ more-itertools==10.2.0
# via
# jaraco-classes
# jaraco-functools
newrelic==9.7.1
newrelic==9.8.0
# via
# -r requirements/test.txt
# edx-django-utils
Expand All @@ -201,7 +202,7 @@ psutil==5.9.8
# via
# -r requirements/test.txt
# edx-django-utils
pycparser==2.21
pycparser==2.22
# via
# -r requirements/test.txt
# cffi
Expand Down Expand Up @@ -345,7 +346,7 @@ urllib3==2.2.1
# -r requirements/test.txt
# requests
# twine
web-fragments==2.1.0
web-fragments==2.2.0
# via
# -r requirements/test.txt
# xblock
Expand Down
2 changes: 1 addition & 1 deletion requirements/pip-tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# make upgrade
#
build==1.1.1
build==1.2.1
# via pip-tools
click==8.1.7
# via pip-tools
Expand Down
17 changes: 9 additions & 8 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ astroid==3.1.0
# via
# pylint
# pylint-celery
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# django
# djangorestframework
Expand Down Expand Up @@ -74,7 +75,7 @@ django-crum==0.7.9
# via
# -r requirements/test.txt
# edx-django-utils
django-model-utils==4.4.0
django-model-utils==4.5.0
# via -r requirements/test.txt
django-waffle==4.1.0
# via
Expand All @@ -90,11 +91,11 @@ drf-jwt==1.19.2
# via
# -r requirements/test.txt
# edx-drf-extensions
edx-django-utils==5.11.0
edx-django-utils==5.12.0
# via
# -r requirements/test.txt
# edx-drf-extensions
edx-drf-extensions==10.2.0
edx-drf-extensions==10.3.0
# via -r requirements/test.txt
edx-lint==5.3.6
# via -r requirements/quality.in
Expand Down Expand Up @@ -126,7 +127,7 @@ jinja2==3.1.3
# via
# -r requirements/test.txt
# code-annotations
lxml==5.1.0
lxml==5.2.1
# via
# -r requirements/test.txt
# xblock
Expand All @@ -144,7 +145,7 @@ mccabe==0.7.0
# via pylint
mock==5.1.0
# via -r requirements/test.txt
newrelic==9.7.1
newrelic==9.8.0
# via
# -r requirements/test.txt
# edx-django-utils
Expand All @@ -168,7 +169,7 @@ psutil==5.9.8
# edx-django-utils
pycodestyle==2.11.1
# via -r requirements/quality.in
pycparser==2.21
pycparser==2.22
# via
# -r requirements/test.txt
# cffi
Expand Down Expand Up @@ -280,7 +281,7 @@ urllib3==2.2.1
# via
# -r requirements/test.txt
# requests
web-fragments==2.1.0
web-fragments==2.2.0
# via
# -r requirements/test.txt
# xblock
Expand Down
Loading

0 comments on commit 9842a99

Please sign in to comment.