Skip to content

Commit

Permalink
Merge pull request #653 from stianjensen/versions
Browse files Browse the repository at this point in the history
Drop unsupported Django and Python versions
  • Loading branch information
benjaoming committed Feb 2, 2022
2 parents 6c9e998 + 064af38 commit 98ddb3d
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 42 deletions.
54 changes: 30 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

- uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: '3.7'

- run: pip install pre-commit
- run: pre-commit run --all-files
Expand All @@ -28,7 +28,7 @@ jobs:

- uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: '3.9'

- run: pip install tox

Expand All @@ -39,36 +39,42 @@ jobs:
strategy:
matrix:
include:
- python: pypy3
- python: pypy-3.8
tox_env: django22-pypy3
- python: pypy3
tox_env: django31-pypy3
- python: 3.6
tox_env: django22-py36
- python: 3.6
tox_env: django31-py36
- python: 3.6
tox_env: no_rest_framework
- python: 3.7
- python: pypy-3.8
tox_env: django32-pypy3
- python: pypy-3.8
tox_env: django40-pypy3
- python: '3.7'
tox_env: django22-py37
- python: 3.7
tox_env: django31-py37
- python: 3.8
- python: '3.7'
tox_env: django32-py37
- python: '3.8'
tox_env: django22-py38
- python: 3.8
tox_env: django31-py38
- python: 3.8
- python: '3.8'
tox_env: django32-py38
- python: 3.8
- python: '3.8'
tox_env: django40-py38
- python: '3.8'
tox_env: django_main-py38
- python: 3.9
- python: '3.9'
tox_env: django22-py39
- python: 3.9
tox_env: django31-py39
- python: 3.9
- python: '3.9'
tox_env: django32-py39
- python: 3.9
- python: '3.9'
tox_env: django40-py39
- python: '3.9'
tox_env: django_main-py39
- python: '3.10'
tox_env: django22-py310
- python: '3.10'
tox_env: django32-py310
- python: '3.10'
tox_env: django40-py310
- python: '3.10'
tox_env: django_main-py310
- python: '3.10'
tox_env: no_rest_framework
name: ${{ matrix.tox_env }}
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ django-money
A little Django app that uses `py-moneyed <https://github.com/py-moneyed/py-moneyed>`__ to add support for Money
fields in your models and forms.

* Django versions supported: 2.2, 3.1, 3.2
* Python versions supported: 3.6, 3.7, 3.8, 3.9
* Django versions supported: 2.2, 3.2, 4.0
* Python versions supported: 3.7, 3.8, 3.9, 3.10
* PyPy versions supported: PyPy3

If you need support for older versions of Django and Python, please refer to older releases mentioned in `the release notes <https://django-money.readthedocs.io/en/latest/changes.html>`__.
Expand Down
12 changes: 12 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Changelog
=========


`Unreleased`_ - TBA
-------------------

Expand All @@ -9,6 +10,17 @@ Changelog
- Improve the internal check for whether a currency is provided `#657`_ (`davidszotten`_)
- Fix test suite for django main branch `#657`_ (`davidszotten`_)

**Added**

- Add support for Django 4.0.
- Add support for Python 3.10.

**Removed**

- Drop support for Django 3.1.
- Drop support for Python 3.6.


`2.1.1`_ - 2022-01-02
---------------------

Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def find_version():
license="BSD",
packages=find_packages(include=["djmoney", "djmoney.*"]),
install_requires=["setuptools", "Django>=2.2", "py-moneyed>=1.2,<2.0"],
python_requires=">=3.6",
python_requires=">=3.7",
platforms=["Any"],
keywords=["django", "py-money", "money"],
classifiers=[
Expand All @@ -77,14 +77,14 @@ def find_version():
"Operating System :: OS Independent",
"Framework :: Django",
"Framework :: Django :: 2.2",
"Framework :: Django :: 3.1",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],
Expand Down
2 changes: 1 addition & 1 deletion tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def test_properties_access():
elif VERSION[:2] > (2, 1):
assert str(exc.value) == "ModelWithVanillaMoneyField() got an unexpected keyword argument 'bla'"
else:
assert str(exc.value) == "'bla' is an invalid keyword argument for this function"
assert str(exc.value) == "ModelWithVanillaMoneyField() got an unexpected keyword argument 'bla'"


def parametrize_with_q(**kwargs):
Expand Down
25 changes: 13 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tox]
envlist =
django_main-py{39,38,37,36,py3}
django32-py{39,38,37,36,py3}
django31-py{39,38,37,36,py3}
django22-py{39,38,37,36,py3}
django_main-py{310,39,38,py3}
django40-py{310,39,38,py3}
django32-py{310,39,38,37,py3}
django22-py{310,39,38,37,py3}
lint
docs
skipsdist = true
Expand All @@ -16,8 +16,8 @@ python_paths = {toxinidir}
deps =
.[test,exchange]
django22: {[django]2.2.x}
django31: {[django]3.1.x}
django32: {[django]3.2.x}
django40: {[django]4.0.x}
django_main: {[django]main}
commands = py.test --ds=tests.settings_reversion --cov=./djmoney {posargs}
usedevelop = false
Expand All @@ -36,23 +36,24 @@ commands =
Django>=2.2,<2.3
django-reversion>=2.0.8
djangorestframework>=3.7.3
3.1.x =
Django>=3.1,<3.2
django-reversion>=3.0.8
djangorestframework>=3.12.0
3.2.x =
Django>=3.2,<3.3
django-reversion>=3.0.8
djangorestframework>=3.12.0
4.0.x =
Django>=4.0,<4.1
django-reversion>=4.0.0
djangorestframework>=3.13.0
main =
https://github.com/django/django/tarball/main
djangorestframework>=3.12.0
django-reversion>=4.0.0
djangorestframework>=3.13.0

[testenv:no_rest_framework]
deps =
.[test,exchange]
Django>=2.2,<3.2
django-reversion>=3.0.8
Django>=2.2,<4.1
django-reversion>=4.0.0

[testenv:docs]
allowlist_externals = make
Expand Down

0 comments on commit 98ddb3d

Please sign in to comment.