Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[script.module.six@matrix] 1.16.0+matrix.1 #2547

Merged
merged 1 commit into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
7 changes: 0 additions & 7 deletions script.module.six/README

This file was deleted.

18 changes: 7 additions & 11 deletions script.module.six/addon.xml
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>
18 changes: 17 additions & 1 deletion script.module.six/lib/six.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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."""
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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__)


Expand Down
File renamed without changes
Loading