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

chore: Post Django32 Cleanup #142

Merged
merged 1 commit into from
Jan 20, 2022
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [django22, django30, django31, django32, quality]
toxenv: [quality, django32, django40]
steps:
- uses: actions/checkout@v1
- name: setup python
Expand All @@ -35,7 +35,7 @@ jobs:
run: tox

- name: Run Coverage
if: matrix.python-version == '3.8' && matrix.toxenv=='django22'
if: matrix.python-version == '3.8' && matrix.toxenv=='django32'
uses: codecov/codecov-action@v1
with:
flags: unittests
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ Change Log
Unreleased
--------------------

[2.0.0] - 2022-01-19
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Drop support for Django<3.2
* Replacing ugettext with gettext to resolve RemovedInDjango40 error.
* Added Django40 Support

[1.5.1] - 2021-11-01
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion edx_rbac/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Library to help managing role based access controls for django apps.
"""

__version__ = '1.5.1'
__version__ = '1.6.0'

default_app_config = 'edx_rbac.apps.EdxRbacConfig' # pylint: disable=invalid-name
2 changes: 1 addition & 1 deletion edx_rbac/admin/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

from django import forms
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _

from edx_rbac.fields import UserFromEmailField

Expand Down
9 changes: 5 additions & 4 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ idna==3.3
# requests
imagesize==1.3.0
# via sphinx
importlib-metadata==4.10.1
# via sphinx
iniconfig==1.1.1
# via
# -r requirements/test.txt
Expand Down Expand Up @@ -225,7 +227,7 @@ six==1.16.0
# python-dateutil
snowballstemmer==2.2.0
# via sphinx
sphinx==4.3.2
sphinx==4.4.0
# via
# -r requirements/doc.in
# edx-sphinx-theme
Expand Down Expand Up @@ -270,6 +272,5 @@ urllib3==1.26.8
# requests
webencodings==0.5.1
# via bleach

# The following packages are considered to be unsafe in a requirements file:
# setuptools
zipp==3.7.0
# via importlib-metadata
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,8 @@ def is_requirement(line):
classifiers=[
'Development Status :: 3 - Alpha',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
'Natural Language :: English',
Expand Down
64 changes: 31 additions & 33 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-django{22,30,31,32},quality
envlist = py38-django{32,40},quality

[doc8]
max-line-length = 120
Expand All @@ -19,55 +19,53 @@ norecursedirs = .* docs requirements venvs

[testenv]
deps =
django22: Django>=2.2,<2.3
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
django32: Django>=3.2,<3.3
-r{toxinidir}/requirements/test.txt
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
-r{toxinidir}/requirements/test.txt
whitelist_externals =
touch
rm
touch
rm
commands =
python -Wd -m pytest {posargs}
python -Wd -m pytest {posargs}

[testenv:docs]
setenv =
DJANGO_SETTINGS_MODULE = test_settings
PYTHONPATH = {toxinidir}
DJANGO_SETTINGS_MODULE = test_settings
PYTHONPATH = {toxinidir}
whitelist_externals =
make
rm
make
rm
deps =
-r{toxinidir}/requirements/doc.txt
-r{toxinidir}/requirements/doc.txt
commands =
doc8 --ignore-path docs/_build README.rst docs
rm -f docs/edx_rbac.rst
rm -f docs/modules.rst
make -C docs clean
make -C docs html
python setup.py check --restructuredtext --strict
doc8 --ignore-path docs/_build README.rst docs
rm -f docs/edx_rbac.rst
rm -f docs/modules.rst
make -C docs clean
make -C docs html
python setup.py check --restructuredtext --strict

[testenv:quality]
setenv =
DJANGO_SETTINGS_MODULE = test_settings
DJANGO_SETTINGS_MODULE = test_settings
whitelist_externals =
make
rm
touch
make
rm
touch
deps =
-r{toxinidir}/requirements/quality.txt
-r{toxinidir}/requirements/quality.txt
commands =
pylint edx_rbac tests test_utils manage.py setup.py
pycodestyle edx_rbac tests manage.py setup.py
pydocstyle edx_rbac tests manage.py setup.py
isort --check-only --diff tests test_utils edx_rbac manage.py setup.py test_settings.py
make selfcheck
pylint edx_rbac tests test_utils manage.py setup.py
pycodestyle edx_rbac tests manage.py setup.py
pydocstyle edx_rbac tests manage.py setup.py
isort --check-only --diff tests test_utils edx_rbac manage.py setup.py test_settings.py
make selfcheck

[testenv:pii_check]
setenv =
DJANGO_SETTINGS_MODULE = test_settings
DJANGO_SETTINGS_MODULE = test_settings
deps =
-r{toxinidir}/requirements/test.txt
-r{toxinidir}/requirements/test.txt
commands =
code_annotations django_find_annotations --config_file .pii_annotations.yml --lint --report --coverage
code_annotations django_find_annotations --config_file .pii_annotations.yml --lint --report --coverage