Skip to content

Commit

Permalink
feat: django-cms 4.0.x - django 3.2 and Python 3.9 compatibility (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiky30 authored May 10, 2022
1 parent c8562f0 commit dbd61f5
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ 3.6, 3.7, ]
python-version: [ 3.7, 3.8, 3.9 ]
requirements-file: [
dj11_cms40.txt,
dj22_cms40.txt,
dj32_cms40.txt,
]
os: [
ubuntu-20.04,
Expand Down
11 changes: 5 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ repos:
# - id: pyupgrade
# args: ["--py37-plus"]
#
# FIXME: Should be enabled for codebases that are minimum django 2.2+
# - repo: https://github.com/adamchainz/django-upgrade
# rev: '1.4.0'
# hooks:
# - id: django-upgrade
# args: [--target-version, "2.2"]
- repo: https://github.com/adamchainz/django-upgrade
rev: '1.4.0'
hooks:
- id: django-upgrade
args: [--target-version, "2.2"]

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ Changelog

Unreleased
==========

* Python 3.8, 3.9 support added
* Django 3.0, 3.1 and 3.2 support added
* Python 3.5 and 3.6 support removed
* Django 1.11 support removed
* port-feat: pre-commit config added from the v3 workstream
* fix: Added test coverage to admin preview view


4.0.0.dev4 (2022-02-03)
=======================

Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'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',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Framework :: Django :: 3.2',
'Framework :: Django CMS',
'Framework :: Django CMS :: 3.7',
'Framework :: Django CMS :: 3.8',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development',
Expand Down
12 changes: 8 additions & 4 deletions tests/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
django-app-helper
tox
coverage
isort
flake8
django-app-helper
factory-boy
flake8
isort
tox

# Unreleased django-cms 4.0 compatible packages
https://github.com/django-cms/django-cms/tarball/develop-4#egg=django-cms
https://github.com/django-cms/djangocms-versioning/tarball/master#egg=djangocms-versioning
4 changes: 0 additions & 4 deletions tests/requirements/dj11_cms40.txt

This file was deleted.

2 changes: 0 additions & 2 deletions tests/requirements/dj22_cms40.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
-r base.txt

Django>=2.2,<3.0
https://github.com/django-cms/django-cms/tarball/release/4.0.x#egg=django-cms
https://github.com/divio/djangocms-versioning/tarball/master/#egg=djangocms-versioning
3 changes: 3 additions & 0 deletions tests/requirements/dj32_cms40.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-r base.txt

Django>=3.2,<4.0
2 changes: 2 additions & 0 deletions tests/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python
HELPER_SETTINGS = {
'SECRET_KEY': "djangocmssnippetstestsuitekey",
'INSTALLED_APPS': [
'tests.utils',
'djangocms_versioning',
Expand All @@ -18,6 +19,7 @@
'CMS_TEMPLATES': (
("page.html", "Normal page"),
),
"DEFAULT_AUTO_FIELD": "django.db.models.AutoField",
}


Expand Down

0 comments on commit dbd61f5

Please sign in to comment.