Skip to content

Commit

Permalink
Devel (jazzband#140)
Browse files Browse the repository at this point in the history
* Django 3.0 Compatibility Patch (jazzband#136)

* Added six module for python_2_unicode_compatible functionality. Should be compatible with Django 3.0

* Added six module for python_2_unicode_compatible functionality. Should be compatible with Django 3.0

* Patch; fixed utils.py by removing django.utils and referencing the six module directly

* Added Six to install_requires arg in setup.py

* Edits to tox. Errors with BackendAllauth may still be present

* removed six; removed Python2 compatibility due to EOL/Code Freeze

* removed six from install_requires

* removed six from install_requires

* Travis CI Integration

* PUSH ISSUE | MAKING SLIGHT CHANGE TO FIX COMMIT ISSUE try-except clause for django.conf.urls/django.urls due to v1.11 limitations

* PUSH ISSUE | MAKING SLIGHT CHANGE TO FIX COMMIT ISSUE try-except clause for django.conf.urls/django.urls due to v1.11 limitations

* removing cache keys from travis to check against errors

* pinned django-allauth version to 0.40.0 due to Dec update ditching Django v!+.  Pushing to test.

* Fixed malformed tox.ini setting for django-allauth version pin.

* Update README

Neglected to omit a line about working on a test branch.  Removed.

* Removed six + Django 1.11 support, per @bee-keeper's request

* Removed django.conf.urls conditional import now that Django 1.11 support is being dropped

* re-added conditional url imports at test_urls; removed six from requirements

* fixed Django3 version error in tox.ini; removed conditional import of url and replaced with re_path

* fixed tox error w/Python3.5 by removing Django v.3.0 from testing; Django 3 is only compatible with Python 3.6 onward.

* continue to test against 1.x

* tox

Co-authored-by: Francis Secada <francis.secada@gmail.com>
  • Loading branch information
2 people authored and ralphqq committed Aug 23, 2022
1 parent 578b257 commit 8ed0958
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -7,6 +7,7 @@ dist/
.coverage/
django_invitations.egg-info/
.gitchangelog.rc
git-push.bat
.python-version
.coverage
/.idea/
Expand Down
2 changes: 0 additions & 2 deletions invitations/base_invitation.py
@@ -1,12 +1,10 @@
from django.conf import settings
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _

from .managers import BaseInvitationManager


@python_2_unicode_compatible
class AbstractBaseInvitation(models.Model):
accepted = models.BooleanField(verbose_name=_('accepted'), default=False)
key = models.CharField(verbose_name=_('key'), max_length=64, unique=True)
Expand Down
2 changes: 0 additions & 2 deletions invitations/models.py
Expand Up @@ -9,7 +9,6 @@
from django.db import models
from django.utils import timezone
from django.utils.crypto import get_random_string
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _

from . import signals
Expand All @@ -18,7 +17,6 @@
from .base_invitation import AbstractBaseInvitation


@python_2_unicode_compatible
class Invitation(AbstractBaseInvitation):
email = models.EmailField(verbose_name=_('e-mail address'),
max_length=app_settings.EMAIL_MAX_LENGTH)
Expand Down
3 changes: 1 addition & 2 deletions invitations/utils.py
@@ -1,6 +1,5 @@
from django.apps import apps as django_apps
from django.core.exceptions import ImproperlyConfigured
from django.utils import six

from .app_settings import app_settings

Expand All @@ -11,7 +10,7 @@


def import_attribute(path):
assert isinstance(path, six.string_types)
assert isinstance(path, str)
pkg, attr = path.rsplit('.', 1)
ret = getattr(importlib.import_module(pkg), attr)
return ret
Expand Down
12 changes: 8 additions & 4 deletions tox.ini
@@ -1,9 +1,12 @@
[tox]
envlist =
py35-django{111,22}-backend{Basic,Allauth}
py36-django{111,22}-backend{Basic,Allauth}
py37-django{111,22}-backend{Basic,Allauth}
py38-django22-backend{Basic,Allauth}
py35-django{111}-backend{Basic}
py36-django{111}-backend{Basic}
py37-django{111}-backend{Basic}
py35-django22-backend{Basic,Allauth}
py36-django{22,3}-backend{Basic,Allauth}
py37-django{22,3}-backend{Basic,Allauth}
py38-django{22,3}-backend{Basic,Allauth}
flake8

[pytest]
Expand All @@ -16,6 +19,7 @@ deps =
-r requirements.txt
django111: Django>=1.11.17,<2.0
django22: Django>=2.2.6
django3: Django>=3.0.1
backendAllauth: django-allauth
commands =
python -V
Expand Down

0 comments on commit 8ed0958

Please sign in to comment.