Description: Revert "implement Happy Eyeballs"
This functionality relies on the `rfc6555` Python module, which is not
available on Debian.

Ported from offlineimap.
 
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Forwarded: not-needed

---

--- offlineimap3-0.0~git20201025.5e7b006.orig/offlineimap/imaplibutil.py
+++ offlineimap3-0.0~git20201025.5e7b006/offlineimap/imaplibutil.py
@@ -24,7 +24,6 @@ import errno
 import zlib
 from sys import exc_info
 from hashlib import sha512, sha384, sha256, sha224, sha1
-import rfc6555
 from offlineimap import OfflineImapError
 from offlineimap.ui import getglobalui
 from imaplib2 import IMAP4, IMAP4_SSL, InternalDate
@@ -75,15 +74,8 @@ class UsefulIMAPMixIn:
     def open_socket(self):
         """open_socket()
         Open socket choosing first address family available."""
-        if self.af == socket.AF_UNSPEC:
-            # happy-eyeballs!
-            return rfc6555.create_connection((self.host, self.port))
-        else:
-            return self._open_socket_for_af(self.af)
-
-    def _open_socket_for_af(self, af):
         msg = (-1, 'could not open socket')
-        for res in socket.getaddrinfo(self.host, self.port, af, socket.SOCK_STREAM):
+        for res in socket.getaddrinfo(self.host, self.port, self.af, socket.SOCK_STREAM):
             af, socktype, proto, canonname, sa = res
             try:
                 # use socket of our own, possiblly socksified socket.
--- offlineimap3-0.0~git20201025.5e7b006.orig/requirements.txt
+++ offlineimap3-0.0~git20201025.5e7b006/requirements.txt
@@ -1,7 +1,6 @@
 # Requirements
 gssapi[kerberos]
 portalocker[cygwin]
-rfc6555
 distro
 
 imaplib2~=3.5
