Skip to content

Commit

Permalink
feat: Django 3.x and python 3.9 support added, django 1.11 support re…
Browse files Browse the repository at this point in the history
…moved (#47)
  • Loading branch information
Aiky30 authored Apr 25, 2022
1 parent b43e2ce commit 734d277
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9
- run: pip install --upgrade flake8
- name: flake8
uses: liskin/gh-problem-matcher-wrap@v1
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9
- run: python -m pip install isort
- name: isort
uses: liskin/gh-problem-matcher-wrap@v1
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ on: [pull_request, push]

jobs:
database-sqlite:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ 3.8 ] # latest release minus two
python-version: [ 3.8, 3.9 ] # latest release minus two
requirements-file: [
django-2_2.txt,
]
os: [
ubuntu-20.04,
django-3_2.txt,
]

steps:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog

unreleased
==========
* Python 3.9 support added
* Django 3.0, 3.1 and 3.2 support added
* Django 1.11 support removed

0.0.8 (2021-11-26)
==================
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


INSTALL_REQUIREMENTS = [
"Django>=1.11,<3.0",
"Django>=2.2,<4.0",
"django-cms",
"django-admin-rangefilter",
"python-dateutil",
Expand Down
2 changes: 2 additions & 0 deletions test_settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
HELPER_SETTINGS = {
"SECRET_KEY": "djangocms-content-expiry-tests",
"TIME_ZONE": "America/Chicago",
"INSTALLED_APPS": [
"djangocms_alias",
Expand Down Expand Up @@ -66,6 +67,7 @@
},
"PARLER_ENABLE_CACHING": False,
"LANGUAGE_CODE": "en",
"DEFAULT_AUTO_FIELD": "django.db.models.AutoField",
}


Expand Down
7 changes: 6 additions & 1 deletion tests/requirements/django-2_2.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-r requirements_base.txt

Django>=2.2,<3.0
django-formtools==2.2
django-formtools==2.2
django-polymorphic==2.1.2

# Unreleased django-cms 4.0 compatible packages
https://github.com/django-cms/djangocms-moderation/tarball/release/1.0.x#egg=djangocms-moderation
8 changes: 8 additions & 0 deletions tests/requirements/django-3_2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-r requirements_base.txt

Django>=3.2,<4.0
django-formtools
django-polymorphic

# Unreleased django-cms 4.0 compatible packages
https://github.com/django-cms/djangocms-moderation/tarball/master#egg=djangocms-moderation
10 changes: 4 additions & 6 deletions tests/requirements/requirements_base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ django-classy-tags>=0.7.2
django-formtools
django-sekizai>=0.7
django-treebeard>=4.3
django-polymorphic==2.1.2
djangocms-admin-style>=1.5
factory-boy
freezegun
Expand All @@ -21,8 +20,7 @@ sphinxcontrib-spelling<7.0.0 # restriction for py35 tests
unittest-xml-reporting==1.11.0

# Unreleased django-cms 4.0 compatible packages
https://github.com/divio/django-cms/tarball/release/4.0.x#egg=django-cms
https://github.com/divio/djangocms-alias/tarball/master#egg=djangocms-alias
https://github.com/divio/djangocms-text-ckeditor/tarball/support/4.0.x#egg=djangocms-text-ckeditor
https://github.com/divio/djangocms-versioning/tarball/master#egg=djangocms-versioning
https://github.com/django-cms/djangocms-moderation/tarball/release/1.0.x#egg=djangocms-moderation
https://github.com/django-cms/django-cms/tarball/develop-4#egg=django-cms
https://github.com/django-cms/djangocms-alias/tarball/master#egg=djangocms-alias
https://github.com/django-cms/djangocms-text-ckeditor/tarball/support/4.0.x#egg=djangocms-text-ckeditor
https://github.com/django-cms/djangocms-versioning/tarball/master#egg=djangocms-versioning
12 changes: 6 additions & 6 deletions tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ def test_file_content_contains_values(self):
content_row_1[self.headings_map["title"]],
poll_content_expiry.version.content.text
)
self.assertEqual(
content_row_1[self.headings_map["ctype"]],
poll_content_expiry.version.content_type.name
self.assertIn(
poll_content_expiry.version.content_type.name,
content_row_1[self.headings_map["ctype"]]
)
self.assertEqual(
content_row_1[self.headings_map["expiry_date"]],
Expand Down Expand Up @@ -270,9 +270,9 @@ def test_file_content_contains_values(self):
content_row_2[self.headings_map["title"]],
art_content_expiry.version.content.artist
)
self.assertEqual(
content_row_2[self.headings_map["ctype"]],
art_content_expiry.version.content_type.name
self.assertIn(
art_content_expiry.version.content_type.name,
content_row_2[self.headings_map["ctype"]]
)
self.assertEqual(
content_row_2[self.headings_map["expiry_date"]],
Expand Down

0 comments on commit 734d277

Please sign in to comment.