Commit 4cec8cd8 authored by Raphaël Hertzog's avatar Raphaël Hertzog

Get rid of useless "from __future__ import unicode_literals"

parent 113f2b27
......@@ -7,7 +7,6 @@
# distribution and at https://deb.li/DTLicense. No part of Distro Tracker,
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
from __future__ import unicode_literals
from distro_tracker.accounts.models import User
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
......@@ -8,7 +8,6 @@
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
"""Models for the :mod:`distro_tracker.accounts` app."""
from __future__ import unicode_literals
from django_email_accounts.models import User as EmailAccountsUser
# Re-export some objects of django_email_accounts
......
......@@ -10,7 +10,6 @@
"""
Tests for the :mod:`distro_tracker.accounts` app.
"""
from __future__ import unicode_literals
from distro_tracker.test import TestCase
from distro_tracker.accounts.models import User
from distro_tracker.accounts.models import UserEmail
......
......@@ -8,7 +8,6 @@
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
"""Views for the :mod:`distro_tracker.accounts` app."""
from __future__ import unicode_literals
from django.views.generic.base import View
from django.urls import reverse_lazy
from django.shortcuts import get_object_or_404
......
......@@ -10,7 +10,6 @@
"""
Tests for the :mod:`distro_tracker.auto_news` app.
"""
from __future__ import unicode_literals
from distro_tracker.test import TestCase
from django.core.files.base import ContentFile
from unittest import mock
......
......@@ -10,7 +10,6 @@
"""
The Distro-Tracker-specific tasks for :mod:`distro_tracker.auto_news` app.
"""
from __future__ import unicode_literals
from distro_tracker.core.tasks import BaseTask
from distro_tracker.core.utils.http import get_resource_content
from distro_tracker.core.models import SourcePackageName
......
......@@ -11,7 +11,6 @@
Settings for the admin panel for the models defined in the
:mod:`distro_tracker.core` app.
"""
from __future__ import unicode_literals
from django.contrib import admin
from django import forms
from .models import Repository
......
......@@ -8,7 +8,6 @@
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
"""Implements Django context processors specific to Distro Tracker."""
from __future__ import unicode_literals
from django.conf import settings
......
......@@ -8,7 +8,6 @@
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
"""Forms for the :mod:`distro_tracker.core` app."""
from __future__ import unicode_literals
from django import forms
from django.template.defaultfilters import slugify
from distro_tracker.core.models import Team
......
......@@ -10,7 +10,6 @@
"""
Implements a command to perform various database fixups.
"""
from __future__ import unicode_literals
from django.db.models import Count
from django.db.models.functions import Lower
......
......@@ -11,7 +11,6 @@
Implements a command which starts all independent Distro Tracker tasks.
A task is a subclass of :class:`distro_tracker.core.tasks.BaseTask`.
"""
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from distro_tracker.core.tasks import run_all_tasks
import logging
......
......@@ -11,7 +11,6 @@
Implements a command to start a number of available Distro Tracker tasks.
A task is a subclass of :class:`distro_tracker.core.tasks.BaseTask`.
"""
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from distro_tracker.core.tasks import run_task
import traceback
......
......@@ -12,7 +12,6 @@ Implements a command which tries to update the signature information
for :class:`News <distro_tracker.core.models.News>` instances which do not have
any associated signatures.
"""
from __future__ import unicode_literals
from django.db import models
from django.core.management.base import BaseCommand
from distro_tracker.core.models import EmailNews
......
......@@ -8,7 +8,6 @@
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
"""Implements a command to update available pseudo packages."""
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from distro_tracker.core.models import PseudoPackageName
from distro_tracker.core.retrieve_data import update_pseudo_package_list
......
......@@ -15,7 +15,6 @@ It launches an
:class:`UpdateRepositoriesTask
<distro_tracker.core.retrieve_data.UpdateRepositoriesTask>` task.
"""
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from distro_tracker.core.retrieve_data import UpdateRepositoriesTask
from distro_tracker.core.tasks import run_task
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import jsonfield.fields
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-07 17:24
from __future__ import unicode_literals
from django.db import migrations, models
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
keywords = {
......
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-07-10 05:56
from __future__ import unicode_literals
from django.db import migrations
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
......
......@@ -8,7 +8,6 @@
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
"""Models for the :mod:`distro_tracker.core` app."""
from __future__ import unicode_literals
from email.utils import getaddresses
from email.utils import parseaddr
from email.iterators import typed_subpart_iterator
......
......@@ -9,7 +9,6 @@
# except according to the terms contained in the LICENSE file.
"""Implements the RSS news feed."""
from __future__ import unicode_literals
from django.conf import settings
from django.http import Http404
from django.contrib.syndication.views import Feed
......
......@@ -8,7 +8,6 @@
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
"""Implements the core panels shown on package pages."""
from __future__ import unicode_literals
from django.conf import settings
from django.utils.functional import cached_property
from django.core.exceptions import ObjectDoesNotExist
......
......@@ -8,7 +8,6 @@
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
"""Implements core data retrieval from various external resources."""
from __future__ import unicode_literals
from distro_tracker import vendor
from distro_tracker.core.models import PseudoPackageName, PackageName
from distro_tracker.core.models import Repository
......
......@@ -13,7 +13,6 @@ Implements a framework for implementing interdependent tasks.
It provides a way to run all tasks dependent on the original task
automatically.
"""
from __future__ import unicode_literals
from distro_tracker.core.utils.plugins import PluginRegistry
from distro_tracker.core.utils.datastructures import DAG
from distro_tracker.core.models import RunningJob
......
......@@ -8,7 +8,6 @@
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
"""Additional distro-tracker specific template tags."""
from __future__ import unicode_literals
from django import template
from django.template.loader import render_to_string
......
......@@ -13,7 +13,6 @@
"""
Tests for the Distro Tracker core management commands.
"""
from __future__ import unicode_literals
from unittest import mock
from django.core.management import call_command
......
......@@ -13,7 +13,6 @@
"""
Tests for the Distro Tracker core module's models.
"""
from __future__ import unicode_literals
from distro_tracker.test import TestCase
from django.test.utils import override_settings
from django.core.files.base import ContentFile
......
......@@ -13,7 +13,6 @@
"""
Tests for the :mod:`distro_tracker.core.news_feed` module.
"""
from __future__ import unicode_literals
from datetime import datetime
......
......@@ -13,7 +13,6 @@
"""
Tests for the Distro Tracker core panels.
"""
from __future__ import unicode_literals
from django.urls import reverse
from django.conf import settings
from bs4 import BeautifulSoup as soup
......
......@@ -13,7 +13,6 @@
"""
Tests for the Distro Tracker core data retrieval.
"""
from __future__ import unicode_literals
from distro_tracker.test import TestCase
from django.test.utils import override_settings
from unittest import mock
......
......@@ -13,7 +13,6 @@
"""
Tests for the Distro Tracker core's tasks framework.
"""
from __future__ import unicode_literals
from distro_tracker.test import TestCase
from unittest import mock
from distro_tracker.core.models import RunningJob
......
......@@ -13,7 +13,6 @@
"""
Tests for the Distro Tracker template tags.
"""
from __future__ import unicode_literals
from bs4 import BeautifulSoup as soup
from django.template import Template, Context
......
......@@ -13,7 +13,6 @@
"""
Tests for the Distro Tracker core utils.
"""
from __future__ import unicode_literals
import datetime
from email import encoders
from email.header import Header
......
......@@ -13,7 +13,6 @@
"""
Tests for the Distro Tracker core views.
"""
from __future__ import unicode_literals
from distro_tracker.test import TestCase, TemplateTestsMixin
from distro_tracker.core.models import BinaryPackage, BinaryPackageName
from distro_tracker.core.models import SourcePackageName, SourcePackage
......
......@@ -8,7 +8,6 @@
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
"""Various utilities for the distro-tracker project."""
from __future__ import unicode_literals
from django.template.loader import render_to_string
from django.http import HttpResponse
from django.db import models
......
......@@ -8,7 +8,6 @@
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
"""Utility data structures for Distro Tracker."""
from __future__ import unicode_literals
from collections import deque
from copy import deepcopy
......
......@@ -11,7 +11,6 @@
"""
Module including some utility functions and classes for manipulating email.
"""
from __future__ import unicode_literals
from django.core.mail import EmailMessage
from django.utils.encoding import force_bytes
from email.mime.base import MIMEBase
......
......@@ -11,7 +11,6 @@
Utilities for handling HTTP resource access.
"""
from __future__ import unicode_literals
from hashlib import md5
from django.utils import timezone
from django.utils.http import parse_http_date
......
......@@ -11,7 +11,6 @@
"""
Module including some utility functions to inject links in plain text.
"""
from __future__ import unicode_literals
import re
from django.conf import settings
......
......@@ -8,7 +8,6 @@
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
"""Utilities for processing Debian package information."""
from __future__ import unicode_literals
from distro_tracker.core.utils.email_messages import (
name_and_address_from_string as parse_address,
names_and_addresses_from_string as parse_addresses
......
......@@ -8,8 +8,6 @@
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
from __future__ import unicode_literals
class PluginRegistry(type):
"""
......
......@@ -24,7 +24,6 @@ It is implemented following the recommendations laid out in
>>> map(str, decode('itny-out-node42+21ann=old.example.com@domain.com'))
['itny-out@domain.com', 'node42!ann@old.example.com']
"""
from __future__ import unicode_literals
__all__ = ('encode', 'decode')
......
......@@ -8,7 +8,6 @@
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
"""Views for the :mod:`distro_tracker.core` app."""
from __future__ import unicode_literals
import importlib
from django.conf import settings
from django.db.models import Q
......
......@@ -8,7 +8,6 @@
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
from __future__ import unicode_literals
from django.conf.urls import url
......
......@@ -13,7 +13,6 @@
Tests for the :mod:`distro_tracker.extract_source_files` app.
"""
from __future__ import unicode_literals
from distro_tracker.test import TestCase
from django.core.files.base import ContentFile
from distro_tracker.core.models import SourcePackage, SourcePackageName
......
......@@ -11,7 +11,6 @@
Implements the classes necessary to place the links to extracted source
files in the :class:`distro_tracker.core.panels.VersionedLinks` panel.
"""
from __future__ import unicode_literals
from distro_tracker.core.panels import VersionedLinks
from distro_tracker.core.models import ExtractedSourceFile
from distro_tracker.core.templatetags.distro_tracker_extras import octicon
......
......@@ -11,7 +11,6 @@
Implements the Distro Tracker tasks necessary for interesting package source
files.
"""
from __future__ import unicode_literals
from distro_tracker.core.tasks import BaseTask
from distro_tracker.core.utils.packages import AptCache
from distro_tracker.core.models import ExtractedSourceFile
......
......@@ -10,7 +10,6 @@
"""
Module implementing the processing of email control messages.
"""
from __future__ import unicode_literals
from email.iterators import typed_subpart_iterator
from django.core.mail import EmailMessage
......
......@@ -11,7 +11,6 @@
"""
Defines and implements all Distro Tracker control commands.
"""
from __future__ import unicode_literals
from django.conf import settings
......
......@@ -11,7 +11,6 @@
The module defining common functionality and base classes for all email control
commands.
"""
from __future__ import unicode_literals
import re
from django.conf import settings
......
......@@ -11,7 +11,6 @@
Implements classes and functions related to commands which require confirmation
and confirming such commands.
"""
from __future__ import unicode_literals
from distro_tracker.core.utils import get_or_none
from distro_tracker.mail.models import CommandConfirmation
......
......@@ -10,7 +10,6 @@
"""
Implements all commands which deal with message keywords.
"""
from __future__ import unicode_literals
from distro_tracker.mail.control.commands.base import Command
from distro_tracker.core.models import (
......
......@@ -10,7 +10,6 @@
"""
Implementation of miscellaneous commands.
"""
from __future__ import unicode_literals
from distro_tracker.core.utils import get_or_none
from distro_tracker.core.utils import distro_tracker_render_to_string
......
......@@ -10,7 +10,6 @@
"""
Implements all commands which deal with teams.
"""
from __future__ import unicode_literals
from distro_tracker.mail.control.commands.base import Command
from distro_tracker.mail.control.commands.confirmation import needs_confirmation
......
......@@ -11,7 +11,6 @@
Implements the processing of received package messages in order to dispatch
them to subscribers.
"""
from __future__ import unicode_literals
from copy import deepcopy
from datetime import datetime
import logging
......
......@@ -11,7 +11,6 @@
Module implementing the processing of received emails which could be turned
into news items.
"""
from __future__ import unicode_literals
from django.utils.html import escape
from distro_tracker.core.utils import message_from_bytes
from distro_tracker.core.utils import get_or_none
......
......@@ -10,7 +10,6 @@
"""
Implements a management command which adds a new keyword.
"""
from __future__ import unicode_literals
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
......
......@@ -10,7 +10,6 @@
"""
Implements the command which outputs all subscribers for given packages.
"""
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
import json
......
......@@ -10,7 +10,6 @@
"""
Implements the command which outputs statistics.
"""
from __future__ import unicode_literals
from __future__ import print_function
from django.core.management.base import BaseCommand
from django.utils import timezone
......
......@@ -10,7 +10,6 @@
"""
Implements the command which removes all subscriptions for a given email.
"""
from __future__ import unicode_literals
from django.core.management.base import BaseCommand, CommandError
from distro_tracker.core.models import UserEmail, EmailSettings
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
......
......@@ -10,7 +10,6 @@
"""
Defines models specific for the :py:mod:`distro_tracker.mail` app.
"""
from __future__ import unicode_literals
from django.db import models
from django.conf import settings
from django_email_accounts.models import UserEmailManager
......
......@@ -10,7 +10,6 @@
"""
Module implementing the processing of incoming email messages.
"""
from __future__ import unicode_literals
import asyncore
from datetime import timedelta
import email
......
......@@ -12,7 +12,6 @@
"""
Tests for :mod:`distro_tracker.mail.tracker_control`.
"""
from __future__ import unicode_literals
from django.conf import settings
from distro_tracker.test import TestCase
from django.core import mail
......
......@@ -13,7 +13,6 @@
This module contains the tests for the dispatch functionality
(:py:mod:`distro_tracker.mail.dispatch` module) of distro-tracker.
"""
from __future__ import unicode_literals
from email.message import Message
from datetime import timedelta
import logging
......
......@@ -13,7 +13,6 @@
Tests for the :mod:`distro_tracker.mail.mail_news` app.
"""
from __future__ import unicode_literals
from distro_tracker.test import TestCase, SimpleTestCase
from unittest import mock
from django.utils.encoding import force_bytes
......
......@@ -10,7 +10,6 @@
"""
Tests the management command of the :mod:`distro_tracker.mail` app.
"""
from __future__ import unicode_literals
from distro_tracker.test import TestCase
from distro_tracker.mail.management.commands.tracker_control import (
Command as ControlCommand)
......
......@@ -12,7 +12,6 @@
"""
Tests for :mod:`distro_tracker.mail.processor`.
"""
from __future__ import unicode_literals
from email.message import Message
from datetime import datetime
from datetime import timedelta
......
......@@ -120,7 +120,6 @@ of those settings.
More settings:
"""
from __future__ import unicode_literals
import django
from django.core.exceptions import ImproperlyConfigured
from os.path import dirname
......
......@@ -3,7 +3,6 @@
The paths indicated in this file are those setup by the official Debian
package.
"""
from __future__ import unicode_literals
DISTRO_TRACKER_DATA_PATH = '/var/lib/distro-tracker'
DISTRO_TRACKER_CACHE_DIRECTORY = '/var/cache/distro-tracker'
......
......@@ -9,7 +9,6 @@
# except according to the terms contained in the LICENSE file.
"""The URL routes for the Distro Tracker project."""
from __future__ import unicode_literals
import importlib
......
......@@ -13,7 +13,6 @@
Tests for the :mod:`distro_tracker.stdver_warnings` app.
"""
from __future__ import unicode_literals
from distro_tracker.test import TestCase
from unittest import mock
from distro_tracker.stdver_warnings.tracker_tasks \
......
......@@ -13,7 +13,6 @@
Distro Tracker tasks for the :mod:`distro_tracker.stdver_warnings` app.
"""
from __future__ import unicode_literals
from distro_tracker.core.tasks import BaseTask
from distro_tracker.core.utils import get_or_none
from distro_tracker.core.models import SourcePackageName
......
......@@ -14,7 +14,6 @@
Tests for test functionalities of Distro Tracker.
"""
from __future__ import unicode_literals
from distro_tracker.test import SimpleTestCase, TestCase, TransactionTestCase
from distro_tracker.test import TempDirsMixin
from django.conf import settings
......
......@@ -7,7 +7,6 @@
# distribution and at https://deb.li/DTLicense. No part of Distro Tracker,
# including this file, may be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
from __future__ import unicode_literals
from django.core.management.base import BaseCommand, CommandError
from django.utils import timezone
from django.core.files.base import ContentFile
......