Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.11 & 3.12 #277

Merged
merged 6 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [quality, django32-drf314, django32-drflatest, django42-drf314, django42-drflatest]
python-version: ['3.8', '3.11', '3.12']
toxenv: [quality, django42-drf314, django42-drflatest]

steps:
- uses: actions/checkout@v2
Expand All @@ -37,7 +37,8 @@ jobs:

- name: Run Coverage
if: matrix.python-version == '3.8' && matrix.toxenv=='django42-drflatest'
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
flags: unittests
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
6 changes: 4 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ Change Log

.. There should always be an "Unreleased" section for changes pending release.

Unreleased
----------
[4.6.0] - 2024-4-16
-------------------

* Add support for Python 3.11 and 3.12

[4.5.0] - 2024-3-19
--------------------
Expand Down
32 changes: 21 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,32 @@ docs: ## generate Sphinx HTML documentation, including API docs
tox -e docs
$(BROWSER) docs/_build/html/index.html

COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt
.PHONY: $(COMMON_CONSTRAINTS_TXT)
$(COMMON_CONSTRAINTS_TXT):
wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)"

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -qr requirements/pip-tools.txt
pip-compile --rebuild --upgrade --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
pip-compile --rebuild --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in
# Make sure to compile files after any other files they include!
pip-compile --upgrade --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -qr requirements/pip.txt
pip install -qr requirements/pip-tools.txt
pip-compile --rebuild --upgrade -o requirements/dev.txt requirements/dev.in
pip-compile --rebuild --upgrade -o requirements/doc.txt requirements/doc.in
pip-compile --rebuild --upgrade -o requirements/quality.txt requirements/quality.in
pip-compile --rebuild --upgrade -o requirements/test.txt requirements/test.in
pip-compile --rebuild --upgrade -o requirements/ci.txt requirements/ci.in
pip-compile --upgrade --allow-unsafe -o requirements/base.txt requirements/base.in
pip-compile --upgrade -o requirements/test.txt requirements/test.in
pip-compile --upgrade -o requirements/doc.txt requirements/doc.in
pip-compile --upgrade --allow-unsafe -o requirements/quality.txt requirements/quality.in
pip-compile --upgrade -o requirements/ci.txt requirements/ci.in
pip-compile --upgrade -o requirements/dev.txt requirements/dev.in
# Let tox control the Django version for tests
sed -i.tmp '/^[d|D]jango==/d' requirements/test.txt
sed -i.tmp '/^djangorestframework==/d' requirements/test.txt
rm requirements/test.txt.tmp
sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp
mv requirements/test.tmp requirements/test.txt
# Also lets tox control DRF version
sed '/^[dD]jangorestframework==/d' requirements/test.txt > requirements/test.tmp
mv requirements/test.tmp requirements/test.txt


quality: ## check coding style with pycodestyle and pylint
tox -e quality
Expand Down
2 changes: 1 addition & 1 deletion completion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"""


__version__ = '4.5.0'
__version__ = '4.6.0'
2 changes: 1 addition & 1 deletion completion/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def _create_test_completions(self, user):
models.BlockCompletion.objects.submit_batch_completion(
user,
[
(block, float(f"0.{randint(1,9)}"))
(block, float(f"0.{randint(1, 9)}"))
for block in self.blocks + self.other_blocks
]
)
Expand Down
7 changes: 4 additions & 3 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
# SERIOUSLY.
#
# ------------------------------
# Generated by edx-lint version: 5.2.5
# Generated by edx-lint version: 5.3.6
# ------------------------------
[MASTER]
ignore = migrations
Expand Down Expand Up @@ -259,6 +259,7 @@ enable =
useless-suppression,
disable =
bad-indentation,
broad-exception-raised,
consider-using-f-string,
duplicate-code,
file-ignored,
Expand Down Expand Up @@ -383,6 +384,6 @@ ext-import-graph =
int-import-graph =

[EXCEPTIONS]
overgeneral-exceptions = Exception
overgeneral-exceptions = builtins.Exception

# c0857a3261a064e2a276a399b5ec398fd1738e0f
# 94445ea91ee8c0de6c53ae1fa510a8a063a86b78
1 change: 0 additions & 1 deletion pylintrc_tweaks
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ load-plugins = edx_lint.pylint,pylint_django,pylint_celery

[MESSAGES CONTROL]
disable+ =
no-self-use,
logging-format-interpolation,
useless-suppression,
1 change: 1 addition & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ edx-toggles>=1.2.0
pytz
XBlock>=1.2.2
event-tracking
setuptools
208 changes: 208 additions & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
#
amqp==5.2.0
# via kombu
appdirs==1.4.4
# via fs
asgiref==3.8.1
# via django
attrs==23.2.0
# via openedx-events
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# celery
# django
# djangorestframework
# kombu
billiard==4.2.0
# via celery
celery==5.3.6
# via event-tracking
certifi==2024.2.2
# via requests
cffi==1.16.0
# via
# cryptography
# pynacl
charset-normalizer==3.3.2
# via requests
click==8.1.7
# via
# celery
# click-didyoumean
# click-plugins
# click-repl
# code-annotations
# edx-django-utils
click-didyoumean==0.3.1
# via celery
click-plugins==1.1.1
# via celery
click-repl==0.3.0
# via celery
code-annotations==1.8.0
# via edx-toggles
cryptography==42.0.5
# via pyjwt
django==4.2.11
# via
# -c requirements/common_constraints.txt
# -r requirements/base.in
# django-crum
# django-model-utils
# django-waffle
# djangorestframework
# drf-jwt
# edx-django-utils
# edx-drf-extensions
# edx-toggles
# event-tracking
# openedx-events
django-crum==0.7.9
# via
# edx-django-utils
# edx-toggles
django-model-utils==4.5.0
# via -r requirements/base.in
django-waffle==4.1.0
# via
# edx-django-utils
# edx-drf-extensions
# edx-toggles
djangorestframework==3.15.1
# via
# -r requirements/base.in
# drf-jwt
# edx-drf-extensions
drf-jwt==1.19.2
# via edx-drf-extensions
edx-django-utils==5.12.0
# via
# edx-drf-extensions
# edx-toggles
# event-tracking
# openedx-events
edx-drf-extensions==10.3.0
# via -r requirements/base.in
edx-opaque-keys[django]==2.5.1
# via
# -r requirements/base.in
# edx-drf-extensions
# openedx-events
edx-toggles==5.2.0
# via
# -r requirements/base.in
# event-tracking
event-tracking==2.4.0
# via -r requirements/base.in
fastavro==1.9.4
# via openedx-events
fs==2.4.16
# via xblock
idna==3.7
# via requests
jinja2==3.1.3
# via code-annotations
kombu==5.3.7
# via celery
lxml==5.2.1
# via xblock
mako==1.3.3
# via xblock
markupsafe==2.1.5
# via
# jinja2
# mako
# xblock
newrelic==9.8.0
# via edx-django-utils
openedx-events==9.9.1
# via event-tracking
pbr==6.0.0
# via stevedore
prompt-toolkit==3.0.43
# via click-repl
psutil==5.9.8
# via edx-django-utils
pycparser==2.22
# via cffi
pyjwt[crypto]==2.8.0
# via
# drf-jwt
# edx-drf-extensions
pymongo==3.13.0
# via
# edx-opaque-keys
# event-tracking
pynacl==1.5.0
# via edx-django-utils
python-dateutil==2.9.0.post0
# via
# celery
# xblock
python-slugify==8.0.4
# via code-annotations
pytz==2024.1
# via
# -r requirements/base.in
# event-tracking
# xblock
pyyaml==6.0.1
# via
# code-annotations
# xblock
requests==2.31.0
# via edx-drf-extensions
semantic-version==2.10.0
# via edx-drf-extensions
simplejson==3.19.2
# via xblock
six==1.16.0
# via
# event-tracking
# fs
# python-dateutil
sqlparse==0.5.0
# via django
stevedore==5.2.0
# via
# code-annotations
# edx-django-utils
# edx-opaque-keys
text-unidecode==1.3
# via python-slugify
typing-extensions==4.11.0
# via
# asgiref
# edx-opaque-keys
# kombu
tzdata==2024.1
# via
# backports-zoneinfo
# celery
urllib3==2.2.1
# via requests
vine==5.1.0
# via
# amqp
# celery
# kombu
wcwidth==0.2.13
# via prompt-toolkit
web-fragments==2.2.0
# via xblock
webob==1.8.7
# via xblock
xblock==3.1.0
# via -r requirements/base.in

# The following packages are considered to be unsafe in a requirements file:
setuptools==69.5.1
# via
# -r requirements/base.in
# fs
28 changes: 18 additions & 10 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,37 @@
#
# make upgrade
#
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.3
filelock==3.13.4
# via
# tox
# virtualenv
mock==5.1.0
# via -r requirements/ci.in
packaging==24.0
# via tox
# via
# pyproject-api
# tox
platformdirs==4.2.0
# via virtualenv
# via
# tox
# virtualenv
pluggy==1.4.0
# via tox
py==1.11.0
# via tox
six==1.16.0
pyproject-api==1.6.1
# via tox
tomli==2.0.1
# via tox
tox==3.28.0
# via
# -c requirements/constraints.txt
# -r requirements/ci.in
# pyproject-api
# tox
tox==4.14.2
# via -r requirements/ci.in
virtualenv==20.25.1
# via tox
Loading
Loading