* Package: app-misc/yq-2.12.0 * Repository: gentoo * Maintainer: zmedico@gentoo.org chutzpah@gentoo.org * USE: abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python3_9 test userland_GNU * FEATURES: network-sandbox preserve-libs sandbox test userpriv usersandbox >>> Unpacking source... >>> Unpacking yq-2.12.0.tar.gz to /var/tmp/portage/app-misc/yq-2.12.0/work >>> Source unpacked in /var/tmp/portage/app-misc/yq-2.12.0/work >>> Preparing source in /var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0 ... * Applying yq-2.11.1-tests.patch ... [ ok ] >>> Source prepared. >>> Configuring source in /var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0 ... * python3_9: running distutils-r1_run_phase distutils-r1_python_compile python3.9 setup.py build -j 4 running build running build_py creating /var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0-python3_9/lib/yq copying yq/version.py -> /var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0-python3_9/lib/yq copying yq/parser.py -> /var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0-python3_9/lib/yq copying yq/loader.py -> /var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0-python3_9/lib/yq copying yq/dumper.py -> /var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0-python3_9/lib/yq copying yq/__main__.py -> /var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0-python3_9/lib/yq copying yq/__init__.py -> /var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0-python3_9/lib/yq running egg_info writing yq.egg-info/PKG-INFO writing dependency_links to yq.egg-info/dependency_links.txt writing entry points to yq.egg-info/entry_points.txt writing requirements to yq.egg-info/requires.txt writing top-level names to yq.egg-info/top_level.txt reading manifest file 'yq.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'yq.egg-info/SOURCES.txt' warning: build_py: byte-compiling is disabled, skipping. >>> Source compiled. >>> Test phase: app-misc/yq-2.12.0 * python3_9: running distutils-r1_run_phase python_test test_abbrev_opt_collisions (__main__.TestYq) ... ok test_datetimes (__main__.TestYq) ... [ "2016-12-20T22:07:36+00:00" ] "2016-12-20" ok test_explicit_doc_markers (__main__.TestYq) ... ok test_in_place (__main__.TestYq) ... /var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0/yq/__init__.py:127: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-misc/yq-2.12.0/temp/tmplh2zp4ry' mode='w' encoding='UTF-8'> yq(input_streams=[input_stream], output_stream=DeferredOutputStream(input_stream.name), **yq_args) ResourceWarning: Enable tracemalloc to get the object allocation traceback /var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0/yq/__init__.py:127: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-misc/yq-2.12.0/temp/tmp66k2igyq' mode='w' encoding='UTF-8'> yq(input_streams=[input_stream], output_stream=DeferredOutputStream(input_stream.name), **yq_args) ResourceWarning: Enable tracemalloc to get the object allocation traceback jq: error: syntax error, unexpected '/', expecting $end (Unix shell quoting issues?) at , line 1: /var/tmp/portage/app-misc/yq-2.12.0/temp/tmplh2zp4ry jq: 1 compile error ok test_jq16_arg_passthrough (__main__.TestYq) ... jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '5') at , line 1: def halt_error: halt_error(5); jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 7: def unique: group_by(.) | map(.[0]); jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 8: def unique_by(f): group_by(f) | map(.[0]); jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 26: def reverse: [.[length - 1 - range(0;length)]]; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 26: def reverse: [.[length - 1 - range(0;length)]]; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 31: def index($i): indices($i) | .[0]; # TODO: optimize jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 32: def rindex($i): indices($i) | .[-1:][0]; # TODO: optimize jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 32: def rindex($i): indices($i) | .[-1:][0]; # TODO: optimize jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 33: def paths: path(recurse(if (type|. == "array" or . == "object") then .[] else empty end))|select(length > 0); jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 52: def _flatten($x): reduce .[] as $i ([]; if $i | type == "array" and $x != 0 then . + ($i | _flatten($x-1)) else . + [$i] end); jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 52: def _flatten($x): reduce .[] as $i ([]; if $i | type == "array" and $x != 0 then . + ($i | _flatten($x-1)) else . + [$i] end); jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 53: def flatten($x): if $x < 0 then error("flatten depth must not be negative") else _flatten($x) end; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 54: def flatten: _flatten(-1); jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 55: def range($x): range(0;$x); jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 62: elif $vt == "array" and ($val | length) > 1 then match($val[0]; $val[1]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 62: elif $vt == "array" and ($val | length) > 1 then match($val[0]; $val[1]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 62: elif $vt == "array" and ($val | length) > 1 then match($val[0]; $val[1]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 63: elif $vt == "array" and ($val | length) > 0 then match($val[0]; null) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 63: elif $vt == "array" and ($val | length) > 0 then match($val[0]; null) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 67: elif $vt == "array" and ($val | length) > 1 then test($val[0]; $val[1]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 67: elif $vt == "array" and ($val | length) > 1 then test($val[0]; $val[1]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 67: elif $vt == "array" and ($val | length) > 1 then test($val[0]; $val[1]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 68: elif $vt == "array" and ($val | length) > 0 then test($val[0]; null) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 68: elif $vt == "array" and ($val | length) > 0 then test($val[0]; null) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 72: elif $vt == "array" and ($val | length) > 1 then capture($val[0]; $val[1]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 72: elif $vt == "array" and ($val | length) > 1 then capture($val[0]; $val[1]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 72: elif $vt == "array" and ($val | length) > 1 then capture($val[0]; $val[1]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 73: elif $vt == "array" and ($val | length) > 0 then capture($val[0]; null) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 73: elif $vt == "array" and ($val | length) > 0 then capture($val[0]; null) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 77: | if (.captures|length > 0) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 84: def _nwise(a; $n): if a|length <= $n then a else a[0:$n] , _nwise(a[$n:]; $n) end; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 91: | [0] + . +[$s|length] jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '2') at , line 92: | _nwise(2) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 93: | $s[.[0]:.[1] ] ; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 93: | $s[.[0]:.[1] ] ; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 103: | if length == 0 then $in jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 104: else .[0] jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 109: | $in[0:$r.offset] + s + $in[$r.offset+$r.length:] jq: error: Invalid numeric literal at EOF at line 1, column 3 (while parsing '103') at , line 114: def subg: [explode[] | select(. != 103)] | implode; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 120: | if length == 0 then $in jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 121: else .[0] as $edit jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 126: | $in[0:$edit.offset] jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 128: + ($in[$len:] | if length > 0 and gs then mysub else . end) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 151: if $n > 0 then label $out | foreach exp as $item ($n; .-1; $item, if . <= 0 then break $out else empty end) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 151: if $n > 0 then label $out | foreach exp as $item ($n; .-1; $item, if . <= 0 then break $out else empty end) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 151: if $n > 0 then label $out | foreach exp as $item ($n; .-1; $item, if . <= 0 then break $out else empty end) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 152: elif $n == 0 then empty jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 156: if $by > 0 then $init|while(. < $upto; . + $by) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 157: elif $by < 0 then $init|while(. > $upto; . + $by) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 168: def nth($n; g): if $n < 0 then error("nth doesn't support negative indices") else last(limit($n + 1; g)) end; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 168: def nth($n; g): if $n < 0 then error("nth doesn't support negative indices") else last(limit($n + 1; g)) end; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 169: def first: .[0]; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 170: def last: .[-1]; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 173: if length == 0 then [] else jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 174: .[0][] as $x jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 175: | (.[1:] | combinations) as $y jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 189: | reduce range(0; $max) as $j jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 190: ([]; . + [reduce range(0;$length) as $i ([]; . + [ $in[$i][$j] ] )] ) jq: error: Invalid numeric literal at EOF at line 1, column 2 (while parsing '65') at , line 201: explode | map( if 65 <= . and . <= 90 then . + 32 else . end) | implode; jq: error: Invalid numeric literal at EOF at line 1, column 2 (while parsing '90') at , line 201: explode | map( if 65 <= . and . <= 90 then . + 32 else . end) | implode; jq: error: Invalid numeric literal at EOF at line 1, column 2 (while parsing '32') at , line 201: explode | map( if 65 <= . and . <= 90 then . + 32 else . end) | implode; jq: error: Invalid numeric literal at EOF at line 1, column 2 (while parsing '97') at , line 204: explode | map( if 97 <= . and . <= 122 then . - 32 else . end) | implode; jq: error: Invalid numeric literal at EOF at line 1, column 3 (while parsing '122') at , line 204: explode | map( if 97 <= . and . <= 122 then . - 32 else . end) | implode; jq: error: Invalid numeric literal at EOF at line 1, column 2 (while parsing '32') at , line 204: explode | map( if 97 <= . and . <= 122 then . - 32 else . end) | implode; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 208: . as $n | null | stream | . as $input | if (.[0]|length) > $n then setpath([0];$input[0][$n:]) else empty end; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 208: . as $n | null | stream | . as $input | if (.[0]|length) > $n then setpath([0];$input[0][$n:]) else empty end; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 208: . as $n | null | stream | . as $input | if (.[0]|length) > $n then setpath([0];$input[0][$n:]) else empty end; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '2') at , line 213: | if $i|length == 2 jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 214: then setpath(["e"]; $i[0]|length==0) | setpath(["x"]+$i[0]; $i[1]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 214: then setpath(["e"]; $i[0]|length==0) | setpath(["x"]+$i[0]; $i[1]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 214: then setpath(["e"]; $i[0]|length==0) | setpath(["x"]+$i[0]; $i[1]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 214: then setpath(["e"]; $i[0]|length==0) | setpath(["x"]+$i[0]; $i[1]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 215: else setpath(["e"]; $i[0]|length==1) end jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 215: else setpath(["e"]; $i[0]|length==1) end jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 228: if length == 0 then -1 jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 228: if length == 0 then -1 jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 229: elif length == 1 then jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 230: if $target == .[0] then 0 elif $target < .[0] then -1 else -2 end jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 230: if $target == .[0] then 0 elif $target < .[0] then -1 else -2 end jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 230: if $target == .[0] then 0 elif $target < .[0] then -1 else -2 end jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 230: if $target == .[0] then 0 elif $target < .[0] then -1 else -2 end jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '2') at , line 230: if $target == .[0] then 0 elif $target < .[0] then -1 else -2 end jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 234: | [0, length-1, null] jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 234: | [0, length-1, null] jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 235: | until( .[0] > .[1] ; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 235: | until( .[0] > .[1] ; jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '2') at , line 236: if .[2] != null then (.[1] = -1) # i.e. break jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 236: if .[2] != null then (.[1] = -1) # i.e. break jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 236: if .[2] != null then (.[1] = -1) # i.e. break jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 238: ( ( (.[1] + .[0]) / 2 ) | floor ) as $mid jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 238: ( ( (.[1] + .[0]) / 2 ) | floor ) as $mid jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '2') at , line 238: ( ( (.[1] + .[0]) / 2 ) | floor ) as $mid jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '2') at , line 240: | if $monkey == $target then (.[2] = $mid) # success jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 241: elif .[0] == .[1] then (.[1] = -1) # failure jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 241: elif .[0] == .[1] then (.[1] = -1) # failure jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 241: elif .[0] == .[1] then (.[1] = -1) # failure jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 241: elif .[0] == .[1] then (.[1] = -1) # failure jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 242: elif $monkey < $target then (.[0] = ($mid + 1)) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 242: elif $monkey < $target then (.[0] = ($mid + 1)) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 243: else (.[1] = ($mid - 1)) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 243: else (.[1] = ($mid - 1)) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '2') at , line 246: | if .[2] == null then # compute the insertion point jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 247: if $in[ .[0] ] < $target then (-2 -.[0]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '2') at , line 247: if $in[ .[0] ] < $target then (-2 -.[0]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 247: if $in[ .[0] ] < $target then (-2 -.[0]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '1') at , line 248: else (-1 -.[0]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '0') at , line 248: else (-1 -.[0]) jq: error: Invalid numeric literal at EOF at line 1, column 1 (while parsing '2') at , line 250: else .[2] jq: src/builtin.c:1810: builtins_bind: Assertion `!nerrors' failed. FAIL test_multidocs (__main__.TestYq) ... ok test_roundtrip_yaml (__main__.TestYq) ... ok test_short_option_separation (__main__.TestYq) ... { "a": 1 } {"a":1} ok test_times (__main__.TestYq) Timestamps are parsed as sexagesimals in YAML 1.1 but not 1.2. No PyYAML support for YAML 1.2 yet. See issue 10 ... 40333 expected failure test_tomlq (__main__.TestYq) ... { "foo": { "bar": 1 } } ok test_unrecognized_tags (__main__.TestYq) ... "bar" ok test_xq (__main__.TestYq) ... { "foo": null } ok test_xq_dtd (__main__.TestYq) ... ok test_yq (__main__.TestYq) ... usage: yq [options] [input file...] [jq_filter] [files ...] yq: Command-line YAML processor - jq wrapper for YAML documents yq transcodes YAML documents to JSON and passes them to jq. See https://github.com/kislyuk/yq for more information. positional arguments: jq_filter files optional arguments: -h, --help show this help message and exit --yaml-output, --yml-output, -y Transcode jq JSON output back into YAML and emit it --yaml-roundtrip, --yml-roundtrip, -Y Transcode jq JSON output back into YAML and emit it. Preserve YAML tags and styles by representing them as extra items in their enclosing mappings and sequences while in JSON. This option is incompatible with jq filters that do not expect these extra items. --width WIDTH, -w WIDTH When using --yaml-output, specify string wrap width --indentless-lists, --indentless When using --yaml-output, indent block style lists (sequences) with 0 spaces instead of 2 --in-place, -i Edit files in place (no backup - use caution) --version show program's version number and exit jq - commandline JSON processor [version jq_version] Usage: jq [options] [file...] jq [options] --args [strings...] jq [options] --jsonargs [JSON_TEXTS...] jq is a tool for processing JSON inputs, applying the given filter to its JSON text inputs and producing the filter's results as JSON on standard output. The simplest filter is ., which copies jq's input to its output unmodified (except for formatting, but note that IEEE754 is used for number representation internally, with all that that implies). For more advanced filters see the jq(1) manpage ("man jq") and/or https://stedolan.github.io/jq Example: $ echo '{"foo": 0}' | jq . { "foo": 0 } Some of the options include: -c compact instead of pretty-printed output; -n use `null` as the single input value; -e set the exit status code based on the output; -s read (slurp) all inputs into an array; apply filter to it; -r output raw strings, not JSON texts; -R read raw strings, not JSON texts; -C colorize JSON; -M monochrome (don't colorize JSON); -S sort keys of objects on output; --tab use tabs for indentation; --arg a v set variable $a to value ; --argjson a v set variable $a to JSON value ; --slurpfile a f set variable $a to an array of JSON texts read from ; --rawfile a f set variable $a to a string consisting of the contents of ; --args remaining arguments are string arguments, not files; --jsonargs remaining arguments are JSON arguments, not files; -- terminates argument processing; Named arguments are also available as $ARGS.named[], while positional arguments are available as $ARGS.positional[]. See the manpage for more options. usage: yq [options] [input file...] [jq_filter] [files ...] yq: Command-line YAML processor - jq wrapper for YAML documents yq transcodes YAML documents to JSON and passes them to jq. See https://github.com/kislyuk/yq for more information. positional arguments: jq_filter files optional arguments: -h, --help show this help message and exit --yaml-output, --yml-output, -y Transcode jq JSON output back into YAML and emit it --yaml-roundtrip, --yml-roundtrip, -Y Transcode jq JSON output back into YAML and emit it. Preserve YAML tags and styles by representing them as extra items in their enclosing mappings and sequences while in JSON. This option is incompatible with jq filters that do not expect these extra items. --width WIDTH, -w WIDTH When using --yaml-output, specify string wrap width --indentless-lists, --indentless When using --yaml-output, indent block style lists (sequences) with 0 spaces instead of 2 --in-place, -i Edit files in place (no backup - use caution) --version show program's version number and exit jq - commandline JSON processor [version jq_version] Usage: jq [options] [file...] jq [options] --args [strings...] jq [options] --jsonargs [JSON_TEXTS...] jq is a tool for processing JSON inputs, applying the given filter to its JSON text inputs and producing the filter's results as JSON on standard output. The simplest filter is ., which copies jq's input to its output unmodified (except for formatting, but note that IEEE754 is used for number representation internally, with all that that implies). For more advanced filters see the jq(1) manpage ("man jq") and/or https://stedolan.github.io/jq Example: $ echo '{"foo": 0}' | jq . { "foo": 0 } Some of the options include: -c compact instead of pretty-printed output; -n use `null` as the single input value; -e set the exit status code based on the output; -s read (slurp) all inputs into an array; apply filter to it; -r output raw strings, not JSON texts; -R read raw strings, not JSON texts; -C colorize JSON; -M monochrome (don't colorize JSON); -S sort keys of objects on output; --tab use tabs for indentation; --arg a v set variable $a to value ; --argjson a v set variable $a to JSON value ; --slurpfile a f set variable $a to an array of JSON texts read from ; --rawfile a f set variable $a to a string consisting of the contents of ; --args remaining arguments are string arguments, not files; --jsonargs remaining arguments are JSON arguments, not files; -- terminates argument processing; Named arguments are also available as $ARGS.named[], while positional arguments are available as $ARGS.positional[]. See the manpage for more options. {} 3 1 ok test_yq_arg_handling (__main__.TestYq) ... {} {} { "yaml_struct": [ { "key_1": "$.*?/|\\^(){}+@[]&_-", "key_2": [ "$.*?/|\\^(){}+@[]&_-", "{ }", "value23" ], "key_3": "value31", "key_4": [ "value41", "value42" ], "key_5": "value51" }, { "key_1_": "value12", "_key_2": [ "value24", "value25" ], "_key__3": "$.*?/|\\^(){}+@[]&_-" } ] } { "yaml_struct": [ { "key_1": "$.*?/|\\^(){}+@[]&_-", "key_2": [ "$.*?/|\\^(){}+@[]&_-", "{ }", "value23" ], "key_3": "value31", "key_4": [ "value41", "value42" ], "key_5": "value51" }, { "key_1_": "value12", "_key_2": [ "value24", "value25" ], "_key__3": "$.*?/|\\^(){}+@[]&_-" } ] } { "yaml_struct": [ { "key_1": "$.*?/|\\^(){}+@[]&_-", "key_2": [ "$.*?/|\\^(){}+@[]&_-", "{ }", "value23" ], "key_3": "value31", "key_4": [ "value41", "value42" ], "key_5": "value51" }, { "key_1_": "value12", "_key_2": [ "value24", "value25" ], "_key__3": "$.*?/|\\^(){}+@[]&_-" } ] } {} { "yaml_struct": [ { "key_1": "$.*?/|\\^(){}+@[]&_-", "key_2": [ "$.*?/|\\^(){}+@[]&_-", "{ }", "value23" ], "key_3": "value31", "key_4": [ "value41", "value42" ], "key_5": "value51" }, { "key_1_": "value12", "_key_2": [ "value24", "value25" ], "_key__3": "$.*?/|\\^(){}+@[]&_-" } ] } { "yaml_struct": [ { "key_1": "$.*?/|\\^(){}+@[]&_-", "key_2": [ "$.*?/|\\^(){}+@[]&_-", "{ }", "value23" ], "key_3": "value31", "key_4": [ "value41", "value42" ], "key_5": "value51" }, { "key_1_": "value12", "_key_2": [ "value24", "value25" ], "_key__3": "$.*?/|\\^(){}+@[]&_-" } ] } { "yaml_struct": [ { "key_1": "$.*?/|\\^(){}+@[]&_-", "key_2": [ "$.*?/|\\^(){}+@[]&_-", "{ }", "value23" ], "key_3": "value31", "key_4": [ "value41", "value42" ], "key_5": "value51" }, { "key_1_": "value12", "_key_2": [ "value24", "value25" ], "_key__3": "$.*?/|\\^(){}+@[]&_-" } ] } jq - commandline JSON processor [version jq_version] Usage: jq [options] [file...] jq [options] --args [strings...] jq [options] --jsonargs [JSON_TEXTS...] jq is a tool for processing JSON inputs, applying the given filter to its JSON text inputs and producing the filter's results as JSON on standard output. The simplest filter is ., which copies jq's input to its output unmodified (except for formatting, but note that IEEE754 is used for number representation internally, with all that that implies). For more advanced filters see the jq(1) manpage ("man jq") and/or https://stedolan.github.io/jq Example: $ echo '{"foo": 0}' | jq . { "foo": 0 } Some of the options include: -c compact instead of pretty-printed output; -n use `null` as the single input value; -e set the exit status code based on the output; -s read (slurp) all inputs into an array; apply filter to it; -r output raw strings, not JSON texts; -R read raw strings, not JSON texts; -C colorize JSON; -M monochrome (don't colorize JSON); -S sort keys of objects on output; --tab use tabs for indentation; --arg a v set variable $a to value ; --argjson a v set variable $a to JSON value ; --slurpfile a f set variable $a to an array of JSON texts read from ; --rawfile a f set variable $a to a string consisting of the contents of ; --args remaining arguments are string arguments, not files; --jsonargs remaining arguments are JSON arguments, not files; -- terminates argument processing; Named arguments are also available as $ARGS.named[], while positional arguments are available as $ARGS.positional[]. See the manpage for more options. jq - commandline JSON processor [version jq_version] Usage: jq [options] [file...] jq [options] --args [strings...] jq [options] --jsonargs [JSON_TEXTS...] jq is a tool for processing JSON inputs, applying the given filter to its JSON text inputs and producing the filter's results as JSON on standard output. The simplest filter is ., which copies jq's input to its output unmodified (except for formatting, but note that IEEE754 is used for number representation internally, with all that that implies). For more advanced filters see the jq(1) manpage ("man jq") and/or https://stedolan.github.io/jq Example: $ echo '{"foo": 0}' | jq . { "foo": 0 } Some of the options include: -c compact instead of pretty-printed output; -n use `null` as the single input value; -e set the exit status code based on the output; -s read (slurp) all inputs into an array; apply filter to it; -r output raw strings, not JSON texts; -R read raw strings, not JSON texts; -C colorize JSON; -M monochrome (don't colorize JSON); -S sort keys of objects on output; --tab use tabs for indentation; --arg a v set variable $a to value ; --argjson a v set variable $a to JSON value ; --slurpfile a f set variable $a to an array of JSON texts read from ; --rawfile a f set variable $a to a string consisting of the contents of ; --args remaining arguments are string arguments, not files; --jsonargs remaining arguments are JSON arguments, not files; -- terminates argument processing; Named arguments are also available as $ARGS.named[], while positional arguments are available as $ARGS.positional[]. See the manpage for more options. jq - commandline JSON processor [version jq_version] Usage: jq [options] [file...] jq [options] --args [strings...] jq [options] --jsonargs [JSON_TEXTS...] jq is a tool for processing JSON inputs, applying the given filter to its JSON text inputs and producing the filter's results as JSON on standard output. The simplest filter is ., which copies jq's input to its output unmodified (except for formatting, but note that IEEE754 is used for number representation internally, with all that that implies). For more advanced filters see the jq(1) manpage ("man jq") and/or https://stedolan.github.io/jq Example: $ echo '{"foo": 0}' | jq . { "foo": 0 } Some of the options include: -c compact instead of pretty-printed output; -n use `null` as the single input value; -e set the exit status code based on the output; -s read (slurp) all inputs into an array; apply filter to it; -r output raw strings, not JSON texts; -R read raw strings, not JSON texts; -C colorize JSON; -M monochrome (don't colorize JSON); -S sort keys of objects on output; --tab use tabs for indentation; --arg a v set variable $a to value ; --argjson a v set variable $a to JSON value ; --slurpfile a f set variable $a to an array of JSON texts read from ; --rawfile a f set variable $a to a string consisting of the contents of ; --args remaining arguments are string arguments, not files; --jsonargs remaining arguments are JSON arguments, not files; -- terminates argument processing; Named arguments are also available as $ARGS.named[], while positional arguments are available as $ARGS.positional[]. See the manpage for more options. ok test_yq_arg_passthrough (__main__.TestYq) ... {} jq: --indent takes a number between -1 and 7 Use jq --help for help with command-line options, or see the jq manpage, or online docs at https://stedolan.github.io/jq ok test_yq_err (__main__.TestYq) ... /usr/lib/python3.9/subprocess.py:1052: ResourceWarning: subprocess 136 is still running _warn("subprocess %s is still running" % self.pid, ResourceWarning: Enable tracemalloc to get the object allocation traceback ok ====================================================================== FAIL: test_jq16_arg_passthrough (__main__.TestYq) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0/test/test.py", line 40, in run_yq cli(args, input_format=input_format) File "/var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0/yq/__init__.py", line 129, in cli yq(**yq_args) SystemExit: -6 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0/test/test.py", line 112, in test_jq16_arg_passthrough self.assertEqual(self.run_yq("{}", [".", "--jsonargs", "a", "b"]), "") File "/var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0/test/test.py", line 42, in run_yq self.assertIn(e.code, expect_exit_codes) AssertionError: -6 not found in {0} ---------------------------------------------------------------------- Ran 17 tests in 0.541s FAILED (failures=1, expected failures=1) sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=4 encoding='UTF-8'> * ERROR: app-misc/yq-2.12.0::gentoo failed (test phase): * tests failed under python3.9 * * Call stack: * ebuild.sh, line 127: Called src_test * environment, line 2938: Called distutils-r1_src_test * environment, line 1275: Called _distutils-r1_run_foreach_impl 'python_test' * environment, line 502: Called python_foreach_impl 'distutils-r1_run_phase' 'python_test' * environment, line 2595: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' * environment, line 2126: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' * environment, line 2124: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_test' * environment, line 831: Called distutils-r1_run_phase 'python_test' * environment, line 1214: Called python_test * environment, line 2897: Called die * The specific snippet of code: * "${EPYTHON}" test/test.py < /dev/null || die "tests failed under ${EPYTHON}" * * If you need support, post the output of `emerge --info '=app-misc/yq-2.12.0::gentoo'`, * the complete build log and the output of `emerge -pqv '=app-misc/yq-2.12.0::gentoo'`. * The complete build log is located at '/var/log/portage/app-misc:yq-2.12.0:20210820-154337.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/app-misc/yq-2.12.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-misc/yq-2.12.0/temp/environment'. * Working directory: '/var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0' * S: '/var/tmp/portage/app-misc/yq-2.12.0/work/yq-2.12.0'