Commits

Stefan H. Holek  committed 39d7f78

Can't use 'surrogateescape' in upload_docs either.

  • Participants
  • Parent commits 4a359af

Comments (0)

Files changed (1)

File setuptools/command/upload_docs.py

 from pkg_resources import iter_entry_points
 
 from distutils import log
+from distutils.errors import DistutilsError
 from distutils.errors import DistutilsOptionError
 
 try:
 except ImportError:
     from setuptools.command.upload import upload
 
-if sys.version_info >= (3, 1):
-    errors = 'surrogateescape'
-else:
-    errors = 'strict'
-
 
 # This is not just a replacement for byte literals
 # but works as a general purpose encoder
 def b(s, encoding='utf-8'):
     if isinstance(s, unicode):
-        return s.encode(encoding, errors)
+        return s.encode(encoding)
     return s