Skip to content

Commit

Permalink
django 42 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
vipulnarang95 committed Mar 11, 2024
1 parent 27dd083 commit 9ac10e7
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ 3.7, 3.8, 3.9, ] # latest release minus two
python-version: [ 3.8, 3.9, '3.10' ] # latest release minus two
requirements-file: [
django-2.2.txt,
django-4.2.txt,
django-3.2.txt,
]
os: [
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ repos:
args: ["--py37-plus"]

- repo: https://github.com/adamchainz/django-upgrade
rev: '1.4.0'
rev: ''
hooks:
- id: django-upgrade
args: [--target-version, "2.2"]
args: [--target-version, "4.2"]

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
-r requirements_base.txt
Django>=2.2,<3.0
Django>=4.2,<5.0
2 changes: 1 addition & 1 deletion tests/requirements/requirements_base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ html5lib>=0.999999999
Pillow
tox

https://github.com/django-cms/django-cms/tarball/develop-4#egg=django-cms
https://github.com/django-cms/django-cms/tarball/release/4.0.1.x#egg=django-cms

# IMPORTANT: latest easy-thumbnails causes error since it returns with floating point, but the tests are not prepared for this and even the lib
easy-thumbnails
Expand Down
2 changes: 1 addition & 1 deletion tests/test_app/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class ToppingInlineAdmin(admin.TabularInline):
extra = 1


@admin.register(Pizza)
class PizzaAdmin(admin.ModelAdmin):
fieldsets = (
('', {
Expand All @@ -23,4 +24,3 @@ class PizzaAdmin(admin.ModelAdmin):
inlines = [ToppingInlineAdmin]


Check warning on line 26 in tests/test_app/admin.py

View workflow job for this annotation

GitHub Actions / flake8

blank line at end of file
admin.site.register(Pizza, PizzaAdmin)
7 changes: 3 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ envlist =
flake8
isort
frontend
py{35,36,37,38}-dj{111,21,22}-cms40
py{37,38,310}-dj{32,42}-cms40

skip_missing_interpreters=True

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

dj111: Django>=1.11,<2.0
dj21: Django>=2.1,<2.2
dj22: Django>=2.2,<3.0
dj32: Django>=3.2,<4.0
dj42: Django>=4.2,<5.0

cms40: https://github.com/divio/django-cms/archive/release/4.0.x.zip

Expand Down

0 comments on commit 9ac10e7

Please sign in to comment.