From 47f42c5dcd059b0e6c3a2a10bcc29e66c88e5cdf Mon Sep 17 00:00:00 2001 From: salmannawaz Date: Mon, 24 Jul 2023 13:40:44 +0500 Subject: [PATCH] Django 4.2 support (#76) * fix: django 4.2 upgrade * chore: regular upgrade. * chore: removed django40 from workflow. * chore: fixing coverage. * chore: fixing coverage. * chore: bump the version. * fix: remove django 4.0 classifier * fix: remove django 4.0 classifier * fix: remove django 4.0 classifier --------- Co-authored-by: Salman Nawaz Co-authored-by: Awais Qureshi --- .github/workflows/ci.yml | 4 +- milestones/__init__.py | 2 +- requirements/base.txt | 22 +++--- requirements/ci.txt | 39 ++++------- requirements/dev.txt | 136 ++++++++++++++++--------------------- requirements/pip-tools.txt | 20 ++++-- requirements/pip.txt | 14 ++-- requirements/quality.txt | 85 +++++++++++------------ requirements/test.txt | 48 ++++++------- setup.py | 2 +- tox.ini | 6 +- 11 files changed, 169 insertions(+), 209 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a855f26..5f6f300 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: matrix: os: [ubuntu-20.04] python-version: ['3.8'] - toxenv: [quality, django32, django40] + toxenv: [quality, django32, django42] steps: - uses: actions/checkout@v2 @@ -39,7 +39,7 @@ jobs: run: tox - name: Run Coverage - if: matrix.python-version == '3.8' && matrix.toxenv=='django32' + if: matrix.python-version == '3.8' && matrix.toxenv=='django42' uses: codecov/codecov-action@v3 with: flags: unittests diff --git a/milestones/__init__.py b/milestones/__init__.py index ac0296a..3473f3a 100644 --- a/milestones/__init__.py +++ b/milestones/__init__.py @@ -3,4 +3,4 @@ """ -__version__ = '0.4.0' +__version__ = '0.5.0' diff --git a/requirements/base.txt b/requirements/base.txt index d83af0b..bd59b29 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,29 +1,31 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -asgiref==3.5.2 +asgiref==3.7.2 # via django -django==3.2.13 +django==3.2.20 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in # django-model-utils -django-model-utils==4.2.0 +django-model-utils==4.3.1 # via -r requirements/base.in edx-opaque-keys==2.3.0 # via -r requirements/base.in -pbr==5.9.0 +pbr==5.11.1 # via stevedore -pymongo==3.12.3 +pymongo==3.13.0 # via edx-opaque-keys -pytz==2022.1 +pytz==2023.3 # via django six==1.16.0 # via -r requirements/base.in -sqlparse==0.4.2 +sqlparse==0.4.4 # via django -stevedore==3.5.0 +stevedore==5.1.0 # via edx-opaque-keys +typing-extensions==4.7.1 + # via asgiref diff --git a/requirements/ci.txt b/requirements/ci.txt index 289fd7d..ddb98d0 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,48 +1,33 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -certifi==2022.5.18.1 - # via requests -charset-normalizer==2.0.12 - # via requests -coverage==6.4.1 - # via codecov -distlib==0.3.4 +distlib==0.3.6 # via virtualenv -filelock==3.7.1 +filelock==3.12.2 # via # tox # virtualenv -idna==3.3 - # via requests -packaging==21.3 +packaging==23.1 # via tox -platformdirs==2.5.2 +platformdirs==3.8.1 # via virtualenv -pluggy==1.0.0 +pluggy==1.2.0 # via tox py==1.11.0 # via tox -pyparsing==3.0.9 - # via packaging -requests==2.27.1 - # via codecov six==1.16.0 - # via - # tox - # virtualenv -toml==0.10.2 # via tox -tox==3.25.0 +tomli==2.0.1 + # via tox +tox==3.28.0 # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/ci.in # tox-battery tox-battery==0.6.1 # via -r requirements/ci.in -urllib3==1.26.9 - # via requests -virtualenv==20.14.1 +virtualenv==20.23.1 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index 8085195..ad35482 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,31 +1,23 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -asgiref==3.5.2 +asgiref==3.7.2 # via # -r requirements/quality.txt # django -astroid==2.11.5 +astroid==2.15.6 # via # -r requirements/quality.txt # pylint # pylint-celery -attrs==21.4.0 +build==0.10.0 # via - # -r requirements/quality.txt - # pytest -certifi==2022.5.18.1 - # via - # -r requirements/ci.txt - # requests -charset-normalizer==2.0.12 - # via - # -r requirements/ci.txt - # requests -click==8.1.3 + # -r requirements/pip-tools.txt + # pip-tools +click==8.1.4 # via # -r requirements/pip-tools.txt # -r requirements/quality.txt @@ -41,45 +33,43 @@ code-annotations==1.3.0 # via # -r requirements/quality.txt # edx-lint -coverage[toml]==6.4.1 +coverage[toml]==7.2.7 # via - # -r requirements/ci.txt # -r requirements/quality.txt - # codecov # pytest-cov -dill==0.3.5.1 +dill==0.3.6 # via # -r requirements/quality.txt # pylint -distlib==0.3.4 +distlib==0.3.6 # via # -r requirements/ci.txt # virtualenv -django==3.2.13 +django==3.2.20 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/quality.txt # django-model-utils -django-model-utils==4.2.0 +django-model-utils==4.3.1 # via -r requirements/quality.txt -edx-lint==5.2.3 +edx-lint==5.3.4 # via -r requirements/quality.txt edx-opaque-keys==2.3.0 # via -r requirements/quality.txt -filelock==3.7.1 +exceptiongroup==1.1.2 + # via + # -r requirements/quality.txt + # pytest +filelock==3.12.2 # via # -r requirements/ci.txt # tox # virtualenv -idna==3.3 - # via - # -r requirements/ci.txt - # requests -iniconfig==1.1.1 +iniconfig==2.0.0 # via # -r requirements/quality.txt # pytest -isort==5.10.1 +isort==5.12.0 # via # -r requirements/quality.txt # pylint @@ -87,11 +77,11 @@ jinja2==3.1.2 # via # -r requirements/quality.txt # code-annotations -lazy-object-proxy==1.7.1 +lazy-object-proxy==1.9.0 # via # -r requirements/quality.txt # astroid -markupsafe==2.1.1 +markupsafe==2.1.3 # via # -r requirements/quality.txt # jinja2 @@ -99,29 +89,27 @@ mccabe==0.7.0 # via # -r requirements/quality.txt # pylint -packaging==21.3 +packaging==23.1 # via # -r requirements/ci.txt + # -r requirements/pip-tools.txt # -r requirements/quality.txt + # build # pytest # tox -pbr==5.9.0 +pbr==5.11.1 # via # -r requirements/quality.txt # stevedore -pep517==0.12.0 - # via - # -r requirements/pip-tools.txt - # pip-tools -pip-tools==6.6.2 +pip-tools==6.14.0 # via -r requirements/pip-tools.txt -platformdirs==2.5.2 +platformdirs==3.8.1 # via # -r requirements/ci.txt # -r requirements/quality.txt # pylint # virtualenv -pluggy==1.0.0 +pluggy==1.2.0 # via # -r requirements/ci.txt # -r requirements/quality.txt @@ -130,14 +118,12 @@ pluggy==1.0.0 py==1.11.0 # via # -r requirements/ci.txt - # -r requirements/quality.txt - # pytest # tox -pycodestyle==2.8.0 +pycodestyle==2.10.0 # via -r requirements/quality.txt -pydocstyle==6.1.1 +pydocstyle==6.3.0 # via -r requirements/quality.txt -pylint==2.14.1 +pylint==2.17.4 # via # -r requirements/quality.txt # edx-lint @@ -152,34 +138,33 @@ pylint-django==2.5.3 # via # -r requirements/quality.txt # edx-lint -pylint-plugin-utils==0.7 +pylint-plugin-utils==0.8.2 # via # -r requirements/quality.txt # pylint-celery # pylint-django -pymongo==3.12.3 +pymongo==3.13.0 # via # -r requirements/quality.txt # edx-opaque-keys -pyparsing==3.0.9 +pyproject-hooks==1.0.0 # via - # -r requirements/ci.txt - # -r requirements/quality.txt - # packaging -pytest==7.1.2 + # -r requirements/pip-tools.txt + # build +pytest==7.4.0 # via # -r requirements/quality.txt # pytest-cov # pytest-django -pytest-cov==3.0.0 +pytest-cov==4.1.0 # via -r requirements/quality.txt pytest-django==4.5.2 # via -r requirements/quality.txt -python-slugify==6.1.2 +python-slugify==8.0.1 # via # -r requirements/quality.txt # code-annotations -pytz==2022.1 +pytz==2023.3 # via # -r requirements/quality.txt # django @@ -187,26 +172,21 @@ pyyaml==6.0 # via # -r requirements/quality.txt # code-annotations -requests==2.27.1 - # via - # -r requirements/ci.txt - # codecov six==1.16.0 # via # -r requirements/ci.txt # -r requirements/quality.txt # edx-lint # tox - # virtualenv snowballstemmer==2.2.0 # via # -r requirements/quality.txt # pydocstyle -sqlparse==0.4.2 +sqlparse==0.4.4 # via # -r requirements/quality.txt # django -stevedore==3.5.0 +stevedore==5.1.0 # via # -r requirements/quality.txt # code-annotations @@ -215,46 +195,44 @@ text-unidecode==1.3 # via # -r requirements/quality.txt # python-slugify -toml==0.10.2 - # via - # -r requirements/ci.txt - # tox tomli==2.0.1 # via + # -r requirements/ci.txt # -r requirements/pip-tools.txt # -r requirements/quality.txt + # build # coverage - # pep517 + # pip-tools # pylint + # pyproject-hooks # pytest -tomlkit==0.11.0 + # tox +tomlkit==0.11.8 # via # -r requirements/quality.txt # pylint -tox==3.25.0 +tox==3.28.0 # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/ci.txt # tox-battery tox-battery==0.6.1 # via -r requirements/ci.txt -typing-extensions==4.2.0 +typing-extensions==4.7.1 # via # -r requirements/quality.txt + # asgiref # astroid # pylint -urllib3==1.26.9 - # via - # -r requirements/ci.txt - # requests -virtualenv==20.14.1 +virtualenv==20.23.1 # via # -r requirements/ci.txt # tox -wheel==0.37.1 +wheel==0.40.0 # via # -r requirements/pip-tools.txt # pip-tools -wrapt==1.14.1 +wrapt==1.15.0 # via # -r requirements/quality.txt # astroid diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index ce56f4c..69a70b0 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -1,18 +1,24 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -click==8.1.3 +build==0.10.0 # via pip-tools -pep517==0.12.0 +click==8.1.4 # via pip-tools -pip-tools==6.6.2 +packaging==23.1 + # via build +pip-tools==6.14.0 # via -r requirements/pip-tools.in +pyproject-hooks==1.0.0 + # via build tomli==2.0.1 - # via pep517 -wheel==0.37.1 + # via + # build + # pip-tools +wheel==0.40.0 # via pip-tools # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/pip.txt b/requirements/pip.txt index e0a3431..fa19e6f 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,16 +1,14 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -wheel==0.37.1 +wheel==0.40.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==22.1.2 +pip==23.1.2 + # via -r requirements/pip.in +setuptools==68.0.0 # via -r requirements/pip.in -setuptools==59.8.0 - # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index 98218e8..e272f0f 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -1,22 +1,18 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -asgiref==3.5.2 +asgiref==3.7.2 # via # -r requirements/test.txt # django -astroid==2.11.5 +astroid==2.15.6 # via # pylint # pylint-celery -attrs==21.4.0 - # via - # -r requirements/test.txt - # pytest -click==8.1.3 +click==8.1.4 # via # -r requirements/test.txt # click-log @@ -28,28 +24,32 @@ code-annotations==1.3.0 # via # -r requirements/test.txt # edx-lint -coverage[toml]==6.4.1 +coverage[toml]==7.2.7 # via # -r requirements/test.txt # pytest-cov -dill==0.3.5.1 +dill==0.3.6 # via pylint -django==3.2.13 +django==3.2.20 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/test.txt # django-model-utils -django-model-utils==4.2.0 +django-model-utils==4.3.1 # via -r requirements/test.txt -edx-lint==5.2.3 +edx-lint==5.3.4 # via -r requirements/quality.in edx-opaque-keys==2.3.0 # via -r requirements/test.txt -iniconfig==1.1.1 +exceptiongroup==1.1.2 + # via + # -r requirements/test.txt + # pytest +iniconfig==2.0.0 # via # -r requirements/test.txt # pytest -isort==5.10.1 +isort==5.12.0 # via # -r requirements/quality.in # pylint @@ -57,37 +57,33 @@ jinja2==3.1.2 # via # -r requirements/test.txt # code-annotations -lazy-object-proxy==1.7.1 +lazy-object-proxy==1.9.0 # via astroid -markupsafe==2.1.1 +markupsafe==2.1.3 # via # -r requirements/test.txt # jinja2 mccabe==0.7.0 # via pylint -packaging==21.3 +packaging==23.1 # via # -r requirements/test.txt # pytest -pbr==5.9.0 +pbr==5.11.1 # via # -r requirements/test.txt # stevedore -platformdirs==2.5.2 +platformdirs==3.8.1 # via pylint -pluggy==1.0.0 +pluggy==1.2.0 # via # -r requirements/test.txt # pytest -py==1.11.0 - # via - # -r requirements/test.txt - # pytest -pycodestyle==2.8.0 +pycodestyle==2.10.0 # via -r requirements/quality.in -pydocstyle==6.1.1 +pydocstyle==6.3.0 # via -r requirements/quality.in -pylint==2.14.1 +pylint==2.17.4 # via # edx-lint # pylint-celery @@ -97,32 +93,28 @@ pylint-celery==0.3 # via edx-lint pylint-django==2.5.3 # via edx-lint -pylint-plugin-utils==0.7 +pylint-plugin-utils==0.8.2 # via # pylint-celery # pylint-django -pymongo==3.12.3 +pymongo==3.13.0 # via # -r requirements/test.txt # edx-opaque-keys -pyparsing==3.0.9 - # via - # -r requirements/test.txt - # packaging -pytest==7.1.2 +pytest==7.4.0 # via # -r requirements/test.txt # pytest-cov # pytest-django -pytest-cov==3.0.0 +pytest-cov==4.1.0 # via -r requirements/test.txt pytest-django==4.5.2 # via -r requirements/test.txt -python-slugify==6.1.2 +python-slugify==8.0.1 # via # -r requirements/test.txt # code-annotations -pytz==2022.1 +pytz==2023.3 # via # -r requirements/test.txt # django @@ -136,11 +128,11 @@ six==1.16.0 # edx-lint snowballstemmer==2.2.0 # via pydocstyle -sqlparse==0.4.2 +sqlparse==0.4.4 # via # -r requirements/test.txt # django -stevedore==3.5.0 +stevedore==5.1.0 # via # -r requirements/test.txt # code-annotations @@ -155,14 +147,13 @@ tomli==2.0.1 # coverage # pylint # pytest -tomlkit==0.11.0 +tomlkit==0.11.8 # via pylint -typing-extensions==4.2.0 +typing-extensions==4.7.1 # via + # -r requirements/test.txt + # asgiref # astroid # pylint -wrapt==1.14.1 +wrapt==1.15.0 # via astroid - -# The following packages are considered to be unsafe in a requirements file: -# setuptools diff --git a/requirements/test.txt b/requirements/test.txt index 6574a43..d2257e1 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,20 +1,18 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -asgiref==3.5.2 +asgiref==3.7.2 # via # -r requirements/base.txt # django -attrs==21.4.0 - # via pytest -click==8.1.3 +click==8.1.4 # via code-annotations code-annotations==1.3.0 # via -r requirements/test.in -coverage[toml]==6.4.1 +coverage[toml]==7.2.7 # via # -r requirements/test.in # pytest-cov @@ -22,44 +20,42 @@ coverage[toml]==6.4.1 # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.txt # django-model-utils -django-model-utils==4.2.0 +django-model-utils==4.3.1 # via -r requirements/base.txt edx-opaque-keys==2.3.0 # via -r requirements/base.txt -iniconfig==1.1.1 +exceptiongroup==1.1.2 + # via pytest +iniconfig==2.0.0 # via pytest jinja2==3.1.2 # via code-annotations -markupsafe==2.1.1 +markupsafe==2.1.3 # via jinja2 -packaging==21.3 +packaging==23.1 # via pytest -pbr==5.9.0 +pbr==5.11.1 # via # -r requirements/base.txt # stevedore -pluggy==1.0.0 - # via pytest -py==1.11.0 +pluggy==1.2.0 # via pytest -pymongo==3.12.3 +pymongo==3.13.0 # via # -r requirements/base.txt # edx-opaque-keys -pyparsing==3.0.9 - # via packaging -pytest==7.1.2 +pytest==7.4.0 # via # -r requirements/test.in # pytest-cov # pytest-django -pytest-cov==3.0.0 +pytest-cov==4.1.0 # via -r requirements/test.in pytest-django==4.5.2 # via -r requirements/test.in -python-slugify==6.1.2 +python-slugify==8.0.1 # via code-annotations -pytz==2022.1 +pytz==2023.3 # via # -r requirements/base.txt # django @@ -67,11 +63,11 @@ pyyaml==6.0 # via code-annotations six==1.16.0 # via -r requirements/base.txt -sqlparse==0.4.2 +sqlparse==0.4.4 # via # -r requirements/base.txt # django -stevedore==3.5.0 +stevedore==5.1.0 # via # -r requirements/base.txt # code-annotations @@ -82,3 +78,7 @@ tomli==2.0.1 # via # coverage # pytest +typing-extensions==4.7.1 + # via + # -r requirements/base.txt + # asgiref diff --git a/setup.py b/setup.py index 47fe38e..30c2743 100644 --- a/setup.py +++ b/setup.py @@ -78,7 +78,7 @@ def is_requirement(line): 'Programming Language :: Python :: 3.8', 'Framework :: Django', 'Framework :: Django :: 3.2', - 'Framework :: Django :: 4.0', + 'Framework :: Django :: 4.2', ], packages=find_packages(exclude=["tests"]), install_requires=load_requirements('requirements/base.in'), diff --git a/tox.ini b/tox.ini index 85ed8d8..2078b87 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{32,40} +envlist = py38-django{32, 42} [testenv] setenv = @@ -7,12 +7,12 @@ setenv = PYTHONPATH = {toxinidir} deps = django32: Django>=3.2,<4.0 - django40: Django>=4.0,<4.1 + django42: Django>=4.2,<4.3 -r{toxinidir}/requirements/test.txt commands = python -Wd -m pytest {posargs} coverage report -m - coverage html + coverage xml [testenv:quality] whitelist_externals =