Skip to content

Commit

Permalink
chore: Post Django 3.2 cleanup (#134)
Browse files Browse the repository at this point in the history
Co-authored-by: Mohammad Ahtasham ul Hassan <[email protected]>
Co-authored-by: Jason Myatt <[email protected]>
  • Loading branch information
3 people authored Feb 16, 2022
1 parent 7376d4d commit 5cecee2
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 46 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ jobs:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [django22, django30, django31, django32, quality, docs]
toxenv: [quality, docs, django32, django40]

steps:
- uses: actions/checkout@v2
Expand All @@ -33,7 +34,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
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ Change Log
Unreleased
~~~~~~~~~~

[1.5.0] - 2022-02-15
~~~~~~~~~~~~~~~~~~~~

* Added support for Django40
* Removed support for Django22, 30 and 31

[1.4.1] - 2021-12-06
~~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion edx_ace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from .recipient import Recipient
from .recipient_resolver import RecipientResolver

__version__ = '1.4.1'
__version__ = '1.5.0'

default_app_config = 'edx_ace.apps.EdxAceConfig'

Expand Down
4 changes: 2 additions & 2 deletions edx_ace/tests/test_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from hypothesis import strategies as st
from hypothesis.extra.pytz import timezones

from django.utils.translation import ugettext_lazy
from django.utils.translation import gettext_lazy

from edx_ace.message import Message, MessageType
from edx_ace.recipient import Recipient
Expand Down Expand Up @@ -80,7 +80,7 @@ def test_serialization(self):

def test_serialization_lazy_text(self):
unicode_text = "A 𝓾𝓷𝓲𝓬𝓸𝓭𝓮 Text"
lazy_text = ugettext_lazy(unicode_text) # pylint: disable=translation-of-non-string
lazy_text = gettext_lazy(unicode_text) # pylint: disable=translation-of-non-string
self.assertEqual(self.encoder.default(lazy_text), unicode_text)

@given(msg)
Expand Down
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
74 changes: 36 additions & 38 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,47 +1,45 @@
[tox]
envlist = py38-django{22,30,31,32}, quality
envlist = py38-django{32,40}, quality

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

[testenv:docs]
setenv =
DJANGO_SETTINGS_MODULE = test_settings
PYTHONPATH = {toxinidir}
whitelist_externals =
make
rm
deps =
-r{toxinidir}/requirements/test.txt
-r{toxinidir}/requirements/doc.txt
commands =
doc8 --ignore-path docs/_build README.rst docs
make -C docs clean
make -C docs html
python setup.py sdist bdist_wheel
twine check dist/*
setenv =
DJANGO_SETTINGS_MODULE = test_settings
PYTHONPATH = {toxinidir}
whitelist_externals =
make
rm
deps =
-r{toxinidir}/requirements/test.txt
-r{toxinidir}/requirements/doc.txt
commands =
doc8 --ignore-path docs/_build README.rst docs
make -C docs clean
make -C docs html
python setup.py sdist bdist_wheel
twine check dist/*

[testenv:quality]
setenv =
DJANGO_SETTINGS_MODULE=test_settings
setenv =
DJANGO_SETTINGS_MODULE=test_settings
basepython = python3.8
whitelist_externals =
make
rm
touch
commands =
touch edx_ace/tests/__init__.py
pylint edx_ace
rm edx_ace/tests/__init__.py
pycodestyle edx_ace
isort --check-only --diff edx_ace manage.py setup.py test_settings.py
make selfcheck
whitelist_externals =
make
rm
touch
commands =
touch edx_ace/tests/__init__.py
pylint edx_ace
rm edx_ace/tests/__init__.py
pycodestyle edx_ace
isort --check-only --diff edx_ace manage.py setup.py test_settings.py
make selfcheck

0 comments on commit 5cecee2

Please sign in to comment.