-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[script.module.six] 1.16.0+matrix.1 (#2547)
- Loading branch information
Showing
5 changed files
with
24 additions
and
19 deletions.
There are no files selected for viewing
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<addon id="script.module.six" | ||
name="six" | ||
version="1.15.0+matrix.1" | ||
provider-name="gutworth"> | ||
<addon id="script.module.six" name="six" version="1.16.0+matrix.1" provider-name="Benjamin Peterson"> | ||
<requires> | ||
<import addon="xbmc.python" | ||
version="3.0.0"/> | ||
<import addon="xbmc.python" version="3.0.0" /> | ||
</requires> | ||
<extension point="xbmc.python.module" library="lib" /> | ||
<extension point="xbmc.addon.metadata"> | ||
<summary lang="en_GB">Python 2 and 3 compatibility utilities.</summary> | ||
<description lang="en_GB">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.</description> | ||
<platform>all</platform> | ||
<summary lang="en_GB">Python 2 and 3 compatibility utilities</summary> | ||
<description lang="en_GB">Python 2 and 3 compatibility utilities</description> | ||
<license>MIT</license> | ||
<platform>all</platform> | ||
<website>https://github.com/benjaminp/six</website> | ||
<source>https://github.com/benjaminp/six</source> | ||
<website>https://pypi.org/project/six/</website> | ||
<assets> | ||
<icon>icon.png</icon> | ||
<icon>resources/icon.png</icon> | ||
</assets> | ||
</extension> | ||
</addon> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
import types | ||
|
||
__author__ = "Benjamin Peterson <[email protected]>" | ||
__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__) | ||
|
||
|
||
|
File renamed without changes