Hello community,

here is the log from the commit of package python-ijson for openSUSE:Factory 
checked in at 2020-04-13 12:53:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ijson (Old)
 and      /work/SRC/openSUSE:Factory/.python-ijson.new.3248 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ijson"

Mon Apr 13 12:53:07 2020 rev:2 rq:793337 version:3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ijson/python-ijson.changes        
2019-10-21 12:32:07.240213715 +0200
+++ /work/SRC/openSUSE:Factory/.python-ijson.new.3248/python-ijson.changes      
2020-04-13 12:53:09.556644793 +0200
@@ -1,0 +2,30 @@
+Thu Apr  9 13:11:22 UTC 2020 - Marketa Calabkova <mcalabk...@suse.com>
+
+- update to 3.0
+  * Exposing backend's name under ``<backend>.backend``,
+  and default backend's name under ``ijson.backend``.
+  * Exposing ``ijson.sendable_list`` to users in case it comes in handy.
+  * Improved the protocol for user-facing coroutines,
+  where instead of having to send a final, empty bytes string
+  to finish the parsing process
+  users can simply call ``.close()`` on the coroutine.
+  * Including C code in coverage measurements,
+  and increased overall code coverage up to 99%.
+  * Full re-design of ijson.
+  * Initial support for ``asyncio`` in python 3.5+.
+  * Exposure of underlying infrastructure implementing the push model.
+  * C extension broken down into separate source files
+  for easier understanding and maintenance.
+  * Fixed a deprecation warning in the C backend
+  present in python 3.8 when parsing Decimal values.
+  * New `kvitems` method in all backends.
+  Like `items`, it takes a prefix,
+  and iterates over the key/value pairs of matching objects
+  (instead of iterating over objects themselves, like in `items`).
+  * When using python 2, all backends now return
+  `map_key` values as `unicode` objects, not `str`.
+  * Including more files in source distributions (#14).
+  * Adjusting python backend to avoid reading off the input stream
+  too eagerly (#15).
+
+-------------------------------------------------------------------

Old:
----
  ijson-2.5.1.tar.gz
  tests.py

New:
----
  ijson-3.0.tar.gz
  tests_asyncio.py

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-ijson.spec ++++++
--- /var/tmp/diff_new_pack.RtHnFq/_old  2020-04-13 12:53:10.192645070 +0200
+++ /var/tmp/diff_new_pack.RtHnFq/_new  2020-04-13 12:53:10.192645070 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-ijson
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,20 +18,21 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-ijson
-Version:        2.5.1
+Version:        3.0
 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/isagalaev/ijson/pull/74
-Source1:        https://raw.githubusercontent.com/ICRAR/ijson/master/tests.py
+# 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:  pkgconfig(yajl)
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
+BuildRequires:  python3-asyncio
+BuildRequires:  pkgconfig(yajl)
 %python_subpackages
 
 %description

++++++ ijson-2.5.1.tar.gz -> ijson-3.0.tar.gz ++++++
++++ 6836 lines of diff (skipped)

++++++ tests_asyncio.py ++++++
# -*- 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]

Reply via email to