Commits

g2p committed 9202d4a

Don't wrap sys.stdout if it's in the correct encoding already.

Comments (0)

Files changed (1)

setuptools/dist.py

         if not isinstance(sys.stdout, io.TextIOWrapper):
             return _Distribution.handle_display_options(self, option_order)
 
+        if sys.stdout.encoding.lower() in ('utf-8', 'utf8'):
+            return _Distribution.handle_display_options(self, option_order)
+
         # Print metadata in UTF-8 no matter the platform
         encoding = sys.stdout.encoding
         errors = sys.stdout.errors