[Py2to3] Force unicode_literals and fix related issues
* Added `from __future__ import unicode_literals` to every file so now all strings in code are forced to be unicode strings unless marked as byte string `b'str'` or encoded to byte string `'str'.encode('utf-8')`. This is a large change but we have been working towards the goal of unicode strings passed in the code so decoding external input and encoding output as byte strings (where applicable). Note that in Python 2 the `str` type still refers to byte strings. * Replaced the use of `str` for `basestring` in isinstance comparison as this was the original intention but breaks code when encoutering unicode strings. * Marked byte strings in gtkui as the conversion to utf8 is not always handled, mostly related to gobject signal names.
This commit is contained in:
parent
011afe3e89
commit
84802da29b
|
@ -1,4 +1,6 @@
|
|||
"""Deluge"""
|
||||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from new import classobj
|
||||
|
||||
from deluge.core.core import Core
|
||||
|
|
|
@ -15,6 +15,7 @@ Example:
|
|||
>>> from deluge._libtorrent import lt
|
||||
|
||||
"""
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from deluge.common import VersionSplit, get_version
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#
|
||||
|
||||
"""Common functions for various parts of Deluge to use."""
|
||||
from __future__ import division, print_function
|
||||
from __future__ import division, print_function, unicode_literals
|
||||
|
||||
import base64
|
||||
import functools
|
||||
|
@ -800,7 +800,7 @@ def decode_string(s, encoding='utf8'):
|
|||
|
||||
"""
|
||||
if not s:
|
||||
return u''
|
||||
return ''
|
||||
elif isinstance(s, unicode):
|
||||
return s
|
||||
|
||||
|
@ -817,7 +817,7 @@ def decode_string(s, encoding='utf8'):
|
|||
return s.decode(*l())
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
return u''
|
||||
return ''
|
||||
|
||||
|
||||
def utf8_encoded(s, encoding='utf8'):
|
||||
|
@ -871,6 +871,7 @@ class VersionSplit(object):
|
|||
vs = ver.replace('_', '-').split('-')
|
||||
|
||||
self.version = [int(x) for x in vs[0].split('.') if x.isdigit()]
|
||||
self.version_string = ''.join(str(x) for x in vs[0].split('.') if x.isdigit())
|
||||
self.suffix = None
|
||||
self.dev = False
|
||||
if len(vs) > 1:
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
from collections import defaultdict
|
||||
|
@ -305,7 +307,7 @@ class ComponentRegistry(object):
|
|||
# Start all the components if names is empty
|
||||
if not names:
|
||||
names = self.components.keys()
|
||||
elif isinstance(names, str):
|
||||
elif isinstance(names, basestring):
|
||||
names = [names]
|
||||
|
||||
def on_depends_started(result, name):
|
||||
|
@ -339,7 +341,7 @@ class ComponentRegistry(object):
|
|||
"""
|
||||
if not names:
|
||||
names = self.components.keys()
|
||||
elif isinstance(names, str):
|
||||
elif isinstance(names, basestring):
|
||||
names = [names]
|
||||
|
||||
def on_dependents_stopped(result, name):
|
||||
|
@ -377,7 +379,7 @@ class ComponentRegistry(object):
|
|||
"""
|
||||
if not names:
|
||||
names = self.components.keys()
|
||||
elif isinstance(names, str):
|
||||
elif isinstance(names, basestring):
|
||||
names = [names]
|
||||
|
||||
deferreds = []
|
||||
|
@ -403,7 +405,7 @@ class ComponentRegistry(object):
|
|||
"""
|
||||
if not names:
|
||||
names = self.components.keys()
|
||||
elif isinstance(names, str):
|
||||
elif isinstance(names, basestring):
|
||||
names = [names]
|
||||
|
||||
deferreds = []
|
||||
|
|
|
@ -39,6 +39,7 @@ this can only be done for the 'config file version' and not for the 'format'
|
|||
version as this will be done internally.
|
||||
|
||||
"""
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import cPickle as pickle
|
||||
import json
|
||||
|
@ -46,7 +47,7 @@ import logging
|
|||
import os
|
||||
import shutil
|
||||
|
||||
from deluge.common import get_default_config_dir, utf8_encoded
|
||||
from deluge.common import decode_string, get_default_config_dir, utf8_encoded
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
callLater = None # Necessary for the config tests
|
||||
|
@ -243,11 +244,8 @@ class Config(object):
|
|||
5
|
||||
|
||||
"""
|
||||
if isinstance(self.__config[key], str):
|
||||
try:
|
||||
return self.__config[key].decode('utf8')
|
||||
except UnicodeDecodeError:
|
||||
return self.__config[key]
|
||||
if isinstance(self.__config[key], basestring):
|
||||
return decode_string(self.__config[key])
|
||||
else:
|
||||
return self.__config[key]
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ This should typically only be used by the Core. Plugins should utilize the
|
|||
`:mod:EventManager` for similar functionality.
|
||||
|
||||
"""
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import division, unicode_literals
|
||||
|
||||
import base64
|
||||
import glob
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#
|
||||
|
||||
"""The Deluge daemon"""
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# the additional special exception to link portions of this program with the OpenSSL library.
|
||||
# See LICENSE for more details.
|
||||
#
|
||||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
import deluge.component as component
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
import deluge.component as component
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
|
||||
"""PluginManager for Core"""
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#
|
||||
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import os
|
||||
import random
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#
|
||||
|
||||
"""RPCServer Module"""
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
|
|
@ -14,7 +14,7 @@ Attributes:
|
|||
|
||||
"""
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import division, unicode_literals
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#
|
||||
|
||||
"""TorrentManager handles Torrent objects"""
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import cPickle
|
||||
import datetime
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import inspect
|
||||
import re
|
||||
import warnings
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
#
|
||||
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
class DelugeError(Exception):
|
||||
|
||||
def __new__(cls, *args, **kwargs):
|
||||
|
|
|
@ -14,6 +14,7 @@ This module describes the types of events that can be generated by the daemon
|
|||
and subsequently emitted to the clients.
|
||||
|
||||
"""
|
||||
from __future__ import unicode_literals
|
||||
|
||||
known_events = {}
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import os.path
|
||||
import zlib
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#
|
||||
|
||||
"""Logging functions"""
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import inspect
|
||||
import logging
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import division, unicode_literals
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import division, unicode_literals
|
||||
|
||||
import logging
|
||||
import os.path
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
|
||||
"""PluginManagerBase"""
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import os.path
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from deluge.plugins.init import PluginInitBase
|
||||
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
|
||||
import pkg_resources
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import base64
|
||||
import logging
|
||||
import os
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
from deluge.plugins.pluginbase import WebPluginBase
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
__plugin_name__ = 'AutoAdd'
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from deluge.plugins.init import PluginInitBase
|
||||
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
from functools import wraps
|
||||
from sys import exc_info
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import division, unicode_literals
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#
|
||||
# pylint: disable=redefined-builtin
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import bz2
|
||||
import gzip
|
||||
import zipfile
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from .decompressers import BZipped2, GZipped, Zipped
|
||||
from .readers import EmuleReader, PeerGuardianReader, SafePeerReader
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
from datetime import datetime
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import gzip
|
||||
import logging
|
||||
import socket
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import re
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
from deluge.plugins.pluginbase import WebPluginBase
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
__plugin_name__ = 'Blocklist'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from deluge.plugins.init import PluginInitBase
|
||||
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
|
||||
import pkg_resources
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import hashlib
|
||||
import logging
|
||||
import os
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
import gtk
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
from deluge.plugins.pluginbase import WebPluginBase
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
__plugin_name__ = 'Execute'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from deluge.plugins.init import PluginInitBase
|
||||
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
|
||||
import pkg_resources
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import errno
|
||||
import logging
|
||||
import os
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
import gtk
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
from deluge.plugins.pluginbase import WebPluginBase
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
__plugin_name__ = 'Extractor'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from deluge.plugins.init import PluginInitBase
|
||||
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
torrent-label core plugin.
|
||||
adds a status field for tracker.
|
||||
"""
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import re
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
from deluge import component # for systray
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
import gtk
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#
|
||||
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
import gtk
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
from deluge.ui.client import sclient
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
__plugin_name__ = 'Label'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from deluge.plugins.init import PluginInitBase
|
||||
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
from twisted.internet import defer
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import smtplib
|
||||
from email.utils import formatdate
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
from os.path import basename
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
# License: BSD - Please view the LICENSE file for additional information.
|
||||
# ==============================================================================
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
from twisted.internet import task
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
from deluge.plugins.pluginbase import WebPluginBase
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
__plugin_name__ = 'Notifications'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from deluge.plugins.init import PluginInitBase
|
||||
|
||||
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
#
|
||||
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
def get_resource(filename):
|
||||
import os
|
||||
import pkg_resources
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import time
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import division, unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
|
||||
|
@ -11,6 +10,7 @@
|
|||
# the additional special exception to link portions of this program with the OpenSSL library.
|
||||
# See LICENSE for more details.
|
||||
#
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
__plugin_name__ = 'Scheduler'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# this is a namespace package
|
||||
import pkg_resources
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from deluge.plugins.init import PluginInitBase
|
||||
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
|
||||
import pkg_resources
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2009 Ian Martin <ianmartin@cantab.net>
|
||||
|
@ -11,7 +10,7 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import division, unicode_literals
|
||||
|
||||
import logging
|
||||
import time
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2009 Ian Martin <ianmartin@cantab.net>
|
||||
|
@ -15,7 +14,7 @@
|
|||
port of old plugin by markybob.
|
||||
"""
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import division, unicode_literals
|
||||
|
||||
import logging
|
||||
import math
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
# See LICENSE for more details.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import division, unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# the additional special exception to link portions of this program with the OpenSSL library.
|
||||
# See LICENSE for more details.
|
||||
#
|
||||
from __future__ import print_function
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
import pytest
|
||||
from twisted.internet import defer
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue