From 6483c19cb7f6029924bd1ad970dbcf04d3f4189d Mon Sep 17 00:00:00 2001
From: Brett Cannon <brett@python.org>
Date: Fri, 26 Mar 2021 16:34:05 -0700
Subject: [PATCH] Implement find_spec() for _SixMetaPathImporter

---
 six.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/boto/vendored/six.py b/boto/vendored/six.py
index d162d09c..5e7f0ce4 100644
--- a/boto/vendored/six.py
+++ b/boto/vendored/six.py
@@ -71,6 +71,11 @@ def __len__(self):
             MAXSIZE = int((1 << 63) - 1)
         del X
 
+if PY34:
+    from importlib.util import spec_from_loader
+else:
+    spec_from_loader = None
+
 
 def _add_doc(func, doc):
     """Add documentation to a function."""
@@ -186,6 +191,11 @@ def find_module(self, fullname, path=None):
             return self
         return None
 
+    def find_spec(self, fullname, path, target=None):
+        if fullname in self.known_modules:
+            return spec_from_loader(fullname, self)
+        return None
+
     def __get_module(self, fullname):
         try:
             return self.known_modules[fullname]
