diff --git a/script.module.six/LICENSE b/script.module.six/LICENSE.txt similarity index 100% rename from script.module.six/LICENSE rename to script.module.six/LICENSE.txt diff --git a/script.module.six/README b/script.module.six/README deleted file mode 100644 index 560a773d9..000000000 --- a/script.module.six/README +++ /dev/null @@ -1,7 +0,0 @@ -Six is a Python 2 and 3 compatibility library. It provides utility functions for smoothing over the differences between the Python versions with the goal of writing Python code that is compatible on both Python versions. See the documentation for more information on what is provided. - -Six supports Python 2.7 and 3.3+. It is contained in only one Python file, so it can be easily copied into your project. (The copyright and license notice must be retained.) - -Online documentation is at https://six.readthedocs.io/. - -Bugs can be reported to https://github.com/benjaminp/six. The code can also be found there. \ No newline at end of file diff --git a/script.module.six/addon.xml b/script.module.six/addon.xml index e35065ad9..ed42563e6 100644 --- a/script.module.six/addon.xml +++ b/script.module.six/addon.xml @@ -1,22 +1,18 @@ - + - + - Python 2 and 3 compatibility utilities. - Six is a Python 2 and 3 compatibility library. It provides utility functions for smoothing over the differences between the Python versions with the goal of writing Python code that is compatible on both Python versions. See the documentation for more information on what is provided. - all + Python 2 and 3 compatibility utilities + Python 2 and 3 compatibility utilities MIT + all + https://github.com/benjaminp/six https://github.com/benjaminp/six - https://pypi.org/project/six/ - icon.png + resources/icon.png diff --git a/script.module.six/lib/six.py b/script.module.six/lib/six.py index 83f69783d..4e15675d8 100644 --- a/script.module.six/lib/six.py +++ b/script.module.six/lib/six.py @@ -29,7 +29,7 @@ import types __author__ = "Benjamin Peterson " -__version__ = "1.15.0" +__version__ = "1.16.0" # Useful for very coarse version differentiation. @@ -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] @@ -223,6 +233,12 @@ def get_code(self, fullname): return None get_source = get_code # same as get_code + def create_module(self, spec): + return self.load_module(spec.name) + + def exec_module(self, module): + pass + _importer = _SixMetaPathImporter(__name__) diff --git a/script.module.six/icon.png b/script.module.six/resources/icon.png similarity index 100% rename from script.module.six/icon.png rename to script.module.six/resources/icon.png