Skip to content

Commit

Permalink
Drop Python 2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Aug 5, 2019
1 parent debd35d commit d8b9cd6
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 21 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ matrix:
env: REQ="Django>=1.11,<2.0"
- python: 3.4
env: REQ="Django>=1.11,<2.0"
- python: 2.7
env: REQ="Django>=1.11,<2.0"
- python: 3.7
env: REQ="black flake8"
install:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Next version

* Restructured the ``FIELD_TYPES`` data structure to use a dictionary
instead of a tuple to allow for future expansion.
* Dropped compatibility with Python 2.


0.14
Expand Down
2 changes: 0 additions & 2 deletions form_designer/admin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import json

from django import forms
Expand Down
2 changes: 0 additions & 2 deletions form_designer/apps.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _

Expand Down
2 changes: 0 additions & 2 deletions form_designer/contents.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

from django.db import models
from django.template.loader import render_to_string
from django.utils.encoding import smart_text
Expand Down
2 changes: 0 additions & 2 deletions form_designer/default_field_types.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

from functools import partial

from django import forms
Expand Down
2 changes: 0 additions & 2 deletions form_designer/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


Expand Down
5 changes: 0 additions & 5 deletions form_designer/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

from collections import OrderedDict
import json
import warnings
Expand All @@ -11,7 +9,6 @@
from django.core.validators import validate_email
from django.db import models
from django.db.models.fields import BLANK_CHOICE_DASH
from django.utils.encoding import python_2_unicode_compatible
from django.utils.html import format_html, format_html_join
from django.utils.module_loading import import_string
from django.utils.text import slugify
Expand Down Expand Up @@ -48,7 +45,6 @@ def validate_comma_separated_emails(value):
validate_email(v.strip())


@python_2_unicode_compatible
class Form(models.Model):
CONFIG_OPTIONS = [
(
Expand Down Expand Up @@ -157,7 +153,6 @@ def process(self, form, request):
}


@python_2_unicode_compatible
class FormField(models.Model):
form = models.ForeignKey(
Form, related_name="fields", verbose_name=_("form"), on_delete=models.CASCADE
Expand Down
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ def read(filename):
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development",
Expand Down
2 changes: 0 additions & 2 deletions tests/testapp/test_forms.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

from django.contrib.auth.models import User
from django.core import mail
from django.test import TestCase
Expand Down

0 comments on commit d8b9cd6

Please sign in to comment.