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

Add support for official Python & Django versions #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
82 changes: 28 additions & 54 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,45 @@
language: python
sudo: false
dist: xenial
dist: jammy
jobs:
fast_finish: true
include:
- python: 3.7
env: TOXENV=py37-flake8
- python: 3.7
env: TOXENV=py37-docs
- python: 3.7
env: TOXENV=py37-mypy
- python: 3.5
env: TOXENV=py35-django2-drf3.8
- python: 3.5
env: TOXENV=py35-django2-drf3.9
- python: 3.5
env: TOXENV=py35-django2-drf3.10
- python: 3.5
env: TOXENV=py35-django2-drf3.11
- python: 3.6
env: TOXENV=py36-django2-drf3.8
- python: 3.6
env: TOXENV=py36-django2-drf3.9
- python: 3.6
env: TOXENV=py36-django2-drf3.10
- python: 3.6
env: TOXENV=py36-django2-drf3.11
- python: 3.6
env: TOXENV=py36-django3-drf3.10
- python: 3.6
env: TOXENV=py36-django3-drf3.11
- python: 3.7
env: TOXENV=py37-django2-drf3.8
- python: 3.7
env: TOXENV=py37-django2-drf3.9
- python: 3.7
env: TOXENV=py37-django2-drf3.10
- python: 3.7
env: TOXENV=py37-django2-drf3.11
- python: 3.7
env: TOXENV=py37-django3-drf3.10
- python: 3.7
env: TOXENV=py37-django3-drf3.11
- python: 3.11
env: TOXENV=py311-flake8
- python: 3.11
env: TOXENV=py311-docs
- python: 3.11
env: TOXENV=py311-mypy
- python: 3.8
env: TOXENV=py38-django2-drf3.8
env: TOXENV=py38-django32-drf3.13
- python: 3.8
env: TOXENV=py38-django2-drf3.9
env: TOXENV=py38-django32-drf3.14
- python: 3.8
env: TOXENV=py38-django2-drf3.10
env: TOXENV=py38-django41-drf3.13
- python: 3.8
env: TOXENV=py38-django2-drf3.11
env: TOXENV=py38-django41-drf3.14
- python: 3.8
env: TOXENV=py38-django3-drf3.10
- python: 3.8
env: TOXENV=py38-django3-drf3.11
- python: 3.9
env: TOXENV=py39-django2-drf3.8
env: TOXENV=py38-django42-drf3.14
- python: 3.9
env: TOXENV=py39-django2-drf3.9
env: TOXENV=py39-django32-drf3.13
- python: 3.9
env: TOXENV=py39-django2-drf3.10
env: TOXENV=py39-django32-drf3.14
- python: 3.9
env: TOXENV=py39-django2-drf3.11
env: TOXENV=py39-django41-drf3.13
- python: 3.9
env: TOXENV=py39-django3-drf3.10
env: TOXENV=py39-django41-drf3.14
- python: 3.9
env: TOXENV=py39-django3-drf3.11
env: TOXENV=py39-django42-drf3.14
- python: 3.10
env: TOXENV=py310-django32-drf3.14
- python: 3.10
env: TOXENV=py310-django41-drf3.14
- python: 3.10
env: TOXENV=py310-django42-drf3.14
- python: 3.11
env: TOXENV=py311-django41-drf3.14
- python: 3.11
env: TOXENV=py311-django42-drf3.14
install:
- pip install tox
script:
Expand All @@ -79,4 +53,4 @@ deploy:
on:
repo: FJNR-inc/dry-rest-permissions
tags: true
condition: $TOXENV = py38-django2-drf3.8
condition: $TOXENV = py311-django42-drf3.14
8 changes: 8 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# History

## 1.3.0
* Added support for Python 3.10 & 3.11
* Added support for Django 4.1 & 4.2
* Added support for Django-Rest-Framework 3.13 & 3.14
* Remove support for all Python version < 3.8
* Remove support for all Django version < 3.2
* Remove support for all Django-Rest-Framework version < 3.13

## 1.2.0

* Added type hints
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ DRY Rest Permissions allows developers to easily describe what gives someone per

## Requirements

- Python (3.4+)
- Django (2.2, 3.0)
- Django REST Framework (3.8, 3.9, 3.10, 3.11)
- Python (3.8+)
- Django (3.2+)
- Django REST Framework (3.13+)

## Installation

Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ DRY Rest Permissions allows developers to easily describe what gives someone per

##Requirements

- Python (2.7, 3.4+)
- Django (1.7, 1.8, 1.9, 2.0)
- Django REST Framework (3.0, 3.1, 3.7)
- Python (3.8+)
- Django (3.2+)
- Django REST Framework (3.13+)

##Installation

Expand Down
2 changes: 1 addition & 1 deletion dry_rest_permissions/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.2.0'
__version__ = '1.3.0'
25 changes: 12 additions & 13 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
# Minimum Django and REST framework version
Django>=1.6,<2.0; python_version<'3.0'
Django>=2.0; python_version>='3.0'
djangorestframework>=2.4.3
Django>=3.2
djangorestframework>=3.13

# Test requirements
pytest-django==3.9.0
pytest==5.4.3
pytest-cov==2.9.0
flake8==2.2.2
pytest-django==4.5.2
pytest==7.4.2
pytest-cov==4.1.0
flake8==6.1.0

# wheel for PyPI installs
wheel==0.24.0
wheel==0.41.2

# MkDocs for documentation previews/deploys
mkdocs==1.2.1
mkdocs==1.5.2

# mypy
mypy==0.910
django-stubs==1.8.0
djangorestframework-stubs==1.4.0
types-pyyaml==5.4.3
mypy==1.5.1
django-stubs==4.2.4
djangorestframework-stubs==3.14.2
types-pyyaml==6.0.12.11
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,17 @@ def get_packages(package):
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.1',
'Framework :: Django :: 4.2',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Natural Language :: English',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'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 :: 3.11',
'Topic :: Internet :: WWW/HTTP',
]
)
42 changes: 20 additions & 22 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,42 +1,40 @@
[tox]
envlist =
py{34,35}-django2-drf{3.8,3.9,3.10,3.11}
py{36,37,38,39}-django2-drf{3.8,3.9}
py{36,37,38,39}-django{2,3}-drf{3.10,3.11}
py{38,39}-django{32,41}-drf{3.13,3.14}
py{38,39,310}-django{32,41,42}-drf{3.14}
py{311}-django{41,42}-drf{3.14}

[testenv]
allowlist_externals = ./runtests.py
commands = ./runtests.py --fast
setenv =
PYTHONDONTWRITEBYTECODE=1
deps =
django2: Django>=2.2,<3.0
django32: Django>=3.2,<4.0
django41: Django>=4.1,<4.2
django42: Django>=4.2,<5.0

# To deal with https://github.com/encode/django-rest-framework/pull/6953 ("FieldDoesNotExist")
django3-drf3.10: Django>=3.0,<3.1
django3-drf3.11: Django>=3.0,<4.0
drf3.13: djangorestframework>=3.13,<3.14
drf3.14: djangorestframework>=3.14,<3.15

drf3.8: djangorestframework>=3.8,<3.9
drf3.9: djangorestframework>=3.9,<3.10
drf3.10: djangorestframework>=3.10,<3.11
drf3.11: djangorestframework>=3.11,<3.12
pytest-django==4.5.2
pytz==2023.3

pytest-django==4.4.0

[testenv:py37-flake8]
[testenv:py311-flake8]
commands = ./runtests.py --lintonly
deps =
pytest==5.4.3
flake8==3.3.0
pytest==7.4.2
flake8==6.1.0

[testenv:py37-docs]
[testenv:py311-docs]
commands = mkdocs build
deps =
mkdocs>=0.11.1

[testenv:py37-mypy]
[testenv:py311-mypy]
commands = mypy dry_rest_permissions
deps =
mypy==0.910
django-stubs==1.8.0
djangorestframework-stubs==1.4.0
types-pyyaml==5.4.3
mypy==1.5.1
django-stubs==4.2.4
djangorestframework-stubs==3.14.2
types-pyyaml==6.0.12.11