Skip to content
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
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Cdrf Env",
"image": "mcr.microsoft.com/devcontainers/python:0-3.8",
"image": "mcr.microsoft.com/devcontainers/python:0-3.10",
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
8000
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'
- name: Install dependencies
run: |
pip install --upgrade pip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'
- name: Install dependencies
run: |
pip install --upgrade pip
Expand Down
185 changes: 35 additions & 150 deletions build.ini
Original file line number Diff line number Diff line change
@@ -1,45 +1,13 @@
[tox]
skipsdist=True
envlist =
drf{31,32,33,34,35,36,37,38,39,310,311,312,313,314},
drfbuild{31,32,33,34,35,36,37,38,39,310,311,312,313,314},
drf{39,310,311,312,313,314,315,316},
drfbuild{39,310,311,312,313,314,315,316},

[testenv]
deps =
-r{toxinidir}/requirements-tox.txt

deps31 =
django==1.11.29
djangorestframework>=3.1,<3.2

deps32 =
django==1.11.29
djangorestframework>=3.2,<3.3

deps33 =
django==1.11.29
djangorestframework>=3.3,<3.4

deps34 =
django==1.11.29
djangorestframework>=3.4,<3.5

deps35 =
django==1.11.29
djangorestframework>=3.5,<3.6

deps36 =
django==1.11.29
djangorestframework>=3.6,<3.7

deps37 =
django==2.2
djangorestframework>=3.7,<3.8

deps38 =
django==2.2
djangorestframework>=3.8,<3.9

deps39 =
django==2.2
djangorestframework>=3.9,<3.10
Expand All @@ -64,6 +32,14 @@ deps314 =
django==4.1.0
djangorestframework>=3.14,<3.15

deps315 =
django==5.2.5
djangorestframework>=3.15,<3.16

deps316 =
django==5.2.5
djangorestframework>=3.16,<3.17

setenv =
PYTHONPATH = {toxinidir}

Expand All @@ -78,62 +54,6 @@ commands =
commands =
fab version

[testenv:drf31]
deps =
{[testenv]deps}
{[testenv]deps31}
commands =
{[index]commands}

[testenv:drf32]
deps =
{[testenv]deps}
{[testenv]deps32}
commands =
{[index]commands}

[testenv:drf33]
deps =
{[testenv]deps}
{[testenv]deps33}
commands =
{[index]commands}

[testenv:drf34]
deps =
{[testenv]deps}
{[testenv]deps34}
commands =
{[index]commands}

[testenv:drf35]
deps =
{[testenv]deps}
{[testenv]deps35}
commands =
{[index]commands}

[testenv:drf36]
deps =
{[testenv]deps}
{[testenv]deps36}
commands =
{[index]commands}

[testenv:drf37]
deps =
{[testenv]deps}
{[testenv]deps37}
commands =
{[index]commands}

[testenv:drf38]
deps =
{[testenv]deps}
{[testenv]deps38}
commands =
{[index]commands}

[testenv:drf39]
deps =
{[testenv]deps}
Expand Down Expand Up @@ -176,72 +96,21 @@ deps =
commands =
{[index]commands}


# SITE GENERATION

[testenv:drfbuild31]
deps =
{[testenv:drf31]deps}
envdir =
{toxworkdir}/drf31
commands =
{[build]commands}

[testenv:drfbuild32]
deps =
{[testenv:drf32]deps}
envdir =
{toxworkdir}/drf32
commands =
{[build]commands}

[testenv:drfbuild33]
[testenv:drf315]
deps =
{[testenv:drf33]deps}
envdir =
{toxworkdir}/drf33
commands =
{[build]commands}

[testenv:drfbuild34]
deps =
{[testenv:drf34]deps}
envdir =
{toxworkdir}/drf34
commands =
{[build]commands}

[testenv:drfbuild35]
deps =
{[testenv:drf35]deps}
envdir =
{toxworkdir}/drf35
commands =
{[build]commands}

[testenv:drfbuild36]
deps =
{[testenv:drf36]deps}
envdir =
{toxworkdir}/drf36
{[testenv]deps}
{[testenv]deps315}
commands =
{[build]commands}
{[index]commands}

[testenv:drfbuild37]
[testenv:drf316]
deps =
{[testenv:drf37]deps}
envdir =
{toxworkdir}/drf37
{[testenv]deps}
{[testenv]deps316}
commands =
{[build]commands}
{[index]commands}

[testenv:drfbuild38]
deps =
{[testenv:drf38]deps}
envdir =
{toxworkdir}/drf38
commands =
{[build]commands}
# SITE GENERATION

[testenv:drfbuild39]
deps =
Expand Down Expand Up @@ -290,3 +159,19 @@ envdir =
{toxworkdir}/drf314
commands =
{[build]commands}

[testenv:drfbuild315]
deps =
{[testenv:drf315]deps}
envdir =
{toxworkdir}/drf315
commands =
{[build]commands}

[testenv:drfbuild316]
deps =
{[testenv:drf316]deps}
envdir =
{toxworkdir}/drf316
commands =
{[build]commands}
10 changes: 5 additions & 5 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r requirements-tox.txt
djangorestframework==3.14.0
django==4.1.13
pytest==7.1.2
pytest-cov==4.1.0
coveralls==3.3.1
djangorestframework==3.16.0
django==5.2.5
pytest==8.4.1
pytest-cov==6.2.1
coveralls==4.0.1
8 changes: 4 additions & 4 deletions requirements-tox.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Fabric==2.7.0
Jinja2==3.1.2
Pygments==2.15.0
python-decouple==3.6
Fabric==3.2.2
Jinja2==3.1.6
Pygments==2.19.2
python-decouple==3.8
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Fabric==2.7.0
python-decouple==3.6
tox==3.25.0
Fabric==3.2.2
python-decouple==3.8
tox==4.29.0
12 changes: 3 additions & 9 deletions rest_framework_ccbv/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@


REST_FRAMEWORK_VERSIONS = [
"3.1",
"3.2",
"3.3",
"3.4",
"3.5",
"3.6",
"3.7",
"3.8",
"3.9",
"3.10",
"3.11",
"3.12",
"3.13",
"3.14"
"3.14",
"3.15",
"3.16",
]


Expand Down
4 changes: 2 additions & 2 deletions tests/test_renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from rest_framework_ccbv.inspector import Attributes

KLASS_FILE_CONTENT = (
'{"3.2": {"rest_framework.generics": ["RetrieveDestroyAPIView", "ListAPIView"]},'
'{"3.9": {"rest_framework.generics": ["RetrieveDestroyAPIView", "ListAPIView"]},'
Comment thread
rvlb marked this conversation as resolved.
'"%s": {"rest_framework.generics": ["RetrieveDestroyAPIView", "ListAPIView"]}}' % VERSION
)

Expand Down Expand Up @@ -98,7 +98,7 @@ def setUp(self):
def test_context(self, get_template_mock):
self.renderer.render('foo')
context = get_template_mock.return_value.render.call_args_list[0][0][0]
assert context['other_versions'] == ['3.2']
assert context['other_versions'] == ['3.9']
Comment thread
rvlb marked this conversation as resolved.
assert context['name'] == ListAPIView.__name__
assert isinstance(context['ancestors'], (list, tuple))
assert isinstance(context['direct_ancestors'], (list, tuple))
Expand Down