Skip to content

Commit

Permalink
feat: add python 3.12 support (#488)
Browse files Browse the repository at this point in the history
* feat: add python 3.12 support

* refactor: resolved lint errors

* feat: dropped 3.11 support

* refactor: updated pylintrc_tweaks, disabled no-member

* refactor: pylintrc_tweaks disable updated

* chore: resolved trailing space issue in pylintrc_tweaks

* chore: updated comment & removed django42 from toxenv

* chore: suppressed too-many-positional-arguments rule
  • Loading branch information
BilalQamar95 authored Oct 24, 2024
1 parent 48d4897 commit ff45c72
Show file tree
Hide file tree
Showing 14 changed files with 86 additions and 77 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
python-version: ['3.12']
toxenv: [quality, docs, django42-drflatest]

steps:
Expand All @@ -34,7 +34,7 @@ jobs:
run: tox

- name: Run coverage
if: matrix.python-version == '3.11' && matrix.toxenv == 'django42-drflatest'
if: matrix.python-version == '3.12' && matrix.toxenv == 'django42-drflatest'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_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 @@ -16,7 +16,7 @@ jobs:
- name: setup python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.12

- name: Install pip
run: pip install -r requirements/pip.txt
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Change Log
Unreleased
----------

[10.5.0] - 2024-10-21
---------------------
* Upgraded to use ``Python 3.12``

[10.4.0] - 2024-08-30
---------------------
* Dropped support for ``Python<3.11``
Expand Down
2 changes: 1 addition & 1 deletion edx_rest_framework_extensions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
""" edx Django REST Framework extensions. """

__version__ = '10.4.0' # pragma: no cover
__version__ = '10.5.0' # pragma: no cover
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def some_function_view(request): # pylint: disable=unused-argument
}
view_classes = {
"class_view": SomeClassView,
"view_set": views['view_set'].cls, # pylint: disable=no-member
"view_set": views['view_set'].cls,
"function_view": views['function_view'].view_class,
}
view = views[view_type]
Expand Down
6 changes: 3 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.3.4
# Generated by edx-lint version: 5.4.0
# ------------------------------
[MASTER]
ignore =
Expand Down Expand Up @@ -286,7 +286,7 @@ disable =
feature-toggle-needs-doc,
illegal-waffle-usage,

logging-fstring-interpolation,
logging-fstring-interpolation,no-member, too-many-positional-arguments

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

# 9e4689ffce27e736fb99d1efea50aaefc664f0a1
# 3d6ea133547fe5894b68602b76c8d69a9d460e8c
3 changes: 3 additions & 0 deletions pylintrc_tweaks
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[MASTER]
load-plugins = edx_lint.pylint

[MESSAGES CONTROL]
disable+= no-member, too-many-positional-arguments

[BASIC]
const-rgx = (([A-Z_][A-Z0-9_]*)|(__.*__)|log|urlpatterns|logger|User)$
20 changes: 10 additions & 10 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.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
Expand All @@ -12,11 +12,11 @@ cffi==1.17.1
# via
# cryptography
# pynacl
charset-normalizer==3.3.2
charset-normalizer==3.4.0
# via requests
click==8.1.7
# via edx-django-utils
cryptography==43.0.1
cryptography==43.0.3
# via pyjwt
django==4.2.16
# via
Expand All @@ -37,29 +37,29 @@ djangorestframework==3.15.2
# via
# -r requirements/base.in
# drf-jwt
dnspython==2.6.1
dnspython==2.7.0
# via pymongo
drf-jwt==1.19.2
# via -r requirements/base.in
edx-django-utils==5.15.0
edx-django-utils==7.0.0
# via -r requirements/base.in
edx-opaque-keys==2.11.0
# via -r requirements/base.in
idna==3.8
idna==3.10
# via requests
newrelic==9.13.0
newrelic==10.2.0
# via edx-django-utils
pbr==6.1.0
# via stevedore
psutil==6.0.0
psutil==6.1.0
# via edx-django-utils
pycparser==2.22
# via cffi
pyjwt[crypto]==2.9.0
# via
# -r requirements/base.in
# drf-jwt
pymongo==4.8.0
pymongo==4.10.1
# via edx-opaque-keys
pynacl==1.5.0
# via edx-django-utils
Expand All @@ -75,5 +75,5 @@ stevedore==5.3.0
# edx-opaque-keys
typing-extensions==4.12.2
# via edx-opaque-keys
urllib3==2.2.2
urllib3==2.2.3
# via requests
49 changes: 25 additions & 24 deletions requirements/dev.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.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
Expand All @@ -17,7 +17,7 @@ asgiref==3.8.1
# -r requirements/base.txt
# -r requirements/test.txt
# django
astroid==3.2.4
astroid==3.3.5
# via
# -r requirements/test.txt
# pylint
Expand Down Expand Up @@ -51,7 +51,7 @@ chardet==5.2.0
# via
# -r requirements/test.txt
# tox
charset-normalizer==3.3.2
charset-normalizer==3.4.0
# via
# -r requirements/base.txt
# -r requirements/docs.txt
Expand All @@ -77,22 +77,22 @@ colorama==0.4.6
# via
# -r requirements/test.txt
# tox
coverage[toml]==7.6.1
coverage[toml]==7.6.4
# via
# -r requirements/test.txt
# pytest-cov
cryptography==43.0.1
cryptography==43.0.3
# via
# -r requirements/base.txt
# -r requirements/test.txt
# pyjwt
ddt==1.7.2
# via -r requirements/test.txt
dill==0.3.8
dill==0.3.9
# via
# -r requirements/test.txt
# pylint
distlib==0.3.8
distlib==0.3.9
# via
# -r requirements/test.txt
# virtualenv
Expand Down Expand Up @@ -121,7 +121,7 @@ djangorestframework==3.15.2
# -r requirements/base.txt
# -r requirements/test.txt
# drf-jwt
dnspython==2.6.1
dnspython==2.7.0
# via
# -r requirements/base.txt
# -r requirements/test.txt
Expand All @@ -135,7 +135,7 @@ drf-jwt==1.19.2
# via
# -r requirements/base.txt
# -r requirements/test.txt
edx-django-utils==5.15.0
edx-django-utils==7.0.0
# via
# -r requirements/base.txt
# -r requirements/test.txt
Expand All @@ -147,18 +147,18 @@ edx-opaque-keys==2.11.0
# -r requirements/test.txt
factory-boy==2.12.0
# via -r requirements/test.txt
faker==28.4.1
faker==30.6.0
# via
# -r requirements/test.txt
# factory-boy
filelock==3.15.4
filelock==3.16.1
# via
# -r requirements/test.txt
# tox
# virtualenv
httpretty==1.1.4
# via -r requirements/test.txt
idna==3.8
idna==3.10
# via
# -r requirements/base.txt
# -r requirements/docs.txt
Expand All @@ -182,7 +182,7 @@ jinja2==3.1.4
# -r requirements/test.txt
# code-annotations
# sphinx
markupsafe==2.1.5
markupsafe==3.0.2
# via
# -r requirements/docs.txt
# -r requirements/test.txt
Expand All @@ -191,7 +191,7 @@ mccabe==0.7.0
# via
# -r requirements/test.txt
# pylint
newrelic==9.13.0
newrelic==10.2.0
# via
# -r requirements/base.txt
# -r requirements/test.txt
Expand All @@ -210,7 +210,7 @@ pbr==6.1.0
# -r requirements/base.txt
# -r requirements/test.txt
# stevedore
platformdirs==4.2.2
platformdirs==4.3.6
# via
# -r requirements/test.txt
# pylint
Expand All @@ -221,7 +221,7 @@ pluggy==1.5.0
# -r requirements/test.txt
# pytest
# tox
psutil==6.0.0
psutil==6.1.0
# via
# -r requirements/base.txt
# -r requirements/test.txt
Expand All @@ -248,7 +248,7 @@ pyjwt[crypto]==2.9.0
# -r requirements/base.txt
# -r requirements/test.txt
# drf-jwt
pylint==3.2.7
pylint==3.3.1
# via
# -r requirements/test.txt
# edx-lint
Expand All @@ -259,7 +259,7 @@ pylint-celery==0.3
# via
# -r requirements/test.txt
# edx-lint
pylint-django==2.5.5
pylint-django==2.6.1
# via
# -r requirements/test.txt
# edx-lint
Expand All @@ -268,7 +268,7 @@ pylint-plugin-utils==0.8.2
# -r requirements/test.txt
# pylint-celery
# pylint-django
pymongo==4.8.0
pymongo==4.10.1
# via
# -r requirements/base.txt
# -r requirements/test.txt
Expand All @@ -278,11 +278,11 @@ pynacl==1.5.0
# -r requirements/base.txt
# -r requirements/test.txt
# edx-django-utils
pyproject-api==1.7.1
pyproject-api==1.8.0
# via
# -r requirements/test.txt
# tox
pytest==8.3.2
pytest==8.3.3
# via
# -r requirements/test.txt
# pytest-cov
Expand Down Expand Up @@ -378,22 +378,23 @@ tomlkit==0.13.2
# via
# -r requirements/test.txt
# pylint
tox==4.18.0
tox==4.23.0
# via -r requirements/test.txt
typing-extensions==4.12.2
# via
# -r requirements/base.txt
# -r requirements/docs.txt
# -r requirements/test.txt
# edx-opaque-keys
# faker
# pydata-sphinx-theme
urllib3==2.2.2
urllib3==2.2.3
# via
# -r requirements/base.txt
# -r requirements/docs.txt
# -r requirements/test.txt
# requests
virtualenv==20.26.3
virtualenv==20.27.0
# via
# -r requirements/test.txt
# tox
10 changes: 5 additions & 5 deletions requirements/docs.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.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
Expand All @@ -18,15 +18,15 @@ certifi==2024.8.30
# via
# -c requirements/test.txt
# requests
charset-normalizer==3.3.2
charset-normalizer==3.4.0
# via
# -c requirements/test.txt
# requests
docutils==0.19
# via
# pydata-sphinx-theme
# sphinx
idna==3.8
idna==3.10
# via
# -c requirements/test.txt
# requests
Expand All @@ -36,7 +36,7 @@ jinja2==3.1.4
# via
# -c requirements/test.txt
# sphinx
markupsafe==2.1.5
markupsafe==3.0.2
# via
# -c requirements/test.txt
# jinja2
Expand Down Expand Up @@ -84,7 +84,7 @@ typing-extensions==4.12.2
# via
# -c requirements/test.txt
# pydata-sphinx-theme
urllib3==2.2.2
urllib3==2.2.3
# via
# -c requirements/test.txt
# requests
Loading

0 comments on commit ff45c72

Please sign in to comment.