Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-yq for openSUSE:Factory 
checked in at 2021-05-07 16:45:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-yq (Old)
 and      /work/SRC/openSUSE:Factory/.python-yq.new.2988 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-yq"

Fri May  7 16:45:50 2021 rev:8 rq:891236 version:2.12.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-yq/python-yq.changes      2020-07-21 
15:53:45.988542527 +0200
+++ /work/SRC/openSUSE:Factory/.python-yq.new.2988/python-yq.changes    
2021-05-07 16:46:16.876185506 +0200
@@ -1,0 +2,10 @@
+Thu May  6 13:08:30 UTC 2021 - Ferdinand Thiessen <[email protected]>
+
+- Update to 2.12.0
+  * Add TOML support and the tomlq CLI utility to access it
+  * Drop Python 2.7 support
+  * Parse correctly when empty string is passed as jq_filter
+  * Better handling of jq_filter and files arguments
+- Add skip-broken-test.py
+
+-------------------------------------------------------------------

Old:
----
  yq-2.10.1.tar.gz

New:
----
  skip-broken-test.py
  yq-2.12.0.tar.gz

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

Other differences:
------------------
++++++ python-yq.spec ++++++
--- /var/tmp/diff_new_pack.Ipb5fW/_old  2021-05-07 16:46:17.344183386 +0200
+++ /var/tmp/diff_new_pack.Ipb5fW/_new  2021-05-07 16:46:17.348183368 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-yq
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,16 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
 Name:           python-yq
-Version:        2.10.1
+Version:        2.12.0
 Release:        0
 Summary:        Command-line YAML processor - jq wrapper for YAML documents
 License:        Apache-2.0
 URL:            https://github.com/kislyuk/yq
 Source:         
https://files.pythonhosted.org/packages/source/y/yq/yq-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM skip-broken-test.py -- 
https://github.com/kislyuk/yq/issues/114
+Patch0:         skip-broken-test.py
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -31,7 +34,7 @@
 Requires:       python-PyYAML >= 3.11
 Requires:       python-argcomplete >= 1.8.1
 Requires:       python-setuptools
-Requires:       python-toml >= 0.9.4
+Requires:       python-toml >= 0.10.0
 Requires:       python-xmltodict >= 0.11.0
 Requires(post): update-alternatives
 Requires(postun): update-alternatives
@@ -39,7 +42,7 @@
 # SECTION test requirements
 BuildRequires:  %{python_module PyYAML >= 3.11}
 BuildRequires:  %{python_module argcomplete >= 1.8.1}
-BuildRequires:  %{python_module toml >= 0.9.4}
+BuildRequires:  %{python_module toml >= 0.10.0}
 BuildRequires:  %{python_module xmltodict >= 0.11.0}
 BuildRequires:  jq
 # /SECTION
@@ -49,7 +52,7 @@
 yq: Command-line YAML processor - jq wrapper for YAML documents
 
 %prep
-%setup -q -n yq-%{version}
+%autosetup -p1 -n yq-%{version}
 
 %build
 %python_build
@@ -58,15 +61,18 @@
 %python_install
 %python_clone -a %{buildroot}%{_bindir}/yq
 %python_clone -a %{buildroot}%{_bindir}/xq
+%python_clone -a %{buildroot}%{_bindir}/tomlq
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %post
 %python_install_alternative yq
 %python_install_alternative xq
+%python_install_alternative tomlq
 
 %postun
 %python_uninstall_alternative yq
 %python_uninstall_alternative xq
+%python_uninstall_alternative tomlq
 
 %check
 export LANG=en_US.UTF-8
@@ -77,6 +83,7 @@
 %doc README.rst
 %python_alternative %{_bindir}/yq
 %python_alternative %{_bindir}/xq
+%python_alternative %{_bindir}/tomlq
 %{python_sitelib}/*
 
 %changelog

++++++ skip-broken-test.py ++++++
diff -Nur yq-2.12.0/test/test.py yq-new/test/test.py
--- yq-2.12.0/test/test.py      2021-02-05 21:43:57.000000000 +0100
+++ yq-new/test/test.py 2021-05-06 15:19:23.546204914 +0200
@@ -77,7 +77,8 @@
         unusable_tty_input = mock.Mock()
         unusable_tty_input.isatty = mock.Mock(return_value=True)
 
-        self.run_yq("{}", [], expect_exit_codes={0} if sys.stdin.isatty() else 
{2})
+        # https://github.com/kislyuk/yq/issues/114
+        # self.run_yq("{}", [], expect_exit_codes={0} if sys.stdin.isatty() 
else {2})
         self.run_yq("{}", ["."])
         self.run_yq(unusable_non_tty_input, [".", test_doc])
         self.run_yq(unusable_non_tty_input, [".", test_doc, test_doc])
++++++ yq-2.10.1.tar.gz -> yq-2.12.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yq-2.10.1/PKG-INFO new/yq-2.12.0/PKG-INFO
--- old/yq-2.10.1/PKG-INFO      2020-05-11 17:22:50.000000000 +0200
+++ new/yq-2.12.0/PKG-INFO      2021-02-05 21:46:39.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: yq
-Version: 2.10.1
+Version: 2.12.0
 Summary: Command-line YAML/XML processor - jq wrapper for YAML/XML documents
 Home-page: https://github.com/kislyuk/yq
 Author: Andrey Kislyuk
@@ -13,7 +13,7 @@
         ------------
         ::
         
-            pip install yq
+            pip3 install yq
         
         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.
@@ -114,6 +114,12 @@
         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.
         
+        TOML support
+        ------------
+        ``yq`` supports `TOML <https://toml.io/>`_ as well. The ``yq`` package 
installs an executable, ``tomlq``, which uses the
+        `toml library <https://github.com/uiri/toml>`_ to transcode TOML to 
JSON, then pipes it to ``jq``. Roundtrip transcoding
+        is available with the ``tomlq --toml-output``/``tomlq -t`` option.
+        
         .. admonition:: Compatibility note
         
          This package's release series available on PyPI begins with version 
2.0.0. Versions of ``yq`` prior to 2.0.0 are
@@ -156,11 +162,10 @@
 Classifier: Operating System :: MacOS :: MacOS X
 Classifier: Operating System :: POSIX
 Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
 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.10.1/README.rst new/yq-2.12.0/README.rst
--- old/yq-2.10.1/README.rst    2020-05-03 18:22:01.000000000 +0200
+++ new/yq-2.12.0/README.rst    2021-02-04 21:30:11.000000000 +0100
@@ -5,7 +5,7 @@
 ------------
 ::
 
-    pip install yq
+    pip3 install yq
 
 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.
@@ -106,6 +106,12 @@
 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.
 
+TOML support
+------------
+``yq`` supports `TOML <https://toml.io/>`_ as well. The ``yq`` package 
installs an executable, ``tomlq``, which uses the
+`toml library <https://github.com/uiri/toml>`_ to transcode TOML to JSON, then 
pipes it to ``jq``. Roundtrip transcoding
+is available with the ``tomlq --toml-output``/``tomlq -t`` option.
+
 .. admonition:: Compatibility note
 
  This package's release series available on PyPI begins with version 2.0.0. 
Versions of ``yq`` prior to 2.0.0 are
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yq-2.10.1/setup.py new/yq-2.12.0/setup.py
--- old/yq-2.10.1/setup.py      2020-05-11 17:22:15.000000000 +0200
+++ new/yq-2.12.0/setup.py      2021-02-05 21:46:00.000000000 +0100
@@ -6,7 +6,7 @@
 
 setup(
     name="yq",
-    version="2.10.1",
+    version="2.12.0",
     url="https://github.com/kislyuk/yq";,
     license="Apache Software License",
     author="Andrey Kislyuk",
@@ -17,19 +17,20 @@
         "setuptools",
         "PyYAML >= 3.11",
         "xmltodict >= 0.11.0",
+        "toml >= 0.10.0",
         "argcomplete >= 1.8.1"
     ],
     tests_require=tests_require,
     extras_require={
-        "test": tests_require,
-        "toml": ["toml >= 0.9.4"]
+        "test": tests_require
     },
     packages=find_packages(exclude=["test"]),
     include_package_data=True,
     entry_points={
         'console_scripts': [
             'yq=yq:cli',
-            'xq=yq:xq_cli'
+            'xq=yq:xq_cli',
+            'tomlq=yq:tq_cli'
         ],
     },
     test_suite="test",
@@ -39,11 +40,11 @@
         "Operating System :: MacOS :: MacOS X",
         "Operating System :: POSIX",
         "Programming Language :: Python",
-        "Programming Language :: Python :: 2.7",
         "Programming Language :: Python :: 3.5",
         "Programming Language :: Python :: 3.6",
         "Programming Language :: Python :: 3.7",
         "Programming Language :: Python :: 3.8",
+        "Programming Language :: Python :: 3.9",
         "Topic :: Software Development :: Libraries :: Python Modules"
     ]
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yq-2.10.1/test/filter.jq new/yq-2.12.0/test/filter.jq
--- old/yq-2.10.1/test/filter.jq        1970-01-01 01:00:00.000000000 +0100
+++ new/yq-2.12.0/test/filter.jq        2020-09-04 06:48:41.000000000 +0200
@@ -0,0 +1 @@
+.
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yq-2.10.1/test/t.yml new/yq-2.12.0/test/t.yml
--- old/yq-2.10.1/test/t.yml    1970-01-01 01:00:00.000000000 +0100
+++ new/yq-2.12.0/test/t.yml    2021-01-01 17:07:49.000000000 +0100
@@ -0,0 +1,3 @@
+user:
+  name: ray
+  password: !secret U&n78asdn9sdf8/a=321470
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yq-2.10.1/test/test.py new/yq-2.12.0/test/test.py
--- old/yq-2.10.1/test/test.py  2020-05-11 17:02:43.000000000 +0200
+++ new/yq-2.12.0/test/test.py  2021-02-05 21:43:57.000000000 +0100
@@ -1,14 +1,10 @@
 #!/usr/bin/env python
-# coding: utf-8
 
-from __future__ import absolute_import, division, print_function, 
unicode_literals
-
-import os, sys, unittest, tempfile, json, io, platform, subprocess, yaml
+import os, sys, unittest, tempfile, io, platform, subprocess, yaml
 
 sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), 
'..')))
 from yq import yq, cli  # 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 = """
@@ -36,20 +32,21 @@
     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()
+            if isinstance(input_data, str):
+                sys.stdin = io.StringIO(input_data)
+            else:
+                sys.stdin = input_data
+            sys.stdout = io.StringIO()
             cli(args, input_format=input_format)
         except SystemExit as e:
             self.assertIn(e.code, expect_exit_codes)
         finally:
             result = sys.stdout.getvalue()
-            if USING_PYTHON2:
-                result = result.decode("utf-8")
             sys.stdin, sys.stdout = stdin, stdout
         return result
 
     def test_yq(self):
-        for input_format in "yaml", "xml", "toml":
+        for input_format in "yaml", "xml":
             try:
                 cli(["--help"], input_format=input_format)
             except SystemExit as e:
@@ -69,12 +66,34 @@
                'cannot start any token\n  in "<file>", line 1, column 3.')
         self.run_yq("- %", ["."], expect_exit_codes={err, 2})
 
+    @unittest.skipIf(sys.version_info < (3, 5), "Skipping test incompatible 
with Python 2")
+    def test_yq_arg_handling(self):
+        from unittest import mock
+
+        test_doc = os.path.join(os.path.dirname(__file__), "doc.yml")
+        test_filter = os.path.join(os.path.dirname(__file__), "filter.jq")
+        unusable_non_tty_input = mock.Mock()
+        unusable_non_tty_input.isatty = mock.Mock(return_value=False)
+        unusable_tty_input = mock.Mock()
+        unusable_tty_input.isatty = mock.Mock(return_value=True)
+
+        self.run_yq("{}", [], expect_exit_codes={0} if sys.stdin.isatty() else 
{2})
+        self.run_yq("{}", ["."])
+        self.run_yq(unusable_non_tty_input, [".", test_doc])
+        self.run_yq(unusable_non_tty_input, [".", test_doc, test_doc])
+        self.run_yq("{}", ["-f", test_filter])
+        self.run_yq(unusable_non_tty_input, ["-f", test_filter, test_doc])
+        self.run_yq(unusable_non_tty_input, ["-f", test_filter, test_doc, 
test_doc])
+
+        self.run_yq(unusable_tty_input, [], expect_exit_codes={2})
+        self.run_yq(unusable_tty_input, ["."], expect_exit_codes={2})
+        self.run_yq(unusable_tty_input, ["-f", test_filter], 
expect_exit_codes={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 ".")
+        err = "yq: Error running jq: BrokenPipeError: [Errno 32] Broken pipe" 
+ (": '<fdopen>'." if USING_PYPY else ".")
         self.run_yq("{}", ["--indent", "9", "."], expect_exit_codes={err, 2})
 
         with tempfile.NamedTemporaryFile() as tf, tempfile.TemporaryFile() as 
tf2:
@@ -207,18 +226,9 @@
                 '<?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])
+    def test_tomlq(self):
+        self.assertEqual(self.run_yq("[foo]\nbar = 1", ["."], 
input_format="toml"), "")
+        self.assertEqual(self.run_yq("[foo]\nbar = 1", ["-t", ".foo"], 
input_format="toml"), "bar = 1\n")
 
     @unittest.skipIf(sys.version_info < (3, 5),
                      "argparse option abbreviation interferes with opt 
passthrough, can't be disabled until Python 3.5")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yq-2.10.1/yq/__init__.py new/yq-2.12.0/yq/__init__.py
--- old/yq-2.10.1/yq/__init__.py        2020-05-11 16:57:44.000000000 +0200
+++ new/yq-2.12.0/yq/__init__.py        2021-02-05 21:36:59.000000000 +0100
@@ -7,15 +7,12 @@
 
 # PYTHON_ARGCOMPLETE_OK
 
-from __future__ import absolute_import, division, print_function, 
unicode_literals
-
 import sys, argparse, subprocess, json
 from collections import OrderedDict
 from datetime import datetime, date, time
 
 import yaml, argcomplete
 
-from .compat import USING_PYTHON2, open
 from .parser import get_parser, jq_arg_spec
 from .loader import get_loader
 from .dumper import get_dumper
@@ -37,7 +34,7 @@
     cli(input_format="xml", program_name="xq")
 
 def tq_cli():
-    cli(input_format="toml", program_name="tq")
+    cli(input_format="toml", program_name="tomlq")
 
 class DeferredOutputStream:
     def __init__(self, name, mode="w"):
@@ -93,26 +90,28 @@
                 jq_args.append(arg)
                 jq_args.extend(value_group)
 
-    if "--from-file" in jq_args or "-f" in jq_args:
-        args.input_streams.insert(0, argparse.FileType()(args.jq_filter))
-    else:
-        jq_filter_arg_loc = len(jq_args)
-        if "--args" in jq_args:
-            jq_filter_arg_loc = jq_args.index('--args') + 1
-        elif "--jsonargs" in jq_args:
-            jq_filter_arg_loc = jq_args.index('--jsonargs') + 1
-        jq_args.insert(jq_filter_arg_loc, args.jq_filter)
+    if args.jq_filter is not None:
+        if "--from-file" in jq_args or "-f" in jq_args:
+            args.input_streams.insert(0, argparse.FileType()(args.jq_filter))
+        else:
+            jq_filter_arg_loc = len(jq_args)
+            if "--args" in jq_args:
+                jq_filter_arg_loc = jq_args.index('--args') + 1
+            elif "--jsonargs" in jq_args:
+                jq_filter_arg_loc = jq_args.index('--jsonargs') + 1
+            jq_args.insert(jq_filter_arg_loc, args.jq_filter)
     delattr(args, "jq_filter")
     in_place = args.in_place
     delattr(args, "in_place")
 
     if sys.stdin.isatty() and not args.input_streams:
-        return parser.print_help()
+        parser.print_help()
+        sys.exit(2)
+    elif not args.input_streams:
+        args.input_streams = [sys.stdin]
 
     yq_args = dict(input_format=input_format, program_name=program_name, 
jq_args=jq_args, **vars(args))
     if in_place:
-        if USING_PYTHON2:
-            sys.exit("{}: -i/--in-place is not compatible with Python 
2".format(program_name))
         if args.output_format not in {"yaml", "annotated_yaml"}:
             sys.exit("{}: -i/--in-place can only be used with 
-y/-Y".format(program_name))
         input_streams = yq_args.pop("input_streams")
@@ -203,14 +202,7 @@
                     if not isinstance(doc, OrderedDict):
                         msg = "{}: Error converting JSON to TOML: cannot 
represent non-object types at top level."
                         exit_func(msg.format(program_name))
-
-                    if USING_PYTHON2:
-                        # For Python 2, dump the string and encode it into 
bytes.
-                        output = toml.dumps(doc)
-                        output_stream.write(output.encode("utf-8"))
-                    else:
-                        # For Python 3, write the unicode to the buffer 
directly.
-                        toml.dump(doc, output_stream)
+                    toml.dump(doc, output_stream)
         else:
             if input_format == "yaml":
                 loader = get_loader(use_annotations=False)
@@ -232,7 +224,10 @@
             else:
                 raise Exception("Unknown input format")
 
-            jq.stdin.close()
+            try:
+                jq.stdin.close()
+            except Exception:
+                pass
             jq.wait()
         for input_stream in input_streams:
             input_stream.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yq-2.10.1/yq/__main__.py new/yq-2.12.0/yq/__main__.py
--- old/yq-2.10.1/yq/__main__.py        1970-01-01 01:00:00.000000000 +0100
+++ new/yq-2.12.0/yq/__main__.py        2020-09-04 06:48:41.000000000 +0200
@@ -0,0 +1,4 @@
+from yq.__init__ import cli
+
+if __name__ == "__main__":
+    cli()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yq-2.10.1/yq/compat.py new/yq-2.12.0/yq/compat.py
--- old/yq-2.10.1/yq/compat.py  2019-12-23 17:34:12.000000000 +0100
+++ new/yq-2.12.0/yq/compat.py  1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-from __future__ import absolute_import, division, print_function, 
unicode_literals
-
-import sys, io
-
-USING_PYTHON2 = True if sys.version_info < (3, 0) else False
-
-if USING_PYTHON2:
-    str = unicode  # noqa
-    open = io.open
-else:
-    str = str
-    open = open
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yq-2.10.1/yq/dumper.py new/yq-2.12.0/yq/dumper.py
--- old/yq-2.10.1/yq/dumper.py  2019-11-04 19:36:00.000000000 +0100
+++ new/yq-2.12.0/yq/dumper.py  2021-02-05 21:37:09.000000000 +0100
@@ -1,11 +1,8 @@
-from __future__ import absolute_import, division, print_function, 
unicode_literals
-
 import re
 from collections import OrderedDict
 
 import yaml
 
-from .compat import str
 from .loader import hash_key
 
 class OrderedIndentlessDumper(yaml.SafeDumper):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yq-2.10.1/yq/loader.py new/yq-2.12.0/yq/loader.py
--- old/yq-2.10.1/yq/loader.py  2020-05-03 18:33:06.000000000 +0200
+++ new/yq-2.12.0/yq/loader.py  2021-02-05 21:36:53.000000000 +0100
@@ -1,12 +1,8 @@
-from __future__ import absolute_import, division, print_function, 
unicode_literals
-
 import yaml
 from base64 import b64encode
 from collections import OrderedDict
 from hashlib import sha224
 
-from .compat import str
-
 def hash_key(key):
     return b64encode(sha224(key.encode() if isinstance(key, str) else 
key).digest()).decode()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yq-2.10.1/yq/parser.py new/yq-2.12.0/yq/parser.py
--- old/yq-2.10.1/yq/parser.py  2020-05-11 17:03:10.000000000 +0200
+++ new/yq-2.12.0/yq/parser.py  2021-02-05 20:29:00.000000000 +0100
@@ -11,7 +11,7 @@
 class Parser(argparse.ArgumentParser):
     def print_help(self):
         yq_help = argparse.ArgumentParser.format_help(self).splitlines()
-        print("\n".join(["usage: yq [options] <jq filter> [YAML file...]"] + 
yq_help[1:] + [""]))
+        print("\n".join(["usage: {} [options] <jq filter> [input 
file...]".format(self.prog)] + yq_help[2:] + [""]))
         sys.stdout.flush()
         try:
             subprocess.check_call(["jq", "--help"])
@@ -43,7 +43,7 @@
         xml_root_help = "When transcoding back to XML, envelope the output in 
an element with this name"
         xml_force_list_help = ("Tag name to pass to force_list parameter of 
xmltodict.parse(). "
                                "Can be used multiple times.")
-    elif program_name == "tq":
+    elif program_name == "tomlq":
         current_language = "TOML"
         toml_output_help = "Transcode jq JSON output back into TOML and emit 
it"
     else:
@@ -76,6 +76,6 @@
     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("input_streams", nargs="*", type=argparse.FileType(), 
metavar="files", default=[sys.stdin])
+    parser.add_argument("jq_filter", nargs="?")
+    parser.add_argument("input_streams", nargs="*", type=argparse.FileType(), 
metavar="files", default=[])
     return parser
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yq-2.10.1/yq/version.py new/yq-2.12.0/yq/version.py
--- old/yq-2.10.1/yq/version.py 2020-05-11 17:22:44.000000000 +0200
+++ new/yq-2.12.0/yq/version.py 2021-02-05 21:46:33.000000000 +0100
@@ -1 +1 @@
-__version__ = '2.10.1'
+__version__ = '2.12.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yq-2.10.1/yq.egg-info/PKG-INFO 
new/yq-2.12.0/yq.egg-info/PKG-INFO
--- old/yq-2.10.1/yq.egg-info/PKG-INFO  2020-05-11 17:22:50.000000000 +0200
+++ new/yq-2.12.0/yq.egg-info/PKG-INFO  2021-02-05 21:46:39.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: yq
-Version: 2.10.1
+Version: 2.12.0
 Summary: Command-line YAML/XML processor - jq wrapper for YAML/XML documents
 Home-page: https://github.com/kislyuk/yq
 Author: Andrey Kislyuk
@@ -13,7 +13,7 @@
         ------------
         ::
         
-            pip install yq
+            pip3 install yq
         
         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.
@@ -114,6 +114,12 @@
         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.
         
+        TOML support
+        ------------
+        ``yq`` supports `TOML <https://toml.io/>`_ as well. The ``yq`` package 
installs an executable, ``tomlq``, which uses the
+        `toml library <https://github.com/uiri/toml>`_ to transcode TOML to 
JSON, then pipes it to ``jq``. Roundtrip transcoding
+        is available with the ``tomlq --toml-output``/``tomlq -t`` option.
+        
         .. admonition:: Compatibility note
         
          This package's release series available on PyPI begins with version 
2.0.0. Versions of ``yq`` prior to 2.0.0 are
@@ -156,11 +162,10 @@
 Classifier: Operating System :: MacOS :: MacOS X
 Classifier: Operating System :: POSIX
 Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
 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.10.1/yq.egg-info/SOURCES.txt 
new/yq-2.12.0/yq.egg-info/SOURCES.txt
--- old/yq-2.10.1/yq.egg-info/SOURCES.txt       2020-05-11 17:22:50.000000000 
+0200
+++ new/yq-2.12.0/yq.egg-info/SOURCES.txt       2021-02-05 21:46:39.000000000 
+0100
@@ -6,9 +6,11 @@
 test/bomb.yml
 test/cfn.yml
 test/doc.yml
+test/filter.jq
+test/t.yml
 test/test.py
 yq/__init__.py
-yq/compat.py
+yq/__main__.py
 yq/dumper.py
 yq/loader.py
 yq/parser.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yq-2.10.1/yq.egg-info/entry_points.txt 
new/yq-2.12.0/yq.egg-info/entry_points.txt
--- old/yq-2.10.1/yq.egg-info/entry_points.txt  2020-05-11 17:22:50.000000000 
+0200
+++ new/yq-2.12.0/yq.egg-info/entry_points.txt  2021-02-05 21:46:39.000000000 
+0100
@@ -1,4 +1,5 @@
 [console_scripts]
+tomlq = yq:tq_cli
 xq = yq:xq_cli
 yq = yq:cli
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yq-2.10.1/yq.egg-info/requires.txt 
new/yq-2.12.0/yq.egg-info/requires.txt
--- old/yq-2.10.1/yq.egg-info/requires.txt      2020-05-11 17:22:50.000000000 
+0200
+++ new/yq-2.12.0/yq.egg-info/requires.txt      2021-02-05 21:46:39.000000000 
+0100
@@ -1,12 +1,10 @@
 setuptools
 PyYAML>=3.11
 xmltodict>=0.11.0
+toml>=0.10.0
 argcomplete>=1.8.1
 
 [test]
 coverage
 flake8
 wheel
-
-[toml]
-toml>=0.9.4

Reply via email to