Source

distribute / setuptools / command / upload_docs.py

The branch 'default' does not exist.
Diff from to

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