diff --git a/morango/__init__.py b/morango/__init__.py index 49c13fd..d2d00e1 100644 --- a/morango/__init__.py +++ b/morango/__init__.py @@ -1,6 +1,2 @@ -from __future__ import absolute_import -from __future__ import print_function -from __future__ import unicode_literals - default_app_config = "morango.apps.MorangoConfig" __version__ = "0.8.0" diff --git a/morango/apps.py b/morango/apps.py index 2d525e9..2d78870 100644 --- a/morango/apps.py +++ b/morango/apps.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.apps import AppConfig from morango.registry import session_middleware diff --git a/morango/migrations/0001_initial.py b/morango/migrations/0001_initial.py index 58e9740..5b50e69 100644 --- a/morango/migrations/0001_initial.py +++ b/morango/migrations/0001_initial.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-05-08 23:42 -from __future__ import unicode_literals - import django.db.models.deletion import django.utils.timezone from django.db import migrations diff --git a/morango/migrations/0002_auto_20170511_0400.py b/morango/migrations/0002_auto_20170511_0400.py index fd50d4d..7475677 100644 --- a/morango/migrations/0002_auto_20170511_0400.py +++ b/morango/migrations/0002_auto_20170511_0400.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2017-05-11 04:00 -from __future__ import unicode_literals - import django.db.models.manager from django.db import migrations from django.db import models diff --git a/morango/migrations/0003_auto_20170519_0543.py b/morango/migrations/0003_auto_20170519_0543.py index 0d164f1..f128158 100644 --- a/morango/migrations/0003_auto_20170519_0543.py +++ b/morango/migrations/0003_auto_20170519_0543.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-05-19 05:43 -from __future__ import unicode_literals - from django.db import migrations from django.db import models diff --git a/morango/migrations/0004_auto_20170520_2112.py b/morango/migrations/0004_auto_20170520_2112.py index b260a16..46580a2 100644 --- a/morango/migrations/0004_auto_20170520_2112.py +++ b/morango/migrations/0004_auto_20170520_2112.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-05-20 21:12 -from __future__ import unicode_literals - from django.db import migrations diff --git a/morango/migrations/0005_auto_20170629_2139.py b/morango/migrations/0005_auto_20170629_2139.py index b0cddf9..3004fc7 100644 --- a/morango/migrations/0005_auto_20170629_2139.py +++ b/morango/migrations/0005_auto_20170629_2139.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2017-06-29 21:39 -from __future__ import unicode_literals - from django.db import migrations import morango.models.fields.crypto diff --git a/morango/migrations/0006_instanceidmodel_system_id.py b/morango/migrations/0006_instanceidmodel_system_id.py index f68b05e..f521dd3 100644 --- a/morango/migrations/0006_instanceidmodel_system_id.py +++ b/morango/migrations/0006_instanceidmodel_system_id.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-06-30 00:15 -from __future__ import unicode_literals - from django.db import migrations from django.db import models diff --git a/morango/migrations/0007_auto_20171018_1615.py b/morango/migrations/0007_auto_20171018_1615.py index 509f095..06625a7 100644 --- a/morango/migrations/0007_auto_20171018_1615.py +++ b/morango/migrations/0007_auto_20171018_1615.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2017-10-18 21:15 -from __future__ import unicode_literals - import datetime import django.db.models.deletion diff --git a/morango/migrations/0008_auto_20171114_2217.py b/morango/migrations/0008_auto_20171114_2217.py index e5d8b7e..9ee895f 100644 --- a/morango/migrations/0008_auto_20171114_2217.py +++ b/morango/migrations/0008_auto_20171114_2217.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2017-11-14 22:17 -from __future__ import unicode_literals - import django.db.models.deletion import django.db.models.manager from django.db import migrations diff --git a/morango/migrations/0009_auto_20171205_0252.py b/morango/migrations/0009_auto_20171205_0252.py index 0976428..9e22eb6 100644 --- a/morango/migrations/0009_auto_20171205_0252.py +++ b/morango/migrations/0009_auto_20171205_0252.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2017-12-05 08:52 -from __future__ import unicode_literals - from django.db import migrations diff --git a/morango/migrations/0010_auto_20171206_1615.py b/morango/migrations/0010_auto_20171206_1615.py index c0397a7..276d5ef 100644 --- a/morango/migrations/0010_auto_20171206_1615.py +++ b/morango/migrations/0010_auto_20171206_1615.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2017-12-06 22:15 -from __future__ import unicode_literals - from django.db import migrations from django.db import models diff --git a/morango/migrations/0011_sharedkey.py b/morango/migrations/0011_sharedkey.py index 6020197..07761d4 100644 --- a/morango/migrations/0011_sharedkey.py +++ b/morango/migrations/0011_sharedkey.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-12 18:38 -from __future__ import unicode_literals - from django.db import migrations from django.db import models diff --git a/morango/migrations/0012_auto_20180927_1658.py b/morango/migrations/0012_auto_20180927_1658.py index 1617c36..f6ff596 100644 --- a/morango/migrations/0012_auto_20180927_1658.py +++ b/morango/migrations/0012_auto_20180927_1658.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-09-27 16:58 -from __future__ import unicode_literals - from django.db import migrations from django.db import models diff --git a/morango/migrations/0013_auto_20190627_1513.py b/morango/migrations/0013_auto_20190627_1513.py index 6e040df..e7f8457 100644 --- a/morango/migrations/0013_auto_20190627_1513.py +++ b/morango/migrations/0013_auto_20190627_1513.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-06-27 22:13 -from __future__ import unicode_literals - from django.db import migrations import morango.models.fields.uuids diff --git a/morango/migrations/0014_syncsession_extra_fields.py b/morango/migrations/0014_syncsession_extra_fields.py index c098d8e..d0d2542 100644 --- a/morango/migrations/0014_syncsession_extra_fields.py +++ b/morango/migrations/0014_syncsession_extra_fields.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.27 on 2019-12-30 18:28 -from __future__ import unicode_literals - from django.db import migrations from django.db import models diff --git a/morango/migrations/0015_auto_20200508_2104.py b/morango/migrations/0015_auto_20200508_2104.py index e7efdb6..326d973 100644 --- a/morango/migrations/0015_auto_20200508_2104.py +++ b/morango/migrations/0015_auto_20200508_2104.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-05-08 21:04 -from __future__ import unicode_literals - -from django.db import migrations, models +from django.db import migrations +from django.db import models class Migration(migrations.Migration): diff --git a/morango/migrations/0016_store_deserialization_error.py b/morango/migrations/0016_store_deserialization_error.py index 5317596..3191b45 100644 --- a/morango/migrations/0016_store_deserialization_error.py +++ b/morango/migrations/0016_store_deserialization_error.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.28 on 2020-06-10 23:48 -from __future__ import unicode_literals - -from django.db import migrations, models +from django.db import migrations +from django.db import models class Migration(migrations.Migration): diff --git a/morango/migrations/0017_store_last_transfer_session_id.py b/morango/migrations/0017_store_last_transfer_session_id.py index adef790..c5a73f3 100644 --- a/morango/migrations/0017_store_last_transfer_session_id.py +++ b/morango/migrations/0017_store_last_transfer_session_id.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.28 on 2021-06-25 23:13 -from __future__ import unicode_literals - from django.db import migrations + import morango.models.fields.uuids diff --git a/morango/migrations/0018_auto_20210714_2216.py b/morango/migrations/0018_auto_20210714_2216.py index bc8bc9e..51277dc 100644 --- a/morango/migrations/0018_auto_20210714_2216.py +++ b/morango/migrations/0018_auto_20210714_2216.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-07-14 22:16 -from __future__ import unicode_literals - -from django.db import migrations, models +from django.db import migrations +from django.db import models class Migration(migrations.Migration): diff --git a/morango/migrations/0019_auto_20220113_1807.py b/morango/migrations/0019_auto_20220113_1807.py index b73ad4c..f187461 100644 --- a/morango/migrations/0019_auto_20220113_1807.py +++ b/morango/migrations/0019_auto_20220113_1807.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2022-01-13 18:07 -from __future__ import unicode_literals - -from django.db import migrations, models +from django.db import migrations +from django.db import models class Migration(migrations.Migration): diff --git a/morango/migrations/0020_postgres_fix_nullable.py b/morango/migrations/0020_postgres_fix_nullable.py index bcacf17..f35db4d 100644 --- a/morango/migrations/0020_postgres_fix_nullable.py +++ b/morango/migrations/0020_postgres_fix_nullable.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2022-01-13 18:07 -from __future__ import unicode_literals - from django.db import migrations diff --git a/morango/migrations/0021_store_partition_index_create.py b/morango/migrations/0021_store_partition_index_create.py index 32c21df..f96ed79 100644 --- a/morango/migrations/0021_store_partition_index_create.py +++ b/morango/migrations/0021_store_partition_index_create.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2022-04-27 16:59 -from __future__ import unicode_literals - from django.db import migrations from django.db import models diff --git a/morango/migrations/0022_rename_instance_fields.py b/morango/migrations/0022_rename_instance_fields.py index 82965cb..115df24 100644 --- a/morango/migrations/0022_rename_instance_fields.py +++ b/morango/migrations/0022_rename_instance_fields.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2023-01-31 18:53 -from __future__ import unicode_literals - from django.db import migrations diff --git a/morango/migrations/0023_add_instance_id_fields.py b/morango/migrations/0023_add_instance_id_fields.py index bb9cf6f..bc9f12a 100644 --- a/morango/migrations/0023_add_instance_id_fields.py +++ b/morango/migrations/0023_add_instance_id_fields.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2023-01-31 19:03 -from __future__ import unicode_literals - from django.db import migrations from django.db import models diff --git a/morango/models/certificates.py b/morango/models/certificates.py index 88d39cc..19c8ac1 100644 --- a/morango/models/certificates.py +++ b/morango/models/certificates.py @@ -3,8 +3,6 @@ Each certificate has a ``private_key`` used for signing (child) certificates (thus giving certain permissions) and a ``public_key`` used for verifying that a certificate(s) was properly signed. """ -from __future__ import unicode_literals - import json import string @@ -14,7 +12,6 @@ from django.db import transaction from django.utils import timezone from django.utils.six import string_types -from future.utils import python_2_unicode_compatible from .fields.crypto import Key from .fields.crypto import PrivateKeyField @@ -30,7 +27,6 @@ from morango.utils import _assert -@python_2_unicode_compatible class Certificate(mptt.models.MPTTModel, UUIDModelMixin): uuid_input_fields = ("public_key", "profile", "salt") @@ -329,7 +325,6 @@ def get_description(self, params): return string.Template(self.description).safe_substitute(params) -@python_2_unicode_compatible class Filter(object): def __init__(self, template, params={}): # ensure params have been deserialized diff --git a/morango/models/core.py b/morango/models/core.py index ad80103..816f33b 100644 --- a/morango/models/core.py +++ b/morango/models/core.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - import functools import json import logging diff --git a/setup.py b/setup.py index cb94e13..6b96075 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,5 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from __future__ import absolute_import -from __future__ import print_function -from __future__ import unicode_literals - import io from setuptools import find_packages @@ -32,7 +28,6 @@ "rsa>=3.4.2,<3.5", "djangorestframework==3.9.1", "django-ipware>=1.1.6,<1.2", - "future==0.16.0", "requests", "ifcfg", ], diff --git a/tests/testapp/facility_profile/apps.py b/tests/testapp/facility_profile/apps.py index 1c9be94..dc5c4f3 100644 --- a/tests/testapp/facility_profile/apps.py +++ b/tests/testapp/facility_profile/apps.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.apps import AppConfig diff --git a/tests/testapp/facility_profile/migrations/0001_initial.py b/tests/testapp/facility_profile/migrations/0001_initial.py index e8f6c56..cdf6e7f 100644 --- a/tests/testapp/facility_profile/migrations/0001_initial.py +++ b/tests/testapp/facility_profile/migrations/0001_initial.py @@ -1,15 +1,16 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2022-04-12 20:43 -from __future__ import unicode_literals +import uuid -from django.conf import settings -from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import facility_profile.models -import morango.models.fields.uuids import mptt.fields -import uuid +from django.conf import settings +from django.db import migrations +from django.db import models + +import morango.models.fields.uuids class Migration(migrations.Migration): @@ -53,7 +54,15 @@ class Migration(migrations.Migration): ('rght', models.PositiveIntegerField(db_index=True, editable=False)), ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)), ('level', models.PositiveIntegerField(db_index=True, editable=False)), - ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='facility_profile.Facility')), + ( + 'parent', mptt.fields.TreeForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.CASCADE, + related_name='children', + to='facility_profile.Facility' + ) + ), ], options={ 'abstract': False, diff --git a/tests/testapp/facility_profile/migrations/0002_auto_20220427_0449.py b/tests/testapp/facility_profile/migrations/0002_auto_20220427_0449.py index 40655df..7b7a231 100644 --- a/tests/testapp/facility_profile/migrations/0002_auto_20220427_0449.py +++ b/tests/testapp/facility_profile/migrations/0002_auto_20220427_0449.py @@ -1,10 +1,9 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2022-04-27 04:49 -from __future__ import unicode_literals - -from django.conf import settings -from django.db import migrations, models import django.db.models.deletion +from django.conf import settings +from django.db import migrations +from django.db import models class Migration(migrations.Migration): diff --git a/tests/testapp/facility_profile/models.py b/tests/testapp/facility_profile/models.py index ea65881..f2b405d 100644 --- a/tests/testapp/facility_profile/models.py +++ b/tests/testapp/facility_profile/models.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - import uuid from django.contrib.auth.models import AbstractBaseUser diff --git a/tests/testapp/testapp/postgres_settings.py b/tests/testapp/testapp/postgres_settings.py index 73e0c94..535b3a3 100644 --- a/tests/testapp/testapp/postgres_settings.py +++ b/tests/testapp/testapp/postgres_settings.py @@ -1,10 +1,6 @@ """ A settings module for running tests using a postgres db backend. """ -from __future__ import absolute_import -from __future__ import print_function -from __future__ import unicode_literals - from .settings import * # noqa DATABASES = {