Skip to content

Commit

Permalink
[script.module.ijson] 3.2.2+matrix.1 (#2496)
Browse files Browse the repository at this point in the history
  • Loading branch information
L2501 authored Aug 18, 2023
1 parent cce14b0 commit 941d975
Show file tree
Hide file tree
Showing 19 changed files with 1,025 additions and 1,758 deletions.
30 changes: 0 additions & 30 deletions script.module.ijson/CHANGELOG.md

This file was deleted.

21 changes: 21 additions & 0 deletions script.module.ijson/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
ijson
=====

Copyright (c) 2010, Ivan Sagalaev
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand All @@ -22,3 +25,21 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


yajl
====

Copyright (c) 2007-2014, Lloyd Hilaiel <[email protected]>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
156 changes: 0 additions & 156 deletions script.module.ijson/README.rst

This file was deleted.

37 changes: 16 additions & 21 deletions script.module.ijson/addon.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.module.ijson"
name="ijson"
version="2.6.1+matrix.1"
provider-name="Rodrigo Tobar, Ivan Sagalaev">
<requires>
<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">Iterative JSON parser with a standard Python iterator interface</summary>
<description lang="en_GB">Packed for KODI from https://github.com/isagalaev/ijson</description>
<license>BSD-3-Clause</license>
<website>https://pypi.org/project/ijson/</website>
<source>https://github.com/ICRAR/ijson</source>
<assets>
<icon>icon.png</icon>
</assets>
</extension>
<addon id="script.module.ijson" name="ijson" version="3.2.2+matrix.1" provider-name="Rodrigo Tobar, Ivan Sagalaev">
<requires>
<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">Iterative JSON parser with standard Python iterator interfaces</summary>
<description lang="en_GB">Iterative JSON parser with standard Python iterator interfaces</description>
<license>BSD-3-Clause</license>
<platform>all</platform>
<website>https://pypi.org/project/ijson/</website>
<source>https://github.com/ICRAR/ijson</source>
<assets>
<icon>resources/icon.png</icon>
</assets>
</extension>
</addon>
27 changes: 22 additions & 5 deletions script.module.ijson/lib/ijson/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,40 @@
also two other backends using the C library yajl in ``ijson.backends`` that have
the same API and are faster under CPython.
'''
from ijson.common import JSONError, IncompleteJSONError, ObjectBuilder
from ijson.common import JSONError, IncompleteJSONError, ObjectBuilder, compat

from ijson.utils import coroutine, sendable_list
from .version import __version__

def _default_backend():
def get_backend(backend):
"""Import the backend named ``backend``"""
import importlib
for backend in ('yajl2_c', 'yajl2_cffi', 'yajl2', 'python'):
return importlib.import_module('ijson.backends.' + backend)

def _default_backend():
import os
if 'IJSON_BACKEND' in os.environ:
return get_backend(os.environ['IJSON_BACKEND'])
for backend in ('yajl2_c', 'yajl2_cffi', 'yajl2', 'yajl', 'python'):
try:
return importlib.import_module('ijson.backends.' + backend)
return get_backend(backend)
except ImportError:
continue
raise ImportError('no backends available')
backend = _default_backend()
del _default_backend

basic_parse = backend.basic_parse
basic_parse_coro = backend.basic_parse_coro
parse = backend.parse
parse_coro = backend.parse_coro
items = backend.items
items_coro = backend.items_coro
kvitems = backend.kvitems
del backend
kvitems_coro = backend.kvitems_coro
if compat.IS_PY35:
basic_parse_async = backend.basic_parse_async
parse_async = backend.parse_async
items_async = backend.items_async
kvitems_async = backend.kvitems_async
backend = backend.backend
Loading

0 comments on commit 941d975

Please sign in to comment.