launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #07124
[Merge] lp:~allenap/maas/absolute-imports into lp:maas
Gavin Panella has proposed merging lp:~allenap/maas/absolute-imports into lp:maas.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~allenap/maas/absolute-imports/+merge/102082
--
https://code.launchpad.net/~allenap/maas/absolute-imports/+merge/102082
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~allenap/maas/absolute-imports into lp:maas.
=== modified file 'contrib/wsgi.py'
--- contrib/wsgi.py 2012-03-06 15:24:01 +0000
+++ contrib/wsgi.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""WSGI Application."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'setup.py'
--- setup.py 2012-03-21 17:47:48 +0000
+++ setup.py 2012-04-16 10:09:20 +0000
@@ -5,6 +5,7 @@
"""Distutils installer for maas."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maas/__init__.py'
--- src/maas/__init__.py 2012-03-15 13:56:39 +0000
+++ src/maas/__init__.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""MAAS web."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maas/demo.py'
--- src/maas/demo.py 2012-03-26 11:56:00 +0000
+++ src/maas/demo.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Django DEMO settings for maas project."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maas/development.py'
--- src/maas/development.py 2012-03-29 15:40:12 +0000
+++ src/maas/development.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Django DEVELOPMENT settings for maas project."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maas/settings.py'
--- src/maas/settings.py 2012-04-12 16:21:44 +0000
+++ src/maas/settings.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Django settings for maas project."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maas/tests/test_maas.py'
--- src/maas/tests/test_maas.py 2012-03-15 18:38:12 +0000
+++ src/maas/tests/test_maas.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test the maas package."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maas/urls.py'
--- src/maas/urls.py 2012-03-19 03:24:16 +0000
+++ src/maas/urls.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""URL configuration for the maas project."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/__init__.py'
--- src/maasserver/__init__.py 2012-03-15 13:58:32 +0000
+++ src/maasserver/__init__.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""MAAS Server application."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/api.py'
--- src/maasserver/api.py 2012-04-12 05:00:51 +0000
+++ src/maasserver/api.py 2012-04-16 10:09:20 +0000
@@ -47,6 +47,7 @@
"""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/api_auth.py'
--- src/maasserver/api_auth.py 2012-03-15 13:58:32 +0000
+++ src/maasserver/api_auth.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""OAuth authentication for the various APIs."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/components.py'
--- src/maasserver/components.py 2012-04-11 13:19:39 +0000
+++ src/maasserver/components.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""MAAS components management."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/context_processors.py'
--- src/maasserver/context_processors.py 2012-04-06 14:48:18 +0000
+++ src/maasserver/context_processors.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Context processors."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/exceptions.py'
--- src/maasserver/exceptions.py 2012-04-02 14:40:17 +0000
+++ src/maasserver/exceptions.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Exceptions."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/fields.py'
--- src/maasserver/fields.py 2012-03-26 05:57:07 +0000
+++ src/maasserver/fields.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Custom model fields."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/forms.py'
--- src/maasserver/forms.py 2012-04-12 05:40:40 +0000
+++ src/maasserver/forms.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Forms."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/maasavahi.py'
--- src/maasserver/maasavahi.py 2012-03-20 21:16:06 +0000
+++ src/maasserver/maasavahi.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Glue to publish MAAS over Avahi."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/management/commands/createadmin.py'
--- src/maasserver/management/commands/createadmin.py 2012-03-22 20:40:41 +0000
+++ src/maasserver/management/commands/createadmin.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Django command: create a superuser with an empty email."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/management/commands/deletedb.py'
--- src/maasserver/management/commands/deletedb.py 2012-01-24 12:44:48 +0000
+++ src/maasserver/management/commands/deletedb.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Django command: stop and delete the local database cluster."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/management/commands/gc.py'
--- src/maasserver/management/commands/gc.py 2012-03-05 17:13:27 +0000
+++ src/maasserver/management/commands/gc.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Custom django command: garabge-collect."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/management/commands/query.py'
--- src/maasserver/management/commands/query.py 2012-01-24 12:44:48 +0000
+++ src/maasserver/management/commands/query.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Django command: access the development database directly in SQL."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/management/commands/runserver.py'
--- src/maasserver/management/commands/runserver.py 2012-04-02 07:06:37 +0000
+++ src/maasserver/management/commands/runserver.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Django command: run the server. Overrides the default implementation."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/messages.py'
--- src/maasserver/messages.py 2012-03-22 05:20:04 +0000
+++ src/maasserver/messages.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Messages."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/middleware.py'
--- src/maasserver/middleware.py 2012-04-02 14:45:28 +0000
+++ src/maasserver/middleware.py 2012-04-16 10:09:20 +0000
@@ -2,6 +2,7 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/migrations/0001_initial.py'
--- src/maasserver/migrations/0001_initial.py 2012-03-21 12:18:48 +0000
+++ src/maasserver/migrations/0001_initial.py 2012-04-16 10:09:20 +0000
@@ -4,9 +4,11 @@
"""Initial maasserver migration."""
from __future__ import (
- print_function,
# This breaks South.
#unicode_literals,
+ absolute_import,
+ print_function,
+ unicode_literals,
)
__metaclass__ = type
=== modified file 'src/maasserver/migrations/0002_macaddress_unique.py'
--- src/maasserver/migrations/0002_macaddress_unique.py 2012-03-29 16:06:18 +0000
+++ src/maasserver/migrations/0002_macaddress_unique.py 2012-04-16 10:09:20 +0000
@@ -4,9 +4,11 @@
"""Maasserver migration 0002_macaddress_unique."""
from __future__ import (
- print_function,
# This breaks South.
#unicode_literals,
+ absolute_import,
+ print_function,
+ unicode_literals,
)
__metaclass__ = type
=== modified file 'src/maasserver/models.py'
--- src/maasserver/models.py 2012-04-16 02:50:38 +0000
+++ src/maasserver/models.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""MAAS model objects."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/provisioning.py'
--- src/maasserver/provisioning.py 2012-04-12 16:21:44 +0000
+++ src/maasserver/provisioning.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Interact with the Provisioning API."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/rabbit.py'
--- src/maasserver/rabbit.py 2012-03-22 05:20:04 +0000
+++ src/maasserver/rabbit.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Rabbit messaging."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/templatetags/field_type.py'
--- src/maasserver/templatetags/field_type.py 2012-03-09 14:50:53 +0000
+++ src/maasserver/templatetags/field_type.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Field type template tag."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/testing/__init__.py'
--- src/maasserver/testing/__init__.py 2012-03-28 16:00:26 +0000
+++ src/maasserver/testing/__init__.py 2012-04-16 10:09:20 +0000
@@ -2,6 +2,7 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/testing/enum.py'
--- src/maasserver/testing/enum.py 2012-03-05 06:04:49 +0000
+++ src/maasserver/testing/enum.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Enumeration helpers."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/testing/factory.py'
--- src/maasserver/testing/factory.py 2012-04-11 06:53:08 +0000
+++ src/maasserver/testing/factory.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test object factories."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/testing/models.py'
--- src/maasserver/testing/models.py 2012-03-05 12:14:21 +0000
+++ src/maasserver/testing/models.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test model for tests of testing module."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/testing/oauthclient.py'
--- src/maasserver/testing/oauthclient.py 2012-02-22 15:54:52 +0000
+++ src/maasserver/testing/oauthclient.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""OAuth client for API testing."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/testing/testcase.py'
--- src/maasserver/testing/testcase.py 2012-04-06 15:57:11 +0000
+++ src/maasserver/testing/testcase.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Custom test-case classes."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/testing/tests/test_enum.py'
--- src/maasserver/testing/tests/test_enum.py 2012-03-13 05:34:38 +0000
+++ src/maasserver/testing/tests/test_enum.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for enumeration helpers."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/testing/tests/test_factory.py'
--- src/maasserver/testing/tests/test_factory.py 2012-03-29 15:14:41 +0000
+++ src/maasserver/testing/tests/test_factory.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test the factory where appropriate. Don't overdo this."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/testing/tests/test_module.py'
--- src/maasserver/testing/tests/test_module.py 2012-03-22 03:08:48 +0000
+++ src/maasserver/testing/tests/test_module.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for `maasserver.testing`."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/models.py'
--- src/maasserver/tests/models.py 2012-03-12 16:26:29 +0000
+++ src/maasserver/tests/models.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test related classes and functions for maas and its applications."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_api.py'
--- src/maasserver/tests/test_api.py 2012-04-12 05:40:40 +0000
+++ src/maasserver/tests/test_api.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test maasserver API."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_auth.py'
--- src/maasserver/tests/test_auth.py 2012-04-03 13:55:42 +0000
+++ src/maasserver/tests/test_auth.py 2012-04-16 10:09:20 +0000
@@ -2,6 +2,7 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_commands.py'
--- src/maasserver/tests/test_commands.py 2012-03-29 08:58:00 +0000
+++ src/maasserver/tests/test_commands.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test custom commands, as found in src/maasserver/management/commands."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_components.py'
--- src/maasserver/tests/test_components.py 2012-04-11 13:19:39 +0000
+++ src/maasserver/tests/test_components.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test maasserver components module."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_configuration.py'
--- src/maasserver/tests/test_configuration.py 2012-03-13 05:34:38 +0000
+++ src/maasserver/tests/test_configuration.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests configuration."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_fields.py'
--- src/maasserver/tests/test_fields.py 2012-03-26 05:57:07 +0000
+++ src/maasserver/tests/test_fields.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test custom model fields."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_forms.py'
--- src/maasserver/tests/test_forms.py 2012-04-12 05:40:40 +0000
+++ src/maasserver/tests/test_forms.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test forms."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_js.py'
--- src/maasserver/tests/test_js.py 2012-02-24 14:02:16 +0000
+++ src/maasserver/tests/test_js.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Run YUI3 unit tests with SST (http://testutils.org/sst/)."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_maasavahi.py'
--- src/maasserver/tests/test_maasavahi.py 2012-03-21 12:18:48 +0000
+++ src/maasserver/tests/test_maasavahi.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for the Avahi export of MAAS."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_messages.py'
--- src/maasserver/tests/test_messages.py 2012-03-22 05:20:04 +0000
+++ src/maasserver/tests/test_messages.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test maasserver messages."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_middleware.py'
--- src/maasserver/tests/test_middleware.py 2012-04-02 14:58:26 +0000
+++ src/maasserver/tests/test_middleware.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test maasserver middleware classes."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_models.py'
--- src/maasserver/tests/test_models.py 2012-04-12 05:00:51 +0000
+++ src/maasserver/tests/test_models.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test maasserver models."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_provisioning.py'
--- src/maasserver/tests/test_provisioning.py 2012-04-12 16:21:44 +0000
+++ src/maasserver/tests/test_provisioning.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for `maasserver.provisioning`."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_rabbit.py'
--- src/maasserver/tests/test_rabbit.py 2012-03-23 05:02:31 +0000
+++ src/maasserver/tests/test_rabbit.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Rabbit messaging tests."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_runserver.py'
--- src/maasserver/tests/test_runserver.py 2012-03-13 05:34:38 +0000
+++ src/maasserver/tests/test_runserver.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for the "runserver" command module."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_views.py'
--- src/maasserver/tests/test_views.py 2012-04-12 14:23:32 +0000
+++ src/maasserver/tests/test_views.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test maasserver API."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/tests/test_zeroconfservice.py'
--- src/maasserver/tests/test_zeroconfservice.py 2012-03-21 14:09:06 +0000
+++ src/maasserver/tests/test_zeroconfservice.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for `zeroconfservice`."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/urls.py'
--- src/maasserver/urls.py 2012-04-03 09:58:17 +0000
+++ src/maasserver/urls.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""URL routing configuration."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/urls_api.py'
--- src/maasserver/urls_api.py 2012-03-15 13:58:32 +0000
+++ src/maasserver/urls_api.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""URL API routing configuration."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maasserver/views.py'
--- src/maasserver/views.py 2012-04-12 13:14:10 +0000
+++ src/maasserver/views.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Views."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
@@ -31,7 +32,6 @@
import mimetypes
import os
import urllib2
-from django.utils.safestring import mark_safe
from convoy.combo import (
combine_files,
@@ -61,6 +61,7 @@
render_to_response,
)
from django.template import RequestContext
+from django.utils.safestring import mark_safe
from django.views.generic import (
CreateView,
DeleteView,
=== modified file 'src/maasserver/zeroconfservice.py'
--- src/maasserver/zeroconfservice.py 2012-03-21 12:18:48 +0000
+++ src/maasserver/zeroconfservice.py 2012-04-16 10:09:20 +0000
@@ -7,6 +7,7 @@
"""Work with Zeroconf."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maastesting/factory.py'
--- src/maastesting/factory.py 2012-03-30 14:54:57 +0000
+++ src/maastesting/factory.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test object factories."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maastesting/management/commands/reconcile.py'
--- src/maastesting/management/commands/reconcile.py 2012-03-28 15:52:51 +0000
+++ src/maastesting/management/commands/reconcile.py 2012-04-16 10:09:20 +0000
@@ -18,6 +18,7 @@
"""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maastesting/management/commands/tests/test_reconcile.py'
--- src/maastesting/management/commands/tests/test_reconcile.py 2012-03-28 15:42:37 +0000
+++ src/maastesting/management/commands/tests/test_reconcile.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for `maastesting.management.commands.reconcile`."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
@@ -11,10 +12,10 @@
__metaclass__ = type
__all__ = []
-from maastesting.testcase import TestCase
from maastesting.management.commands.reconcile import (
guess_architecture_from_profile,
)
+from maastesting.testcase import TestCase
class TestFunctions(TestCase):
=== modified file 'src/maastesting/rabbit.py'
--- src/maastesting/rabbit.py 2012-03-17 12:24:49 +0000
+++ src/maastesting/rabbit.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Helpers for testing with RabbitMQ."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maastesting/runner.py'
--- src/maastesting/runner.py 2012-01-25 14:24:52 +0000
+++ src/maastesting/runner.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test runner for maas and its applications."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maastesting/testcase.py'
--- src/maastesting/testcase.py 2012-04-03 08:50:43 +0000
+++ src/maastesting/testcase.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test related classes and functions for maas and its applications."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maastesting/tests/__init__.py'
--- src/maastesting/tests/__init__.py 2012-01-23 12:42:42 +0000
+++ src/maastesting/tests/__init__.py 2012-04-16 10:09:20 +0000
@@ -2,6 +2,7 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maastesting/tests/test_factory.py'
--- src/maastesting/tests/test_factory.py 2012-03-30 11:12:48 +0000
+++ src/maastesting/tests/test_factory.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test the factory where appropriate. Don't overdo this."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/maastesting/tests/test_rabbit.py'
--- src/maastesting/tests/test_rabbit.py 2012-03-17 12:34:35 +0000
+++ src/maastesting/tests/test_rabbit.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for `maastesting.rabbit`."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/metadataserver/address.py'
--- src/metadataserver/address.py 2012-03-19 12:43:13 +0000
+++ src/metadataserver/address.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Figure out server address for the maas_url setting."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/metadataserver/api.py'
--- src/metadataserver/api.py 2012-04-13 21:26:47 +0000
+++ src/metadataserver/api.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Metadata API."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/metadataserver/fields.py'
--- src/metadataserver/fields.py 2012-03-28 20:13:23 +0000
+++ src/metadataserver/fields.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Custom field types for the metadata server."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/metadataserver/middleware.py'
--- src/metadataserver/middleware.py 2012-02-22 15:51:15 +0000
+++ src/metadataserver/middleware.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Django "middlewares" for the metadata API."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/metadataserver/migrations/0001_initial.py'
--- src/metadataserver/migrations/0001_initial.py 2012-03-21 12:18:48 +0000
+++ src/metadataserver/migrations/0001_initial.py 2012-04-16 10:09:20 +0000
@@ -4,9 +4,11 @@
"""Initial metadataserver migration."""
from __future__ import (
- print_function,
# This breaks South.
#unicode_literals,
+ absolute_import,
+ print_function,
+ unicode_literals,
)
__metaclass__ = type
=== modified file 'src/metadataserver/models.py'
--- src/metadataserver/models.py 2012-04-11 06:11:36 +0000
+++ src/metadataserver/models.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Model for the metadata server."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/metadataserver/nodeinituser.py'
--- src/metadataserver/nodeinituser.py 2012-02-16 13:45:37 +0000
+++ src/metadataserver/nodeinituser.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""User management for nodes' access to the metadata service."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/metadataserver/tests/__init__.py'
--- src/metadataserver/tests/__init__.py 2012-03-16 17:01:35 +0000
+++ src/metadataserver/tests/__init__.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for `metadataserver`."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/metadataserver/tests/models.py'
--- src/metadataserver/tests/models.py 2012-02-24 10:15:13 +0000
+++ src/metadataserver/tests/models.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test model for testing BinaryField."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/metadataserver/tests/test_address.py'
--- src/metadataserver/tests/test_address.py 2012-03-19 12:28:41 +0000
+++ src/metadataserver/tests/test_address.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test server-address-guessing logic."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/metadataserver/tests/test_api.py'
--- src/metadataserver/tests/test_api.py 2012-04-13 21:26:47 +0000
+++ src/metadataserver/tests/test_api.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for the metadata API."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/metadataserver/tests/test_fields.py'
--- src/metadataserver/tests/test_fields.py 2012-03-13 05:34:38 +0000
+++ src/metadataserver/tests/test_fields.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Test custom field types."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/metadataserver/tests/test_models.py'
--- src/metadataserver/tests/test_models.py 2012-04-11 07:42:23 +0000
+++ src/metadataserver/tests/test_models.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Model tests for metadata server."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/metadataserver/tests/test_nodeinituser.py'
--- src/metadataserver/tests/test_nodeinituser.py 2012-03-13 05:34:38 +0000
+++ src/metadataserver/tests/test_nodeinituser.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Model tests for metadata server."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/metadataserver/urls.py'
--- src/metadataserver/urls.py 2012-03-06 15:24:01 +0000
+++ src/metadataserver/urls.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Metadata API URLs."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/amqpclient.py'
--- src/provisioningserver/amqpclient.py 2012-02-01 15:09:40 +0000
+++ src/provisioningserver/amqpclient.py 2012-04-16 10:09:20 +0000
@@ -8,6 +8,7 @@
"""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/api.py'
--- src/provisioningserver/api.py 2012-04-05 17:42:01 +0000
+++ src/provisioningserver/api.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Provisioning API for external use."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/cobblercatcher.py'
--- src/provisioningserver/cobblercatcher.py 2012-03-28 20:13:23 +0000
+++ src/provisioningserver/cobblercatcher.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Helping hands for dealing with Cobbler exceptions."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/cobblerclient.py'
--- src/provisioningserver/cobblerclient.py 2012-04-12 09:54:29 +0000
+++ src/provisioningserver/cobblerclient.py 2012-04-16 10:09:20 +0000
@@ -2,6 +2,7 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/enum.py'
--- src/provisioningserver/enum.py 2012-04-12 09:54:29 +0000
+++ src/provisioningserver/enum.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Enumerations meaningful to the provisioning server."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/interfaces.py'
--- src/provisioningserver/interfaces.py 2012-04-05 15:53:22 +0000
+++ src/provisioningserver/interfaces.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Provisioning API interfaces."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/plugin.py'
--- src/provisioningserver/plugin.py 2012-04-10 21:21:42 +0000
+++ src/provisioningserver/plugin.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Twisted Application Plugin code for the MAAS provisioning server"""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
@@ -13,7 +14,6 @@
from getpass import getuser
-from amqpclient import AMQFactory
from formencode import Schema
from formencode.validators import (
Int,
@@ -21,6 +21,7 @@
String,
URL,
)
+from provisioningserver.amqpclient import AMQFactory
from provisioningserver.cobblerclient import CobblerSession
from provisioningserver.remote import ProvisioningAPI_XMLRPC
from provisioningserver.services import (
=== modified file 'src/provisioningserver/remote.py'
--- src/provisioningserver/remote.py 2012-02-08 21:12:45 +0000
+++ src/provisioningserver/remote.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Provisioning API over XML-RPC."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/services.py'
--- src/provisioningserver/services.py 2012-03-15 13:58:32 +0000
+++ src/provisioningserver/services.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Additional services that compose the MAAS Provisioning Server."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/testing/amqpclient.py'
--- src/provisioningserver/testing/amqpclient.py 2012-03-21 21:49:38 +0000
+++ src/provisioningserver/testing/amqpclient.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for `provisioningserver.amqpclient`."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/testing/factory.py'
--- src/provisioningserver/testing/factory.py 2012-04-05 15:39:46 +0000
+++ src/provisioningserver/testing/factory.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Provisioning test-objects factory."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/testing/fakeapi.py'
--- src/provisioningserver/testing/fakeapi.py 2012-04-05 17:42:01 +0000
+++ src/provisioningserver/testing/fakeapi.py 2012-04-16 10:09:20 +0000
@@ -12,6 +12,7 @@
"""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/testing/fakecobbler.py'
--- src/provisioningserver/testing/fakecobbler.py 2012-03-29 15:59:26 +0000
+++ src/provisioningserver/testing/fakecobbler.py 2012-04-16 10:09:20 +0000
@@ -2,6 +2,7 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/testing/realcobbler.py'
--- src/provisioningserver/testing/realcobbler.py 2012-03-16 10:19:30 +0000
+++ src/provisioningserver/testing/realcobbler.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Set up test sessions against real Cobblers."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/tests/__init__.py'
--- src/provisioningserver/tests/__init__.py 2012-03-16 17:05:42 +0000
+++ src/provisioningserver/tests/__init__.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for `provisioningserver`."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/tests/test_amqaclient.py'
--- src/provisioningserver/tests/test_amqaclient.py 2012-02-02 23:48:04 +0000
+++ src/provisioningserver/tests/test_amqaclient.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for C{AMQFactory}."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/tests/test_api.py'
--- src/provisioningserver/tests/test_api.py 2012-04-05 18:39:06 +0000
+++ src/provisioningserver/tests/test_api.py 2012-04-16 10:09:20 +0000
@@ -7,6 +7,7 @@
"""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/tests/test_cobblercatcher.py'
--- src/provisioningserver/tests/test_cobblercatcher.py 2012-03-20 02:45:17 +0000
+++ src/provisioningserver/tests/test_cobblercatcher.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for conversion of Cobbler exceptions to `ProvisioningError`."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/tests/test_cobblerclient.py'
--- src/provisioningserver/tests/test_cobblerclient.py 2012-02-08 16:42:55 +0000
+++ src/provisioningserver/tests/test_cobblerclient.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for `provisioningserver.cobblerclient`."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/tests/test_cobblersession.py'
--- src/provisioningserver/tests/test_cobblersession.py 2012-04-12 11:09:31 +0000
+++ src/provisioningserver/tests/test_cobblersession.py 2012-04-16 10:09:20 +0000
@@ -2,6 +2,7 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/tests/test_fakecobbler.py'
--- src/provisioningserver/tests/test_fakecobbler.py 2012-03-29 15:59:26 +0000
+++ src/provisioningserver/tests/test_fakecobbler.py 2012-04-16 10:09:20 +0000
@@ -2,6 +2,7 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/tests/test_plugin.py'
--- src/provisioningserver/tests/test_plugin.py 2012-04-11 14:43:10 +0000
+++ src/provisioningserver/tests/test_plugin.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for the psmaas TAP."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/tests/test_remote.py'
--- src/provisioningserver/tests/test_remote.py 2012-02-08 21:32:08 +0000
+++ src/provisioningserver/tests/test_remote.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for `provisioningserver.remote`."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/tests/test_services.py'
--- src/provisioningserver/tests/test_services.py 2012-02-02 15:06:48 +0000
+++ src/provisioningserver/tests/test_services.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Tests for `provisioningserver.services`."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'src/provisioningserver/utils.py'
--- src/provisioningserver/utils.py 2012-02-08 21:12:45 +0000
+++ src/provisioningserver/utils.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Utilities for the provisioning server."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'templates/module.py'
--- templates/module.py 2012-01-24 12:44:48 +0000
+++ templates/module.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""..."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'templates/script.py'
--- templates/script.py 2012-03-22 20:20:20 +0000
+++ templates/script.py 2012-04-16 10:09:20 +0000
@@ -5,6 +5,7 @@
"""..."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'templates/test_module.py'
--- templates/test_module.py 2012-03-13 05:34:38 +0000
+++ templates/test_module.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""..."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'twisted/plugins/maasps.py'
--- twisted/plugins/maasps.py 2012-03-15 13:58:32 +0000
+++ twisted/plugins/maasps.py 2012-04-16 10:09:20 +0000
@@ -4,6 +4,7 @@
"""Twisted Application Plugin for the MAAS provisioning server."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== added file 'utilities/rewrite-future-imports'
--- utilities/rewrite-future-imports 1970-01-01 00:00:00 +0000
+++ utilities/rewrite-future-imports 2012-04-16 10:09:20 +0000
@@ -0,0 +1,42 @@
+#!/usr/bin/env python2.7
+# Copyright 2012 Canonical Ltd. This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+"""Ensure that __future__ import lines are populated correctly."""
+
+from __future__ import (
+ absolute_import,
+ print_function,
+ unicode_literals,
+ )
+
+__metaclass__ = type
+
+import re
+import sys
+
+
+re_futures = re.compile(
+ r"^(from __future__ import) [(](.*?)[)]", re.DOTALL | re.MULTILINE)
+
+
+mandatory_future_imports = frozenset(
+ ("absolute_import", "print_function", "unicode_literals"))
+
+
+def replace(match):
+ imports = set().union(
+ (name.strip() for name in match.group(2).split(",")),
+ mandatory_future_imports)
+ imports.discard("")
+ imports = "".join(" %s,\n" % name for name in sorted(imports))
+ return "%s (\n%s )" % (match.group(1), imports)
+
+
+if __name__ == '__main__':
+ for filename in sys.argv[1:]:
+ with open(filename, "rb") as fd:
+ source = fd.read()
+ source = re_futures.sub(replace, source)
+ with open(filename, "wb") as fd:
+ fd.write(source)
=== modified file 'vdenv/api-list.py'
--- vdenv/api-list.py 2012-04-10 23:15:09 +0000
+++ vdenv/api-list.py 2012-04-16 10:09:20 +0000
@@ -5,6 +5,7 @@
"""Print information from the Cobbler server."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)
=== modified file 'vdenv/setup.py'
--- vdenv/setup.py 2012-03-20 14:22:16 +0000
+++ vdenv/setup.py 2012-04-16 10:09:20 +0000
@@ -5,6 +5,7 @@
"""Setup a Virtual Data-center Environment."""
from __future__ import (
+ absolute_import,
print_function,
unicode_literals,
)