summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2017-06-05 09:02:51 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2017-06-05 09:03:34 +0100
commitede0f710f814c62f9e6625c7b166fb7b1fcf5942 (patch)
treee371b49ee0b6c24fcb584e5595086ff9f7a7f0e4
parent66718f6d8ee6a3faa0c051571d8487a876ab71e7 (diff)
downloaddeluge-ede0f710f814c62f9e6625c7b166fb7b1fcf5942.tar.gz
deluge-ede0f710f814c62f9e6625c7b166fb7b1fcf5942.tar.bz2
deluge-ede0f710f814c62f9e6625c7b166fb7b1fcf5942.zip
[Core] Replace usage of deprecated new.classobj
* type is new module to use
-rw-r--r--deluge/__rpcapi.py4
-rw-r--r--tox.ini2
2 files changed, 2 insertions, 4 deletions
diff --git a/deluge/__rpcapi.py b/deluge/__rpcapi.py
index a2290abb0..8e5de1285 100644
--- a/deluge/__rpcapi.py
+++ b/deluge/__rpcapi.py
@@ -9,8 +9,6 @@
from __future__ import unicode_literals
-from new import classobj
-
from deluge.core.core import Core
from deluge.core.daemon import Daemon
@@ -27,7 +25,7 @@ def scan_for_methods(obj):
if not hasattr(getattr(obj, d), '_rpcserver_export'):
continue
methods[d] = getattr(obj, d)
- cobj = classobj(obj.__name__.lower(), (object,), methods)
+ cobj = type(obj.__name__.lower(), (object,), methods)
setattr(RpcApi, obj.__name__.lower(), cobj)
diff --git a/tox.ini b/tox.ini
index 2cb527f87..3580568a0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -92,7 +92,7 @@ commands = {[testenv:pydef]commands}
###########################
[testenv:flake8]
-# Disble site packages to avoid using system flake8 which uses hardcoded python path which imports the wrong libraries.
+# Disable site packages to avoid using system flake8 which uses hardcoded python path which imports the wrong libraries.
sitepackages = False
deps =
{[testenv]deps}