Hello community, here is the log from the commit of package python-yq for openSUSE:Factory checked in at 2019-03-29 20:42:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-yq (Old) and /work/SRC/openSUSE:Factory/.python-yq.new.25356 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-yq" Fri Mar 29 20:42:41 2019 rev:3 rq:689264 version:2.7.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-yq/python-yq.changes 2018-12-13 19:45:59.324892012 +0100 +++ /work/SRC/openSUSE:Factory/.python-yq.new.25356/python-yq.changes 2019-03-29 20:42:42.494678168 +0100 @@ -1,0 +2,24 @@ +Wed Mar 27 14:45:44 UTC 2019 - Matej Cepl <[email protected]> + +- Run test suite at least for Python 3 + +------------------------------------------------------------------- +Tue Mar 26 10:45:19 UTC 2019 - [email protected] + +- version update to 2.7.2 + * xq: Introduce –xml-dtd and –xml-root. + * TOML support is optional and experimental + * TOML support with the tq executable entry point. + * Disallow argparse abbreviated options. + * Parse unrecognized tags instead of dropping them. + * Ignore unrecognized YAML tags instead of crashing. + * xq -x: Raise understandable error on non-dict conversion failure. + * Support XML parsing with xmltodict. + * Fix for the –from-file/-f argument: Re-route jq_filter to files + when using –from-file. + * Parse and pass multiple positional-consuming jq args. + * Support jq arguments that consume subsequent positionals. + * Support bare YAML dates and times. +- package LICENSE + +------------------------------------------------------------------- Old: ---- yq-2.3.3.tar.gz New: ---- yq-2.7.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-yq.spec ++++++ --- /var/tmp/diff_new_pack.vfY9i8/_old 2019-03-29 20:42:43.422678140 +0100 +++ /var/tmp/diff_new_pack.vfY9i8/_new 2019-03-29 20:42:43.422678140 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-yq # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,18 +18,26 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-yq -Version: 2.3.3 +Version: 2.7.2 Release: 0 Summary: Command-line YAML processor - jq wrapper for YAML documents License: Apache-2.0 Group: Development/Languages/Python Url: https://github.com/kislyuk/yq Source: https://files.pythonhosted.org/packages/source/y/yq/yq-%{version}.tar.gz -BuildRequires: %{python_module PyYAML >= 3.11} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +# SECTION test requirements +BuildRequires: %{python_module PyYAML >= 3.11} +BuildRequires: %{python_module toml >= 0.9.4} +BuildRequires: %{python_module xmltodict >= 0.11.0} +BuildRequires: jq +# /SECTION Requires: python-PyYAML >= 3.11 +Requires: python-setuptools +Requires: python-toml >= 0.9.4 +Requires: python-xmltodict >= 0.11.0 Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch @@ -48,18 +56,26 @@ %install %python_install %python_clone -a %{buildroot}%{_bindir}/yq +%python_clone -a %{buildroot}%{_bindir}/xq %python_expand %fdupes %{buildroot}%{$python_sitelib} %post %python_install_alternative yq +%python_install_alternative xq %postun %python_uninstall_alternative yq +%python_uninstall_alternative xq + +%check +PYTHONPATH=%{buildroot}%{python3_sitelib} python3 test/test.py -v %files %{python_files} %defattr(-,root,root,-) +%license LICENSE %doc README.rst %python_alternative %{_bindir}/yq +%python_alternative %{_bindir}/xq %{python_sitelib}/* %changelog ++++++ yq-2.3.3.tar.gz -> yq-2.7.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yq-2.3.3/LICENSE new/yq-2.7.2/LICENSE --- old/yq-2.3.3/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ new/yq-2.7.2/LICENSE 2017-05-01 19:50:52.000000000 +0200 @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yq-2.3.3/MANIFEST.in new/yq-2.7.2/MANIFEST.in --- old/yq-2.3.3/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100 +++ new/yq-2.7.2/MANIFEST.in 2018-04-28 16:21:59.000000000 +0200 @@ -0,0 +1 @@ +include LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yq-2.3.3/PKG-INFO new/yq-2.7.2/PKG-INFO --- old/yq-2.3.3/PKG-INFO 2017-09-30 19:06:15.000000000 +0200 +++ new/yq-2.7.2/PKG-INFO 2019-01-09 19:55:01.000000000 +0100 @@ -1,14 +1,13 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: yq -Version: 2.3.3 -Summary: Command-line YAML processor - jq wrapper for YAML documents +Version: 2.7.2 +Summary: Command-line YAML/XML processor - jq wrapper for YAML/XML documents Home-page: https://github.com/kislyuk/yq Author: Andrey Kislyuk Author-email: [email protected] License: Apache Software License -Description-Content-Type: UNKNOWN -Description: yq: Command-line YAML processor - jq wrapper for YAML documents - =============================================================== +Description: yq: Command-line YAML/XML processor - jq wrapper for YAML and XML documents + =========================================================================== Installation ------------ @@ -19,28 +18,38 @@ Before using ``yq``, you also have to install its dependency, ``jq``. See the `jq installation instructions <https://stedolan.github.io/jq/download/>`_ for details and directions specific to your platform. + On macOS, ``yq`` is also available on `Homebrew <https://brew.sh/>`_: use ``brew install python-yq``. + Synopsis -------- - ``yq``'s mode of operation is simple: it transcodes YAML on standard input to JSON (using the key-order-preserving - equivalent of ``yaml.safe_load_all`` to avoid dangerous vulnerabilities in YAML/PyYAML design) and pipes it to ``jq``:: + ``yq`` takes YAML input, converts it to JSON, and pipes it to `jq <https://stedolan.github.io/jq/>`_:: cat input.yml | yq .foo.bar - Or specify the filename directly:: + Like in ``jq``, you can also specify input filename(s) as arguments:: yq .foo.bar input.yml - By default, no transcoding of ``jq`` output is done. Specify the ``--yaml-output``/``-y`` option to transcode it back - into YAML (using the key-order-preserving equivalent of ``yaml.safe_dump_all``):: + By default, no conversion of ``jq`` output is done. Use the ``--yaml-output``/``-y`` argument to convert it back into YAML:: cat input.yml | yq -y .foo.bar - Use the ``--width``/``-w`` argument to pass the line wrap width for string literals. - - All other command line arguments are forwarded to ``jq``. ``yq`` forwards the exit code ``jq`` produced, - unless there was an error in YAML parsing, in which case the exit code is 1. See the `jq manual - <https://stedolan.github.io/jq/manual/>`_ for more details on ``jq`` features and options. + Use the ``--width``/``-w`` argument to pass the line wrap width for string literals. All other command line arguments are + forwarded to ``jq``. ``yq`` forwards the exit code ``jq`` produced, unless there was an error in YAML parsing, in which case + the exit code is 1. See the `jq manual <https://stedolan.github.io/jq/manual/>`_ for more details on ``jq`` features and + options. + + YAML `tags <http://www.yaml.org/spec/1.2/spec.html#id2764295>`_ in the input are ignored (any nested data is treated as + untagged). Key order is preserved. + + XML support + ----------- + ``yq`` also supports XML. The ``yq`` package installs an executable, ``xq``, which + `transcodes XML to JSON <https://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html>`_ using + `xmltodict <https://github.com/martinblech/xmltodict>`_ and pipes it to ``jq``. Roundtrip transcoding is available with + the ``xq --xml-output``/``xq -x`` option. Multiple XML documents can be passed in separate files/streams as + ``xq a.xml b.xml``. Entity expansion and DTD resolution is disabled to avoid XML parsing vulnerabilities. .. admonition:: Compatibility note @@ -59,6 +68,7 @@ * `Documentation (Read the Docs) <https://yq.readthedocs.io/en/latest/>`_ * `Package distribution (PyPI) <https://pypi.python.org/pypi/yq>`_ * `Change log <https://github.com/kislyuk/yq/blob/master/Changes.rst>`_ + * `jq <https://stedolan.github.io/jq/>`_ - the command-line JSON processor utility powering ``yq`` Bugs ~~~~ @@ -91,3 +101,5 @@ Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Topic :: Software Development :: Libraries :: Python Modules +Provides-Extra: test +Provides-Extra: toml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yq-2.3.3/README.rst new/yq-2.7.2/README.rst --- old/yq-2.3.3/README.rst 2017-08-27 21:37:10.000000000 +0200 +++ new/yq-2.7.2/README.rst 2018-08-04 04:43:19.000000000 +0200 @@ -1,5 +1,5 @@ -yq: Command-line YAML processor - jq wrapper for YAML documents -=============================================================== +yq: Command-line YAML/XML processor - jq wrapper for YAML and XML documents +=========================================================================== Installation ------------ @@ -10,28 +10,38 @@ Before using ``yq``, you also have to install its dependency, ``jq``. See the `jq installation instructions <https://stedolan.github.io/jq/download/>`_ for details and directions specific to your platform. +On macOS, ``yq`` is also available on `Homebrew <https://brew.sh/>`_: use ``brew install python-yq``. + Synopsis -------- -``yq``'s mode of operation is simple: it transcodes YAML on standard input to JSON (using the key-order-preserving -equivalent of ``yaml.safe_load_all`` to avoid dangerous vulnerabilities in YAML/PyYAML design) and pipes it to ``jq``:: +``yq`` takes YAML input, converts it to JSON, and pipes it to `jq <https://stedolan.github.io/jq/>`_:: cat input.yml | yq .foo.bar -Or specify the filename directly:: +Like in ``jq``, you can also specify input filename(s) as arguments:: yq .foo.bar input.yml -By default, no transcoding of ``jq`` output is done. Specify the ``--yaml-output``/``-y`` option to transcode it back -into YAML (using the key-order-preserving equivalent of ``yaml.safe_dump_all``):: +By default, no conversion of ``jq`` output is done. Use the ``--yaml-output``/``-y`` argument to convert it back into YAML:: cat input.yml | yq -y .foo.bar -Use the ``--width``/``-w`` argument to pass the line wrap width for string literals. - -All other command line arguments are forwarded to ``jq``. ``yq`` forwards the exit code ``jq`` produced, -unless there was an error in YAML parsing, in which case the exit code is 1. See the `jq manual -<https://stedolan.github.io/jq/manual/>`_ for more details on ``jq`` features and options. +Use the ``--width``/``-w`` argument to pass the line wrap width for string literals. All other command line arguments are +forwarded to ``jq``. ``yq`` forwards the exit code ``jq`` produced, unless there was an error in YAML parsing, in which case +the exit code is 1. See the `jq manual <https://stedolan.github.io/jq/manual/>`_ for more details on ``jq`` features and +options. + +YAML `tags <http://www.yaml.org/spec/1.2/spec.html#id2764295>`_ in the input are ignored (any nested data is treated as +untagged). Key order is preserved. + +XML support +----------- +``yq`` also supports XML. The ``yq`` package installs an executable, ``xq``, which +`transcodes XML to JSON <https://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html>`_ using +`xmltodict <https://github.com/martinblech/xmltodict>`_ and pipes it to ``jq``. Roundtrip transcoding is available with +the ``xq --xml-output``/``xq -x`` option. Multiple XML documents can be passed in separate files/streams as +``xq a.xml b.xml``. Entity expansion and DTD resolution is disabled to avoid XML parsing vulnerabilities. .. admonition:: Compatibility note @@ -50,6 +60,7 @@ * `Documentation (Read the Docs) <https://yq.readthedocs.io/en/latest/>`_ * `Package distribution (PyPI) <https://pypi.python.org/pypi/yq>`_ * `Change log <https://github.com/kislyuk/yq/blob/master/Changes.rst>`_ +* `jq <https://stedolan.github.io/jq/>`_ - the command-line JSON processor utility powering ``yq`` Bugs ~~~~ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yq-2.3.3/scripts/yq new/yq-2.7.2/scripts/yq --- old/yq-2.3.3/scripts/yq 2017-05-01 19:50:52.000000000 +0200 +++ new/yq-2.7.2/scripts/yq 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -#!/usr/bin/env python - -from yq import main - -main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yq-2.3.3/setup.cfg new/yq-2.7.2/setup.cfg --- old/yq-2.3.3/setup.cfg 2017-09-30 19:06:15.000000000 +0200 +++ new/yq-2.7.2/setup.cfg 2019-01-09 19:55:01.000000000 +0100 @@ -1,9 +1,12 @@ +[metadata] +license_file = LICENSE + [bdist_wheel] universal = 1 [flake8] max-line-length = 120 -ignore = E301, E302, E305, E401, E261, E265, E226, F401, E501 +ignore = E302, E305, E401 [egg_info] tag_build = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yq-2.3.3/setup.py new/yq-2.7.2/setup.py --- old/yq-2.3.3/setup.py 2017-09-30 19:05:07.000000000 +0200 +++ new/yq-2.7.2/setup.py 2019-01-09 19:51:35.000000000 +0100 @@ -1,28 +1,36 @@ #!/usr/bin/env python -import os, glob from setuptools import setup, find_packages tests_require = ["coverage", "flake8", "wheel"] setup( name="yq", - version="2.3.3", + version="2.7.2", url="https://github.com/kislyuk/yq", license="Apache Software License", author="Andrey Kislyuk", author_email="[email protected]", - description="Command-line YAML processor - jq wrapper for YAML documents", + description="Command-line YAML/XML processor - jq wrapper for YAML/XML documents", long_description=open("README.rst").read(), install_requires=[ "setuptools", - "PyYAML >= 3.11" + "PyYAML >= 3.11", + "xmltodict >= 0.11.0" ], tests_require=tests_require, - extras_require={"test": tests_require}, + extras_require={ + "test": tests_require, + "toml": ["toml >= 0.9.4"] + }, packages=find_packages(exclude=["test"]), - scripts=glob.glob("scripts/*"), include_package_data=True, + entry_points={ + 'console_scripts': [ + 'yq=yq:main', + 'xq=yq:xq_cli' + ], + }, test_suite="test", classifiers=[ "Intended Audience :: Developers", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yq-2.3.3/test/test.py new/yq-2.7.2/test/test.py --- old/yq-2.3.3/test/test.py 2017-09-26 17:41:18.000000000 +0200 +++ new/yq-2.7.2/test/test.py 2019-01-09 19:47:40.000000000 +0100 @@ -3,22 +3,44 @@ from __future__ import absolute_import, division, print_function, unicode_literals -import os, sys, unittest, tempfile, json, io +import os, sys, unittest, tempfile, json, io, platform, subprocess sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) -from yq import main # noqa +from yq import main # noqa USING_PYTHON2 = True if sys.version_info < (3, 0) else False +USING_PYPY = True if platform.python_implementation() == "PyPy" else False + +yaml_with_tags = """ +foo: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 3766343436323632623130303 +xyz: !!mytag + foo: bar + baz: 1 +xyzzt: !binary + - 1 + - 2 + - 3 +scalar-red: !color FF0000 +scalar-orange: !color FFFF00 +mapping-red: !color-mapping {r: 255, g: 0, b: 0} +mapping-orange: + !color-mapping + r: 255 + g: 255 + b: 0 +""" class TestYq(unittest.TestCase): - def run_yq(self, input_data, args, expect_exit_code=os.EX_OK): + def run_yq(self, input_data, args, expect_exit_codes={os.EX_OK}, input_format="yaml"): stdin, stdout = sys.stdin, sys.stdout try: sys.stdin = io.StringIO(input_data) sys.stdout = io.BytesIO() if USING_PYTHON2 else io.StringIO() - main(args) + main(args, input_format=input_format) except SystemExit as e: - self.assertEqual(e.code, expect_exit_code) + self.assertIn(e.code, expect_exit_codes) finally: result = sys.stdout.getvalue() if USING_PYTHON2: @@ -27,19 +49,46 @@ return result def test_yq(self): + for input_format in "yaml", "xml", "toml": + try: + main(["--help"], input_format=input_format) + except SystemExit as e: + self.assertEqual(e.code, 0) self.assertEqual(self.run_yq("{}", ["."]), "") self.assertEqual(self.run_yq("foo:\n bar: 1\n baz: {bat: 3}", [".foo.baz.bat"]), "") self.assertEqual(self.run_yq("[1, 2, 3]", ["--yaml-output", "-M", "."]), "- 1\n- 2\n- 3\n") self.assertEqual(self.run_yq("foo:\n bar: 1\n baz: {bat: 3}", ["-y", ".foo.baz.bat"]), "3\n...\n") self.assertEqual(self.run_yq("[aaaaaaaaaa bbb]", ["-y", "."]), "- aaaaaaaaaa bbb\n") - self.assertEqual(self.run_yq("[aaaaaaaaaa bbb]", ["-y", "-w8", "."]), "- aaaaaaaaaa\n bbb\n") + self.assertEqual(self.run_yq("[aaaaaaaaaa bbb]", ["-y", "-w", "8", "."]), "- aaaaaaaaaa\n bbb\n") self.assertEqual(self.run_yq('{"понедельник": 1}', ['.["понедельник"]']), "") self.assertEqual(self.run_yq('{"понедельник": 1}', ["-y", '.["понедельник"]']), "1\n...\n") self.assertEqual(self.run_yq("- понедельник\n- вторник\n", ["-y", "."]), "- понедельник\n- вторник\n") def test_yq_err(self): - err = 'yq: Error running jq: ScannerError: while scanning for the next token\nfound character \'%\' that cannot start any token\n in "<file>", line 1, column 3.' - self.run_yq("- %", ["."], expect_exit_code=err) + err = ('yq: Error running jq: ScannerError: while scanning for the next token\nfound character \'%\' that ' + 'cannot start any token\n in "<file>", line 1, column 3.') + self.run_yq("- %", ["."], expect_exit_codes={err, 2}) + + def test_yq_arg_passthrough(self): + self.assertEqual(self.run_yq("{}", ["--arg", "foo", "bar", "--arg", "x", "y", "--indent", "4", "."]), "") + self.assertEqual(self.run_yq("{}", ["--arg", "foo", "bar", "--arg", "x", "y", "-y", "--indent", "4", ".x=$x"]), + "x: y\n") + err = "yq: Error running jq: {}Error: [Errno 32] Broken pipe{}".format("IO" if USING_PYTHON2 else "BrokenPipe", + ": '<fdopen>'." if USING_PYPY else ".") + self.run_yq("{}", ["--indent", "9", "."], expect_exit_codes={err, 2}) + + with tempfile.NamedTemporaryFile() as tf, tempfile.TemporaryFile() as tf2: + tf.write(b'.a') + tf.seek(0) + tf2.write(b'{"a": 1}') + for arg in "--from-file", "-f": + tf2.seek(0) + self.assertEqual(self.run_yq("", ["-y", arg, tf.name, self.fd_path(tf2)]), '1\n...\n') + + @unittest.skipIf(subprocess.check_output(["jq", "--version"]) < b"jq-1.6", "Test options introduced in jq 1.6") + def test_jq16_arg_passthrough(self): + self.assertEqual(self.run_yq("{}", ["-y", ".a=$ARGS.positional", "--args", "a", "b"]), "a:\n- a\n- b\n") + self.assertEqual(self.run_yq("{}", [".", "--jsonargs", "a", "b"]), "") def fd_path(self, fh): return "/dev/fd/{}".format(fh.fileno()) @@ -57,5 +106,78 @@ self.assertEqual(self.run_yq("- 2016-12-20T22:07:36Z\n", ["."]), "") self.assertEqual(self.run_yq("- 2016-12-20T22:07:36Z\n", ["-y", "."]), "- '2016-12-20T22:07:36'\n") + self.assertEqual(self.run_yq("2016-12-20", ["."]), "") + self.assertEqual(self.run_yq("2016-12-20", ["-y", "."]), "'2016-12-20'\n") + + def test_unrecognized_tags(self): + self.assertEqual(self.run_yq("!!foo bar\n", ["."]), "") + self.assertEqual(self.run_yq("!!foo bar\n", ["-y", "."]), "bar\n...\n") + self.assertEqual(self.run_yq("x: !foo bar\n", ["-y", "."]), "x: bar\n") + self.assertEqual(self.run_yq("x: !!foo bar\n", ["-y", "."]), "x: bar\n") + with tempfile.TemporaryFile() as tf: + tf.write(yaml_with_tags.encode()) + tf.seek(0) + self.assertEqual(self.run_yq("", ["-y", ".xyz.foo", self.fd_path(tf)]), 'bar\n...\n') + + @unittest.expectedFailure + def test_times(self): + """ + Timestamps are parsed as sexagesimals in YAML 1.1 but not 1.2. No PyYAML support for YAML 1.2 yet. See issue 10 + """ + self.assertEqual(self.run_yq("11:12:13", ["."]), "") + self.assertEqual(self.run_yq("11:12:13", ["-y", "."]), "'11:12:13'\n") + + def test_xq(self): + self.assertEqual(self.run_yq("<foo/>", ["."], input_format="xml"), "") + self.assertEqual(self.run_yq("<foo/>", ["-x", ".foo.x=1"], input_format="xml"), + '<foo>\n <x>1</x>\n</foo>\n') + with tempfile.TemporaryFile() as tf, tempfile.TemporaryFile() as tf2: + tf.write(b'<a><b/></a>') + tf.seek(0) + tf2.write(b'<a><c/></a>') + tf2.seek(0) + self.assertEqual(self.run_yq("", ["-x", ".a", self.fd_path(tf), self.fd_path(tf2)], input_format="xml"), + '<b></b>\n<c></c>\n') + err = ("yq: Error converting JSON to XML: cannot represent non-object types at top level. " + "Use --xml-root=name to envelope your output with a root element.") + self.run_yq("[1]", ["-x", "."], expect_exit_codes=[err]) + + def test_xq_dtd(self): + with tempfile.TemporaryFile() as tf: + tf.write(b'<a><b c="d">e</b><b>f</b></a>') + tf.seek(0) + self.assertEqual(self.run_yq("", ["-x", ".a", self.fd_path(tf)], input_format="xml"), + '<b c="d">e</b><b>f</b>\n') + tf.seek(0) + self.assertEqual(self.run_yq("", ["-x", "--xml-dtd", ".", self.fd_path(tf)], input_format="xml"), + '<?xml version="1.0" encoding="utf-8"?>\n<a>\n <b c="d">e</b>\n <b>f</b>\n</a>\n') + tf.seek(0) + self.assertEqual( + self.run_yq("", ["-x", "--xml-dtd", "--xml-root=g", ".a", self.fd_path(tf)], input_format="xml"), + '<?xml version="1.0" encoding="utf-8"?>\n<g>\n <b c="d">e</b>\n <b>f</b>\n</g>\n' + ) + + def test_tq(self): + self.assertEqual(self.run_yq("", ["."], input_format="toml"), "") + self.assertEqual(self.run_yq("", ["-t", ".foo.x=1"], input_format="toml"), + '[foo]\nx = 1\n') + + self.assertEqual(self.run_yq("[input]\n" + "test_val = 1234\n", + ["-t", ".input"], input_format="toml"), + "test_val = 1234\n") + + err = "yq: Error converting JSON to TOML: cannot represent non-object types at top level." + self.run_yq('[1]', ["-t", "."], expect_exit_codes=[err]) + + @unittest.skipIf(sys.version_info < (3, 5), + "argparse option abbreviation interferes with opt passthrough, can't be disabled until Python 3.5") + def test_abbrev_opt_collisions(self): + with tempfile.TemporaryFile() as tf, tempfile.TemporaryFile() as tf2: + self.assertEqual( + self.run_yq("", ["-y", "-e", "--slurp", ".[0] == .[1]", "-", self.fd_path(tf), self.fd_path(tf2)]), + "true\n...\n" + ) + if __name__ == '__main__': unittest.main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yq-2.3.3/yq/__init__.py new/yq-2.7.2/yq/__init__.py --- old/yq-2.3.3/yq/__init__.py 2017-09-30 19:04:16.000000000 +0200 +++ new/yq-2.7.2/yq/__init__.py 2019-01-09 19:50:25.000000000 +0100 @@ -7,10 +7,12 @@ from __future__ import absolute_import, division, print_function, unicode_literals -import os, sys, argparse, subprocess, json +import sys, argparse, subprocess, json from collections import OrderedDict -from datetime import datetime +from datetime import datetime, date, time + import yaml + from .version import __version__ class Parser(argparse.ArgumentParser): @@ -19,7 +21,7 @@ print("\n".join(["usage: yq [options] <jq filter> [YAML file...]"] + yq_help[1:] + [""])) try: subprocess.check_call(["jq", "--help"]) - except: + except Exception: pass class OrderedLoader(yaml.SafeLoader): @@ -30,7 +32,7 @@ class JSONDateTimeEncoder(json.JSONEncoder): def default(self, o): - if isinstance(o, datetime): + if isinstance(o, (datetime, date, time)): return o.isoformat() return json.JSONEncoder.default(self, o) @@ -44,58 +46,189 @@ def decode_docs(jq_output, json_decoder): while jq_output: doc, pos = json_decoder.raw_decode(jq_output) - jq_output = jq_output[pos+1:] + jq_output = jq_output[pos + 1:] yield doc +def parse_unknown_tags(loader, tag_suffix, node): + if isinstance(node, yaml.nodes.ScalarNode): + return loader.construct_scalar(node) + elif isinstance(node, yaml.nodes.SequenceNode): + return loader.construct_sequence(node) + elif isinstance(node, yaml.nodes.MappingNode): + return construct_mapping(loader, node) + OrderedLoader.add_constructor(yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG, construct_mapping) +OrderedLoader.add_multi_constructor('', parse_unknown_tags) OrderedDumper.add_representer(OrderedDict, represent_dict_order) -parser = Parser(description=__doc__, formatter_class=argparse.RawTextHelpFormatter) -parser.add_argument("--yaml-output", "--yml-output", "-y", help="Transcode jq JSON output back into YAML and emit it", - action="store_true") -parser.add_argument("--width", "-w", type=int, help="When using --yaml-output, specify string wrap width") -parser.add_argument("--version", action="version", version="%(prog)s {version}".format(version=__version__)) -parser.add_argument("jq_filter") -parser.add_argument("files", nargs="*", type=argparse.FileType()) +# jq arguments that consume positionals must be listed here to avoid our parser mistaking them for our positionals +jq_arg_spec = {"--indent": 1, "-f": 1, "--from-file": 1, "-L": 1, "--arg": 2, "--argjson": 2, "--slurpfile": 2, + "--argfile": 2, "--rawfile": 2, "--args": argparse.REMAINDER, "--jsonargs": argparse.REMAINDER} + +# Detection for Python 2 +USING_PYTHON2 = True if sys.version_info < (3, 0) else False + +def get_parser(program_name): + # By default suppress these help strings and only enable them in the specific programs. + yaml_output_help, width_help = argparse.SUPPRESS, argparse.SUPPRESS + xml_output_help, xml_dtd_help, xml_root_help = argparse.SUPPRESS, argparse.SUPPRESS, argparse.SUPPRESS + toml_output_help = argparse.SUPPRESS + + if program_name == "yq": + current_language = "YAML" + yaml_output_help = "Transcode jq JSON output back into YAML and emit it" + width_help = "When using --yaml-output, specify string wrap width" + elif program_name == "xq": + current_language = "XML" + xml_output_help = "Transcode jq JSON output back into XML and emit it" + xml_dtd_help = "Preserve XML Document Type Definition (disables streaming of multiple docs)" + xml_root_help = "When transcoding back to XML, envelope the output in an element with this name" + elif program_name == "tq": + current_language = "TOML" + toml_output_help = "Transcode jq JSON output back into TOML and emit it" + else: + raise Exception("Unknown program name") + + description = __doc__.replace("yq", program_name).replace("YAML", current_language) + parser_args = dict(prog=program_name, description=description, formatter_class=argparse.RawTextHelpFormatter) + if sys.version_info >= (3, 5): + parser_args.update(allow_abbrev=False) # required to disambiguate options listed in jq_arg_spec + parser = Parser(**parser_args) + parser.add_argument("--yaml-output", "--yml-output", "-y", action="store_true", help=yaml_output_help) + parser.add_argument("--width", "-w", type=int, help=width_help) + parser.add_argument("--xml-output", "-x", action="store_true", help=xml_output_help) + parser.add_argument("--xml-dtd", action="store_true", help=xml_dtd_help) + parser.add_argument("--xml-root", help=xml_root_help) + parser.add_argument("--toml-output", "-t", action="store_true", help=toml_output_help) + parser.add_argument("--version", action="version", version="%(prog)s {version}".format(version=__version__)) + + for arg in jq_arg_spec: + parser.add_argument(arg, nargs=jq_arg_spec[arg], dest=arg, action="append", help=argparse.SUPPRESS) + + parser.add_argument("jq_filter") + parser.add_argument("files", nargs="*", type=argparse.FileType()) + return parser -def main(args=None): +def xq_cli(): + main(input_format="xml", program_name="xq") + +def tq_cli(): + main(input_format="toml", program_name="tq") + +def main(args=None, input_format="yaml", program_name="yq"): + parser = get_parser(program_name) args, jq_args = parser.parse_known_args(args=args) + for arg in jq_arg_spec: + values = getattr(args, arg, None) + if values is not None: + for value_group in values: + jq_args.append(arg) + jq_args.extend(value_group) + if getattr(args, "--from-file") or getattr(args, "-f"): + args.files.insert(0, argparse.FileType()(args.jq_filter)) + else: + jq_filter_arg_loc = len(jq_args) + if getattr(args, "--args"): + jq_filter_arg_loc = jq_args.index('--args') + 1 + elif getattr(args, "--jsonargs"): + jq_filter_arg_loc = jq_args.index('--jsonargs') + 1 + jq_args.insert(jq_filter_arg_loc, args.jq_filter) + if sys.stdin.isatty() and not args.files: return parser.print_help() + converting_output = args.yaml_output or args.xml_output or args.toml_output + try: # Note: universal_newlines is just a way to induce subprocess to make stdin a text buffer and encode it for us - jq = subprocess.Popen(["jq"] + jq_args + [args.jq_filter], + jq = subprocess.Popen(["jq"] + jq_args, stdin=subprocess.PIPE, - stdout=subprocess.PIPE if args.yaml_output else None, + stdout=subprocess.PIPE if converting_output else None, universal_newlines=True) except OSError as e: - msg = "yq: Error starting jq: {}: {}. Is jq installed and available on PATH?" - parser.exit(msg.format(type(e).__name__, e)) + msg = "{}: Error starting jq: {}: {}. Is jq installed and available on PATH?" + parser.exit(msg.format(program_name, type(e).__name__, e)) try: input_streams = args.files if args.files else [sys.stdin] - if args.yaml_output: + + if converting_output: # TODO: enable true streaming in this branch (with asyncio, asyncproc, a multi-shot variant of # subprocess.Popen._communicate, etc.) # See https://stackoverflow.com/questions/375427/non-blocking-read-on-a-subprocess-pipe-in-python input_docs = [] for input_stream in input_streams: - input_docs.extend(yaml.load_all(input_stream, Loader=OrderedLoader)) + if input_format == "yaml": + input_docs.extend(yaml.load_all(input_stream, Loader=OrderedLoader)) + elif input_format == "xml": + import xmltodict + input_docs.append(xmltodict.parse(input_stream.read(), disable_entities=True)) + elif input_format == "toml": + import toml + input_docs.append(toml.load(input_stream)) + else: + raise Exception("Unknown input format") input_payload = "\n".join(json.dumps(doc, cls=JSONDateTimeEncoder) for doc in input_docs) jq_out, jq_err = jq.communicate(input_payload) json_decoder = json.JSONDecoder(object_pairs_hook=OrderedDict) - yaml.dump_all(decode_docs(jq_out, json_decoder), stream=sys.stdout, Dumper=OrderedDumper, width=args.width, - allow_unicode=True, default_flow_style=False) + if args.yaml_output: + yaml.dump_all(decode_docs(jq_out, json_decoder), stream=sys.stdout, Dumper=OrderedDumper, + width=args.width, allow_unicode=True, default_flow_style=False) + elif args.xml_output: + import xmltodict + for doc in decode_docs(jq_out, json_decoder): + if args.xml_root: + doc = {args.xml_root: doc} + elif not isinstance(doc, OrderedDict): + msg = ("{}: Error converting JSON to XML: cannot represent non-object types at top level. " + "Use --xml-root=name to envelope your output with a root element.") + parser.exit(msg.format(program_name)) + full_document = True if args.xml_dtd else False + try: + xmltodict.unparse(doc, output=sys.stdout, full_document=full_document, pretty=True, indent=" ") + except ValueError as e: + if "Document must have exactly one root" in str(e): + raise Exception(str(e) + " Use --xml-root=name to envelope your output with a root element") + else: + raise + sys.stdout.write(b"\n" if sys.version_info < (3, 0) else "\n") + elif args.toml_output: + import toml + for doc in decode_docs(jq_out, json_decoder): + if not isinstance(doc, OrderedDict): + msg = "{}: Error converting JSON to TOML: cannot represent non-object types at top level." + parser.exit(msg.format(program_name)) + + if USING_PYTHON2: + # For Python 2, dump the string and encode it into bytes. + output = toml.dumps(doc) + sys.stdout.write(output.encode("utf-8")) + else: + # For Python 3, write the unicode to the buffer directly. + toml.dump(doc, sys.stdout) else: - for input_stream in input_streams: - for doc in yaml.load_all(input_stream, Loader=OrderedLoader): - json.dump(doc, jq.stdin, cls=JSONDateTimeEncoder) + if input_format == "yaml": + for input_stream in input_streams: + for doc in yaml.load_all(input_stream, Loader=OrderedLoader): + json.dump(doc, jq.stdin, cls=JSONDateTimeEncoder) + jq.stdin.write("\n") + elif input_format == "xml": + import xmltodict + for input_stream in input_streams: + json.dump(xmltodict.parse(input_stream.read(), disable_entities=True), jq.stdin) jq.stdin.write("\n") + elif input_format == "toml": + import toml + for input_stream in input_streams: + json.dump(toml.load(input_stream), jq.stdin) + jq.stdin.write("\n") + else: + raise Exception("Unknown input format") + jq.stdin.close() jq.wait() for input_stream in input_streams: input_stream.close() exit(jq.returncode) except Exception as e: - parser.exit("yq: Error running jq: {}: {}.".format(type(e).__name__, e)) + parser.exit("{}: Error running jq: {}: {}.".format(program_name, type(e).__name__, e)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yq-2.3.3/yq/version.py new/yq-2.7.2/yq/version.py --- old/yq-2.3.3/yq/version.py 2017-09-30 19:06:09.000000000 +0200 +++ new/yq-2.7.2/yq/version.py 2019-01-09 19:54:54.000000000 +0100 @@ -1 +1 @@ -__version__ = '2.3.3' +__version__ = '2.7.2' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yq-2.3.3/yq.egg-info/PKG-INFO new/yq-2.7.2/yq.egg-info/PKG-INFO --- old/yq-2.3.3/yq.egg-info/PKG-INFO 2017-09-30 19:06:15.000000000 +0200 +++ new/yq-2.7.2/yq.egg-info/PKG-INFO 2019-01-09 19:55:01.000000000 +0100 @@ -1,14 +1,13 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: yq -Version: 2.3.3 -Summary: Command-line YAML processor - jq wrapper for YAML documents +Version: 2.7.2 +Summary: Command-line YAML/XML processor - jq wrapper for YAML/XML documents Home-page: https://github.com/kislyuk/yq Author: Andrey Kislyuk Author-email: [email protected] License: Apache Software License -Description-Content-Type: UNKNOWN -Description: yq: Command-line YAML processor - jq wrapper for YAML documents - =============================================================== +Description: yq: Command-line YAML/XML processor - jq wrapper for YAML and XML documents + =========================================================================== Installation ------------ @@ -19,28 +18,38 @@ Before using ``yq``, you also have to install its dependency, ``jq``. See the `jq installation instructions <https://stedolan.github.io/jq/download/>`_ for details and directions specific to your platform. + On macOS, ``yq`` is also available on `Homebrew <https://brew.sh/>`_: use ``brew install python-yq``. + Synopsis -------- - ``yq``'s mode of operation is simple: it transcodes YAML on standard input to JSON (using the key-order-preserving - equivalent of ``yaml.safe_load_all`` to avoid dangerous vulnerabilities in YAML/PyYAML design) and pipes it to ``jq``:: + ``yq`` takes YAML input, converts it to JSON, and pipes it to `jq <https://stedolan.github.io/jq/>`_:: cat input.yml | yq .foo.bar - Or specify the filename directly:: + Like in ``jq``, you can also specify input filename(s) as arguments:: yq .foo.bar input.yml - By default, no transcoding of ``jq`` output is done. Specify the ``--yaml-output``/``-y`` option to transcode it back - into YAML (using the key-order-preserving equivalent of ``yaml.safe_dump_all``):: + By default, no conversion of ``jq`` output is done. Use the ``--yaml-output``/``-y`` argument to convert it back into YAML:: cat input.yml | yq -y .foo.bar - Use the ``--width``/``-w`` argument to pass the line wrap width for string literals. - - All other command line arguments are forwarded to ``jq``. ``yq`` forwards the exit code ``jq`` produced, - unless there was an error in YAML parsing, in which case the exit code is 1. See the `jq manual - <https://stedolan.github.io/jq/manual/>`_ for more details on ``jq`` features and options. + Use the ``--width``/``-w`` argument to pass the line wrap width for string literals. All other command line arguments are + forwarded to ``jq``. ``yq`` forwards the exit code ``jq`` produced, unless there was an error in YAML parsing, in which case + the exit code is 1. See the `jq manual <https://stedolan.github.io/jq/manual/>`_ for more details on ``jq`` features and + options. + + YAML `tags <http://www.yaml.org/spec/1.2/spec.html#id2764295>`_ in the input are ignored (any nested data is treated as + untagged). Key order is preserved. + + XML support + ----------- + ``yq`` also supports XML. The ``yq`` package installs an executable, ``xq``, which + `transcodes XML to JSON <https://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html>`_ using + `xmltodict <https://github.com/martinblech/xmltodict>`_ and pipes it to ``jq``. Roundtrip transcoding is available with + the ``xq --xml-output``/``xq -x`` option. Multiple XML documents can be passed in separate files/streams as + ``xq a.xml b.xml``. Entity expansion and DTD resolution is disabled to avoid XML parsing vulnerabilities. .. admonition:: Compatibility note @@ -59,6 +68,7 @@ * `Documentation (Read the Docs) <https://yq.readthedocs.io/en/latest/>`_ * `Package distribution (PyPI) <https://pypi.python.org/pypi/yq>`_ * `Change log <https://github.com/kislyuk/yq/blob/master/Changes.rst>`_ + * `jq <https://stedolan.github.io/jq/>`_ - the command-line JSON processor utility powering ``yq`` Bugs ~~~~ @@ -91,3 +101,5 @@ Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Topic :: Software Development :: Libraries :: Python Modules +Provides-Extra: test +Provides-Extra: toml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yq-2.3.3/yq.egg-info/SOURCES.txt new/yq-2.7.2/yq.egg-info/SOURCES.txt --- old/yq-2.3.3/yq.egg-info/SOURCES.txt 2017-09-30 19:06:15.000000000 +0200 +++ new/yq-2.7.2/yq.egg-info/SOURCES.txt 2019-01-09 19:55:01.000000000 +0100 @@ -1,12 +1,14 @@ +LICENSE +MANIFEST.in README.rst setup.cfg setup.py -scripts/yq test/test.py yq/__init__.py yq/version.py yq.egg-info/PKG-INFO yq.egg-info/SOURCES.txt yq.egg-info/dependency_links.txt +yq.egg-info/entry_points.txt yq.egg-info/requires.txt yq.egg-info/top_level.txt \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yq-2.3.3/yq.egg-info/entry_points.txt new/yq-2.7.2/yq.egg-info/entry_points.txt --- old/yq-2.3.3/yq.egg-info/entry_points.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/yq-2.7.2/yq.egg-info/entry_points.txt 2019-01-09 19:55:01.000000000 +0100 @@ -0,0 +1,4 @@ +[console_scripts] +xq = yq:xq_cli +yq = yq:main + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yq-2.3.3/yq.egg-info/requires.txt new/yq-2.7.2/yq.egg-info/requires.txt --- old/yq-2.3.3/yq.egg-info/requires.txt 2017-09-30 19:06:15.000000000 +0200 +++ new/yq-2.7.2/yq.egg-info/requires.txt 2019-01-09 19:55:01.000000000 +0100 @@ -1,7 +1,11 @@ setuptools PyYAML>=3.11 +xmltodict>=0.11.0 [test] coverage flake8 wheel + +[toml] +toml>=0.9.4
