Skip to content

Commit

Permalink
Dropped support for python 2.7 and django <2.0. Added support for
Browse files Browse the repository at this point in the history
PostgreSQL
  • Loading branch information
grey0ne committed May 13, 2020
1 parent 00dcfac commit 4c10137
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
9 changes: 1 addition & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,8 @@ install:
- pip install coveralls
matrix:
include:
- python: 2.7
env: DJANGO_VERSION='Django>=1.11,<2.0'
- python: 3.7
env: DJANGO_VERSION='Django>=1.11,<2.0'
- python: 3.7
env: DJANGO_VERSION='Django>=2.0,<2.1'
exclude:
- python: 2.7
env: DJANGO_VERSION='Django>=2.0,<2.1'
env: DJANGO_VERSION='Django>=2.2,<3.0'
fast_finish: true
script:
coverage run --source=protector setup.py test
Expand Down
2 changes: 1 addition & 1 deletion protector/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__author__ = 'Sergey Lihobabin'
__version__ = '0.5.8'
__version__ = '0.6.0'
default_app_config = 'protector.apps.ProtectorConfig'
5 changes: 1 addition & 4 deletions protector/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.fields import GenericRelation, GenericForeignKey
from django.utils.translation import ugettext_lazy as _
from django.utils.six import text_type, python_2_unicode_compatible
from mptt.models import MPTTModel, TreeForeignKey
from protector.internals import (
DEFAULT_ROLE,
Expand Down Expand Up @@ -186,7 +185,6 @@ def save(self, *args, **kwargs):
super(GenericUserToGroup, self).save(*args, **kwargs)


@python_2_unicode_compatible
class HistoryGenericUserToGroup(AbstractBaseHistory, AbstractGenericUserToGroup):
TYPE_ADD = 1
TYPE_REMOVE = 2
Expand All @@ -210,7 +208,7 @@ class Meta:
)

def __str__(self):
return text_type('{history_id} | initiated by {responsible}, action: {action_type} | {group_name} {group_id}').\
return '{history_id} | initiated by {responsible}, action: {action_type} | {group_name} {group_id}'.\
format(
history_id=self.id,
responsible=self.responsible.username if self.responsible else '',
Expand Down Expand Up @@ -328,7 +326,6 @@ def save(self, *args, **kwargs):
super(OwnerToPermission, self).save(*args, **kwargs)


@python_2_unicode_compatible
class HistoryOwnerToPermission(AbstractBaseHistory, AbstractOwnerToPermission):
TYPE_ADD = 1
TYPE_REMOVE = 2
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Django>=1.11
Django>=2.0
django-mptt>=0.8.6
future>=0.16.0
mock>=3.0.5

0 comments on commit 4c10137

Please sign in to comment.