forked from pool/python-ijson
Accepting request 1100746 from devel:languages:python
- update to 3.2.3:
* Fixed several issues in the ``yajl2_c`` backend
and its async generators that were only made apparent
when running it with PyPy and/or a CPython debug build (#101).
* Adapted ``yajl2_c`` async generators to work against PyPy
shortcomings
* Fixed compilation and ``async`` support
of the ``yajl2_c`` backend in pyhthon 3.12 (#98).
* Check ``IJSON_BUILD_YAJL2C`` environment variable
when building ijson to force/skip building the
``yajl2_c`` backend (#102).
* Added support for Python 3.12.
* Fixed a memory leak in the ``yajl2_c`` backend
triggered only when the underlying ``yajl`` functions
reported a failure (#97).
* New ``ijson.dump`` command-line utility
* Fixed bug in ``yajl2_c`` backend introduced in 3.1.2
where random crashes could occur due to an unsafe reference decrement
when constructing the parse/items/kvitems generators (#66).
* Mark Python 3.10 and 3.11 as explicitly supported.
- drop tests_asyncio.py source - this comes in the tarball now
OBS-URL: https://build.opensuse.org/request/show/1100746
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-ijson?expand=0&rev=5
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1d1003ae3c6115ec9b587d29dd136860a81a23c7626b682e2b5b12c9fd30e4ea
|
||||
size 56783
|
||||
3
ijson-3.2.3.tar.gz
Normal file
3
ijson-3.2.3.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:10294e9bf89cb713da05bc4790bdff616610432db561964827074898e174f917
|
||||
size 57596
|
||||
@@ -1,3 +1,28 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 26 06:47:55 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 3.2.3:
|
||||
* Fixed several issues in the ``yajl2_c`` backend
|
||||
and its async generators that were only made apparent
|
||||
when running it with PyPy and/or a CPython debug build (#101).
|
||||
* Adapted ``yajl2_c`` async generators to work against PyPy
|
||||
shortcomings
|
||||
* Fixed compilation and ``async`` support
|
||||
of the ``yajl2_c`` backend in pyhthon 3.12 (#98).
|
||||
* Check ``IJSON_BUILD_YAJL2C`` environment variable
|
||||
when building ijson to force/skip building the
|
||||
``yajl2_c`` backend (#102).
|
||||
* Added support for Python 3.12.
|
||||
* Fixed a memory leak in the ``yajl2_c`` backend
|
||||
triggered only when the underlying ``yajl`` functions
|
||||
reported a failure (#97).
|
||||
* New ``ijson.dump`` command-line utility
|
||||
* Fixed bug in ``yajl2_c`` backend introduced in 3.1.2
|
||||
where random crashes could occur due to an unsafe reference decrement
|
||||
when constructing the parse/items/kvitems generators (#66).
|
||||
* Mark Python 3.10 and 3.11 as explicitly supported.
|
||||
- drop tests_asyncio.py source - this comes in the tarball now
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 11 12:39:17 UTC 2023 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-ijson
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,15 +18,13 @@
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-ijson
|
||||
Version: 3.1.4
|
||||
Version: 3.2.3
|
||||
Release: 0
|
||||
Summary: Iterative JSON parser with a standard Python iterator interface
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/ICRAR/ijson
|
||||
Source: https://files.pythonhosted.org/packages/source/i/ijson/ijson-%{version}.tar.gz
|
||||
# https://github.com/ICRAR/ijson/pull/26
|
||||
Source1: https://raw.githubusercontent.com/ICRAR/ijson/master/tests_asyncio.py
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
@@ -40,7 +38,6 @@ Iterative JSON parser with a standard Python iterator interface.
|
||||
|
||||
%prep
|
||||
%setup -q -n ijson-%{version}
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
|
||||
import asyncio
|
||||
import io
|
||||
|
||||
from ijson import compat
|
||||
|
||||
|
||||
class AsyncReader(object):
|
||||
def __init__(self, data):
|
||||
if type(data) == compat.bytetype:
|
||||
self.data = io.BytesIO(data)
|
||||
else:
|
||||
self.data = io.StringIO(data)
|
||||
|
||||
async def read(self, n=-1):
|
||||
return self.data.read(n)
|
||||
|
||||
class Async(object):
|
||||
'''Test adaptation for async generators'''
|
||||
|
||||
suffix = '_async'
|
||||
|
||||
def _run(self, f):
|
||||
loop = asyncio.new_event_loop()
|
||||
try:
|
||||
loop.run_until_complete(f)
|
||||
finally:
|
||||
loop.close()
|
||||
|
||||
def all(self, routine, json_content, *args, **kwargs):
|
||||
events = []
|
||||
async def run():
|
||||
async for event in routine(AsyncReader(json_content), *args, **kwargs):
|
||||
events.append(event)
|
||||
self._run(run())
|
||||
return events
|
||||
|
||||
def first(self, routine, json_content, *args, **kwargs):
|
||||
events = []
|
||||
async def run():
|
||||
async for event in routine(AsyncReader(json_content), *args, **kwargs):
|
||||
events.append(event)
|
||||
if events:
|
||||
return
|
||||
self._run(run())
|
||||
return events[0]
|
||||
Reference in New Issue
Block a user