Skip to content

Commit

Permalink
Merge pull request #150 from openedx/jenkins/add-python312-support-fc…
Browse files Browse the repository at this point in the history
…1c215

feat: add python 3.11 support
  • Loading branch information
feanil authored Jun 20, 2024
2 parents 120073a + 77035e5 commit bfaebcb
Show file tree
Hide file tree
Showing 15 changed files with 80 additions and 53 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [django32, django42, quality, csslint, eslint]
python-version:
- '3.8'
- '3.11'
toxenv: [django42, quality, csslint, eslint]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ Version 2.0.0

Remove Transifex calls and bundled translation files for the OEP-58 proposal.
BREAKING CHANGE: This version breaks translations with Quince and earlier releases.

Version 2.1.0

Added support for python 3.11 support. Removed django 3.2 support.
1 change: 1 addition & 0 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ disable =
too-many-instance-attributes,
too-many-public-methods,
useless-object-inheritance,
consider-using-min-builtin,

[REPORTS]
output-format = text
Expand Down
22 changes: 12 additions & 10 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,30 @@
#
appdirs==1.4.4
# via fs
asgiref==3.7.2
asgiref==3.8.1
# via django
django==3.2.24
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# django
django==4.2.11
# via
# -c requirements/common_constraints.txt
# -r requirements/base.in
fs==2.4.16
# via xblock
lxml==5.1.0
lxml==5.2.1
# via xblock
mako==1.3.2
# via xblock
markupsafe==2.1.5
# via
# mako
# xblock
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
# via xblock
pytz==2024.1
# via
# django
# xblock
# via xblock
pyyaml==6.0.1
# via xblock
simplejson==3.19.2
Expand All @@ -39,13 +41,13 @@ six==1.16.0
# python-dateutil
sqlparse==0.4.4
# via django
typing-extensions==4.9.0
typing-extensions==4.10.0
# via asgiref
web-fragments==2.1.0
web-fragments==2.2.0
# via xblock
webob==1.8.7
# via xblock
xblock==1.10.0
xblock==3.1.0
# via -r requirements/base.in

# The following packages are considered to be unsafe in a requirements file:
Expand Down
10 changes: 5 additions & 5 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# make upgrade
#
cachetools==5.3.2
cachetools==5.3.3
# via
# -r requirements/tox.txt
# tox
Expand All @@ -30,14 +30,14 @@ distlib==0.3.8
# virtualenv
docopt==0.6.2
# via coveralls
filelock==3.13.1
filelock==3.13.3
# via
# -r requirements/tox.txt
# tox
# virtualenv
idna==3.6
# via requests
packaging==23.2
packaging==24.0
# via
# -r requirements/tox.txt
# pyproject-api
Expand All @@ -62,11 +62,11 @@ tomli==2.0.1
# -r requirements/tox.txt
# pyproject-api
# tox
tox==4.13.0
tox==4.14.2
# via -r requirements/tox.txt
urllib3==2.2.1
# via requests
virtualenv==20.25.0
virtualenv==20.25.1
# via
# -r requirements/tox.txt
# tox
11 changes: 10 additions & 1 deletion requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@


# using LTS django version
Django<4.0
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
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
4 changes: 4 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@
-c common_constraints.txt

# TODO: Many pinned dependencies should be unpinned and/or moved to this constraints file.


# Temporary to Support the python 3.11 Upgrade
backports.zoneinfo;python_version<"3.9" # Newer versions have zoneinfo available in the standard library
4 changes: 2 additions & 2 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#
# make upgrade
#
wheel==0.42.0
wheel==0.43.0
# via -r requirements/pip.in

# The following packages are considered to be unsafe in a requirements file:
pip==24.0
# via -r requirements/pip.in
setuptools==69.1.0
setuptools==69.2.0
# via -r requirements/pip.in
16 changes: 9 additions & 7 deletions requirements/pip_tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
#
# make upgrade
#
build==1.0.3
build==1.2.1
# via pip-tools
click==8.1.7
# via pip-tools
importlib-metadata==7.0.1
# via build
packaging==23.2
importlib-metadata==6.11.0
# via
# -c requirements/common_constraints.txt
# build
packaging==24.0
# via build
pip-tools==7.4.0
pip-tools==7.4.1
# via -r requirements/pip_tools.in
pyproject-hooks==1.0.0
# via
Expand All @@ -23,9 +25,9 @@ tomli==2.0.1
# build
# pip-tools
# pyproject-hooks
wheel==0.42.0
wheel==0.43.0
# via pip-tools
zipp==3.17.0
zipp==3.18.1
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
Expand Down
30 changes: 17 additions & 13 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,22 @@ appdirs==1.4.4
# via
# -r requirements/base.txt
# fs
asgiref==3.7.2
asgiref==3.8.1
# via
# -r requirements/base.txt
# django
astroid==3.0.3
astroid==3.1.0
# via pylint
coverage==7.4.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
# django
coverage==7.4.4
# via -r requirements/test.txt
dill==0.3.8
# via pylint
django==3.2.24
django==4.2.11
# via
# -c requirements/common_constraints.txt
# -r requirements/base.txt
Expand All @@ -30,7 +35,7 @@ fs==2.4.16
# xblock
isort==5.13.2
# via pylint
lxml==5.1.0
lxml==5.2.1
# via
# -r requirements/base.txt
# xblock
Expand All @@ -55,20 +60,19 @@ platformdirs==4.2.0
# via pylint
pycodestyle==2.11.1
# via -r requirements/quality.in
pylint==3.0.3
pylint==3.1.0
# via -r requirements/quality.in
pymongo==3.13.0
# via
# -r requirements/test.txt
# edx-opaque-keys
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
# via
# -r requirements/base.txt
# xblock
pytz==2024.1
# via
# -r requirements/base.txt
# django
# xblock
pyyaml==6.0.1
# via
Expand All @@ -87,31 +91,31 @@ sqlparse==0.4.4
# via
# -r requirements/base.txt
# django
stevedore==5.1.0
stevedore==5.2.0
# via
# -r requirements/test.txt
# edx-opaque-keys
tomli==2.0.1
# via pylint
tomlkit==0.12.3
tomlkit==0.12.4
# via pylint
typing-extensions==4.9.0
typing-extensions==4.10.0
# via
# -r requirements/base.txt
# -r requirements/test.txt
# asgiref
# astroid
# edx-opaque-keys
# pylint
web-fragments==2.1.0
web-fragments==2.2.0
# via
# -r requirements/base.txt
# xblock
webob==1.8.7
# via
# -r requirements/base.txt
# xblock
xblock==1.10.0
xblock==3.1.0
# via -r requirements/base.txt

# The following packages are considered to be unsafe in a requirements file:
Expand Down
6 changes: 3 additions & 3 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# make upgrade
#
coverage==7.4.1
coverage==7.4.4
# via -r requirements/test.in
edx-opaque-keys==2.5.1
# via -r requirements/test.in
Expand All @@ -14,7 +14,7 @@ pbr==6.0.0
# via stevedore
pymongo==3.13.0
# via edx-opaque-keys
stevedore==5.1.0
stevedore==5.2.0
# via edx-opaque-keys
typing-extensions==4.9.0
typing-extensions==4.10.0
# via edx-opaque-keys
10 changes: 5 additions & 5 deletions requirements/tox.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
#
# make upgrade
#
cachetools==5.3.2
cachetools==5.3.3
# via tox
chardet==5.2.0
# via tox
colorama==0.4.6
# via tox
distlib==0.3.8
# via virtualenv
filelock==3.13.1
filelock==3.13.3
# via
# tox
# virtualenv
packaging==23.2
packaging==24.0
# via
# pyproject-api
# tox
Expand All @@ -32,7 +32,7 @@ tomli==2.0.1
# via
# pyproject-api
# tox
tox==4.13.0
tox==4.14.2
# via -r requirements/tox.in
virtualenv==20.25.0
virtualenv==20.25.1
# via tox
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from setuptools import find_packages, setup

version = '2.0.0'
version = '2.1.0'
description = __doc__.strip().split('\n')[0]
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.rst')) as file_in:
Expand Down
2 changes: 1 addition & 1 deletion submit_and_compare/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def studio_submit(self, data, *args, **kwargs):
self.weight = _convert_to_int(data['weight'])
max_attempts = _convert_to_int(data['max_attempts'])
if max_attempts >= 0:
self.max_attempts = max_attempts
self.max_attempts = max_attempts # pylint: disable=consider-using-min-builtin
self.your_answer_label = data['your_answer_label']
self.our_answer_label = data['our_answer_label']
self.submit_button_label = data['submit_button_label']
Expand Down
5 changes: 2 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[tox]
envlist = csslint,eslint,pycodestyle,pylint,py38-django{32,42}
envlist = csslint,eslint,pycodestyle,pylint,py{38, 311}-django{42}

[testenv]
deps =
django32: Django>=3.2,<4.0
deps =
django42: Django>=4.2,<4.3
-rrequirements/test.txt
commands =
Expand Down

0 comments on commit bfaebcb

Please sign in to comment.