Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

Commit

Permalink
fix: Revert Django 4.0 addition (leave for major bump)
Browse files Browse the repository at this point in the history
Django 4.0 breaks some of our tests. Dropping support for Python 3.6 and Django 2.2 is also overdue, so we can combine those three in a coming release shortly
  • Loading branch information
sondrelg committed Dec 18, 2021
1 parent 3de9ee2 commit 1ff31d3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 28 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10" ]
django-version: [ "2.2", "3.0", "3.1", "3.2", "4.0" ]
exclude:
# Django v4 drops Python 3.6/3.7 support
- django-version: 4.0
python-version: 3.7
- django-version: 4.0
python-version: 3.6
python-version: [ "3.6", "3.7", "3.8" , "3.9", "3.10" ]
django-version: [ "2.2", "3.0", "3.1", "3.2" ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand All @@ -56,7 +50,7 @@ jobs:
id: poetry-cache
with:
path: ~/.local
key: key-0
key: key-1
- name: Install poetry
uses: snok/install-poetry@v1
with:
Expand All @@ -66,22 +60,24 @@ jobs:
id: cache-venv
with:
path: .venv
key: ${{ hashFiles('**/poetry.lock') }}-0
key: ${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}-1
- run: |
pip install virtualenv
virtualenv .venv
source .venv/bin/activate
pip install pip setuptools wheel -U
poetry install --no-interaction --no-root
if: steps.cache-venv.outputs.cache-hit != 'true'
- run: |
- name: Install django version
run: |
source .venv/bin/activate
pip install "Django==${{ matrix.django-version }}"
- run: |
source .venv/bin/activate
pip install coverage[toml]
- name: Install DRF 3.11 on Django 2.2
if: matrix.django-version == '2.2'
run: pip install "djangorestframework==3.11.1"
- run: pip install coverage
if: matrix.python-version == '3.10'
- name: Run tests
run: |
source .venv/bin/activate
Expand Down
21 changes: 11 additions & 10 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ packages = [
]

[tool.poetry.dependencies]
python = ">=3.6.1,<4.0.0"
djangorestframework = "*"
django = "^2.2 || ^3.0 || ^4.0"
django = "^2.2 || ^3.0"
inflection = "*"
openapi-spec-validator = "*"
prance = "*"
python = ">=3.6.1,<4.0.0"
pyYAML = "*"

[tool.poetry.dev-dependencies]
Expand All @@ -55,10 +55,10 @@ drf-yasg = "*"
Faker = "*"
pre-commit = "*"
pytest = "*"
pytest-cov = "*"
pytest-django = "*"
pylint = "*"
coverage = { extras = ["toml"], version = "^6.1.1", python = "3.10" }
coverage = { extras = ["toml"], version = "^6"}
pytest-cov = "^2"

[tool.black]
line-length = 120
Expand Down
1 change: 0 additions & 1 deletion test_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
LANGUAGE_CODE = "en"
TIME_ZONE = "UTC"
USE_I18N = True
USE_L10N = True
USE_TZ = True
STATIC_URL = "/test_project/static/"
STATIC_ROOT = os.path.join(BASE_DIR, "static")
Expand Down

0 comments on commit 1ff31d3

Please sign in to comment.