Skip to content

Commit

Permalink
Remove support for Django < 1.11 / Python 3.4 (#109)
Browse files Browse the repository at this point in the history
* Remove support for Django < 1.11 / Python 3.4

* Add django CMS 3.7 / Django 2.2
  • Loading branch information
yakky committed Aug 9, 2019
1 parent c34f91c commit c5c2b97
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 97 deletions.
77 changes: 26 additions & 51 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,32 @@
# Config file for automatic testing at travis-ci.org

language: python

sudo: false
dist: xenial

python:
- 3.7
- 3.6
- 3.5
- 3.4
- 2.7

env:
matrix:
- TOXENV='pep8'
- TOXENV='docs'
- TOXENV='isort'
- DJANGO='django22' CMS='cms37'
- DJANGO='django21' CMS='cms36'
- DJANGO='django20' CMS='cms36'
- DJANGO='django22' CMS='cms36'
- DJANGO='django111' CMS='cms37'
- DJANGO='django111' CMS='cms36'
- DJANGO='django111' CMS='cms35'
- DJANGO='django110' CMS='cms35'
- DJANGO='django19' CMS='cms35'
- DJANGO='django18' CMS='cms35'
- DJANGO='django111' CMS='cms34'
- DJANGO='django110' CMS='cms34'
- DJANGO='django19' CMS='cms34'
- DJANGO='django18' CMS='cms34'

# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install:
- pip install -U setuptools tox>=1.8 coveralls
- "if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then export PYVER=py27; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.4' ]]; then export PYVER=py34; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then export PYVER=py35; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then export PYVER=py36; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.7' ]]; then export PYVER=py37; fi"
- "if [[ ${DJANGO}z != 'z' ]]; then export TOXENV=$PYVER-$DJANGO-$CMS; fi"

# command to run tests, e.g. python setup.py test
Expand All @@ -53,55 +46,37 @@ matrix:
env: TOXENV='isort'
- python: 2.7
env: TOXENV='docs'
- python: 3.4
env: TOXENV='pep8'
- python: 3.4
env: TOXENV='isort'
- python: 3.4
env: TOXENV='docs'
- python: 2.7
env: DJANGO='django20' CMS='cms36'
- python: 2.7
env: DJANGO='django21' CMS='cms36'
- python: 3.4
env: DJANGO='django18' CMS='cms34'
- python: 3.4
env: DJANGO='django19' CMS='cms34'
- python: 3.4
env: DJANGO='django110' CMS='cms34'
- python: 3.4
env: DJANGO='django18' CMS='cms35'
- python: 3.4
env: DJANGO='django19' CMS='cms35'
- python: 3.4
env: DJANGO='django110' CMS='cms35'
- python: 3.4
env: DJANGO='django111' CMS='cms36'
- python: 3.4
env: DJANGO='django20' CMS='cms36'
- python: 3.4
env: DJANGO='django21' CMS='cms36'
- python: 3.5
env: DJANGO='django18' CMS='cms34'
- python: 3.5
env: DJANGO='django19' CMS='cms34'
- python: 3.5
env: DJANGO='django110' CMS='cms34'
- python: 2.7
env: DJANGO='django22' CMS='cms36'
- python: 2.7
env: DJANGO='django21' CMS='cms37'
- python: 2.7
env: DJANGO='django22' CMS='cms37'
- python: 3.5
env: DJANGO='django18' CMS='cms35'
env: DJANGO='django111' CMS='cms36'
- python: 3.5
env: DJANGO='django19' CMS='cms35'
env: DJANGO='django21' CMS='cms36'
- python: 3.5
env: DJANGO='django110' CMS='cms35'
env: DJANGO='django22' CMS='cms36'
- python: 3.5
env: DJANGO='django111' CMS='cms36'
env: DJANGO='django111' CMS='cms37'
- python: 3.5
env: DJANGO='django20' CMS='cms36'
env: DJANGO='django21' CMS='cms37'
- python: 3.5
env: DJANGO='django21' CMS='cms36'
env: DJANGO='django22' CMS='cms37'
- python: 3.5
env: TOXENV='pep8'
- python: 3.5
env: TOXENV='isort'
- python: 3.5
env: TOXENV='docs'
- python: 3.6
env: DJANGO='django22' CMS='cms36'
- python: 3.6
env: TOXENV='pep8'
- python: 3.6
env: TOXENV='isort'
- python: 3.6
env: TOXENV='docs'
6 changes: 6 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
History
*******

0.9.0 (unreleased)
==================

* Add support for django CMS 3.7 / Django 2.2
* Remove support for Django < 1.11 / Python 3.4

0.8.5 (2019-03-22)
==================

Expand Down
13 changes: 5 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ djangocms-page-meta

Meta tag information for django CMS 3 pages

Python: 2.7, 3.4, 3.5. 3.6
Python: 2.7, 3.5. 3.6, 3.7

Django: 1.8 to 2.1
Django: 1.11 to 2.2

django CMS: 3.4, 3.5, 3.6

.. warning:: Since version 0.7, the support for Python 2.6, Python 3.3, Django<1.8 and django CMS<3.2
has been dropped
django CMS: 3.4, 3.5, 3.6, 3.7


**********
Expand Down Expand Up @@ -58,8 +55,8 @@ Quickstart
Dependencies
============

* `django-filer`_ >= 1.2
* `django-meta`_ >= 1.3
* `django-filer`_
* `django-meta`_

*************
Documentation
Expand Down
4 changes: 4 additions & 0 deletions cms_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,7 @@ def setup():

if __name__ == '__main__':
run()

if __name__ == 'cms_helper':
# this is needed to run cms_helper in pycharm
setup()
2 changes: 1 addition & 1 deletion djangocms_page_meta/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals

__version__ = '0.8.5.post1'
__version__ = '0.9.0a1'
__author__ = 'Iacopo Spalletti <i.spalletti@nephila.it>'

default_app_config = 'djangocms_page_meta.apps.PageMetaConfig'
6 changes: 1 addition & 5 deletions djangocms_page_meta/cms_toolbars.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@
from cms.toolbar_pool import toolbar_pool
from cms.utils.i18n import get_language_list, get_language_object
from cms.utils.permissions import has_page_permission
from django.urls import NoReverseMatch, reverse
from django.utils.translation import ugettext_lazy as _

from .models import PageMeta, TitleMeta

try:
from django.urls import NoReverseMatch, reverse
except ImportError:
from django.core.urlresolvers import NoReverseMatch, reverse

try:
from cms.utils import get_cms_setting
except ImportError:
Expand Down
8 changes: 2 additions & 6 deletions djangocms_page_meta/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@ def get_setting(name):

description_length = getattr(
settings, 'PAGE_META_DESCRIPTION_LENGTH', None
)
if not description_length:
description_length = 320
) or 320

tw_description_length = getattr(
settings, 'PAGE_META_TWITTER_DESCRIPTION_LENGTH', None
)
if not tw_description_length:
tw_description_length = 280
) or 320

default = {
'PAGE_META_DESCRIPTION_LENGTH': description_length,
Expand Down
34 changes: 8 additions & 26 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,34 +1,9 @@
[tox]
envlist = docs,pep8,isort,py{36,35,34,27}-django{21,20,111,110,19,18}-cms{36,35,34}
envlist = docs,pep8,isort,py{37,36,35}-django{22}-cms{37},py{37,36,35}-django{21}-cms{37,36},py{37,36,35,27}-django{111}-cms{37,36,35,34}

[testenv]
commands = {env:COMMAND:python} setup.py test
deps =
django18: Django>=1.8,<1.9
django18: django-mptt>=0.8,<0.9
django18: django-taggit>=0.18,<0.22
django18: django-polymorphic<0.9
django18: djangocms-page-tags<0.7
django18: djangocms-helper<1.1
django18: django-sekizai<1.0
django18: django-classy-tags<0.9
django19: Django>=1.9,<1.10
django19: django-mptt>=0.8,<0.9
django19: django-taggit>=0.18,<0.22
django19: django-polymorphic<0.9
django19: djangocms-page-tags<0.7
django19: djangocms-helper<1.1
django19: django-sekizai<1.0
django19: django-classy-tags<0.9
django110: Django>=1.10,<1.11
django110: django-mptt>=0.8,<0.9
django110: django-taggit>=0.18,<0.22
django110: django-polymorphic>=0.9,<2.0
django110: django-filer>=1.3,<1.4
django110: djangocms-page-tags<0.7
django110: djangocms-helper<1.1
django110: django-sekizai<1.0
django110: django-classy-tags<0.9
django111: Django>=1.11,<2.0
django111: django-mptt>=0.8
django111: django-taggit>=0.18,<0.24
Expand All @@ -49,9 +24,16 @@ deps =
django21: django-polymorphic>=0.9
django21: djangocms-page-tags>=0.6.2
django21: djangocms-helper>1.0,<1.3
django22: Django>=2.2,<2.3
django22: django-mptt>=0.8
django22: django-taggit>=0.24
django22: django-polymorphic>=0.9
django22: djangocms-page-tags>=0.6.2
django22: djangocms-helper>1.2
cms34: https://github.com/divio/django-cms/archive/release/3.4.x.zip
cms35: https://github.com/divio/django-cms/archive/release/3.5.x.zip
cms36: https://github.com/divio/django-cms/archive/release/3.6.x.zip
cms37: https://github.com/divio/django-cms/archive/release/3.7.x.zip
-r{toxinidir}/requirements-test.txt

[testenv:pep8]
Expand Down

0 comments on commit c5c2b97

Please sign in to comment.