diff --git a/youtube_dl/compat.py b/youtube_dl/compat.py
index 44a902573..07ceaa170 100644
--- a/youtube_dl/compat.py
+++ b/youtube_dl/compat.py
@@ -369,8 +369,8 @@ __all__ = [
     'compat_ord',
     'compat_parse_qs',
     'compat_print',
-    'compat_str',
     'compat_socket_create_connection',
+    'compat_str',
     'compat_subprocess_get_DEVNULL',
     'compat_urllib_error',
     'compat_urllib_parse',