Remove remaining Python 2 compatibility code.

This commit is contained in:
Ben Sturmfels 2021-03-05 23:52:13 +11:00
parent 9bf3bc1944
commit f0d57e3bd8
4 changed files with 1 additions and 25 deletions

View File

@ -1,16 +0,0 @@
import functools
import warnings
from email.mime.text import MIMEText
def encode_to_utf8(method):
def wrapper(self):
return method(self)
functools.update_wrapper(wrapper, method, ['__name__', '__doc__'])
return wrapper
# based on django.utils.encoding.python_2_unicode_compatible
def py2_unicode(klass):
return klass

View File

@ -31,11 +31,6 @@ except ImportError:
SKIP_AUDIO = True
SKIP_VIDEO = True
try:
import scikits.audiolab
except ImportError:
SKIP_AUDIO = True
import os
import pytest
import webtest.forms

View File

@ -15,12 +15,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from email.mime.text import MIMEText
import socket
import logging
import smtplib
import sys
from mediagoblin import mg_globals, messages
from mediagoblin._compat import MIMEText
from mediagoblin.tools import common
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -18,13 +18,10 @@ import os
import shutil
import tempfile
from mediagoblin._compat import py2_unicode
# Actual workbench stuff
# ----------------------
@py2_unicode
class Workbench:
"""
Represent the directory for the workbench