0s autopkgtest [09:48:05]: starting date and time: 2026-01-23 09:48:05+0000 0s autopkgtest [09:48:05]: git checkout: 4b346b80 nova: make wait_reboot return success even when a no-op 0s autopkgtest [09:48:05]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.0msbimjk/out --timeout-copy=6000 -a i386 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:python3-defaults --apt-upgrade pystac --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=python3-defaults/3.14.2-1 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-cpu2-ram4-disk20-amd64 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@sto01-10.secgroup --name adt-resolute-i386-pystac-20260123-094805-juju-7f2275-prod-proposed-migration-environment-2-3dc60164-5447-4f01-9b6a-79897303e9dc --image adt/ubuntu-resolute-amd64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-autopkgtest-workers-amd64 -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 5s Creating nova instance adt-resolute-i386-pystac-20260123-094805-juju-7f2275-prod-proposed-migration-environment-2-3dc60164-5447-4f01-9b6a-79897303e9dc from image adt/ubuntu-resolute-amd64-server-20260123.img (UUID 789dbc23-4f1b-4e7c-bcab-98e6eebf04f2)... 81s autopkgtest [09:49:26]: testbed dpkg architecture: amd64 81s autopkgtest [09:49:26]: testbed apt version: 3.1.13 82s autopkgtest [09:49:27]: @@@@@@@@@@@@@@@@@@@@ test bed setup 82s autopkgtest [09:49:27]: testbed release detected to be: None 83s autopkgtest [09:49:28]: updating testbed package index (apt update) 83s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [124 kB] 83s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 83s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 83s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 83s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [95.5 kB] 83s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [1058 kB] 83s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [23.6 kB] 83s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [2820 B] 83s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main i386 Packages [104 kB] 83s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 Packages [124 kB] 83s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 c-n-f Metadata [3384 B] 83s Get:12 http://ftpmaster.internal/ubuntu resolute-proposed/restricted i386 Packages [3696 B] 83s Get:13 http://ftpmaster.internal/ubuntu resolute-proposed/restricted amd64 Packages [12.3 kB] 83s Get:14 http://ftpmaster.internal/ubuntu resolute-proposed/restricted amd64 c-n-f Metadata [336 B] 83s Get:15 http://ftpmaster.internal/ubuntu resolute-proposed/universe amd64 Packages [926 kB] 83s Get:16 http://ftpmaster.internal/ubuntu resolute-proposed/universe i386 Packages [402 kB] 83s Get:17 http://ftpmaster.internal/ubuntu resolute-proposed/universe amd64 c-n-f Metadata [22.3 kB] 83s Get:18 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse i386 Packages [4704 B] 83s Get:19 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse amd64 Packages [11.6 kB] 84s Get:20 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse amd64 c-n-f Metadata [564 B] 84s Fetched 2920 kB in 1s (3666 kB/s) 85s Reading package lists... 85s Hit:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease 85s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 85s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 85s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 86s Reading package lists... 86s Reading package lists... 86s Building dependency tree... 86s Reading state information... 86s Calculating upgrade... 86s The following packages were automatically installed and are no longer required: 86s python3.13 python3.13-minimal 86s Use 'sudo apt autoremove' to remove them. 86s The following NEW packages will be installed: 86s libpython3.14-minimal libpython3.14-stdlib python3.14 python3.14-minimal 86s The following packages will be upgraded: 86s libpython3-stdlib python3 python3-gdbm python3-minimal 87s 4 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. 87s Need to get 6769 kB of archives. 87s After this operation, 24.5 MB of additional disk space will be used. 87s Get:1 http://ftpmaster.internal/ubuntu resolute/main amd64 libpython3.14-minimal amd64 3.14.2-1 [920 kB] 87s Get:2 http://ftpmaster.internal/ubuntu resolute/main amd64 python3.14-minimal amd64 3.14.2-1 [2563 kB] 87s Get:3 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 python3-minimal amd64 3.14.2-1 [28.2 kB] 87s Get:4 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 python3 amd64 3.14.2-1 [22.9 kB] 87s Get:5 http://ftpmaster.internal/ubuntu resolute/main amd64 libpython3.14-stdlib amd64 3.14.2-1 [2398 kB] 87s Get:6 http://ftpmaster.internal/ubuntu resolute/main amd64 python3.14 amd64 3.14.2-1 [816 kB] 87s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 libpython3-stdlib amd64 3.14.2-1 [10.9 kB] 87s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 python3-gdbm amd64 3.14.2-1 [11.1 kB] 87s dpkg-preconfigure: unable to re-open stdin: No such file or directory 87s Fetched 6769 kB in 1s (10.5 MB/s) 87s Selecting previously unselected package libpython3.14-minimal:amd64. 88s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 124176 files and directories currently installed.) 88s Preparing to unpack .../libpython3.14-minimal_3.14.2-1_amd64.deb ... 88s Unpacking libpython3.14-minimal:amd64 (3.14.2-1) ... 88s Selecting previously unselected package python3.14-minimal. 88s Preparing to unpack .../python3.14-minimal_3.14.2-1_amd64.deb ... 88s Unpacking python3.14-minimal (3.14.2-1) ... 88s Setting up libpython3.14-minimal:amd64 (3.14.2-1) ... 88s Setting up python3.14-minimal (3.14.2-1) ... 88s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 124518 files and directories currently installed.) 88s Preparing to unpack .../python3-minimal_3.14.2-1_amd64.deb ... 88s Unpacking python3-minimal (3.14.2-1) over (3.13.9-3) ... 88s Setting up python3-minimal (3.14.2-1) ... 89s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 124518 files and directories currently installed.) 89s Preparing to unpack .../python3_3.14.2-1_amd64.deb ... 89s running python pre-rtupdate hooks for python3.14... 89s Unpacking python3 (3.14.2-1) over (3.13.9-3) ... 89s Selecting previously unselected package libpython3.14-stdlib:amd64. 89s Preparing to unpack .../libpython3.14-stdlib_3.14.2-1_amd64.deb ... 89s Unpacking libpython3.14-stdlib:amd64 (3.14.2-1) ... 89s Selecting previously unselected package python3.14. 89s Preparing to unpack .../python3.14_3.14.2-1_amd64.deb ... 89s Unpacking python3.14 (3.14.2-1) ... 89s Preparing to unpack .../libpython3-stdlib_3.14.2-1_amd64.deb ... 89s Unpacking libpython3-stdlib:amd64 (3.14.2-1) over (3.13.9-3) ... 89s Preparing to unpack .../python3-gdbm_3.14.2-1_amd64.deb ... 89s Unpacking python3-gdbm (3.14.2-1) over (3.13.9-3) ... 89s Setting up libpython3.14-stdlib:amd64 (3.14.2-1) ... 89s Setting up python3.14 (3.14.2-1) ... 90s Setting up libpython3-stdlib:amd64 (3.14.2-1) ... 90s Setting up python3-gdbm (3.14.2-1) ... 90s Setting up python3 (3.14.2-1) ... 90s running python rtupdate hooks for python3.14... 90s running python post-rtupdate hooks for python3.14... 90s Processing triggers for man-db (2.13.1-1) ... 90s Processing triggers for systemd (259-1ubuntu2) ... 90s autopkgtest [09:49:35]: upgrading testbed (apt dist-upgrade and autopurge) 91s Reading package lists... 91s Building dependency tree... 91s Reading state information... 91s Calculating upgrade... 91s The following packages were automatically installed and are no longer required: 91s python3.13 python3.13-minimal 91s Use 'sudo apt autoremove' to remove them. 91s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 91s Reading package lists... 91s Building dependency tree... 91s Reading state information... 91s Solving dependencies... 91s The following packages will be REMOVED: 91s python3.13* python3.13-minimal* 91s 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. 91s After this operation, 7860 kB disk space will be freed. 91s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 124948 files and directories currently installed.) 91s Removing python3.13 (3.13.11-1) ... 92s Removing python3.13-minimal (3.13.11-1) ... 92s Processing triggers for man-db (2.13.1-1) ... 92s Processing triggers for systemd (259-1ubuntu2) ... 92s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 124921 files and directories currently installed.) 92s Purging configuration files for python3.13-minimal (3.13.11-1) ... 95s autopkgtest [09:49:40]: testbed running kernel: Linux 6.18.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 12 16:49:02 UTC 2026 95s autopkgtest [09:49:40]: @@@@@@@@@@@@@@@@@@@@ apt-source pystac 96s Get:1 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (dsc) [3523 B] 96s Get:2 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (tar) [2455 kB] 96s Get:3 http://ftpmaster.internal/ubuntu resolute/universe pystac 1.14.3-1 (diff) [27.7 kB] 97s gpgv: Signature made Sat Jan 10 12:09:05 2026 UTC 97s gpgv: using RSA key 3B70F209A5FFD68903C472C5EBF48AB2578F9812 97s gpgv: issuer "antonio.valentino@tiscali.it" 97s gpgv: Can't check signature: No public key 97s dpkg-source: warning: cannot verify inline signature for ./pystac_1.14.3-1.dsc: no acceptable signature found 97s autopkgtest [09:49:42]: testing package pystac version 1.14.3-1 97s autopkgtest [09:49:42]: build not needed 99s autopkgtest [09:49:44]: test pybuild-autopkgtest: preparing testbed 99s Reading package lists... 100s Building dependency tree... 100s Reading state information... 100s Solving dependencies... 100s The following NEW packages will be installed: 100s autoconf automake autopoint autotools-dev binutils-i686-linux-gnu 100s build-essential cpp cpp-15 cpp-15-i686-linux-gnu cpp-15-x86-64-linux-gnu 100s cpp-i686-linux-gnu cpp-x86-64-linux-gnu crossbuild-essential-i386 debhelper 100s debugedit dh-autoreconf dh-python dh-strip-nondeterminism docutils-common 100s dwz fontconfig-config fonts-dejavu-core fonts-dejavu-mono fonts-mathjax g++ 100s g++-15 g++-15-i686-linux-gnu g++-15-x86-64-linux-gnu g++-i686-linux-gnu 100s g++-x86-64-linux-gnu gcc gcc-11-base:i386 gcc-15 gcc-15-base:i386 100s gcc-15-cross-base gcc-15-i686-linux-gnu gcc-15-i686-linux-gnu-base 100s gcc-15-x86-64-linux-gnu gcc-i686-linux-gnu gcc-x86-64-linux-gnu gdal-data 100s gdal-plugins gettext intltool-debian libabsl20260107 libaec0 libaom3 100s libarchive-zip-perl libarmadillo14 libarpack2t64 libasan6:i386 libasan8 100s libasan8-i386-cross libatomic1:i386 libatomic1-i386-cross libavif16 libblas3 100s libblosc1 libc-gconv-modules-extra:i386 libc6:i386 libc6-dev:i386 100s libc6-dev-i386-cross libc6-i386-cross libcc1-0 libcfitsio10t64 100s libcrypt-dev:i386 libcrypt1:i386 libdav1d7 libde265-0 libdebhelper-perl 100s libdeflate0 libfile-stripnondeterminism-perl libfontconfig1 libfreexl1 100s libfyba0t64 libgav1-2 libgcc-11-dev:i386 libgcc-15-dev 100s libgcc-15-dev-i386-cross libgcc-s1:i386 libgcc-s1-i386-cross libgdal36 100s libgeos-c1t64 libgeos3.14.1 libgeotiff5 libgfortran5 libgif7 libgomp1 100s libgomp1:i386 libgomp1-i386-cross libgpgmepp6t64 libhdf4-0-alt libhdf5-310 100s libhdf5-hl-310 libheif-plugin-aomdec libheif-plugin-libde265 libheif1 100s libhwasan0 libisl23 libitm1 libitm1:i386 libitm1-i386-cross libjbig0 100s libjpeg-turbo8 libjpeg8 libjs-mathjax libjson-perl libkmlbase1t64 100s libkmldom1t64 libkmlengine1t64 liblapack3 liblcms2-2 liblerc4 liblsan0 100s libltdl7 liblua5.4-0 libminizip1t64 libmpc3 libmysqlclient24 libnetcdf22 100s libnorm1t64 libodbc2 libodbcinst2 libogdi4.1 libopenjp2-7 libpgm-5.3-0t64 100s libpoppler147 libpq5 libproj25 libqhull-r8.0 libquadmath0 libquadmath0:i386 100s libquadmath0-i386-cross librttopo1 libsharpyuv0 libsnappy1v5 libsodium23 100s libspatialite8t64 libstdc++-11-dev:i386 libstdc++-15-dev 100s libstdc++-15-dev-i386-cross libstdc++6:i386 libstdc++6-i386-cross libsz2 100s libtiff6 libtool libtsan2 libubsan1 libubsan1:i386 libubsan1-i386-cross 100s liburiparser1 libwebp7 libxerces-c3.2t64 libyuv0 libzmq5 linux-libc-dev:i386 100s linux-libc-dev-i386-cross m4 mysql-common node-fortawesome-fontawesome-free 100s pandoc pandoc-data po-debconf proj-data pybuild-plugin-autopkgtest 100s pybuild-plugin-pyproject python-pystac-doc python-tinycss2-common 100s python3-accessible-pygments python3-affine python3-alabaster python3-all 100s python3-anyio python3-astroid python3-asttokens python3-bleach python3-bs4 100s python3-build python3-click python3-click-plugins python3-cligj 100s python3-colorama python3-decorator python3-defusedxml python3-docutils 100s python3-executing python3-fastjsonschema python3-h11 python3-html5lib 100s python3-imagesize python3-iniconfig python3-installer python3-ipython 100s python3-jedi python3-jupyter-client python3-jupyter-core 100s python3-jupyterlab-pygments python3-livereload python3-matplotlib-inline 100s python3-mistune python3-multidict python3-nbclient python3-nbconvert 100s python3-nbformat python3-nbsphinx python3-numpy python3-numpy-dev 100s python3-pandocfilters python3-parso python3-platformdirs python3-pluggy 100s python3-prompt-toolkit python3-propcache python3-psutil python3-pure-eval 100s python3-pydata-sphinx-theme python3-pyproject-hooks python3-pystac 100s python3-pytest python3-pytest-mock python3-pytest-recording python3-rasterio 100s python3-requests-mock python3-roman-numerals python3-shapely python3-sniffio 100s python3-snowballstemmer python3-soupsieve python3-sphinx 100s python3-sphinx-autobuild python3-sphinx-design python3-stack-data 100s python3-starlette python3-tinycss2 python3-tornado python3-traitlets 100s python3-typeshed python3-uvicorn python3-uvloop python3-vcr 100s python3-watchfiles python3-wcwidth python3-webencodings python3-websockets 100s python3-wheel python3-wrapt python3-wsproto python3-yarl python3-zmq 100s python3.13 python3.13-minimal sgml-base sphinx-common unixodbc-common 100s xml-core 100s 0 upgraded, 255 newly installed, 0 to remove and 0 not upgraded. 100s Need to get 274 MB of archives. 100s After this operation, 1151 MB of additional disk space will be used. 100s Get:1 http://ftpmaster.internal/ubuntu resolute/main amd64 python3.13-minimal amd64 3.13.11-1 [2408 kB] 101s Get:2 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-numpy-dev amd64 1:2.3.5+ds-3 [147 kB] 101s Get:3 http://ftpmaster.internal/ubuntu resolute/main amd64 libblas3 amd64 3.12.1-7ubuntu1 [260 kB] 101s Get:4 http://ftpmaster.internal/ubuntu resolute/main amd64 libgfortran5 amd64 15.2.0-11ubuntu1 [939 kB] 101s Get:5 http://ftpmaster.internal/ubuntu resolute/main amd64 liblapack3 amd64 3.12.1-7ubuntu1 [2739 kB] 101s Get:6 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-numpy amd64 1:2.3.5+ds-3 [8129 kB] 102s Get:7 http://ftpmaster.internal/ubuntu resolute/main i386 gcc-15-base i386 15.2.0-11ubuntu1 [59.1 kB] 102s Get:8 http://ftpmaster.internal/ubuntu resolute/main i386 libc-gconv-modules-extra i386 2.42-2ubuntu4 [1359 kB] 102s Get:9 http://ftpmaster.internal/ubuntu resolute/main i386 libgcc-s1 i386 15.2.0-11ubuntu1 [94.1 kB] 102s Get:10 http://ftpmaster.internal/ubuntu resolute/main i386 libc6 i386 2.42-2ubuntu4 [1824 kB] 102s Get:11 http://ftpmaster.internal/ubuntu resolute/main i386 libcrypt1 i386 1:4.5.1-1 [100 kB] 102s Get:12 http://ftpmaster.internal/ubuntu resolute/main i386 libatomic1 i386 15.2.0-11ubuntu1 [8414 B] 102s Get:13 http://ftpmaster.internal/ubuntu resolute/main i386 libstdc++6 i386 15.2.0-11ubuntu1 [877 kB] 102s Get:14 http://ftpmaster.internal/ubuntu resolute/main amd64 python3.13 amd64 3.13.11-1 [758 kB] 102s Get:15 http://ftpmaster.internal/ubuntu resolute/main amd64 m4 amd64 1.4.20-2 [217 kB] 102s Get:16 http://ftpmaster.internal/ubuntu resolute/main amd64 autoconf all 2.72-3.1ubuntu1 [384 kB] 102s Get:17 http://ftpmaster.internal/ubuntu resolute/main amd64 autotools-dev all 20240727.1 [43.4 kB] 102s Get:18 http://ftpmaster.internal/ubuntu resolute/main amd64 automake all 1:1.18.1-3build1 [582 kB] 102s Get:19 http://ftpmaster.internal/ubuntu resolute/main amd64 autopoint all 0.23.2-1 [620 kB] 102s Get:20 http://ftpmaster.internal/ubuntu resolute/main amd64 libisl23 amd64 0.27-1build1 [691 kB] 102s Get:21 http://ftpmaster.internal/ubuntu resolute/main amd64 libmpc3 amd64 1.3.1-2 [54.8 kB] 102s Get:22 http://ftpmaster.internal/ubuntu resolute/main amd64 cpp-15-x86-64-linux-gnu amd64 15.2.0-11ubuntu1 [12.9 MB] 102s Get:23 http://ftpmaster.internal/ubuntu resolute/main amd64 cpp-15 amd64 15.2.0-11ubuntu1 [1030 B] 102s Get:24 http://ftpmaster.internal/ubuntu resolute/main amd64 cpp-x86-64-linux-gnu amd64 4:15.2.0-4ubuntu1 [5746 B] 102s Get:25 http://ftpmaster.internal/ubuntu resolute/main amd64 cpp amd64 4:15.2.0-4ubuntu1 [22.4 kB] 102s Get:26 http://ftpmaster.internal/ubuntu resolute/main amd64 libcc1-0 amd64 15.2.0-11ubuntu1 [47.4 kB] 102s Get:27 http://ftpmaster.internal/ubuntu resolute/main amd64 libgomp1 amd64 15.2.0-11ubuntu1 [151 kB] 102s Get:28 http://ftpmaster.internal/ubuntu resolute/main amd64 libitm1 amd64 15.2.0-11ubuntu1 [29.5 kB] 102s Get:29 http://ftpmaster.internal/ubuntu resolute/main amd64 libasan8 amd64 15.2.0-11ubuntu1 [3070 kB] 102s Get:30 http://ftpmaster.internal/ubuntu resolute/main amd64 liblsan0 amd64 15.2.0-11ubuntu1 [1360 kB] 103s Get:31 http://ftpmaster.internal/ubuntu resolute/main amd64 libtsan2 amd64 15.2.0-11ubuntu1 [2757 kB] 103s Get:32 http://ftpmaster.internal/ubuntu resolute/main amd64 libubsan1 amd64 15.2.0-11ubuntu1 [1210 kB] 103s Get:33 http://ftpmaster.internal/ubuntu resolute/main amd64 libhwasan0 amd64 15.2.0-11ubuntu1 [1685 kB] 103s Get:34 http://ftpmaster.internal/ubuntu resolute/main amd64 libquadmath0 amd64 15.2.0-11ubuntu1 [153 kB] 103s Get:35 http://ftpmaster.internal/ubuntu resolute/main amd64 libgcc-15-dev amd64 15.2.0-11ubuntu1 [2863 kB] 103s Get:36 http://ftpmaster.internal/ubuntu resolute/main amd64 gcc-15-x86-64-linux-gnu amd64 15.2.0-11ubuntu1 [25.4 MB] 103s Get:37 http://ftpmaster.internal/ubuntu resolute/main amd64 gcc-15 amd64 15.2.0-11ubuntu1 [528 kB] 103s Get:38 http://ftpmaster.internal/ubuntu resolute/main amd64 gcc-x86-64-linux-gnu amd64 4:15.2.0-4ubuntu1 [1208 B] 103s Get:39 http://ftpmaster.internal/ubuntu resolute/main amd64 gcc amd64 4:15.2.0-4ubuntu1 [5024 B] 103s Get:40 http://ftpmaster.internal/ubuntu resolute/main amd64 libstdc++-15-dev amd64 15.2.0-11ubuntu1 [2574 kB] 103s Get:41 http://ftpmaster.internal/ubuntu resolute/main amd64 g++-15-x86-64-linux-gnu amd64 15.2.0-11ubuntu1 [14.4 MB] 104s Get:42 http://ftpmaster.internal/ubuntu resolute/main amd64 g++-15 amd64 15.2.0-11ubuntu1 [24.6 kB] 104s Get:43 http://ftpmaster.internal/ubuntu resolute/main amd64 g++-x86-64-linux-gnu amd64 4:15.2.0-4ubuntu1 [966 B] 104s Get:44 http://ftpmaster.internal/ubuntu resolute/main amd64 g++ amd64 4:15.2.0-4ubuntu1 [1100 B] 104s Get:45 http://ftpmaster.internal/ubuntu resolute/main amd64 build-essential amd64 12.12ubuntu2 [5256 B] 104s Get:46 http://ftpmaster.internal/ubuntu resolute/main amd64 gcc-15-i686-linux-gnu-base amd64 15.2.0-7ubuntu1cross1 [58.6 kB] 104s Get:47 http://ftpmaster.internal/ubuntu resolute/main amd64 cpp-15-i686-linux-gnu amd64 15.2.0-7ubuntu1cross1 [13.8 MB] 104s Get:48 http://ftpmaster.internal/ubuntu resolute/main amd64 cpp-i686-linux-gnu amd64 4:15.2.0-4ubuntu1 [5730 B] 104s Get:49 http://ftpmaster.internal/ubuntu resolute/main amd64 binutils-i686-linux-gnu amd64 2.45.50.20251209-1ubuntu1 [1763 kB] 104s Get:50 http://ftpmaster.internal/ubuntu resolute/main amd64 gcc-15-cross-base all 15.2.0-7ubuntu1cross1 [53.8 kB] 104s Get:51 http://ftpmaster.internal/ubuntu resolute/main amd64 libc6-i386-cross all 2.42-0ubuntu3cross1 [1582 kB] 104s Get:52 http://ftpmaster.internal/ubuntu resolute/main amd64 libgcc-s1-i386-cross all 15.2.0-7ubuntu1cross1 [94.2 kB] 104s Get:53 http://ftpmaster.internal/ubuntu resolute/main amd64 libgomp1-i386-cross all 15.2.0-7ubuntu1cross1 [152 kB] 104s Get:54 http://ftpmaster.internal/ubuntu resolute/main amd64 libitm1-i386-cross all 15.2.0-7ubuntu1cross1 [31.1 kB] 104s Get:55 http://ftpmaster.internal/ubuntu resolute/main amd64 libatomic1-i386-cross all 15.2.0-7ubuntu1cross1 [8158 B] 104s Get:56 http://ftpmaster.internal/ubuntu resolute/main amd64 libasan8-i386-cross all 15.2.0-7ubuntu1cross1 [2906 kB] 104s Get:57 http://ftpmaster.internal/ubuntu resolute/main amd64 libstdc++6-i386-cross all 15.2.0-7ubuntu1cross1 [827 kB] 104s Get:58 http://ftpmaster.internal/ubuntu resolute/main amd64 libubsan1-i386-cross all 15.2.0-7ubuntu1cross1 [1171 kB] 104s Get:59 http://ftpmaster.internal/ubuntu resolute/main amd64 libquadmath0-i386-cross all 15.2.0-7ubuntu1cross1 [245 kB] 104s Get:60 http://ftpmaster.internal/ubuntu resolute/main amd64 libgcc-15-dev-i386-cross all 15.2.0-7ubuntu1cross1 [2755 kB] 104s Get:61 http://ftpmaster.internal/ubuntu resolute/main amd64 gcc-15-i686-linux-gnu amd64 15.2.0-7ubuntu1cross1 [27.0 MB] 105s Get:62 http://ftpmaster.internal/ubuntu resolute/main amd64 gcc-i686-linux-gnu amd64 4:15.2.0-4ubuntu1 [1220 B] 105s Get:63 http://ftpmaster.internal/ubuntu resolute/main amd64 linux-libc-dev-i386-cross all 6.17.0-4.4cross1 [1503 kB] 105s Get:64 http://ftpmaster.internal/ubuntu resolute/main amd64 libc6-dev-i386-cross all 2.42-0ubuntu3cross1 [1992 kB] 105s Get:65 http://ftpmaster.internal/ubuntu resolute/main amd64 libstdc++-15-dev-i386-cross all 15.2.0-7ubuntu1cross1 [2655 kB] 105s Get:66 http://ftpmaster.internal/ubuntu resolute/main amd64 g++-15-i686-linux-gnu amd64 15.2.0-7ubuntu1cross1 [15.3 MB] 105s Get:67 http://ftpmaster.internal/ubuntu resolute/main amd64 g++-i686-linux-gnu amd64 4:15.2.0-4ubuntu1 [954 B] 105s Get:68 http://ftpmaster.internal/ubuntu resolute/universe amd64 crossbuild-essential-i386 all 12.12ubuntu2 [4146 B] 105s Get:69 http://ftpmaster.internal/ubuntu resolute/main amd64 libdebhelper-perl all 13.28ubuntu1 [97.4 kB] 105s Get:70 http://ftpmaster.internal/ubuntu resolute/main amd64 libtool all 2.5.4-9 [169 kB] 105s Get:71 http://ftpmaster.internal/ubuntu resolute/main amd64 dh-autoreconf all 21 [12.5 kB] 105s Get:72 http://ftpmaster.internal/ubuntu resolute/main amd64 libarchive-zip-perl all 1.68-1 [90.2 kB] 105s Get:73 http://ftpmaster.internal/ubuntu resolute/main amd64 libfile-stripnondeterminism-perl all 1.15.0-1build1 [20.6 kB] 105s Get:74 http://ftpmaster.internal/ubuntu resolute/main amd64 dh-strip-nondeterminism all 1.15.0-1build1 [5110 B] 105s Get:75 http://ftpmaster.internal/ubuntu resolute/main amd64 debugedit amd64 1:5.2-3 [49.9 kB] 105s Get:76 http://ftpmaster.internal/ubuntu resolute/main amd64 dwz amd64 0.16-2 [115 kB] 105s Get:77 http://ftpmaster.internal/ubuntu resolute/main amd64 gettext amd64 0.23.2-1 [1019 kB] 105s Get:78 http://ftpmaster.internal/ubuntu resolute/main amd64 intltool-debian all 0.35.0+20060710.6build1 [24.1 kB] 105s Get:79 http://ftpmaster.internal/ubuntu resolute/main amd64 po-debconf all 1.0.22 [215 kB] 106s Get:80 http://ftpmaster.internal/ubuntu resolute/main amd64 debhelper all 13.28ubuntu1 [916 kB] 106s Get:81 http://ftpmaster.internal/ubuntu resolute/universe amd64 dh-python all 7.20251231 [122 kB] 106s Get:82 http://ftpmaster.internal/ubuntu resolute/main amd64 sgml-base all 1.31+nmu1 [11.0 kB] 106s Get:83 http://ftpmaster.internal/ubuntu resolute/main amd64 xml-core all 0.19build1 [20.3 kB] 106s Get:84 http://ftpmaster.internal/ubuntu resolute/main amd64 docutils-common all 0.22.4+dfsg-1 [130 kB] 106s Get:85 http://ftpmaster.internal/ubuntu resolute/main amd64 fonts-dejavu-mono all 2.37-8build1 [502 kB] 106s Get:86 http://ftpmaster.internal/ubuntu resolute/main amd64 fonts-dejavu-core all 2.37-8build1 [834 kB] 106s Get:87 http://ftpmaster.internal/ubuntu resolute/main amd64 fontconfig-config amd64 2.15.0-2.4ubuntu1 [38.1 kB] 106s Get:88 http://ftpmaster.internal/ubuntu resolute/main amd64 fonts-mathjax all 2.7.9+dfsg-1build1 [2283 kB] 106s Get:89 http://ftpmaster.internal/ubuntu resolute/universe i386 gcc-11-base i386 11.5.0-7ubuntu2 [46.5 kB] 106s Get:90 http://ftpmaster.internal/ubuntu resolute/universe amd64 gdal-data all 3.12.1+dfsg-1 [278 kB] 106s Get:91 http://ftpmaster.internal/ubuntu resolute/universe amd64 gdal-plugins amd64 3.12.1+dfsg-1 [26.8 kB] 106s Get:92 http://ftpmaster.internal/ubuntu resolute/main amd64 libabsl20260107 amd64 20260107.0-0ubuntu2 [587 kB] 106s Get:93 http://ftpmaster.internal/ubuntu resolute/universe amd64 libaec0 amd64 1.1.4-2 [22.9 kB] 106s Get:94 http://ftpmaster.internal/ubuntu resolute/main amd64 libaom3 amd64 3.13.1-2 [1970 kB] 106s Get:95 http://ftpmaster.internal/ubuntu resolute/universe amd64 libarpack2t64 amd64 3.9.1-6 [108 kB] 106s Get:96 http://ftpmaster.internal/ubuntu resolute/universe amd64 libarmadillo14 amd64 1:14.2.3+dfsg-1 [105 kB] 106s Get:97 http://ftpmaster.internal/ubuntu resolute/universe i386 libasan6 i386 11.5.0-7ubuntu2 [2122 kB] 106s Get:98 http://ftpmaster.internal/ubuntu resolute/universe amd64 libdav1d7 amd64 1.5.3-1 [626 kB] 106s Get:99 http://ftpmaster.internal/ubuntu resolute/universe amd64 libgav1-2 amd64 0.20.0-2build1 [402 kB] 106s Get:100 http://ftpmaster.internal/ubuntu resolute/main amd64 libjpeg-turbo8 amd64 2.1.5-4ubuntu2 [152 kB] 106s Get:101 http://ftpmaster.internal/ubuntu resolute/main amd64 libjpeg8 amd64 8c-2ubuntu11 [2148 B] 106s Get:102 http://ftpmaster.internal/ubuntu resolute/main amd64 libyuv0 amd64 0.0.1922.20260106-1 [184 kB] 106s Get:103 http://ftpmaster.internal/ubuntu resolute/universe amd64 libavif16 amd64 1.3.0-1ubuntu3 [117 kB] 106s Get:104 http://ftpmaster.internal/ubuntu resolute/main amd64 libsnappy1v5 amd64 1.2.2-2 [30.8 kB] 106s Get:105 http://ftpmaster.internal/ubuntu resolute/universe amd64 libblosc1 amd64 1.21.5+ds-2 [35.8 kB] 106s Get:106 http://ftpmaster.internal/ubuntu resolute/main i386 linux-libc-dev i386 6.18.0-9.9 [1861 kB] 106s Get:107 http://ftpmaster.internal/ubuntu resolute/main i386 libcrypt-dev i386 1:4.5.1-1 [131 kB] 106s Get:108 http://ftpmaster.internal/ubuntu resolute/main i386 libc6-dev i386 2.42-2ubuntu4 [1945 kB] 106s Get:109 http://ftpmaster.internal/ubuntu resolute/universe amd64 libcfitsio10t64 amd64 4.6.3-1 [549 kB] 106s Get:110 http://ftpmaster.internal/ubuntu resolute/main amd64 libde265-0 amd64 1.0.16-1build1 [172 kB] 106s Get:111 http://ftpmaster.internal/ubuntu resolute/main amd64 libdeflate0 amd64 1.23-2 [49.9 kB] 106s Get:112 http://ftpmaster.internal/ubuntu resolute/main amd64 libfontconfig1 amd64 2.15.0-2.4ubuntu1 [143 kB] 106s Get:113 http://ftpmaster.internal/ubuntu resolute/universe amd64 libfyba0t64 amd64 4.1.1-11build2 [120 kB] 106s Get:114 http://ftpmaster.internal/ubuntu resolute/main i386 libgomp1 i386 15.2.0-11ubuntu1 [155 kB] 106s Get:115 http://ftpmaster.internal/ubuntu resolute/main i386 libitm1 i386 15.2.0-11ubuntu1 [31.6 kB] 106s Get:116 http://ftpmaster.internal/ubuntu resolute/main i386 libubsan1 i386 15.2.0-11ubuntu1 [1172 kB] 106s Get:117 http://ftpmaster.internal/ubuntu resolute/main i386 libquadmath0 i386 15.2.0-11ubuntu1 [246 kB] 106s Get:118 http://ftpmaster.internal/ubuntu resolute/universe i386 libgcc-11-dev i386 11.5.0-7ubuntu2 [2450 kB] 106s Get:119 http://ftpmaster.internal/ubuntu resolute/universe amd64 libminizip1t64 amd64 1:1.3.dfsg+really1.3.1-1ubuntu2 [23.5 kB] 106s Get:120 http://ftpmaster.internal/ubuntu resolute/universe amd64 libfreexl1 amd64 2.0.0-1build3 [42.9 kB] 106s Get:121 http://ftpmaster.internal/ubuntu resolute/universe amd64 libgeos3.14.1 amd64 3.14.1-2 [976 kB] 106s Get:122 http://ftpmaster.internal/ubuntu resolute/universe amd64 libgeos-c1t64 amd64 3.14.1-2 [116 kB] 106s Get:123 http://ftpmaster.internal/ubuntu resolute/universe amd64 proj-data all 9.7.1-1 [7950 kB] 107s Get:124 http://ftpmaster.internal/ubuntu resolute/main amd64 libjbig0 amd64 2.1-6.1ubuntu3 [30.0 kB] 107s Get:125 http://ftpmaster.internal/ubuntu resolute/main amd64 liblerc4 amd64 4.0.0+ds-5ubuntu2 [207 kB] 107s Get:126 http://ftpmaster.internal/ubuntu resolute/main amd64 libsharpyuv0 amd64 1.5.0-0.1build1 [17.6 kB] 107s Get:127 http://ftpmaster.internal/ubuntu resolute/main amd64 libwebp7 amd64 1.5.0-0.1build1 [264 kB] 107s Get:128 http://ftpmaster.internal/ubuntu resolute/main amd64 libtiff6 amd64 4.7.0-3ubuntu3 [209 kB] 107s Get:129 http://ftpmaster.internal/ubuntu resolute/universe amd64 libproj25 amd64 9.7.1-1 [1499 kB] 107s Get:130 http://ftpmaster.internal/ubuntu resolute/universe amd64 libgeotiff5 amd64 1.7.4-1 [60.2 kB] 107s Get:131 http://ftpmaster.internal/ubuntu resolute/main amd64 libgif7 amd64 5.2.2-1ubuntu3 [36.0 kB] 107s Get:132 http://ftpmaster.internal/ubuntu resolute/universe amd64 libsz2 amd64 1.1.4-2 [5516 B] 107s Get:133 http://ftpmaster.internal/ubuntu resolute/universe amd64 libhdf4-0-alt amd64 4.3.0-1 [285 kB] 107s Get:134 http://ftpmaster.internal/ubuntu resolute/universe amd64 libhdf5-310 amd64 1.14.5+repack-4 [1432 kB] 107s Get:135 http://ftpmaster.internal/ubuntu resolute/main amd64 libheif-plugin-aomdec amd64 1.21.2-1 [14.2 kB] 107s Get:136 http://ftpmaster.internal/ubuntu resolute/main amd64 libheif-plugin-libde265 amd64 1.21.2-1 [9978 B] 107s Get:137 http://ftpmaster.internal/ubuntu resolute/main amd64 libheif1 amd64 1.21.2-1 [544 kB] 107s Get:138 http://ftpmaster.internal/ubuntu resolute/universe amd64 liburiparser1 amd64 0.9.8+dfsg-2 [46.8 kB] 107s Get:139 http://ftpmaster.internal/ubuntu resolute/universe amd64 libkmlbase1t64 amd64 1.3.0-13 [51.7 kB] 107s Get:140 http://ftpmaster.internal/ubuntu resolute/universe amd64 libkmldom1t64 amd64 1.3.0-13 [156 kB] 107s Get:141 http://ftpmaster.internal/ubuntu resolute/universe amd64 libkmlengine1t64 amd64 1.3.0-13 [74.1 kB] 107s Get:142 http://ftpmaster.internal/ubuntu resolute/main amd64 mysql-common all 5.8+1.1.1ubuntu2 [7002 B] 107s Get:143 http://ftpmaster.internal/ubuntu resolute/main amd64 libmysqlclient24 amd64 8.4.7-0ubuntu3 [1258 kB] 107s Get:144 http://ftpmaster.internal/ubuntu resolute/universe amd64 libhdf5-hl-310 amd64 1.14.5+repack-4 [59.8 kB] 107s Get:145 http://ftpmaster.internal/ubuntu resolute/universe amd64 libnetcdf22 amd64 1:4.9.3-1build1 [561 kB] 107s Get:146 http://ftpmaster.internal/ubuntu resolute/main amd64 libltdl7 amd64 2.5.4-9 [43.7 kB] 107s Get:147 http://ftpmaster.internal/ubuntu resolute/main amd64 libodbc2 amd64 2.3.14-1 [160 kB] 107s Get:148 http://ftpmaster.internal/ubuntu resolute/main amd64 unixodbc-common all 2.3.14-1 [8792 B] 107s Get:149 http://ftpmaster.internal/ubuntu resolute/main amd64 libodbcinst2 amd64 2.3.14-1 [32.0 kB] 107s Get:150 http://ftpmaster.internal/ubuntu resolute/universe amd64 libogdi4.1 amd64 4.1.1+ds-5 [219 kB] 107s Get:151 http://ftpmaster.internal/ubuntu resolute/main amd64 libopenjp2-7 amd64 2.5.4-1 [188 kB] 107s Get:152 http://ftpmaster.internal/ubuntu resolute/main amd64 libgpgmepp6t64 amd64 1.24.2-3ubuntu2 [124 kB] 107s Get:153 http://ftpmaster.internal/ubuntu resolute/main amd64 liblcms2-2 amd64 2.17-1 [170 kB] 107s Get:154 http://ftpmaster.internal/ubuntu resolute/main amd64 libpoppler147 amd64 25.03.0-11.1 [1224 kB] 107s Get:155 http://ftpmaster.internal/ubuntu resolute/main amd64 libpq5 amd64 18.1-2 [155 kB] 107s Get:156 http://ftpmaster.internal/ubuntu resolute/universe amd64 libqhull-r8.0 amd64 2020.2-8 [197 kB] 107s Get:157 http://ftpmaster.internal/ubuntu resolute/universe amd64 librttopo1 amd64 1.1.0-4 [205 kB] 107s Get:158 http://ftpmaster.internal/ubuntu resolute/universe amd64 libspatialite8t64 amd64 5.1.0-3ubuntu1 [1927 kB] 107s Get:159 http://ftpmaster.internal/ubuntu resolute/universe amd64 libxerces-c3.2t64 amd64 3.2.4+debian-1.3build2 [991 kB] 107s Get:160 http://ftpmaster.internal/ubuntu resolute/universe amd64 libgdal36 amd64 3.10.3+dfsg-1build3 [9647 kB] 107s Get:161 http://ftpmaster.internal/ubuntu resolute/main amd64 libjson-perl all 4.10000-1 [81.9 kB] 107s Get:162 http://ftpmaster.internal/ubuntu resolute/main amd64 liblua5.4-0 amd64 5.4.8-1 [174 kB] 107s Get:163 http://ftpmaster.internal/ubuntu resolute/universe amd64 libnorm1t64 amd64 1.5.9+dfsg-4 [158 kB] 107s Get:164 http://ftpmaster.internal/ubuntu resolute/universe amd64 libpgm-5.3-0t64 amd64 5.3.128~dfsg-2.1build2 [168 kB] 107s Get:165 http://ftpmaster.internal/ubuntu resolute/main amd64 libsodium23 amd64 1.0.18-2 [165 kB] 107s Get:166 http://ftpmaster.internal/ubuntu resolute/universe i386 libstdc++-11-dev i386 11.5.0-7ubuntu2 [2459 kB] 107s Get:167 http://ftpmaster.internal/ubuntu resolute/universe amd64 libzmq5 amd64 4.3.5-1build3 [262 kB] 107s Get:168 http://ftpmaster.internal/ubuntu resolute/universe amd64 node-fortawesome-fontawesome-free all 6.7.2+ds1-1 [1653 kB] 107s Get:169 http://ftpmaster.internal/ubuntu resolute/universe amd64 pandoc-data all 3.1.11.1-3build1 [78.8 kB] 107s Get:170 http://ftpmaster.internal/ubuntu resolute/universe amd64 pandoc amd64 3.1.11.1+ds-4 [27.2 MB] 108s Get:171 http://ftpmaster.internal/ubuntu resolute/universe amd64 pybuild-plugin-autopkgtest all 7.20251231 [1748 B] 108s Get:172 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pyproject-hooks all 1.2.0-1 [10.2 kB] 108s Get:173 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-wheel all 0.46.1-2 [22.1 kB] 108s Get:174 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-build all 1.2.2-5 [30.9 kB] 108s Get:175 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-installer all 0.7.0+dfsg1-3 [17.4 kB] 108s Get:176 http://ftpmaster.internal/ubuntu resolute/universe amd64 pybuild-plugin-pyproject all 7.20251231 [1714 B] 108s Get:177 http://ftpmaster.internal/ubuntu resolute/universe amd64 python-pystac-doc all 1.14.3-1 [2276 kB] 108s Get:178 http://ftpmaster.internal/ubuntu resolute/universe amd64 python-tinycss2-common all 1.5.1-1 [47.3 kB] 108s Get:179 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-accessible-pygments all 0.0.5-2build1 [790 kB] 109s Get:180 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-affine all 2.4.0-2 [14.0 kB] 109s Get:181 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 python3-all amd64 3.14.2-1 [890 B] 109s Get:182 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-sniffio all 1.3.1-1 [7262 B] 109s Get:183 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-anyio all 4.11.0-3 [72.6 kB] 109s Get:184 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-astroid all 4.0.2-1ubuntu1 [172 kB] 109s Get:185 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-asttokens all 3.0.1-1 [20.7 kB] 109s Get:186 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-webencodings all 0.5.1-5build1 [11.7 kB] 109s Get:187 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-html5lib all 1.2-3 [90.6 kB] 109s Get:188 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-bleach all 6.3.0-1 [44.2 kB] 109s Get:189 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-soupsieve all 2.8.1-1 [33.7 kB] 109s Get:190 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-bs4 all 4.14.3-2build1 [84.8 kB] 109s Get:191 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-click all 8.2.0+0.really.8.1.8-1build1 [80.2 kB] 109s Get:192 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-click-plugins all 1.1.1-5 [9760 B] 109s Get:193 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-cligj all 0.7.2-3 [8006 B] 109s Get:194 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-colorama all 0.4.6-4build1 [32.2 kB] 109s Get:195 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-decorator all 5.2.1-2 [28.1 kB] 109s Get:196 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-defusedxml all 0.7.1-3build1 [42.4 kB] 109s Get:197 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-roman-numerals all 4.1.0-1 [8660 B] 109s Get:198 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-docutils all 0.22.4+dfsg-1 [439 kB] 109s Get:199 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-executing all 2.2.1-0.1 [26.2 kB] 109s Get:200 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-fastjsonschema all 2.21.1-1 [20.4 kB] 109s Get:201 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-h11 all 0.14.0-1.1 [51.6 kB] 109s Get:202 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-imagesize all 1.4.1-1build1 [6900 B] 109s Get:203 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-iniconfig all 2.1.0-2 [6962 B] 109s Get:204 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-parso all 0.8.5-1 [68.0 kB] 109s Get:205 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-typeshed all 0.0~git20241223.ea91db2-4 [1554 kB] 109s Get:206 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-jedi all 0.19.1+ds1-1build1 [694 kB] 109s Get:207 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-traitlets all 5.14.3+really5.14.3-2 [71.7 kB] 109s Get:208 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-matplotlib-inline all 0.2.1-1 [9462 B] 109s Get:209 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-wcwidth all 0.2.14+dfsg1-1build1 [26.5 kB] 109s Get:210 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-prompt-toolkit all 3.0.52-2 [258 kB] 109s Get:211 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pure-eval all 0.2.3-1 [11.4 kB] 109s Get:212 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-stack-data all 0.6.3-3 [22.2 kB] 109s Get:213 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-ipython all 8.35.0-2 [575 kB] 109s Get:214 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-platformdirs all 4.5.1-1 [17.1 kB] 109s Get:215 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-jupyter-core all 5.9.1-1 [28.9 kB] 109s Get:216 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-psutil amd64 7.1.0-1ubuntu1 [191 kB] 109s Get:217 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-tornado amd64 6.5.4-0.1 [306 kB] 109s Get:218 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-zmq amd64 27.1.0-1 [234 kB] 109s Get:219 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-jupyter-client all 8.7.0-1 [78.5 kB] 109s Get:220 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-jupyterlab-pygments all 0.2.2-3build1 [6188 B] 109s Get:221 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-livereload all 2.7.1-0.1 [22.7 kB] 109s Get:222 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-mistune all 3.1.4-1 [35.0 kB] 109s Get:223 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-multidict amd64 6.4.3-1build1 [69.2 kB] 109s Get:224 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-nbformat all 5.10.4-1 [39.2 kB] 109s Get:225 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-nbclient all 0.10.4-1 [22.6 kB] 109s Get:226 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-tinycss2 all 1.5.1-1 [23.3 kB] 109s Get:227 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pandocfilters all 1.5.1-1 [23.6 kB] 109s Get:228 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-nbconvert all 7.16.6-1 [140 kB] 109s Get:229 http://ftpmaster.internal/ubuntu resolute/main amd64 sphinx-common all 8.2.3-12 [657 kB] 109s Get:230 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-alabaster all 0.7.16-0.1build1 [18.6 kB] 109s Get:231 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-snowballstemmer all 3.0.1-1 [65.9 kB] 109s Get:232 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-sphinx all 8.2.3-12 [483 kB] 109s Get:233 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-nbsphinx all 0.9.5+ds-1 [41.0 kB] 109s Get:234 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pluggy all 1.6.0-2 [21.1 kB] 109s Get:235 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-propcache amd64 0.3.1-1build1 [54.5 kB] 109s Get:236 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pydata-sphinx-theme all 0.16.1+dfsg-5 [944 kB] 109s Get:237 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pystac all 1.14.3-1 [150 kB] 109s Get:238 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pytest all 9.0.2-2 [277 kB] 109s Get:239 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pytest-mock all 3.15.1-1 [11.9 kB] 109s Get:240 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-wrapt amd64 1.17.3-3 [40.5 kB] 109s Get:241 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-yarl amd64 1.22.0-1 [98.2 kB] 109s Get:242 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-vcr all 7.0.0-2 [33.3 kB] 109s Get:243 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-pytest-recording all 0.13.4-1 [15.9 kB] 109s Get:244 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-rasterio amd64 1.4.3-2build2 [2020 kB] 109s Get:245 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-requests-mock all 1.12.1-4 [17.9 kB] 109s Get:246 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-shapely amd64 2.1.2-1ubuntu1 [408 kB] 109s Get:247 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-starlette all 0.50.0-1 [53.0 kB] 109s Get:248 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-uvloop amd64 0.22.1+ds1-2 [882 kB] 109s Get:249 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-wsproto all 1.3.2-1 [21.8 kB] 109s Get:250 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-uvicorn all 0.38.0-1 [45.9 kB] 109s Get:251 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-watchfiles amd64 1.1.1-2 [404 kB] 110s Get:252 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-websockets amd64 15.0.1-1build1 [98.4 kB] 110s Get:253 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-sphinx-autobuild all 2025.08.25-1 [12.0 kB] 110s Get:254 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-sphinx-design all 0.6.1-2 [894 kB] 110s Get:255 http://ftpmaster.internal/ubuntu resolute/main amd64 libjs-mathjax all 2.7.9+dfsg-1build1 [6017 kB] 110s Preconfiguring packages ... 110s Fetched 274 MB in 10s (27.9 MB/s) 110s Selecting previously unselected package python3.13-minimal. 110s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 124923 files and directories currently installed.) 110s Preparing to unpack .../000-python3.13-minimal_3.13.11-1_amd64.deb ... 110s Unpacking python3.13-minimal (3.13.11-1) ... 110s Selecting previously unselected package python3-numpy-dev:amd64. 110s Preparing to unpack .../001-python3-numpy-dev_1%3a2.3.5+ds-3_amd64.deb ... 110s Unpacking python3-numpy-dev:amd64 (1:2.3.5+ds-3) ... 110s Selecting previously unselected package libblas3:amd64. 110s Preparing to unpack .../002-libblas3_3.12.1-7ubuntu1_amd64.deb ... 110s Unpacking libblas3:amd64 (3.12.1-7ubuntu1) ... 110s Selecting previously unselected package libgfortran5:amd64. 110s Preparing to unpack .../003-libgfortran5_15.2.0-11ubuntu1_amd64.deb ... 110s Unpacking libgfortran5:amd64 (15.2.0-11ubuntu1) ... 110s Selecting previously unselected package liblapack3:amd64. 110s Preparing to unpack .../004-liblapack3_3.12.1-7ubuntu1_amd64.deb ... 110s Unpacking liblapack3:amd64 (3.12.1-7ubuntu1) ... 110s Selecting previously unselected package python3-numpy. 110s Preparing to unpack .../005-python3-numpy_1%3a2.3.5+ds-3_amd64.deb ... 110s Unpacking python3-numpy (1:2.3.5+ds-3) ... 110s Selecting previously unselected package gcc-15-base:i386. 110s Preparing to unpack .../006-gcc-15-base_15.2.0-11ubuntu1_i386.deb ... 110s Unpacking gcc-15-base:i386 (15.2.0-11ubuntu1) ... 110s Selecting previously unselected package libc-gconv-modules-extra:i386. 110s Preparing to unpack .../007-libc-gconv-modules-extra_2.42-2ubuntu4_i386.deb ... 110s Unpacking libc-gconv-modules-extra:i386 (2.42-2ubuntu4) ... 110s Selecting previously unselected package libgcc-s1:i386. 110s Preparing to unpack .../008-libgcc-s1_15.2.0-11ubuntu1_i386.deb ... 110s Unpacking libgcc-s1:i386 (15.2.0-11ubuntu1) ... 111s Selecting previously unselected package libc6:i386. 111s Preparing to unpack .../009-libc6_2.42-2ubuntu4_i386.deb ... 111s Unpacking libc6:i386 (2.42-2ubuntu4) ... 111s Selecting previously unselected package libcrypt1:i386. 111s Preparing to unpack .../010-libcrypt1_1%3a4.5.1-1_i386.deb ... 111s Unpacking libcrypt1:i386 (1:4.5.1-1) ... 111s Selecting previously unselected package libatomic1:i386. 111s Preparing to unpack .../011-libatomic1_15.2.0-11ubuntu1_i386.deb ... 111s Unpacking libatomic1:i386 (15.2.0-11ubuntu1) ... 111s Selecting previously unselected package libstdc++6:i386. 111s Preparing to unpack .../012-libstdc++6_15.2.0-11ubuntu1_i386.deb ... 111s Unpacking libstdc++6:i386 (15.2.0-11ubuntu1) ... 111s Selecting previously unselected package python3.13. 111s Preparing to unpack .../013-python3.13_3.13.11-1_amd64.deb ... 111s Unpacking python3.13 (3.13.11-1) ... 111s Selecting previously unselected package m4. 111s Preparing to unpack .../014-m4_1.4.20-2_amd64.deb ... 111s Unpacking m4 (1.4.20-2) ... 111s Selecting previously unselected package autoconf. 111s Preparing to unpack .../015-autoconf_2.72-3.1ubuntu1_all.deb ... 111s Unpacking autoconf (2.72-3.1ubuntu1) ... 111s Selecting previously unselected package autotools-dev. 111s Preparing to unpack .../016-autotools-dev_20240727.1_all.deb ... 111s Unpacking autotools-dev (20240727.1) ... 111s Selecting previously unselected package automake. 111s Preparing to unpack .../017-automake_1%3a1.18.1-3build1_all.deb ... 111s Unpacking automake (1:1.18.1-3build1) ... 111s Selecting previously unselected package autopoint. 111s Preparing to unpack .../018-autopoint_0.23.2-1_all.deb ... 111s Unpacking autopoint (0.23.2-1) ... 111s Selecting previously unselected package libisl23:amd64. 111s Preparing to unpack .../019-libisl23_0.27-1build1_amd64.deb ... 111s Unpacking libisl23:amd64 (0.27-1build1) ... 111s Selecting previously unselected package libmpc3:amd64. 111s Preparing to unpack .../020-libmpc3_1.3.1-2_amd64.deb ... 111s Unpacking libmpc3:amd64 (1.3.1-2) ... 111s Selecting previously unselected package cpp-15-x86-64-linux-gnu. 111s Preparing to unpack .../021-cpp-15-x86-64-linux-gnu_15.2.0-11ubuntu1_amd64.deb ... 111s Unpacking cpp-15-x86-64-linux-gnu (15.2.0-11ubuntu1) ... 111s Selecting previously unselected package cpp-15. 111s Preparing to unpack .../022-cpp-15_15.2.0-11ubuntu1_amd64.deb ... 111s Unpacking cpp-15 (15.2.0-11ubuntu1) ... 111s Selecting previously unselected package cpp-x86-64-linux-gnu. 111s Preparing to unpack .../023-cpp-x86-64-linux-gnu_4%3a15.2.0-4ubuntu1_amd64.deb ... 111s Unpacking cpp-x86-64-linux-gnu (4:15.2.0-4ubuntu1) ... 111s Selecting previously unselected package cpp. 111s Preparing to unpack .../024-cpp_4%3a15.2.0-4ubuntu1_amd64.deb ... 111s Unpacking cpp (4:15.2.0-4ubuntu1) ... 111s Selecting previously unselected package libcc1-0:amd64. 111s Preparing to unpack .../025-libcc1-0_15.2.0-11ubuntu1_amd64.deb ... 111s Unpacking libcc1-0:amd64 (15.2.0-11ubuntu1) ... 111s Selecting previously unselected package libgomp1:amd64. 111s Preparing to unpack .../026-libgomp1_15.2.0-11ubuntu1_amd64.deb ... 111s Unpacking libgomp1:amd64 (15.2.0-11ubuntu1) ... 111s Selecting previously unselected package libitm1:amd64. 111s Preparing to unpack .../027-libitm1_15.2.0-11ubuntu1_amd64.deb ... 111s Unpacking libitm1:amd64 (15.2.0-11ubuntu1) ... 111s Selecting previously unselected package libasan8:amd64. 111s Preparing to unpack .../028-libasan8_15.2.0-11ubuntu1_amd64.deb ... 111s Unpacking libasan8:amd64 (15.2.0-11ubuntu1) ... 111s Selecting previously unselected package liblsan0:amd64. 111s Preparing to unpack .../029-liblsan0_15.2.0-11ubuntu1_amd64.deb ... 111s Unpacking liblsan0:amd64 (15.2.0-11ubuntu1) ... 111s Selecting previously unselected package libtsan2:amd64. 111s Preparing to unpack .../030-libtsan2_15.2.0-11ubuntu1_amd64.deb ... 111s Unpacking libtsan2:amd64 (15.2.0-11ubuntu1) ... 111s Selecting previously unselected package libubsan1:amd64. 111s Preparing to unpack .../031-libubsan1_15.2.0-11ubuntu1_amd64.deb ... 111s Unpacking libubsan1:amd64 (15.2.0-11ubuntu1) ... 111s Selecting previously unselected package libhwasan0:amd64. 111s Preparing to unpack .../032-libhwasan0_15.2.0-11ubuntu1_amd64.deb ... 111s Unpacking libhwasan0:amd64 (15.2.0-11ubuntu1) ... 111s Selecting previously unselected package libquadmath0:amd64. 111s Preparing to unpack .../033-libquadmath0_15.2.0-11ubuntu1_amd64.deb ... 111s Unpacking libquadmath0:amd64 (15.2.0-11ubuntu1) ... 111s Selecting previously unselected package libgcc-15-dev:amd64. 111s Preparing to unpack .../034-libgcc-15-dev_15.2.0-11ubuntu1_amd64.deb ... 111s Unpacking libgcc-15-dev:amd64 (15.2.0-11ubuntu1) ... 111s Selecting previously unselected package gcc-15-x86-64-linux-gnu. 111s Preparing to unpack .../035-gcc-15-x86-64-linux-gnu_15.2.0-11ubuntu1_amd64.deb ... 111s Unpacking gcc-15-x86-64-linux-gnu (15.2.0-11ubuntu1) ... 112s Selecting previously unselected package gcc-15. 112s Preparing to unpack .../036-gcc-15_15.2.0-11ubuntu1_amd64.deb ... 112s Unpacking gcc-15 (15.2.0-11ubuntu1) ... 112s Selecting previously unselected package gcc-x86-64-linux-gnu. 112s Preparing to unpack .../037-gcc-x86-64-linux-gnu_4%3a15.2.0-4ubuntu1_amd64.deb ... 112s Unpacking gcc-x86-64-linux-gnu (4:15.2.0-4ubuntu1) ... 112s Selecting previously unselected package gcc. 112s Preparing to unpack .../038-gcc_4%3a15.2.0-4ubuntu1_amd64.deb ... 112s Unpacking gcc (4:15.2.0-4ubuntu1) ... 112s Selecting previously unselected package libstdc++-15-dev:amd64. 112s Preparing to unpack .../039-libstdc++-15-dev_15.2.0-11ubuntu1_amd64.deb ... 112s Unpacking libstdc++-15-dev:amd64 (15.2.0-11ubuntu1) ... 112s Selecting previously unselected package g++-15-x86-64-linux-gnu. 112s Preparing to unpack .../040-g++-15-x86-64-linux-gnu_15.2.0-11ubuntu1_amd64.deb ... 112s Unpacking g++-15-x86-64-linux-gnu (15.2.0-11ubuntu1) ... 112s Selecting previously unselected package g++-15. 112s Preparing to unpack .../041-g++-15_15.2.0-11ubuntu1_amd64.deb ... 112s Unpacking g++-15 (15.2.0-11ubuntu1) ... 112s Selecting previously unselected package g++-x86-64-linux-gnu. 112s Preparing to unpack .../042-g++-x86-64-linux-gnu_4%3a15.2.0-4ubuntu1_amd64.deb ... 112s Unpacking g++-x86-64-linux-gnu (4:15.2.0-4ubuntu1) ... 112s Selecting previously unselected package g++. 112s Preparing to unpack .../043-g++_4%3a15.2.0-4ubuntu1_amd64.deb ... 112s Unpacking g++ (4:15.2.0-4ubuntu1) ... 112s Selecting previously unselected package build-essential. 112s Preparing to unpack .../044-build-essential_12.12ubuntu2_amd64.deb ... 112s Unpacking build-essential (12.12ubuntu2) ... 112s Selecting previously unselected package gcc-15-i686-linux-gnu-base:amd64. 112s Preparing to unpack .../045-gcc-15-i686-linux-gnu-base_15.2.0-7ubuntu1cross1_amd64.deb ... 112s Unpacking gcc-15-i686-linux-gnu-base:amd64 (15.2.0-7ubuntu1cross1) ... 112s Selecting previously unselected package cpp-15-i686-linux-gnu. 112s Preparing to unpack .../046-cpp-15-i686-linux-gnu_15.2.0-7ubuntu1cross1_amd64.deb ... 112s Unpacking cpp-15-i686-linux-gnu (15.2.0-7ubuntu1cross1) ... 112s Selecting previously unselected package cpp-i686-linux-gnu. 112s Preparing to unpack .../047-cpp-i686-linux-gnu_4%3a15.2.0-4ubuntu1_amd64.deb ... 112s Unpacking cpp-i686-linux-gnu (4:15.2.0-4ubuntu1) ... 112s Selecting previously unselected package binutils-i686-linux-gnu. 112s Preparing to unpack .../048-binutils-i686-linux-gnu_2.45.50.20251209-1ubuntu1_amd64.deb ... 112s Unpacking binutils-i686-linux-gnu (2.45.50.20251209-1ubuntu1) ... 112s Selecting previously unselected package gcc-15-cross-base. 112s Preparing to unpack .../049-gcc-15-cross-base_15.2.0-7ubuntu1cross1_all.deb ... 112s Unpacking gcc-15-cross-base (15.2.0-7ubuntu1cross1) ... 112s Selecting previously unselected package libc6-i386-cross. 112s Preparing to unpack .../050-libc6-i386-cross_2.42-0ubuntu3cross1_all.deb ... 112s Unpacking libc6-i386-cross (2.42-0ubuntu3cross1) ... 112s Selecting previously unselected package libgcc-s1-i386-cross. 112s Preparing to unpack .../051-libgcc-s1-i386-cross_15.2.0-7ubuntu1cross1_all.deb ... 112s Unpacking libgcc-s1-i386-cross (15.2.0-7ubuntu1cross1) ... 112s Selecting previously unselected package libgomp1-i386-cross. 112s Preparing to unpack .../052-libgomp1-i386-cross_15.2.0-7ubuntu1cross1_all.deb ... 112s Unpacking libgomp1-i386-cross (15.2.0-7ubuntu1cross1) ... 112s Selecting previously unselected package libitm1-i386-cross. 112s Preparing to unpack .../053-libitm1-i386-cross_15.2.0-7ubuntu1cross1_all.deb ... 112s Unpacking libitm1-i386-cross (15.2.0-7ubuntu1cross1) ... 112s Selecting previously unselected package libatomic1-i386-cross. 112s Preparing to unpack .../054-libatomic1-i386-cross_15.2.0-7ubuntu1cross1_all.deb ... 112s Unpacking libatomic1-i386-cross (15.2.0-7ubuntu1cross1) ... 112s Selecting previously unselected package libasan8-i386-cross. 112s Preparing to unpack .../055-libasan8-i386-cross_15.2.0-7ubuntu1cross1_all.deb ... 112s Unpacking libasan8-i386-cross (15.2.0-7ubuntu1cross1) ... 112s Selecting previously unselected package libstdc++6-i386-cross. 112s Preparing to unpack .../056-libstdc++6-i386-cross_15.2.0-7ubuntu1cross1_all.deb ... 112s Unpacking libstdc++6-i386-cross (15.2.0-7ubuntu1cross1) ... 112s Selecting previously unselected package libubsan1-i386-cross. 112s Preparing to unpack .../057-libubsan1-i386-cross_15.2.0-7ubuntu1cross1_all.deb ... 112s Unpacking libubsan1-i386-cross (15.2.0-7ubuntu1cross1) ... 112s Selecting previously unselected package libquadmath0-i386-cross. 112s Preparing to unpack .../058-libquadmath0-i386-cross_15.2.0-7ubuntu1cross1_all.deb ... 112s Unpacking libquadmath0-i386-cross (15.2.0-7ubuntu1cross1) ... 112s Selecting previously unselected package libgcc-15-dev-i386-cross. 112s Preparing to unpack .../059-libgcc-15-dev-i386-cross_15.2.0-7ubuntu1cross1_all.deb ... 112s Unpacking libgcc-15-dev-i386-cross (15.2.0-7ubuntu1cross1) ... 112s Selecting previously unselected package gcc-15-i686-linux-gnu. 112s Preparing to unpack .../060-gcc-15-i686-linux-gnu_15.2.0-7ubuntu1cross1_amd64.deb ... 112s Unpacking gcc-15-i686-linux-gnu (15.2.0-7ubuntu1cross1) ... 113s Selecting previously unselected package gcc-i686-linux-gnu. 113s Preparing to unpack .../061-gcc-i686-linux-gnu_4%3a15.2.0-4ubuntu1_amd64.deb ... 113s Unpacking gcc-i686-linux-gnu (4:15.2.0-4ubuntu1) ... 113s Selecting previously unselected package linux-libc-dev-i386-cross. 113s Preparing to unpack .../062-linux-libc-dev-i386-cross_6.17.0-4.4cross1_all.deb ... 113s Unpacking linux-libc-dev-i386-cross (6.17.0-4.4cross1) ... 113s Selecting previously unselected package libc6-dev-i386-cross. 113s Preparing to unpack .../063-libc6-dev-i386-cross_2.42-0ubuntu3cross1_all.deb ... 113s Unpacking libc6-dev-i386-cross (2.42-0ubuntu3cross1) ... 113s Selecting previously unselected package libstdc++-15-dev-i386-cross. 113s Preparing to unpack .../064-libstdc++-15-dev-i386-cross_15.2.0-7ubuntu1cross1_all.deb ... 113s Unpacking libstdc++-15-dev-i386-cross (15.2.0-7ubuntu1cross1) ... 113s Selecting previously unselected package g++-15-i686-linux-gnu. 113s Preparing to unpack .../065-g++-15-i686-linux-gnu_15.2.0-7ubuntu1cross1_amd64.deb ... 113s Unpacking g++-15-i686-linux-gnu (15.2.0-7ubuntu1cross1) ... 113s Selecting previously unselected package g++-i686-linux-gnu. 113s Preparing to unpack .../066-g++-i686-linux-gnu_4%3a15.2.0-4ubuntu1_amd64.deb ... 113s Unpacking g++-i686-linux-gnu (4:15.2.0-4ubuntu1) ... 113s Selecting previously unselected package crossbuild-essential-i386. 113s Preparing to unpack .../067-crossbuild-essential-i386_12.12ubuntu2_all.deb ... 113s Unpacking crossbuild-essential-i386 (12.12ubuntu2) ... 113s Selecting previously unselected package libdebhelper-perl. 113s Preparing to unpack .../068-libdebhelper-perl_13.28ubuntu1_all.deb ... 113s Unpacking libdebhelper-perl (13.28ubuntu1) ... 113s Selecting previously unselected package libtool. 113s Preparing to unpack .../069-libtool_2.5.4-9_all.deb ... 113s Unpacking libtool (2.5.4-9) ... 113s Selecting previously unselected package dh-autoreconf. 113s Preparing to unpack .../070-dh-autoreconf_21_all.deb ... 113s Unpacking dh-autoreconf (21) ... 113s Selecting previously unselected package libarchive-zip-perl. 113s Preparing to unpack .../071-libarchive-zip-perl_1.68-1_all.deb ... 113s Unpacking libarchive-zip-perl (1.68-1) ... 113s Selecting previously unselected package libfile-stripnondeterminism-perl. 113s Preparing to unpack .../072-libfile-stripnondeterminism-perl_1.15.0-1build1_all.deb ... 113s Unpacking libfile-stripnondeterminism-perl (1.15.0-1build1) ... 113s Selecting previously unselected package dh-strip-nondeterminism. 113s Preparing to unpack .../073-dh-strip-nondeterminism_1.15.0-1build1_all.deb ... 113s Unpacking dh-strip-nondeterminism (1.15.0-1build1) ... 113s Selecting previously unselected package debugedit. 113s Preparing to unpack .../074-debugedit_1%3a5.2-3_amd64.deb ... 113s Unpacking debugedit (1:5.2-3) ... 113s Selecting previously unselected package dwz. 113s Preparing to unpack .../075-dwz_0.16-2_amd64.deb ... 113s Unpacking dwz (0.16-2) ... 113s Selecting previously unselected package gettext. 113s Preparing to unpack .../076-gettext_0.23.2-1_amd64.deb ... 113s Unpacking gettext (0.23.2-1) ... 113s Selecting previously unselected package intltool-debian. 113s Preparing to unpack .../077-intltool-debian_0.35.0+20060710.6build1_all.deb ... 113s Unpacking intltool-debian (0.35.0+20060710.6build1) ... 113s Selecting previously unselected package po-debconf. 113s Preparing to unpack .../078-po-debconf_1.0.22_all.deb ... 113s Unpacking po-debconf (1.0.22) ... 113s Selecting previously unselected package debhelper. 113s Preparing to unpack .../079-debhelper_13.28ubuntu1_all.deb ... 113s Unpacking debhelper (13.28ubuntu1) ... 113s Selecting previously unselected package dh-python. 113s Preparing to unpack .../080-dh-python_7.20251231_all.deb ... 113s Unpacking dh-python (7.20251231) ... 113s Selecting previously unselected package sgml-base. 113s Preparing to unpack .../081-sgml-base_1.31+nmu1_all.deb ... 113s Unpacking sgml-base (1.31+nmu1) ... 113s Selecting previously unselected package xml-core. 113s Preparing to unpack .../082-xml-core_0.19build1_all.deb ... 113s Unpacking xml-core (0.19build1) ... 113s Selecting previously unselected package docutils-common. 113s Preparing to unpack .../083-docutils-common_0.22.4+dfsg-1_all.deb ... 113s Unpacking docutils-common (0.22.4+dfsg-1) ... 113s Selecting previously unselected package fonts-dejavu-mono. 113s Preparing to unpack .../084-fonts-dejavu-mono_2.37-8build1_all.deb ... 113s Unpacking fonts-dejavu-mono (2.37-8build1) ... 113s Selecting previously unselected package fonts-dejavu-core. 113s Preparing to unpack .../085-fonts-dejavu-core_2.37-8build1_all.deb ... 113s Unpacking fonts-dejavu-core (2.37-8build1) ... 113s Selecting previously unselected package fontconfig-config. 113s Preparing to unpack .../086-fontconfig-config_2.15.0-2.4ubuntu1_amd64.deb ... 114s Unpacking fontconfig-config (2.15.0-2.4ubuntu1) ... 114s Selecting previously unselected package fonts-mathjax. 114s Preparing to unpack .../087-fonts-mathjax_2.7.9+dfsg-1build1_all.deb ... 114s Unpacking fonts-mathjax (2.7.9+dfsg-1build1) ... 114s Selecting previously unselected package gcc-11-base:i386. 114s Preparing to unpack .../088-gcc-11-base_11.5.0-7ubuntu2_i386.deb ... 114s Unpacking gcc-11-base:i386 (11.5.0-7ubuntu2) ... 114s Selecting previously unselected package gdal-data. 114s Preparing to unpack .../089-gdal-data_3.12.1+dfsg-1_all.deb ... 114s Unpacking gdal-data (3.12.1+dfsg-1) ... 114s Selecting previously unselected package gdal-plugins:amd64. 114s Preparing to unpack .../090-gdal-plugins_3.12.1+dfsg-1_amd64.deb ... 114s Unpacking gdal-plugins:amd64 (3.12.1+dfsg-1) ... 114s Selecting previously unselected package libabsl20260107:amd64. 114s Preparing to unpack .../091-libabsl20260107_20260107.0-0ubuntu2_amd64.deb ... 114s Unpacking libabsl20260107:amd64 (20260107.0-0ubuntu2) ... 114s Selecting previously unselected package libaec0:amd64. 114s Preparing to unpack .../092-libaec0_1.1.4-2_amd64.deb ... 114s Unpacking libaec0:amd64 (1.1.4-2) ... 114s Selecting previously unselected package libaom3:amd64. 114s Preparing to unpack .../093-libaom3_3.13.1-2_amd64.deb ... 114s Unpacking libaom3:amd64 (3.13.1-2) ... 114s Selecting previously unselected package libarpack2t64:amd64. 114s Preparing to unpack .../094-libarpack2t64_3.9.1-6_amd64.deb ... 114s Unpacking libarpack2t64:amd64 (3.9.1-6) ... 114s Selecting previously unselected package libarmadillo14. 114s Preparing to unpack .../095-libarmadillo14_1%3a14.2.3+dfsg-1_amd64.deb ... 114s Unpacking libarmadillo14 (1:14.2.3+dfsg-1) ... 114s Selecting previously unselected package libasan6:i386. 114s Preparing to unpack .../096-libasan6_11.5.0-7ubuntu2_i386.deb ... 114s Unpacking libasan6:i386 (11.5.0-7ubuntu2) ... 114s Selecting previously unselected package libdav1d7:amd64. 114s Preparing to unpack .../097-libdav1d7_1.5.3-1_amd64.deb ... 114s Unpacking libdav1d7:amd64 (1.5.3-1) ... 114s Selecting previously unselected package libgav1-2:amd64. 114s Preparing to unpack .../098-libgav1-2_0.20.0-2build1_amd64.deb ... 114s Unpacking libgav1-2:amd64 (0.20.0-2build1) ... 114s Selecting previously unselected package libjpeg-turbo8:amd64. 114s Preparing to unpack .../099-libjpeg-turbo8_2.1.5-4ubuntu2_amd64.deb ... 114s Unpacking libjpeg-turbo8:amd64 (2.1.5-4ubuntu2) ... 114s Selecting previously unselected package libjpeg8:amd64. 114s Preparing to unpack .../100-libjpeg8_8c-2ubuntu11_amd64.deb ... 114s Unpacking libjpeg8:amd64 (8c-2ubuntu11) ... 114s Selecting previously unselected package libyuv0:amd64. 114s Preparing to unpack .../101-libyuv0_0.0.1922.20260106-1_amd64.deb ... 114s Unpacking libyuv0:amd64 (0.0.1922.20260106-1) ... 114s Selecting previously unselected package libavif16:amd64. 114s Preparing to unpack .../102-libavif16_1.3.0-1ubuntu3_amd64.deb ... 114s Unpacking libavif16:amd64 (1.3.0-1ubuntu3) ... 114s Selecting previously unselected package libsnappy1v5:amd64. 114s Preparing to unpack .../103-libsnappy1v5_1.2.2-2_amd64.deb ... 114s Unpacking libsnappy1v5:amd64 (1.2.2-2) ... 114s Selecting previously unselected package libblosc1:amd64. 114s Preparing to unpack .../104-libblosc1_1.21.5+ds-2_amd64.deb ... 114s Unpacking libblosc1:amd64 (1.21.5+ds-2) ... 114s Selecting previously unselected package linux-libc-dev:i386. 114s Preparing to unpack .../105-linux-libc-dev_6.18.0-9.9_i386.deb ... 114s Unpacking linux-libc-dev:i386 (6.18.0-9.9) ... 114s Selecting previously unselected package libcrypt-dev:i386. 114s Preparing to unpack .../106-libcrypt-dev_1%3a4.5.1-1_i386.deb ... 114s Unpacking libcrypt-dev:i386 (1:4.5.1-1) ... 114s Selecting previously unselected package libc6-dev:i386. 114s Preparing to unpack .../107-libc6-dev_2.42-2ubuntu4_i386.deb ... 114s Unpacking libc6-dev:i386 (2.42-2ubuntu4) ... 114s Selecting previously unselected package libcfitsio10t64:amd64. 114s Preparing to unpack .../108-libcfitsio10t64_4.6.3-1_amd64.deb ... 114s Unpacking libcfitsio10t64:amd64 (4.6.3-1) ... 114s Selecting previously unselected package libde265-0:amd64. 114s Preparing to unpack .../109-libde265-0_1.0.16-1build1_amd64.deb ... 114s Unpacking libde265-0:amd64 (1.0.16-1build1) ... 114s Selecting previously unselected package libdeflate0:amd64. 114s Preparing to unpack .../110-libdeflate0_1.23-2_amd64.deb ... 114s Unpacking libdeflate0:amd64 (1.23-2) ... 114s Selecting previously unselected package libfontconfig1:amd64. 114s Preparing to unpack .../111-libfontconfig1_2.15.0-2.4ubuntu1_amd64.deb ... 114s Unpacking libfontconfig1:amd64 (2.15.0-2.4ubuntu1) ... 114s Selecting previously unselected package libfyba0t64:amd64. 114s Preparing to unpack .../112-libfyba0t64_4.1.1-11build2_amd64.deb ... 114s Unpacking libfyba0t64:amd64 (4.1.1-11build2) ... 114s Selecting previously unselected package libgomp1:i386. 114s Preparing to unpack .../113-libgomp1_15.2.0-11ubuntu1_i386.deb ... 114s Unpacking libgomp1:i386 (15.2.0-11ubuntu1) ... 114s Selecting previously unselected package libitm1:i386. 114s Preparing to unpack .../114-libitm1_15.2.0-11ubuntu1_i386.deb ... 114s Unpacking libitm1:i386 (15.2.0-11ubuntu1) ... 114s Selecting previously unselected package libubsan1:i386. 114s Preparing to unpack .../115-libubsan1_15.2.0-11ubuntu1_i386.deb ... 114s Unpacking libubsan1:i386 (15.2.0-11ubuntu1) ... 114s Selecting previously unselected package libquadmath0:i386. 114s Preparing to unpack .../116-libquadmath0_15.2.0-11ubuntu1_i386.deb ... 114s Unpacking libquadmath0:i386 (15.2.0-11ubuntu1) ... 114s Selecting previously unselected package libgcc-11-dev:i386. 114s Preparing to unpack .../117-libgcc-11-dev_11.5.0-7ubuntu2_i386.deb ... 114s Unpacking libgcc-11-dev:i386 (11.5.0-7ubuntu2) ... 115s Selecting previously unselected package libminizip1t64:amd64. 115s Preparing to unpack .../118-libminizip1t64_1%3a1.3.dfsg+really1.3.1-1ubuntu2_amd64.deb ... 115s Unpacking libminizip1t64:amd64 (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 115s Selecting previously unselected package libfreexl1:amd64. 115s Preparing to unpack .../119-libfreexl1_2.0.0-1build3_amd64.deb ... 115s Unpacking libfreexl1:amd64 (2.0.0-1build3) ... 115s Selecting previously unselected package libgeos3.14.1:amd64. 115s Preparing to unpack .../120-libgeos3.14.1_3.14.1-2_amd64.deb ... 115s Unpacking libgeos3.14.1:amd64 (3.14.1-2) ... 115s Selecting previously unselected package libgeos-c1t64:amd64. 115s Preparing to unpack .../121-libgeos-c1t64_3.14.1-2_amd64.deb ... 115s Unpacking libgeos-c1t64:amd64 (3.14.1-2) ... 115s Selecting previously unselected package proj-data. 115s Preparing to unpack .../122-proj-data_9.7.1-1_all.deb ... 115s Unpacking proj-data (9.7.1-1) ... 115s Selecting previously unselected package libjbig0:amd64. 115s Preparing to unpack .../123-libjbig0_2.1-6.1ubuntu3_amd64.deb ... 115s Unpacking libjbig0:amd64 (2.1-6.1ubuntu3) ... 115s Selecting previously unselected package liblerc4:amd64. 115s Preparing to unpack .../124-liblerc4_4.0.0+ds-5ubuntu2_amd64.deb ... 115s Unpacking liblerc4:amd64 (4.0.0+ds-5ubuntu2) ... 115s Selecting previously unselected package libsharpyuv0:amd64. 115s Preparing to unpack .../125-libsharpyuv0_1.5.0-0.1build1_amd64.deb ... 115s Unpacking libsharpyuv0:amd64 (1.5.0-0.1build1) ... 115s Selecting previously unselected package libwebp7:amd64. 115s Preparing to unpack .../126-libwebp7_1.5.0-0.1build1_amd64.deb ... 115s Unpacking libwebp7:amd64 (1.5.0-0.1build1) ... 115s Selecting previously unselected package libtiff6:amd64. 115s Preparing to unpack .../127-libtiff6_4.7.0-3ubuntu3_amd64.deb ... 115s Unpacking libtiff6:amd64 (4.7.0-3ubuntu3) ... 115s Selecting previously unselected package libproj25:amd64. 115s Preparing to unpack .../128-libproj25_9.7.1-1_amd64.deb ... 115s Unpacking libproj25:amd64 (9.7.1-1) ... 115s Selecting previously unselected package libgeotiff5:amd64. 115s Preparing to unpack .../129-libgeotiff5_1.7.4-1_amd64.deb ... 115s Unpacking libgeotiff5:amd64 (1.7.4-1) ... 115s Selecting previously unselected package libgif7:amd64. 115s Preparing to unpack .../130-libgif7_5.2.2-1ubuntu3_amd64.deb ... 115s Unpacking libgif7:amd64 (5.2.2-1ubuntu3) ... 115s Selecting previously unselected package libsz2:amd64. 115s Preparing to unpack .../131-libsz2_1.1.4-2_amd64.deb ... 115s Unpacking libsz2:amd64 (1.1.4-2) ... 115s Selecting previously unselected package libhdf4-0-alt:amd64. 115s Preparing to unpack .../132-libhdf4-0-alt_4.3.0-1_amd64.deb ... 115s Unpacking libhdf4-0-alt:amd64 (4.3.0-1) ... 115s Selecting previously unselected package libhdf5-310:amd64. 115s Preparing to unpack .../133-libhdf5-310_1.14.5+repack-4_amd64.deb ... 115s Unpacking libhdf5-310:amd64 (1.14.5+repack-4) ... 115s Selecting previously unselected package libheif-plugin-aomdec:amd64. 115s Preparing to unpack .../134-libheif-plugin-aomdec_1.21.2-1_amd64.deb ... 115s Unpacking libheif-plugin-aomdec:amd64 (1.21.2-1) ... 115s Selecting previously unselected package libheif-plugin-libde265:amd64. 115s Preparing to unpack .../135-libheif-plugin-libde265_1.21.2-1_amd64.deb ... 115s Unpacking libheif-plugin-libde265:amd64 (1.21.2-1) ... 115s Selecting previously unselected package libheif1:amd64. 115s Preparing to unpack .../136-libheif1_1.21.2-1_amd64.deb ... 115s Unpacking libheif1:amd64 (1.21.2-1) ... 115s Selecting previously unselected package liburiparser1:amd64. 115s Preparing to unpack .../137-liburiparser1_0.9.8+dfsg-2_amd64.deb ... 115s Unpacking liburiparser1:amd64 (0.9.8+dfsg-2) ... 115s Selecting previously unselected package libkmlbase1t64:amd64. 115s Preparing to unpack .../138-libkmlbase1t64_1.3.0-13_amd64.deb ... 115s Unpacking libkmlbase1t64:amd64 (1.3.0-13) ... 115s Selecting previously unselected package libkmldom1t64:amd64. 115s Preparing to unpack .../139-libkmldom1t64_1.3.0-13_amd64.deb ... 115s Unpacking libkmldom1t64:amd64 (1.3.0-13) ... 115s Selecting previously unselected package libkmlengine1t64:amd64. 115s Preparing to unpack .../140-libkmlengine1t64_1.3.0-13_amd64.deb ... 115s Unpacking libkmlengine1t64:amd64 (1.3.0-13) ... 115s Selecting previously unselected package mysql-common. 115s Preparing to unpack .../141-mysql-common_5.8+1.1.1ubuntu2_all.deb ... 115s Unpacking mysql-common (5.8+1.1.1ubuntu2) ... 115s Selecting previously unselected package libmysqlclient24:amd64. 115s Preparing to unpack .../142-libmysqlclient24_8.4.7-0ubuntu3_amd64.deb ... 115s Unpacking libmysqlclient24:amd64 (8.4.7-0ubuntu3) ... 115s Selecting previously unselected package libhdf5-hl-310:amd64. 115s Preparing to unpack .../143-libhdf5-hl-310_1.14.5+repack-4_amd64.deb ... 115s Unpacking libhdf5-hl-310:amd64 (1.14.5+repack-4) ... 115s Selecting previously unselected package libnetcdf22:amd64. 115s Preparing to unpack .../144-libnetcdf22_1%3a4.9.3-1build1_amd64.deb ... 115s Unpacking libnetcdf22:amd64 (1:4.9.3-1build1) ... 115s Selecting previously unselected package libltdl7:amd64. 115s Preparing to unpack .../145-libltdl7_2.5.4-9_amd64.deb ... 115s Unpacking libltdl7:amd64 (2.5.4-9) ... 115s Selecting previously unselected package libodbc2:amd64. 115s Preparing to unpack .../146-libodbc2_2.3.14-1_amd64.deb ... 115s Unpacking libodbc2:amd64 (2.3.14-1) ... 115s Selecting previously unselected package unixodbc-common. 115s Preparing to unpack .../147-unixodbc-common_2.3.14-1_all.deb ... 115s Unpacking unixodbc-common (2.3.14-1) ... 115s Selecting previously unselected package libodbcinst2:amd64. 115s Preparing to unpack .../148-libodbcinst2_2.3.14-1_amd64.deb ... 115s Unpacking libodbcinst2:amd64 (2.3.14-1) ... 115s Selecting previously unselected package libogdi4.1:amd64. 115s Preparing to unpack .../149-libogdi4.1_4.1.1+ds-5_amd64.deb ... 115s Unpacking libogdi4.1:amd64 (4.1.1+ds-5) ... 115s Selecting previously unselected package libopenjp2-7:amd64. 115s Preparing to unpack .../150-libopenjp2-7_2.5.4-1_amd64.deb ... 115s Unpacking libopenjp2-7:amd64 (2.5.4-1) ... 115s Selecting previously unselected package libgpgmepp6t64:amd64. 115s Preparing to unpack .../151-libgpgmepp6t64_1.24.2-3ubuntu2_amd64.deb ... 115s Unpacking libgpgmepp6t64:amd64 (1.24.2-3ubuntu2) ... 115s Selecting previously unselected package liblcms2-2:amd64. 115s Preparing to unpack .../152-liblcms2-2_2.17-1_amd64.deb ... 115s Unpacking liblcms2-2:amd64 (2.17-1) ... 115s Selecting previously unselected package libpoppler147:amd64. 115s Preparing to unpack .../153-libpoppler147_25.03.0-11.1_amd64.deb ... 115s Unpacking libpoppler147:amd64 (25.03.0-11.1) ... 115s Selecting previously unselected package libpq5:amd64. 115s Preparing to unpack .../154-libpq5_18.1-2_amd64.deb ... 115s Unpacking libpq5:amd64 (18.1-2) ... 115s Selecting previously unselected package libqhull-r8.0:amd64. 115s Preparing to unpack .../155-libqhull-r8.0_2020.2-8_amd64.deb ... 115s Unpacking libqhull-r8.0:amd64 (2020.2-8) ... 115s Selecting previously unselected package librttopo1:amd64. 115s Preparing to unpack .../156-librttopo1_1.1.0-4_amd64.deb ... 115s Unpacking librttopo1:amd64 (1.1.0-4) ... 115s Selecting previously unselected package libspatialite8t64:amd64. 115s Preparing to unpack .../157-libspatialite8t64_5.1.0-3ubuntu1_amd64.deb ... 115s Unpacking libspatialite8t64:amd64 (5.1.0-3ubuntu1) ... 115s Selecting previously unselected package libxerces-c3.2t64:amd64. 115s Preparing to unpack .../158-libxerces-c3.2t64_3.2.4+debian-1.3build2_amd64.deb ... 115s Unpacking libxerces-c3.2t64:amd64 (3.2.4+debian-1.3build2) ... 115s Selecting previously unselected package libgdal36:amd64. 115s Preparing to unpack .../159-libgdal36_3.10.3+dfsg-1build3_amd64.deb ... 115s Unpacking libgdal36:amd64 (3.10.3+dfsg-1build3) ... 116s Selecting previously unselected package libjson-perl. 116s Preparing to unpack .../160-libjson-perl_4.10000-1_all.deb ... 116s Unpacking libjson-perl (4.10000-1) ... 116s Selecting previously unselected package liblua5.4-0:amd64. 116s Preparing to unpack .../161-liblua5.4-0_5.4.8-1_amd64.deb ... 116s Unpacking liblua5.4-0:amd64 (5.4.8-1) ... 116s Selecting previously unselected package libnorm1t64:amd64. 116s Preparing to unpack .../162-libnorm1t64_1.5.9+dfsg-4_amd64.deb ... 116s Unpacking libnorm1t64:amd64 (1.5.9+dfsg-4) ... 116s Selecting previously unselected package libpgm-5.3-0t64:amd64. 116s Preparing to unpack .../163-libpgm-5.3-0t64_5.3.128~dfsg-2.1build2_amd64.deb ... 116s Unpacking libpgm-5.3-0t64:amd64 (5.3.128~dfsg-2.1build2) ... 116s Selecting previously unselected package libsodium23:amd64. 116s Preparing to unpack .../164-libsodium23_1.0.18-2_amd64.deb ... 116s Unpacking libsodium23:amd64 (1.0.18-2) ... 116s Selecting previously unselected package libstdc++-11-dev:i386. 116s Preparing to unpack .../165-libstdc++-11-dev_11.5.0-7ubuntu2_i386.deb ... 116s Unpacking libstdc++-11-dev:i386 (11.5.0-7ubuntu2) ... 116s Selecting previously unselected package libzmq5:amd64. 116s Preparing to unpack .../166-libzmq5_4.3.5-1build3_amd64.deb ... 116s Unpacking libzmq5:amd64 (4.3.5-1build3) ... 116s Selecting previously unselected package node-fortawesome-fontawesome-free. 116s Preparing to unpack .../167-node-fortawesome-fontawesome-free_6.7.2+ds1-1_all.deb ... 116s Unpacking node-fortawesome-fontawesome-free (6.7.2+ds1-1) ... 116s Selecting previously unselected package pandoc-data. 116s Preparing to unpack .../168-pandoc-data_3.1.11.1-3build1_all.deb ... 116s Unpacking pandoc-data (3.1.11.1-3build1) ... 116s Selecting previously unselected package pandoc. 116s Preparing to unpack .../169-pandoc_3.1.11.1+ds-4_amd64.deb ... 116s Unpacking pandoc (3.1.11.1+ds-4) ... 116s Selecting previously unselected package pybuild-plugin-autopkgtest. 116s Preparing to unpack .../170-pybuild-plugin-autopkgtest_7.20251231_all.deb ... 116s Unpacking pybuild-plugin-autopkgtest (7.20251231) ... 116s Selecting previously unselected package python3-pyproject-hooks. 116s Preparing to unpack .../171-python3-pyproject-hooks_1.2.0-1_all.deb ... 116s Unpacking python3-pyproject-hooks (1.2.0-1) ... 116s Selecting previously unselected package python3-wheel. 116s Preparing to unpack .../172-python3-wheel_0.46.1-2_all.deb ... 116s Unpacking python3-wheel (0.46.1-2) ... 116s Selecting previously unselected package python3-build. 116s Preparing to unpack .../173-python3-build_1.2.2-5_all.deb ... 116s Unpacking python3-build (1.2.2-5) ... 116s Selecting previously unselected package python3-installer. 116s Preparing to unpack .../174-python3-installer_0.7.0+dfsg1-3_all.deb ... 116s Unpacking python3-installer (0.7.0+dfsg1-3) ... 116s Selecting previously unselected package pybuild-plugin-pyproject. 116s Preparing to unpack .../175-pybuild-plugin-pyproject_7.20251231_all.deb ... 116s Unpacking pybuild-plugin-pyproject (7.20251231) ... 116s Selecting previously unselected package python-pystac-doc. 116s Preparing to unpack .../176-python-pystac-doc_1.14.3-1_all.deb ... 116s Unpacking python-pystac-doc (1.14.3-1) ... 117s Selecting previously unselected package python-tinycss2-common. 117s Preparing to unpack .../177-python-tinycss2-common_1.5.1-1_all.deb ... 117s Unpacking python-tinycss2-common (1.5.1-1) ... 117s Selecting previously unselected package python3-accessible-pygments. 117s Preparing to unpack .../178-python3-accessible-pygments_0.0.5-2build1_all.deb ... 117s Unpacking python3-accessible-pygments (0.0.5-2build1) ... 117s Selecting previously unselected package python3-affine. 117s Preparing to unpack .../179-python3-affine_2.4.0-2_all.deb ... 117s Unpacking python3-affine (2.4.0-2) ... 117s Selecting previously unselected package python3-all. 117s Preparing to unpack .../180-python3-all_3.14.2-1_amd64.deb ... 117s Unpacking python3-all (3.14.2-1) ... 117s Selecting previously unselected package python3-sniffio. 117s Preparing to unpack .../181-python3-sniffio_1.3.1-1_all.deb ... 117s Unpacking python3-sniffio (1.3.1-1) ... 117s Selecting previously unselected package python3-anyio. 117s Preparing to unpack .../182-python3-anyio_4.11.0-3_all.deb ... 117s Unpacking python3-anyio (4.11.0-3) ... 117s Selecting previously unselected package python3-astroid. 117s Preparing to unpack .../183-python3-astroid_4.0.2-1ubuntu1_all.deb ... 117s Unpacking python3-astroid (4.0.2-1ubuntu1) ... 117s Selecting previously unselected package python3-asttokens. 117s Preparing to unpack .../184-python3-asttokens_3.0.1-1_all.deb ... 117s Unpacking python3-asttokens (3.0.1-1) ... 117s Selecting previously unselected package python3-webencodings. 117s Preparing to unpack .../185-python3-webencodings_0.5.1-5build1_all.deb ... 117s Unpacking python3-webencodings (0.5.1-5build1) ... 117s Selecting previously unselected package python3-html5lib. 117s Preparing to unpack .../186-python3-html5lib_1.2-3_all.deb ... 117s Unpacking python3-html5lib (1.2-3) ... 117s Selecting previously unselected package python3-bleach. 117s Preparing to unpack .../187-python3-bleach_6.3.0-1_all.deb ... 117s Unpacking python3-bleach (6.3.0-1) ... 117s Selecting previously unselected package python3-soupsieve. 117s Preparing to unpack .../188-python3-soupsieve_2.8.1-1_all.deb ... 117s Unpacking python3-soupsieve (2.8.1-1) ... 117s Selecting previously unselected package python3-bs4. 117s Preparing to unpack .../189-python3-bs4_4.14.3-2build1_all.deb ... 117s Unpacking python3-bs4 (4.14.3-2build1) ... 117s Selecting previously unselected package python3-click. 117s Preparing to unpack .../190-python3-click_8.2.0+0.really.8.1.8-1build1_all.deb ... 117s Unpacking python3-click (8.2.0+0.really.8.1.8-1build1) ... 117s Selecting previously unselected package python3-click-plugins. 117s Preparing to unpack .../191-python3-click-plugins_1.1.1-5_all.deb ... 117s Unpacking python3-click-plugins (1.1.1-5) ... 117s Selecting previously unselected package python3-cligj. 117s Preparing to unpack .../192-python3-cligj_0.7.2-3_all.deb ... 117s Unpacking python3-cligj (0.7.2-3) ... 117s Selecting previously unselected package python3-colorama. 117s Preparing to unpack .../193-python3-colorama_0.4.6-4build1_all.deb ... 117s Unpacking python3-colorama (0.4.6-4build1) ... 117s Selecting previously unselected package python3-decorator. 117s Preparing to unpack .../194-python3-decorator_5.2.1-2_all.deb ... 117s Unpacking python3-decorator (5.2.1-2) ... 117s Selecting previously unselected package python3-defusedxml. 117s Preparing to unpack .../195-python3-defusedxml_0.7.1-3build1_all.deb ... 117s Unpacking python3-defusedxml (0.7.1-3build1) ... 117s Selecting previously unselected package python3-roman-numerals. 117s Preparing to unpack .../196-python3-roman-numerals_4.1.0-1_all.deb ... 117s Unpacking python3-roman-numerals (4.1.0-1) ... 117s Selecting previously unselected package python3-docutils. 117s Preparing to unpack .../197-python3-docutils_0.22.4+dfsg-1_all.deb ... 117s Unpacking python3-docutils (0.22.4+dfsg-1) ... 117s Selecting previously unselected package python3-executing. 117s Preparing to unpack .../198-python3-executing_2.2.1-0.1_all.deb ... 117s Unpacking python3-executing (2.2.1-0.1) ... 117s Selecting previously unselected package python3-fastjsonschema. 117s Preparing to unpack .../199-python3-fastjsonschema_2.21.1-1_all.deb ... 117s Unpacking python3-fastjsonschema (2.21.1-1) ... 117s Selecting previously unselected package python3-h11. 117s Preparing to unpack .../200-python3-h11_0.14.0-1.1_all.deb ... 117s Unpacking python3-h11 (0.14.0-1.1) ... 117s Selecting previously unselected package python3-imagesize. 117s Preparing to unpack .../201-python3-imagesize_1.4.1-1build1_all.deb ... 117s Unpacking python3-imagesize (1.4.1-1build1) ... 117s Selecting previously unselected package python3-iniconfig. 117s Preparing to unpack .../202-python3-iniconfig_2.1.0-2_all.deb ... 117s Unpacking python3-iniconfig (2.1.0-2) ... 117s Selecting previously unselected package python3-parso. 117s Preparing to unpack .../203-python3-parso_0.8.5-1_all.deb ... 117s Unpacking python3-parso (0.8.5-1) ... 117s Selecting previously unselected package python3-typeshed. 117s Preparing to unpack .../204-python3-typeshed_0.0~git20241223.ea91db2-4_all.deb ... 117s Unpacking python3-typeshed (0.0~git20241223.ea91db2-4) ... 117s Selecting previously unselected package python3-jedi. 117s Preparing to unpack .../205-python3-jedi_0.19.1+ds1-1build1_all.deb ... 117s Unpacking python3-jedi (0.19.1+ds1-1build1) ... 117s Selecting previously unselected package python3-traitlets. 117s Preparing to unpack .../206-python3-traitlets_5.14.3+really5.14.3-2_all.deb ... 117s Unpacking python3-traitlets (5.14.3+really5.14.3-2) ... 117s Selecting previously unselected package python3-matplotlib-inline. 117s Preparing to unpack .../207-python3-matplotlib-inline_0.2.1-1_all.deb ... 117s Unpacking python3-matplotlib-inline (0.2.1-1) ... 117s Selecting previously unselected package python3-wcwidth. 117s Preparing to unpack .../208-python3-wcwidth_0.2.14+dfsg1-1build1_all.deb ... 117s Unpacking python3-wcwidth (0.2.14+dfsg1-1build1) ... 118s Selecting previously unselected package python3-prompt-toolkit. 118s Preparing to unpack .../209-python3-prompt-toolkit_3.0.52-2_all.deb ... 118s Unpacking python3-prompt-toolkit (3.0.52-2) ... 118s Selecting previously unselected package python3-pure-eval. 118s Preparing to unpack .../210-python3-pure-eval_0.2.3-1_all.deb ... 118s Unpacking python3-pure-eval (0.2.3-1) ... 118s Selecting previously unselected package python3-stack-data. 118s Preparing to unpack .../211-python3-stack-data_0.6.3-3_all.deb ... 118s Unpacking python3-stack-data (0.6.3-3) ... 118s Selecting previously unselected package python3-ipython. 118s Preparing to unpack .../212-python3-ipython_8.35.0-2_all.deb ... 118s Unpacking python3-ipython (8.35.0-2) ... 118s Selecting previously unselected package python3-platformdirs. 118s Preparing to unpack .../213-python3-platformdirs_4.5.1-1_all.deb ... 118s Unpacking python3-platformdirs (4.5.1-1) ... 118s Selecting previously unselected package python3-jupyter-core. 118s Preparing to unpack .../214-python3-jupyter-core_5.9.1-1_all.deb ... 118s Unpacking python3-jupyter-core (5.9.1-1) ... 118s Selecting previously unselected package python3-psutil. 118s Preparing to unpack .../215-python3-psutil_7.1.0-1ubuntu1_amd64.deb ... 118s Unpacking python3-psutil (7.1.0-1ubuntu1) ... 118s Selecting previously unselected package python3-tornado. 118s Preparing to unpack .../216-python3-tornado_6.5.4-0.1_amd64.deb ... 118s Unpacking python3-tornado (6.5.4-0.1) ... 118s Selecting previously unselected package python3-zmq. 118s Preparing to unpack .../217-python3-zmq_27.1.0-1_amd64.deb ... 118s Unpacking python3-zmq (27.1.0-1) ... 118s Selecting previously unselected package python3-jupyter-client. 118s Preparing to unpack .../218-python3-jupyter-client_8.7.0-1_all.deb ... 118s Unpacking python3-jupyter-client (8.7.0-1) ... 118s Selecting previously unselected package python3-jupyterlab-pygments. 118s Preparing to unpack .../219-python3-jupyterlab-pygments_0.2.2-3build1_all.deb ... 118s Unpacking python3-jupyterlab-pygments (0.2.2-3build1) ... 118s Selecting previously unselected package python3-livereload. 118s Preparing to unpack .../220-python3-livereload_2.7.1-0.1_all.deb ... 118s Unpacking python3-livereload (2.7.1-0.1) ... 118s Selecting previously unselected package python3-mistune. 118s Preparing to unpack .../221-python3-mistune_3.1.4-1_all.deb ... 118s Unpacking python3-mistune (3.1.4-1) ... 118s Selecting previously unselected package python3-multidict. 118s Preparing to unpack .../222-python3-multidict_6.4.3-1build1_amd64.deb ... 118s Unpacking python3-multidict (6.4.3-1build1) ... 118s Selecting previously unselected package python3-nbformat. 118s Preparing to unpack .../223-python3-nbformat_5.10.4-1_all.deb ... 118s Unpacking python3-nbformat (5.10.4-1) ... 118s Selecting previously unselected package python3-nbclient. 118s Preparing to unpack .../224-python3-nbclient_0.10.4-1_all.deb ... 118s Unpacking python3-nbclient (0.10.4-1) ... 118s Selecting previously unselected package python3-tinycss2. 118s Preparing to unpack .../225-python3-tinycss2_1.5.1-1_all.deb ... 118s Unpacking python3-tinycss2 (1.5.1-1) ... 118s Selecting previously unselected package python3-pandocfilters. 118s Preparing to unpack .../226-python3-pandocfilters_1.5.1-1_all.deb ... 118s Unpacking python3-pandocfilters (1.5.1-1) ... 118s Selecting previously unselected package python3-nbconvert. 118s Preparing to unpack .../227-python3-nbconvert_7.16.6-1_all.deb ... 118s Unpacking python3-nbconvert (7.16.6-1) ... 118s Selecting previously unselected package sphinx-common. 118s Preparing to unpack .../228-sphinx-common_8.2.3-12_all.deb ... 118s Unpacking sphinx-common (8.2.3-12) ... 118s Selecting previously unselected package python3-alabaster. 118s Preparing to unpack .../229-python3-alabaster_0.7.16-0.1build1_all.deb ... 118s Unpacking python3-alabaster (0.7.16-0.1build1) ... 118s Selecting previously unselected package python3-snowballstemmer. 118s Preparing to unpack .../230-python3-snowballstemmer_3.0.1-1_all.deb ... 118s Unpacking python3-snowballstemmer (3.0.1-1) ... 118s Selecting previously unselected package python3-sphinx. 118s Preparing to unpack .../231-python3-sphinx_8.2.3-12_all.deb ... 118s Unpacking python3-sphinx (8.2.3-12) ... 118s Selecting previously unselected package python3-nbsphinx. 118s Preparing to unpack .../232-python3-nbsphinx_0.9.5+ds-1_all.deb ... 118s Unpacking python3-nbsphinx (0.9.5+ds-1) ... 118s Selecting previously unselected package python3-pluggy. 118s Preparing to unpack .../233-python3-pluggy_1.6.0-2_all.deb ... 118s Unpacking python3-pluggy (1.6.0-2) ... 118s Selecting previously unselected package python3-propcache. 118s Preparing to unpack .../234-python3-propcache_0.3.1-1build1_amd64.deb ... 118s Unpacking python3-propcache (0.3.1-1build1) ... 118s Selecting previously unselected package python3-pydata-sphinx-theme. 118s Preparing to unpack .../235-python3-pydata-sphinx-theme_0.16.1+dfsg-5_all.deb ... 118s Unpacking python3-pydata-sphinx-theme (0.16.1+dfsg-5) ... 118s Selecting previously unselected package python3-pystac. 118s Preparing to unpack .../236-python3-pystac_1.14.3-1_all.deb ... 118s Unpacking python3-pystac (1.14.3-1) ... 118s Selecting previously unselected package python3-pytest. 118s Preparing to unpack .../237-python3-pytest_9.0.2-2_all.deb ... 118s Unpacking python3-pytest (9.0.2-2) ... 118s Selecting previously unselected package python3-pytest-mock. 118s Preparing to unpack .../238-python3-pytest-mock_3.15.1-1_all.deb ... 118s Unpacking python3-pytest-mock (3.15.1-1) ... 118s Selecting previously unselected package python3-wrapt. 118s Preparing to unpack .../239-python3-wrapt_1.17.3-3_amd64.deb ... 118s Unpacking python3-wrapt (1.17.3-3) ... 118s Selecting previously unselected package python3-yarl. 118s Preparing to unpack .../240-python3-yarl_1.22.0-1_amd64.deb ... 118s Unpacking python3-yarl (1.22.0-1) ... 118s Selecting previously unselected package python3-vcr. 118s Preparing to unpack .../241-python3-vcr_7.0.0-2_all.deb ... 118s Unpacking python3-vcr (7.0.0-2) ... 118s Selecting previously unselected package python3-pytest-recording. 118s Preparing to unpack .../242-python3-pytest-recording_0.13.4-1_all.deb ... 118s Unpacking python3-pytest-recording (0.13.4-1) ... 118s Selecting previously unselected package python3-rasterio. 118s Preparing to unpack .../243-python3-rasterio_1.4.3-2build2_amd64.deb ... 118s Unpacking python3-rasterio (1.4.3-2build2) ... 118s Selecting previously unselected package python3-requests-mock. 118s Preparing to unpack .../244-python3-requests-mock_1.12.1-4_all.deb ... 118s Unpacking python3-requests-mock (1.12.1-4) ... 118s Selecting previously unselected package python3-shapely. 118s Preparing to unpack .../245-python3-shapely_2.1.2-1ubuntu1_amd64.deb ... 118s Unpacking python3-shapely (2.1.2-1ubuntu1) ... 118s Selecting previously unselected package python3-starlette. 118s Preparing to unpack .../246-python3-starlette_0.50.0-1_all.deb ... 118s Unpacking python3-starlette (0.50.0-1) ... 118s Selecting previously unselected package python3-uvloop. 118s Preparing to unpack .../247-python3-uvloop_0.22.1+ds1-2_amd64.deb ... 118s Unpacking python3-uvloop (0.22.1+ds1-2) ... 118s Selecting previously unselected package python3-wsproto. 118s Preparing to unpack .../248-python3-wsproto_1.3.2-1_all.deb ... 118s Unpacking python3-wsproto (1.3.2-1) ... 118s Selecting previously unselected package python3-uvicorn. 118s Preparing to unpack .../249-python3-uvicorn_0.38.0-1_all.deb ... 118s Unpacking python3-uvicorn (0.38.0-1) ... 118s Selecting previously unselected package python3-watchfiles. 118s Preparing to unpack .../250-python3-watchfiles_1.1.1-2_amd64.deb ... 118s Unpacking python3-watchfiles (1.1.1-2) ... 118s Selecting previously unselected package python3-websockets. 119s Preparing to unpack .../251-python3-websockets_15.0.1-1build1_amd64.deb ... 119s Unpacking python3-websockets (15.0.1-1build1) ... 119s Selecting previously unselected package python3-sphinx-autobuild. 119s Preparing to unpack .../252-python3-sphinx-autobuild_2025.08.25-1_all.deb ... 119s Unpacking python3-sphinx-autobuild (2025.08.25-1) ... 119s Selecting previously unselected package python3-sphinx-design. 119s Preparing to unpack .../253-python3-sphinx-design_0.6.1-2_all.deb ... 119s Unpacking python3-sphinx-design (0.6.1-2) ... 119s Selecting previously unselected package libjs-mathjax. 119s Preparing to unpack .../254-libjs-mathjax_2.7.9+dfsg-1build1_all.deb ... 119s Unpacking libjs-mathjax (2.7.9+dfsg-1build1) ... 119s Setting up libc-gconv-modules-extra:i386 (2.42-2ubuntu4) ... 119s Setting up dh-python (7.20251231) ... 119s Setting up liblcms2-2:amd64 (2.17-1) ... 119s Setting up python3-iniconfig (2.1.0-2) ... 119s Setting up python3-sniffio (1.3.1-1) ... 119s Setting up python3-tornado (6.5.4-0.1) ... 120s Setting up libnorm1t64:amd64 (1.5.9+dfsg-4) ... 120s Setting up libsharpyuv0:amd64 (1.5.0-0.1build1) ... 120s Setting up libgpgmepp6t64:amd64 (1.24.2-3ubuntu2) ... 120s Setting up gcc-11-base:i386 (11.5.0-7ubuntu2) ... 120s Setting up libaom3:amd64 (3.13.1-2) ... 120s Setting up mysql-common (5.8+1.1.1ubuntu2) ... 120s update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode 120s Setting up python3-pure-eval (0.2.3-1) ... 120s Setting up fonts-mathjax (2.7.9+dfsg-1build1) ... 120s Setting up libsodium23:amd64 (1.0.18-2) ... 120s Setting up liblerc4:amd64 (4.0.0+ds-5ubuntu2) ... 120s Setting up proj-data (9.7.1-1) ... 120s Setting up python-pystac-doc (1.14.3-1) ... 120s Setting up libjs-mathjax (2.7.9+dfsg-1build1) ... 120s Setting up python3-anyio (4.11.0-3) ... 120s Setting up python3-parso (0.8.5-1) ... 120s Setting up libogdi4.1:amd64 (4.1.1+ds-5) ... 120s Setting up python3-colorama (0.4.6-4build1) ... 120s Setting up python3-defusedxml (0.7.1-3build1) ... 121s Setting up libarchive-zip-perl (1.68-1) ... 121s Setting up python3-alabaster (0.7.16-0.1build1) ... 121s Setting up binutils-i686-linux-gnu (2.45.50.20251209-1ubuntu1) ... 121s Setting up libdebhelper-perl (13.28ubuntu1) ... 121s Setting up libpq5:amd64 (18.1-2) ... 121s Setting up libdeflate0:amd64 (1.23-2) ... 121s Setting up linux-libc-dev:i386 (6.18.0-9.9) ... 121s Setting up m4 (1.4.20-2) ... 121s Setting up python3-watchfiles (1.1.1-2) ... 121s Setting up libqhull-r8.0:amd64 (2020.2-8) ... 121s Setting up node-fortawesome-fontawesome-free (6.7.2+ds1-1) ... 121s Setting up python3-starlette (0.50.0-1) ... 121s Setting up python3-pandocfilters (1.5.1-1) ... 121s Setting up libxerces-c3.2t64:amd64 (3.2.4+debian-1.3build2) ... 121s Setting up libgomp1:amd64 (15.2.0-11ubuntu1) ... 121s Setting up python3-click (8.2.0+0.really.8.1.8-1build1) ... 121s Setting up libmysqlclient24:amd64 (8.4.7-0ubuntu3) ... 121s Setting up python3-wheel (0.46.1-2) ... 122s Setting up libjbig0:amd64 (2.1-6.1ubuntu3) ... 122s Setting up python3-webencodings (0.5.1-5build1) ... 122s Setting up libaec0:amd64 (1.1.4-2) ... 122s Setting up python3-platformdirs (4.5.1-1) ... 122s Setting up python3-psutil (7.1.0-1ubuntu1) ... 122s Setting up gdal-data (3.12.1+dfsg-1) ... 122s Setting up python3-multidict (6.4.3-1build1) ... 122s Setting up libsnappy1v5:amd64 (1.2.2-2) ... 122s Setting up python3-jupyterlab-pygments (0.2.2-3build1) ... 122s Setting up libpgm-5.3-0t64:amd64 (5.3.128~dfsg-2.1build2) ... 122s Setting up python3-decorator (5.2.1-2) ... 123s Setting up linux-libc-dev-i386-cross (6.17.0-4.4cross1) ... 123s Setting up autotools-dev (20240727.1) ... 123s Setting up libblas3:amd64 (3.12.1-7ubuntu1) ... 123s update-alternatives: using /usr/lib/x86_64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/x86_64-linux-gnu/libblas.so.3 (libblas.so.3-x86_64-linux-gnu) in auto mode 123s Setting up libcfitsio10t64:amd64 (4.6.3-1) ... 123s Setting up python3-wcwidth (0.2.14+dfsg1-1build1) ... 123s Setting up python3-pyproject-hooks (1.2.0-1) ... 123s Setting up python3-accessible-pygments (0.0.5-2build1) ... 123s Setting up python3-typeshed (0.0~git20241223.ea91db2-4) ... 123s Setting up python3-snowballstemmer (3.0.1-1) ... 123s Setting up python3-requests-mock (1.12.1-4) ... 123s Setting up libquadmath0:amd64 (15.2.0-11ubuntu1) ... 123s Setting up fonts-dejavu-mono (2.37-8build1) ... 123s Setting up libmpc3:amd64 (1.3.1-2) ... 124s Setting up python3-numpy-dev:amd64 (1:2.3.5+ds-3) ... 124s Setting up gcc-15-i686-linux-gnu-base:amd64 (15.2.0-7ubuntu1cross1) ... 124s Setting up python3-wrapt (1.17.3-3) ... 124s Setting up python3-h11 (0.14.0-1.1) ... 124s Setting up autopoint (0.23.2-1) ... 124s Setting up python3-click-plugins (1.1.1-5) ... 124s Setting up fonts-dejavu-core (2.37-8build1) ... 124s Setting up unixodbc-common (2.3.14-1) ... 124s Setting up libjpeg-turbo8:amd64 (2.1.5-4ubuntu2) ... 124s Setting up python3-html5lib (1.2-3) ... 124s Setting up libltdl7:amd64 (2.5.4-9) ... 124s Setting up python3-uvloop (0.22.1+ds1-2) ... 124s Setting up python3-installer (0.7.0+dfsg1-3) ... 124s Setting up libgfortran5:amd64 (15.2.0-11ubuntu1) ... 124s Setting up autoconf (2.72-3.1ubuntu1) ... 124s Setting up python3-pluggy (1.6.0-2) ... 125s Setting up libwebp7:amd64 (1.5.0-0.1build1) ... 125s Setting up libubsan1:amd64 (15.2.0-11ubuntu1) ... 125s Setting up python3-fastjsonschema (2.21.1-1) ... 125s Setting up libgif7:amd64 (5.2.2-1ubuntu3) ... 125s Setting up libodbc2:amd64 (2.3.14-1) ... 125s Setting up libgeos3.14.1:amd64 (3.14.1-2) ... 125s Setting up liburiparser1:amd64 (0.9.8+dfsg-2) ... 125s Setting up libfyba0t64:amd64 (4.1.1-11build2) ... 125s Setting up dwz (0.16-2) ... 125s Setting up libdav1d7:amd64 (1.5.3-1) ... 125s Setting up libminizip1t64:amd64 (1:1.3.dfsg+really1.3.1-1ubuntu2) ... 125s Setting up python3-astroid (4.0.2-1ubuntu1) ... 125s Setting up libhwasan0:amd64 (15.2.0-11ubuntu1) ... 125s Setting up python3-livereload (2.7.1-0.1) ... 125s Setting up python3-propcache (0.3.1-1build1) ... 125s Setting up python3-traitlets (5.14.3+really5.14.3-2) ... 126s Setting up libasan8:amd64 (15.2.0-11ubuntu1) ... 126s Setting up python-tinycss2-common (1.5.1-1) ... 126s Setting up libjson-perl (4.10000-1) ... 126s Setting up libblosc1:amd64 (1.21.5+ds-2) ... 126s Setting up debugedit (1:5.2-3) ... 126s Setting up libc6-i386-cross (2.42-0ubuntu3cross1) ... 126s Setting up python3-roman-numerals (4.1.0-1) ... 126s Setting up liblua5.4-0:amd64 (5.4.8-1) ... 126s Setting up libopenjp2-7:amd64 (2.5.4-1) ... 126s Setting up python3.13-minimal (3.13.11-1) ... 126s Setting up libabsl20260107:amd64 (20260107.0-0ubuntu2) ... 126s Setting up sgml-base (1.31+nmu1) ... 126s Setting up pandoc-data (3.1.11.1-3build1) ... 126s Setting up libtsan2:amd64 (15.2.0-11ubuntu1) ... 126s Setting up libisl23:amd64 (0.27-1build1) ... 126s Setting up gcc-15-cross-base (15.2.0-7ubuntu1cross1) ... 126s Setting up python3-affine (2.4.0-2) ... 126s Setting up python3-build (1.2.2-5) ... 127s Setting up libde265-0:amd64 (1.0.16-1build1) ... 127s Setting up libkmlbase1t64:amd64 (1.3.0-13) ... 127s Setting up gcc-15-base:i386 (15.2.0-11ubuntu1) ... 127s Setting up libquadmath0-i386-cross (15.2.0-7ubuntu1cross1) ... 127s Setting up python3-yarl (1.22.0-1) ... 127s Setting up python3-mistune (3.1.4-1) ... 127s Setting up python3-soupsieve (2.8.1-1) ... 127s Setting up libcc1-0:amd64 (15.2.0-11ubuntu1) ... 127s Setting up python3-jupyter-core (5.9.1-1) ... 127s Setting up liblsan0:amd64 (15.2.0-11ubuntu1) ... 127s Setting up libsz2:amd64 (1.1.4-2) ... 127s Setting up libitm1:amd64 (15.2.0-11ubuntu1) ... 127s Setting up python3-imagesize (1.4.1-1build1) ... 127s Setting up gdal-plugins:amd64 (3.12.1+dfsg-1) ... 127s Setting up python3-websockets (15.0.1-1build1) ... 127s Setting up python3-pystac (1.14.3-1) ... 128s Setting up libjpeg8:amd64 (8c-2ubuntu11) ... 128s Setting up automake (1:1.18.1-3build1) ... 128s update-alternatives: using /usr/bin/automake-1.18 to provide /usr/bin/automake (automake) in auto mode 128s Setting up python3-prompt-toolkit (3.0.52-2) ... 128s Setting up libfile-stripnondeterminism-perl (1.15.0-1build1) ... 128s Setting up libodbcinst2:amd64 (2.3.14-1) ... 128s Setting up liblapack3:amd64 (3.12.1-7ubuntu1) ... 128s update-alternatives: using /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/x86_64-linux-gnu/liblapack.so.3 (liblapack.so.3-x86_64-linux-gnu) in auto mode 128s Setting up gettext (0.23.2-1) ... 128s Setting up libarpack2t64:amd64 (3.9.1-6) ... 128s Setting up python3-tinycss2 (1.5.1-1) ... 128s Setting up libgcc-15-dev:amd64 (15.2.0-11ubuntu1) ... 128s Setting up libzmq5:amd64 (4.3.5-1build3) ... 128s Setting up python3-wsproto (1.3.2-1) ... 129s Setting up python3-jedi (0.19.1+ds1-1build1) ... 129s Setting up libatomic1-i386-cross (15.2.0-7ubuntu1cross1) ... 129s Setting up python3.13 (3.13.11-1) ... 130s Setting up python3-asttokens (3.0.1-1) ... 130s Setting up pybuild-plugin-pyproject (7.20251231) ... 130s Setting up fontconfig-config (2.15.0-2.4ubuntu1) ... 130s Setting up python3-pytest (9.0.2-2) ... 130s Setting up libgeos-c1t64:amd64 (3.14.1-2) ... 130s Setting up python3-cligj (0.7.2-3) ... 130s Setting up python3-all (3.14.2-1) ... 130s Setting up cpp-15-i686-linux-gnu (15.2.0-7ubuntu1cross1) ... 130s Setting up libgomp1-i386-cross (15.2.0-7ubuntu1cross1) ... 130s Setting up python3-nbformat (5.10.4-1) ... 131s Setting up libc6-dev-i386-cross (2.42-0ubuntu3cross1) ... 131s Setting up cpp-15-x86-64-linux-gnu (15.2.0-11ubuntu1) ... 131s Setting up python3-bs4 (4.14.3-2build1) ... 131s Setting up intltool-debian (0.35.0+20060710.6build1) ... 131s Setting up python3-bleach (6.3.0-1) ... 131s Setting up python3-matplotlib-inline (0.2.1-1) ... 131s Setting up gcc-15-x86-64-linux-gnu (15.2.0-11ubuntu1) ... 131s Setting up libkmldom1t64:amd64 (1.3.0-13) ... 131s Setting up libgcc-s1-i386-cross (15.2.0-7ubuntu1cross1) ... 131s Setting up libstdc++-15-dev:amd64 (15.2.0-11ubuntu1) ... 131s Setting up pandoc (3.1.11.1+ds-4) ... 131s Setting up python3-executing (2.2.1-0.1) ... 131s Setting up python3-zmq (27.1.0-1) ... 132s Setting up sphinx-common (8.2.3-12) ... 132s Setting up libitm1-i386-cross (15.2.0-7ubuntu1cross1) ... 132s Setting up python3-vcr (7.0.0-2) ... 132s Setting up python3-numpy (1:2.3.5+ds-3) ... 134s Setting up libhdf4-0-alt:amd64 (4.3.0-1) ... 134s Setting up dh-strip-nondeterminism (1.15.0-1build1) ... 134s Setting up libgav1-2:amd64 (0.20.0-2build1) ... 134s Setting up librttopo1:amd64 (1.1.0-4) ... 134s Setting up libhdf5-310:amd64 (1.14.5+repack-4) ... 134s Setting up libfreexl1:amd64 (2.0.0-1build3) ... 134s Setting up python3-pytest-mock (3.15.1-1) ... 134s Setting up cpp-15 (15.2.0-11ubuntu1) ... 134s Setting up libtiff6:amd64 (4.7.0-3ubuntu3) ... 134s Setting up xml-core (0.19build1) ... 134s Setting up python3-jupyter-client (8.7.0-1) ... 134s Setting up libarmadillo14 (1:14.2.3+dfsg-1) ... 134s Setting up cpp-i686-linux-gnu (4:15.2.0-4ubuntu1) ... 134s Setting up libfontconfig1:amd64 (2.15.0-2.4ubuntu1) ... 134s Setting up libyuv0:amd64 (0.0.1922.20260106-1) ... 134s Setting up python3-stack-data (0.6.3-3) ... 134s Setting up cpp-x86-64-linux-gnu (4:15.2.0-4ubuntu1) ... 134s Setting up python3-pytest-recording (0.13.4-1) ... 135s Setting up libhdf5-hl-310:amd64 (1.14.5+repack-4) ... 135s Setting up g++-15-x86-64-linux-gnu (15.2.0-11ubuntu1) ... 135s Setting up libavif16:amd64 (1.3.0-1ubuntu3) ... 135s Setting up python3-shapely (2.1.2-1ubuntu1) ... 135s Setting up python3-uvicorn (0.38.0-1) ... 135s Setting up libpoppler147:amd64 (25.03.0-11.1) ... 135s Setting up gcc-x86-64-linux-gnu (4:15.2.0-4ubuntu1) ... 135s Setting up libproj25:amd64 (9.7.1-1) ... 135s Setting up po-debconf (1.0.22) ... 135s Setting up libnetcdf22:amd64 (1:4.9.3-1build1) ... 135s Setting up libkmlengine1t64:amd64 (1.3.0-13) ... 135s Setting up libasan8-i386-cross (15.2.0-7ubuntu1cross1) ... 135s Setting up libstdc++6-i386-cross (15.2.0-7ubuntu1cross1) ... 135s Setting up libgeotiff5:amd64 (1.7.4-1) ... 135s Setting up python3-nbclient (0.10.4-1) ... 135s Setting up gcc-15 (15.2.0-11ubuntu1) ... 135s Setting up python3-ipython (8.35.0-2) ... 136s /usr/lib/python3/dist-packages/IPython/core/interactiveshell.py:3141: SyntaxWarning: 'return' in a 'finally' block 136s return result 136s Setting up python3-nbconvert (7.16.6-1) ... 136s Setting up cpp (4:15.2.0-4ubuntu1) ... 136s Setting up g++-x86-64-linux-gnu (4:15.2.0-4ubuntu1) ... 136s Setting up g++-15 (15.2.0-11ubuntu1) ... 136s Setting up libspatialite8t64:amd64 (5.1.0-3ubuntu1) ... 136s Setting up libtool (2.5.4-9) ... 136s Setting up libubsan1-i386-cross (15.2.0-7ubuntu1cross1) ... 136s Setting up gcc (4:15.2.0-4ubuntu1) ... 136s Setting up dh-autoreconf (21) ... 136s Setting up libgcc-15-dev-i386-cross (15.2.0-7ubuntu1cross1) ... 136s Setting up libstdc++-15-dev-i386-cross (15.2.0-7ubuntu1cross1) ... 136s Setting up g++ (4:15.2.0-4ubuntu1) ... 136s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 136s Setting up build-essential (12.12ubuntu2) ... 136s Setting up gcc-15-i686-linux-gnu (15.2.0-7ubuntu1cross1) ... 136s Setting up debhelper (13.28ubuntu1) ... 136s Setting up g++-15-i686-linux-gnu (15.2.0-7ubuntu1cross1) ... 136s Setting up gcc-i686-linux-gnu (4:15.2.0-4ubuntu1) ... 136s Setting up g++-i686-linux-gnu (4:15.2.0-4ubuntu1) ... 136s Setting up pybuild-plugin-autopkgtest (7.20251231) ... 136s Setting up crossbuild-essential-i386 (12.12ubuntu2) ... 136s Setting up libgcc-s1:i386 (15.2.0-11ubuntu1) ... 136s Setting up libc6:i386 (2.42-2ubuntu4) ... 136s Setting up libstdc++6:i386 (15.2.0-11ubuntu1) ... 136s Setting up libitm1:i386 (15.2.0-11ubuntu1) ... 136s Setting up libheif-plugin-aomdec:amd64 (1.21.2-1) ... 136s Setting up libheif1:amd64 (1.21.2-1) ... 136s Setting up libcrypt1:i386 (1:4.5.1-1) ... 136s Setting up libgomp1:i386 (15.2.0-11ubuntu1) ... 136s Setting up libasan6:i386 (11.5.0-7ubuntu2) ... 136s Setting up libquadmath0:i386 (15.2.0-11ubuntu1) ... 136s Setting up libatomic1:i386 (15.2.0-11ubuntu1) ... 136s Setting up libgdal36:amd64 (3.10.3+dfsg-1build3) ... 136s Setting up libubsan1:i386 (15.2.0-11ubuntu1) ... 136s Setting up libgcc-11-dev:i386 (11.5.0-7ubuntu2) ... 136s Setting up libcrypt-dev:i386 (1:4.5.1-1) ... 136s Setting up libc6-dev:i386 (2.42-2ubuntu4) ... 136s Setting up libheif-plugin-libde265:amd64 (1.21.2-1) ... 136s Setting up python3-rasterio (1.4.3-2build2) ... 137s Setting up libstdc++-11-dev:i386 (11.5.0-7ubuntu2) ... 137s Processing triggers for install-info (7.2-5) ... 137s Processing triggers for libc-bin (2.42-2ubuntu4) ... 137s Processing triggers for systemd (259-1ubuntu2) ... 137s Processing triggers for man-db (2.13.1-1) ... 138s Processing triggers for sgml-base (1.31+nmu1) ... 139s Setting up docutils-common (0.22.4+dfsg-1) ... 139s Processing triggers for sgml-base (1.31+nmu1) ... 139s Setting up python3-docutils (0.22.4+dfsg-1) ... 139s Setting up python3-sphinx (8.2.3-12) ... 140s Setting up python3-sphinx-autobuild (2025.08.25-1) ... 140s Setting up python3-sphinx-design (0.6.1-2) ... 140s Setting up python3-nbsphinx (0.9.5+ds-1) ... 140s Setting up python3-pydata-sphinx-theme (0.16.1+dfsg-5) ... 142s autopkgtest [09:50:27]: test environment configured for cross building 142s autopkgtest [09:50:27]: test pybuild-autopkgtest: pybuild-autopkgtest 142s autopkgtest [09:50:27]: test pybuild-autopkgtest: [----------------------- 142s pybuild-autopkgtest 142s I: pybuild base:384: cd /tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build; python3.13 -m pytest tests 144s ============================= test session starts ============================== 144s platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0 144s rootdir: /tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build 144s configfile: pyproject.toml 144s plugins: typeguard-4.4.4, recording-0.13.4, anyio-4.11.0, requests_mock-1.12.1, mock-3.15.1 144s collected 1557 items 144s 144s tests/extensions/test_classification.py .................... [ 1%] 144s tests/extensions/test_custom.py ....... [ 1%] 144s tests/extensions/test_datacube.py ................................. [ 3%] 145s tests/extensions/test_eo.py .......................................... [ 6%] 145s tests/extensions/test_ext.py ........................................... [ 9%] 145s ....... [ 9%] 145s tests/extensions/test_file.py ................................. [ 11%] 145s tests/extensions/test_grid.py ............ [ 12%] 145s tests/extensions/test_mgrs.py ................... [ 13%] 145s tests/extensions/test_mlm.py ........................................... [ 16%] 145s ... [ 16%] 145s tests/extensions/test_pointcloud.py ...................... [ 18%] 146s tests/extensions/test_projection.py ................................... [ 20%] 146s tests/extensions/test_raster.py ......... [ 21%] 146s tests/extensions/test_render.py .................. [ 22%] 146s tests/extensions/test_sar.py ...................... [ 23%] 146s tests/extensions/test_sat.py .......................... [ 25%] 146s tests/extensions/test_scientific.py .................................... [ 27%] 146s . [ 27%] 146s tests/extensions/test_storage.py ................... [ 28%] 146s tests/extensions/test_table.py ......... [ 29%] 146s tests/extensions/test_timestamps.py ................. [ 30%] 146s tests/extensions/test_version.py .............................. [ 32%] 146s tests/extensions/test_view.py ....................... [ 33%] 147s tests/extensions/test_xarray_assets.py ..................... [ 35%] 147s tests/html/test_html.py .......... [ 35%] 147s tests/posix_paths/test_posix_paths.py ...ss.ss [ 36%] 147s tests/serialization/test_identify.py ................................... [ 38%] 147s ........................................................................ [ 43%] 147s .......................... [ 45%] 147s tests/serialization/test_migrate.py .................................... [ 47%] 147s ........................................................................ [ 51%] 147s ......................... [ 53%] 147s tests/test_asset.py ...............ssss [ 54%] 147s tests/test_cache.py .... [ 55%] 147s tests/test_catalog.py .................................................. [ 58%] 149s ........................................................................ [ 62%] 149s ................... [ 64%] 149s tests/test_collection.py ............................................... [ 67%] 149s ...... [ 67%] 150s tests/test_common_metadata.py ...................... [ 68%] 150s tests/test_item.py ..................................................... [ 72%] 150s [ 72%] 150s tests/test_item_assets.py ............. [ 73%] 150s tests/test_item_collection.py .................. [ 74%] 150s tests/test_layout.py ............................................. [ 77%] 150s tests/test_link.py ........................................... [ 79%] 150s tests/test_pystac_client.py s. [ 80%] 150s tests/test_stac_io.py ................ [ 81%] 150s tests/test_summaries.py ........... [ 81%] 150s tests/test_utils.py ................................ssssssss..s......... [ 85%] 151s ............................................................... [ 89%] 151s tests/test_version.py .. [ 89%] 159s tests/test_writing.py ..................... [ 90%] 159s tests/validation/test_schema_uri_map.py . [ 90%] 162s tests/validation/test_validate.py ...................................... [ 93%] 164s ........................................................................ [ 97%] 169s .................................. [100%] 169s 169s ====================== 1539 passed, 18 skipped in 26.07s ======================= 169s I: pybuild base:384: cd /tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build; python3.14 -m pytest tests 171s ============================= test session starts ============================== 171s platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 171s rootdir: /tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build 171s configfile: pyproject.toml 171s plugins: typeguard-4.4.4, recording-0.13.4, anyio-4.11.0, requests_mock-1.12.1, mock-3.15.1 171s collected 1557 items 171s 171s tests/extensions/test_classification.py ......EE.....E...... [ 1%] 171s tests/extensions/test_custom.py ....... [ 1%] 171s tests/extensions/test_datacube.py .......................E..EE..... [ 3%] 172s tests/extensions/test_eo.py .....EE.EE...............EE............... [ 6%] 172s tests/extensions/test_ext.py ........................................... [ 9%] 172s ....... [ 9%] 173s tests/extensions/test_file.py .....EEE.....EEEEE.EEEEE.......EE [ 11%] 173s tests/extensions/test_grid.py ..E.E....... [ 12%] 173s tests/extensions/test_mgrs.py ........E...EEE.... [ 13%] 173s tests/extensions/test_mlm.py .........................E...E............. [ 16%] 173s ... [ 16%] 174s tests/extensions/test_pointcloud.py ..EEEEEEE............. [ 18%] 174s tests/extensions/test_projection.py ..EEE.EE.EEEEE.........E........... [ 20%] 175s tests/extensions/test_raster.py .EE...... [ 21%] 175s tests/extensions/test_render.py ................EE [ 22%] 175s tests/extensions/test_sar.py .EE................... [ 23%] 176s tests/extensions/test_sat.py ...EEEEEEEEE..EE.......... [ 25%] 177s tests/extensions/test_scientific.py ...EEEEEEEEEE...EEEEEEEEEE.......... [ 27%] 177s . [ 27%] 177s tests/extensions/test_storage.py ..E............EEEE [ 28%] 177s tests/extensions/test_table.py E........ [ 29%] 177s tests/extensions/test_timestamps.py ..EEEE........... [ 30%] 178s tests/extensions/test_version.py ...EEEEEEEE......EE.EE....EE.. [ 32%] 179s tests/extensions/test_view.py ..EEEEEE............... [ 33%] 179s tests/extensions/test_xarray_assets.py ...........EE....EE.. [ 35%] 179s tests/html/test_html.py .......... [ 35%] 179s tests/posix_paths/test_posix_paths.py ...ss.ss [ 36%] 179s tests/serialization/test_identify.py ................................... [ 38%] 179s ........................................................................ [ 43%] 179s .......................... [ 45%] 179s tests/serialization/test_migrate.py .................................... [ 47%] 179s ........................................................................ [ 51%] 179s ......................... [ 53%] 179s tests/test_asset.py ...............ssss [ 54%] 179s tests/test_cache.py .... [ 55%] 180s tests/test_catalog.py ........E......................................... [ 58%] 181s ...........................EEEEEEEE.................................EE.. [ 62%] 181s ................... [ 64%] 181s tests/test_collection.py ............................................... [ 67%] 181s ...... [ 67%] 181s tests/test_common_metadata.py ...................... [ 68%] 181s tests/test_item.py ..........E.E..E....E......................E......... [ 72%] 181s [ 72%] 181s tests/test_item_assets.py ............. [ 73%] 181s tests/test_item_collection.py .................. [ 74%] 181s tests/test_layout.py ............................................. [ 77%] 181s tests/test_link.py ........................................... [ 79%] 181s tests/test_pystac_client.py s. [ 80%] 182s tests/test_stac_io.py ...........EE.EE [ 81%] 182s tests/test_summaries.py ........... [ 81%] 182s tests/test_utils.py ................................ssssssss..s......... [ 85%] 183s ............................................................... [ 89%] 183s tests/test_version.py .. [ 89%] 184s tests/test_writing.py EEEEEEEEEEEEEEEEEEEEE [ 90%] 184s tests/validation/test_schema_uri_map.py . [ 90%] 186s tests/validation/test_validate.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 93%] 191s EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE [ 97%] 193s EEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.... [100%] 193s 193s ==================================== ERRORS ==================================== 193s ____________________ ERROR at setup of test_apply_bitfields ____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_apply_classes _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________ ERROR at setup of test_validate_classification ________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_classification' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________________ ERROR at setup of test_validate ________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_set_variables _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________________ ERROR at setup of test_set_dimensions _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_datacube' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________________ ERROR at setup of test_validate_eo ______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________________________ ERROR at setup of test_bands _________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________________ ERROR at setup of test_asset_bands ______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________________ ERROR at setup of test_cloud_cover ______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________ ERROR at setup of test_set_field[cloud_cover-7.8] _______________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________ ERROR at setup of test_set_field[snow_cover-99] ________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_eo' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_validate_item _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __________________ ERROR at setup of test_validate_collection __________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ___________________ ERROR at setup of test_validate_catalog ____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________ ERROR at setup of test_set_field_on_asset[thumbnail-size-1] __________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ___ ERROR at setup of test_set_field_on_asset[measurement-header_size-8192] ____ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of test_set_field_on_asset[thumbnail-checksum-90e40210163700a8a6501eccd00b6d3b44ddaed0] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of test_set_field_on_asset[thumbnail-byte_order-little-endian] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of test_set_field_on_asset[calibrations-local_path-different-file.xml] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________ ERROR at setup of test_set_field_on_link[about-size-129302] __________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of test_set_field_on_link[about-header_size-4092] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of test_set_field_on_link[about-checksum-90e40210163700a8a6501eccd00b6d3b44ddaedb] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____ ERROR at setup of test_set_field_on_link[about-byte_order-big-endian] _____ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of test_set_field_on_link[about-local_path-a/path] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __________________ ERROR at setup of test_migrate_from_v2_0_0 __________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __________________ ERROR at setup of test_migrate_from_v1_0_0 __________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_file' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________________ ERROR at setup of test_attributes _______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_grid' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________________ ERROR at setup of test_modify _________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_grid' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________________ ERROR at setup of test_validate ________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________ ERROR at setup of test_set_field[latitude_band-C] _______________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________ ERROR at setup of test_set_field[grid_square-ZA] _______________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________ ERROR at setup of test_set_field[utm_zone-59] _________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_mgrs' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________________________ ERROR at setup of test_apply _________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_mlm' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_validate_mlm ______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_mlm' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __________________ ERROR at setup of test_validate_pointcloud __________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________________________ ERROR at setup of test_count _________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________________________ ERROR at setup of test_type __________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________________ ERROR at setup of test_encoding ________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________________ ERROR at setup of test_schemas ________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________________ ERROR at setup of test_statistics _______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________________ ERROR at setup of test_density ________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_pointcloud' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_partial_apply _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_validate_proj _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________________________ ERROR at setup of test_epsg __________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________________________ ERROR at setup of test_wkt2 __________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________________ ERROR at setup of test_projjson ________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________________ ERROR at setup of test_geometry ________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________________________ ERROR at setup of test_bbox __________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________________ ERROR at setup of test_centroid ________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________________________ ERROR at setup of test_shape _________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________________ ERROR at setup of test_transform _______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_get_set_code ______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_projection' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________________ ERROR at setup of test_validate_raster ____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_raster' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________________ ERROR at setup of test_asset_bands ______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_raster' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_item_validate _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_render' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __________________ ERROR at setup of test_collection_validate __________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_render' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________________ ERROR at setup of test_required ________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_sar' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __________________________ ERROR at setup of test_all __________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_sar' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_no_args_fails _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________________ ERROR at setup of test_orbit_state ______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________________ ERROR at setup of test_relative_orbit _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________________ ERROR at setup of test_absolute_orbit _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_anx_datetime ______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ___________ ERROR at setup of test_platform_international_designator ___________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________ ERROR at setup of test_relative_orbit_no_negative _______________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________________________ ERROR at setup of test_both __________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________________ ERROR at setup of test_modify _________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ___________________ ERROR at setup of test_clear_orbit_state ___________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________________ ERROR at setup of test_clear_relative_orbit __________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_sat' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __________________________ ERROR at setup of test_doi __________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________________ ERROR at setup of test_citation ________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ___________________ ERROR at setup of test_publications_one ____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_publications ______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________ ERROR at setup of test_remove_publication_one _________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________ ERROR at setup of test_remove_all_publications_one ______________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________ ERROR at setup of test_remove_publication_forward _______________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________ ERROR at setup of test_remove_publication_reverse _______________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ___________ ERROR at setup of test_remove_all_publications_with_some ___________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ___________ ERROR at setup of test_remove_all_publications_with_none ___________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________________ ERROR at setup of test_collection_doi _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __________________ ERROR at setup of test_collection_citation __________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________ ERROR at setup of test_collection_publications_one ______________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________ ERROR at setup of test_collection_publications ________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ___________ ERROR at setup of test_collection_remove_publication_one ___________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________ ERROR at setup of test_collection_remove_all_publications_one _________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________ ERROR at setup of test_collection_remove_publication_forward _________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________ ERROR at setup of test_collection_remove_publication_reverse _________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____ ERROR at setup of test_collection_remove_all_publications_with_some ______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____ ERROR at setup of test_collection_remove_all_publications_with_none ______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_scientific' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ___________________ ERROR at setup of test_validate_storage ____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________________ ERROR at setup of test_asset_platform _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_asset_region ______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________________ ERROR at setup of test_asset_requester_pays __________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________________ ERROR at setup of test_asset_tier _______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_storage' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________________ ERROR at setup of test_validate ________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_table' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __________________ ERROR at setup of test_validate_timestamps __________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________________ ERROR at setup of test_expires ________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________________ ERROR at setup of test_published _______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________________ ERROR at setup of test_unpublished ______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_timestamps' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________________ ERROR at setup of test_add_version ______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________________ ERROR at setup of test_version_in_properties _________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________ ERROR at setup of test_add_not_deprecated_version _______________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________ ERROR at setup of test_add_deprecated_version _________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________________ ERROR at setup of test_latest _________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________________ ERROR at setup of test_predecessor ______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________________ ERROR at setup of test_successor _______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________________ ERROR at setup of test_all_links _______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________ ERROR at setup of test_collection_add_version _________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________ ERROR at setup of test_collection_validate_all ________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __________________ ERROR at setup of test_catalog_add_version __________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________________ ERROR at setup of test_catalog_validate_all __________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ___________________ ERROR at setup of test_optional_version ____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________________ ERROR at setup of test_assets _________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_version' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_validate_view _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________________ ERROR at setup of test_off_nadir _______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________________ ERROR at setup of test_incidence_angle ____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________________ ERROR at setup of test_azimuth ________________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______________________ ERROR at setup of test_sun_azimuth ______________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_sun_elevation _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_view' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_item_validate _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __________________ ERROR at setup of test_collection_validate __________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ___________ ERROR at setup of test_set_field[storage_options-value0] ___________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________ ERROR at setup of test_set_field[open_kwargs-value1] _____________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/extensions/cassettes/test_xarray_assets' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________ ERROR at setup of TestCatalog.test_read_remote ________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_catalog' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________ ERROR at setup of TestCatalog.test_validate_all[cat0] _____________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_catalog' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________ ERROR at setup of TestCatalog.test_validate_all[cat1] _____________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_catalog' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________ ERROR at setup of TestCatalog.test_validate_all[cat2] _____________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_catalog' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________ ERROR at setup of TestCatalog.test_validate_all[cat3] _____________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_catalog' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________ ERROR at setup of TestCatalog.test_validate_all[cat4] _____________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_catalog' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________ ERROR at setup of TestCatalog.test_validate_all[cat5] _____________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_catalog' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________ ERROR at setup of TestCatalog.test_validate_all[cat6] _____________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_catalog' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ___________ ERROR at setup of TestCatalog.test_validate_all_invalid ____________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_catalog' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________ ERROR at setup of test_validate_all_with_max_n ________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_catalog' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________ ERROR at setup of test_validate_all_with_recusive_off _____________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_catalog' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_null_datetime _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_item' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________ ERROR at setup of test_null_datetime_constructor _______________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_item' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_null_geometry _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_item' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ________________ ERROR at setup of test_relative_extension_path ________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_item' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________ ERROR at setup of test_non_hierarchical_relative_link _____________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_item' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________________ ERROR at setup of test_retry_stac_io _____________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ___________________ ERROR at setup of test_retry_stac_io_404 ___________________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ____________ ERROR at setup of test_urls_with_non_ascii_characters _____________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____________ ERROR at setup of test_proj_json_schema_is_readable ______________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_stac_io' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog0] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog1] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog2] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog3] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog4] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog5] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of TestSTACWriting.test_testcases[ABSOLUTE_PUBLISHED-catalog6] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog0] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog1] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog2] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog3] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog4] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog5] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of TestSTACWriting.test_testcases[RELATIVE_PUBLISHED-catalog6] _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog0] ___ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog1] ___ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog2] ___ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog3] ___ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog4] ___ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog5] ___ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s __ ERROR at setup of TestSTACWriting.test_testcases[SELF_CONTAINED-catalog6] ___ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/cassettes/test_writing' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _________ ERROR at setup of TestValidate.test_validate_current_version _________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example0] ________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example1] ________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example2] ________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example3] ________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example4] ________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example5] ________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example6] ________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example7] ________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example8] ________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example9] ________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example10] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example11] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example12] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example13] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example14] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example15] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example16] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example17] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example18] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example19] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example20] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example21] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example22] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example23] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example24] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example25] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example26] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example27] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example28] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example29] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example30] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example31] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example32] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example33] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example34] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example35] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example36] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example37] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example38] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example39] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example40] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example41] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example42] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example43] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example44] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example45] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example46] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example47] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example48] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example49] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example50] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example51] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example52] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example53] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example54] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example55] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example56] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example57] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example58] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example59] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example60] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example61] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example62] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example63] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example64] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example65] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example66] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example67] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example68] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example69] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example70] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example71] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example72] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example73] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example74] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example75] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example76] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example77] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example78] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example79] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example80] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example81] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example82] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example83] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example84] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example85] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example86] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example87] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example88] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example89] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example90] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example91] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example92] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example93] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example94] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example95] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example96] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example97] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example98] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_examples[example99] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example100] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example101] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example102] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example103] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example104] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example105] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example106] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example107] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example108] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example109] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example110] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example111] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example112] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example113] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example114] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example115] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example116] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example117] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example118] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example119] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example120] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example121] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example122] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example123] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_examples[example124] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_error_contains_href _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _____ ERROR at setup of TestValidate.test_validate_all_deprecated_dict_arg _____ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of TestValidate.test_validate_all_deprecated_dict_arg_missing_href _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______ ERROR at setup of TestValidate.test_validate_all_unexpected_href _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _______________ ERROR at setup of TestValidate.test_validate_all _______________ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case0] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case1] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case2] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case3] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case4] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case5] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s ______ ERROR at setup of TestValidate.test_validate_all_dict[test_case6] _______ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 193s ----------------- 193s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 193s see the base classes that most other pyparsing 193s classes inherit from. Use the docstrings for examples of how to: 193s 193s - construct literal match expressions from :class:`Literal` and 193s :class:`CaselessLiteral` classes 193s - construct character word-group expressions using the :class:`Word` 193s class 193s - see how to create repetitive expressions using :class:`ZeroOrMore` 193s and :class:`OneOrMore` classes 193s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 193s and :class:`'&'` operators to combine simple expressions into 193s more complex ones 193s - associate names with your parsed results using 193s :class:`ParserElement.set_results_name` 193s - access the parsed data, which is returned as a :class:`ParseResults` 193s object 193s - find some helpful expression short-cuts like :class:`DelimitedList` 193s and :class:`one_of` 193s - find more useful common expressions in the :class:`pyparsing_common` 193s namespace class 193s """ 193s from typing import NamedTuple 193s 193s 193s class version_info(NamedTuple): 193s major: int 193s minor: int 193s micro: int 193s releaselevel: str 193s serial: int 193s 193s @property 193s def __version__(self): 193s return ( 193s f"{self.major}.{self.minor}.{self.micro}" 193s + ( 193s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 193s "", 193s )[self.releaselevel == "final"] 193s ) 193s 193s def __str__(self): 193s return f"{__name__} {self.__version__} / {__version_time__}" 193s 193s def __repr__(self): 193s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 193s 193s 193s __version_info__ = version_info(3, 1, 3, "final", 1) 193s __version_time__ = "24 Aug 2024 23:47 UTC" 193s __version__ = __version_info__.__version__ 193s __versionTime__ = __version_time__ 193s __author__ = "Paul McGuire " 193s 193s from .util import * 193s from .exceptions import * 193s from .actions import * 193s > from .core import __diag__, __compat__ 193s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 193s E return f"{type(self).__name__}: {retString}" 193s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 193s E SyntaxError: 'return' in a 'finally' block 193s 193s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 193s _ ERROR at setup of TestValidate.test_validates_geojson_with_tuple_coordinates _ 193s 193s request = > 193s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 193s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 193s record_mode = 'none', disable_recording = False 193s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 193s 193s @pytest.fixture(autouse=True) # type: ignore 193s def vcr( 193s request: SubRequest, 193s vcr_markers: List[Mark], 193s vcr_cassette_dir: str, 193s record_mode: str, 193s disable_recording: bool, 193s pytestconfig: Config, 193s ) -> Iterator[Optional["Cassette"]]: 193s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 193s if disable_recording: 193s yield None 193s elif vcr_markers: 193s > from ._vcr import use_cassette 193s 193s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 193s from vcr import VCR 193s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 193s from .config import VCR 193s /usr/lib/python3/dist-packages/vcr/config.py:10: in 193s from .cassette import Cassette 193s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 193s from .patch import CassettePatcherBuilder 193s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 193s import httplib2 193s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 193s from . import auth 193s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 193s import pyparsing as pp 193s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 193s 193s # module pyparsing.py 193s # 193s # Copyright (c) 2003-2022 Paul T. McGuire 193s # 193s # Permission is hereby granted, free of charge, to any person obtaining 193s # a copy of this software and associated documentation files (the 193s # "Software"), to deal in the Software without restriction, including 193s # without limitation the rights to use, copy, modify, merge, publish, 193s # distribute, sublicense, and/or sell copies of the Software, and to 193s # permit persons to whom the Software is furnished to do so, subject to 193s # the following conditions: 193s # 193s # The above copyright notice and this permission notice shall be 193s # included in all copies or substantial portions of the Software. 193s # 193s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 193s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 193s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 193s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 193s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 193s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 193s # 193s 193s __doc__ = """ 193s pyparsing module - Classes and methods to define and execute parsing grammars 193s ============================================================================= 193s 193s The pyparsing module is an alternative approach to creating and 193s executing simple grammars, vs. the traditional lex/yacc approach, or the 193s use of regular expressions. With pyparsing, you don't need to learn 193s a new syntax for defining grammars or matching expressions - the parsing 193s module provides a library of classes that you use to construct the 193s grammar directly in Python. 193s 193s Here is a program to parse "Hello, World!" (or any greeting of the form 193s ``", !"``), built up using :class:`Word`, 193s :class:`Literal`, and :class:`And` elements 193s (the :meth:`'+'` operators create :class:`And` expressions, 193s and the strings are auto-converted to :class:`Literal` expressions):: 193s 193s from pyparsing import Word, alphas 193s 193s # define grammar of a greeting 193s greet = Word(alphas) + "," + Word(alphas) + "!" 193s 193s hello = "Hello, World!" 193s print(hello, "->", greet.parse_string(hello)) 193s 193s The program outputs the following:: 193s 193s Hello, World! -> ['Hello', ',', 'World', '!'] 193s 193s The Python representation of the grammar is quite readable, owing to the 193s self-explanatory class names, and the use of :class:`'+'`, 193s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 193s 193s The :class:`ParseResults` object returned from 193s :class:`ParserElement.parse_string` can be 193s accessed as a nested list, a dictionary, or an object with named 193s attributes. 193s 193s The pyparsing module handles some of the problems that are typically 193s vexing when writing text parsers: 193s 193s - extra or missing whitespace (the above program will also handle 193s "Hello,World!", "Hello , World !", etc.) 193s - quoted strings 193s - embedded comments 193s 193s 193s Getting Started - 194s ----------------- 194s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 194s see the base classes that most other pyparsing 194s classes inherit from. Use the docstrings for examples of how to: 194s 194s - construct literal match expressions from :class:`Literal` and 194s :class:`CaselessLiteral` classes 194s - construct character word-group expressions using the :class:`Word` 194s class 194s - see how to create repetitive expressions using :class:`ZeroOrMore` 194s and :class:`OneOrMore` classes 194s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 194s and :class:`'&'` operators to combine simple expressions into 194s more complex ones 194s - associate names with your parsed results using 194s :class:`ParserElement.set_results_name` 194s - access the parsed data, which is returned as a :class:`ParseResults` 194s object 194s - find some helpful expression short-cuts like :class:`DelimitedList` 194s and :class:`one_of` 194s - find more useful common expressions in the :class:`pyparsing_common` 194s namespace class 194s """ 194s from typing import NamedTuple 194s 194s 194s class version_info(NamedTuple): 194s major: int 194s minor: int 194s micro: int 194s releaselevel: str 194s serial: int 194s 194s @property 194s def __version__(self): 194s return ( 194s f"{self.major}.{self.minor}.{self.micro}" 194s + ( 194s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 194s "", 194s )[self.releaselevel == "final"] 194s ) 194s 194s def __str__(self): 194s return f"{__name__} {self.__version__} / {__version_time__}" 194s 194s def __repr__(self): 194s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 194s 194s 194s __version_info__ = version_info(3, 1, 3, "final", 1) 194s __version_time__ = "24 Aug 2024 23:47 UTC" 194s __version__ = __version_info__.__version__ 194s __versionTime__ = __version_time__ 194s __author__ = "Paul McGuire " 194s 194s from .util import * 194s from .exceptions import * 194s from .actions import * 194s > from .core import __diag__, __compat__ 194s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 194s E return f"{type(self).__name__}: {retString}" 194s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 194s E SyntaxError: 'return' in a 'finally' block 194s 194s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 194s ________ ERROR at setup of TestValidate.test_validate_custom_validator _________ 194s 194s request = > 194s vcr_markers = [Mark(name='vcr', args=(), kwargs={})] 194s vcr_cassette_dir = '/tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build/tests/validation/cassettes/test_validate' 194s record_mode = 'none', disable_recording = False 194s pytestconfig = <_pytest.config.Config object at 0x7eeb955bc6e0> 194s 194s @pytest.fixture(autouse=True) # type: ignore 194s def vcr( 194s request: SubRequest, 194s vcr_markers: List[Mark], 194s vcr_cassette_dir: str, 194s record_mode: str, 194s disable_recording: bool, 194s pytestconfig: Config, 194s ) -> Iterator[Optional["Cassette"]]: 194s """Install a cassette if a test is marked with `pytest.mark.vcr`.""" 194s if disable_recording: 194s yield None 194s elif vcr_markers: 194s > from ._vcr import use_cassette 194s 194s /usr/lib/python3/dist-packages/pytest_recording/plugin.py:154: 194s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 194s /usr/lib/python3/dist-packages/pytest_recording/_vcr.py:10: in 194s from vcr import VCR 194s /usr/lib/python3/dist-packages/vcr/__init__.py:4: in 194s from .config import VCR 194s /usr/lib/python3/dist-packages/vcr/config.py:10: in 194s from .cassette import Cassette 194s /usr/lib/python3/dist-packages/vcr/cassette.py:13: in 194s from .patch import CassettePatcherBuilder 194s /usr/lib/python3/dist-packages/vcr/patch.py:63: in 194s import httplib2 194s /usr/lib/python3/dist-packages/httplib2/__init__.py:53: in 194s from . import auth 194s /usr/lib/python3/dist-packages/httplib2/auth.py:4: in 194s import pyparsing as pp 194s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 194s 194s # module pyparsing.py 194s # 194s # Copyright (c) 2003-2022 Paul T. McGuire 194s # 194s # Permission is hereby granted, free of charge, to any person obtaining 194s # a copy of this software and associated documentation files (the 194s # "Software"), to deal in the Software without restriction, including 194s # without limitation the rights to use, copy, modify, merge, publish, 194s # distribute, sublicense, and/or sell copies of the Software, and to 194s # permit persons to whom the Software is furnished to do so, subject to 194s # the following conditions: 194s # 194s # The above copyright notice and this permission notice shall be 194s # included in all copies or substantial portions of the Software. 194s # 194s # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 194s # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 194s # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 194s # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 194s # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 194s # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 194s # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 194s # 194s 194s __doc__ = """ 194s pyparsing module - Classes and methods to define and execute parsing grammars 194s ============================================================================= 194s 194s The pyparsing module is an alternative approach to creating and 194s executing simple grammars, vs. the traditional lex/yacc approach, or the 194s use of regular expressions. With pyparsing, you don't need to learn 194s a new syntax for defining grammars or matching expressions - the parsing 194s module provides a library of classes that you use to construct the 194s grammar directly in Python. 194s 194s Here is a program to parse "Hello, World!" (or any greeting of the form 194s ``", !"``), built up using :class:`Word`, 194s :class:`Literal`, and :class:`And` elements 194s (the :meth:`'+'` operators create :class:`And` expressions, 194s and the strings are auto-converted to :class:`Literal` expressions):: 194s 194s from pyparsing import Word, alphas 194s 194s # define grammar of a greeting 194s greet = Word(alphas) + "," + Word(alphas) + "!" 194s 194s hello = "Hello, World!" 194s print(hello, "->", greet.parse_string(hello)) 194s 194s The program outputs the following:: 194s 194s Hello, World! -> ['Hello', ',', 'World', '!'] 194s 194s The Python representation of the grammar is quite readable, owing to the 194s self-explanatory class names, and the use of :class:`'+'`, 194s :class:`'|'`, :class:`'^'` and :class:`'&'` operators. 194s 194s The :class:`ParseResults` object returned from 194s :class:`ParserElement.parse_string` can be 194s accessed as a nested list, a dictionary, or an object with named 194s attributes. 194s 194s The pyparsing module handles some of the problems that are typically 194s vexing when writing text parsers: 194s 194s - extra or missing whitespace (the above program will also handle 194s "Hello,World!", "Hello , World !", etc.) 194s - quoted strings 194s - embedded comments 194s 194s 194s Getting Started - 194s ----------------- 194s Visit the classes :class:`ParserElement` and :class:`ParseResults` to 194s see the base classes that most other pyparsing 194s classes inherit from. Use the docstrings for examples of how to: 194s 194s - construct literal match expressions from :class:`Literal` and 194s :class:`CaselessLiteral` classes 194s - construct character word-group expressions using the :class:`Word` 194s class 194s - see how to create repetitive expressions using :class:`ZeroOrMore` 194s and :class:`OneOrMore` classes 194s - use :class:`'+'`, :class:`'|'`, :class:`'^'`, 194s and :class:`'&'` operators to combine simple expressions into 194s more complex ones 194s - associate names with your parsed results using 194s :class:`ParserElement.set_results_name` 194s - access the parsed data, which is returned as a :class:`ParseResults` 194s object 194s - find some helpful expression short-cuts like :class:`DelimitedList` 194s and :class:`one_of` 194s - find more useful common expressions in the :class:`pyparsing_common` 194s namespace class 194s """ 194s from typing import NamedTuple 194s 194s 194s class version_info(NamedTuple): 194s major: int 194s minor: int 194s micro: int 194s releaselevel: str 194s serial: int 194s 194s @property 194s def __version__(self): 194s return ( 194s f"{self.major}.{self.minor}.{self.micro}" 194s + ( 194s f"{'r' if self.releaselevel[0] == 'c' else ''}{self.releaselevel[0]}{self.serial}", 194s "", 194s )[self.releaselevel == "final"] 194s ) 194s 194s def __str__(self): 194s return f"{__name__} {self.__version__} / {__version_time__}" 194s 194s def __repr__(self): 194s return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})" 194s 194s 194s __version_info__ = version_info(3, 1, 3, "final", 1) 194s __version_time__ = "24 Aug 2024 23:47 UTC" 194s __version__ = __version_info__.__version__ 194s __versionTime__ = __version_time__ 194s __author__ = "Paul McGuire " 194s 194s from .util import * 194s from .exceptions import * 194s from .actions import * 194s > from .core import __diag__, __compat__ 194s E File "/usr/lib/python3/dist-packages/pyparsing/core.py", line 5637 194s E return f"{type(self).__name__}: {retString}" 194s E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 194s E SyntaxError: 'return' in a 'finally' block 194s 194s /usr/lib/python3/dist-packages/pyparsing/__init__.py:132: SyntaxError 194s =========================== short test summary info ============================ 194s ERROR tests/extensions/test_classification.py::test_apply_bitfields - File ... 194s ERROR tests/extensions/test_classification.py::test_apply_classes - File "/... 194s ERROR tests/extensions/test_classification.py::test_validate_classification 194s ERROR tests/extensions/test_datacube.py::test_validate - File "/usr/lib/pyt... 194s ERROR tests/extensions/test_datacube.py::test_set_variables - File "/usr/li... 194s ERROR tests/extensions/test_datacube.py::test_set_dimensions - File "/usr/l... 194s ERROR tests/extensions/test_eo.py::test_validate_eo - File "/usr/lib/python... 194s ERROR tests/extensions/test_eo.py::test_bands - File "/usr/lib/python3/dist... 194s ERROR tests/extensions/test_eo.py::test_asset_bands - File "/usr/lib/python... 194s ERROR tests/extensions/test_eo.py::test_cloud_cover - File "/usr/lib/python... 194s ERROR tests/extensions/test_eo.py::test_set_field[cloud_cover-7.8] - File "... 194s ERROR tests/extensions/test_eo.py::test_set_field[snow_cover-99] - File "/u... 194s ERROR tests/extensions/test_file.py::test_validate_item - File "/usr/lib/py... 194s ERROR tests/extensions/test_file.py::test_validate_collection - File "/usr/... 194s ERROR tests/extensions/test_file.py::test_validate_catalog - File "/usr/lib... 194s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-size-1] 194s ERROR tests/extensions/test_file.py::test_set_field_on_asset[measurement-header_size-8192] 194s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-checksum-90e40210163700a8a6501eccd00b6d3b44ddaed0] 194s ERROR tests/extensions/test_file.py::test_set_field_on_asset[thumbnail-byte_order-little-endian] 194s ERROR tests/extensions/test_file.py::test_set_field_on_asset[calibrations-local_path-different-file.xml] 194s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-size-129302] 194s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-header_size-4092] 194s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-checksum-90e40210163700a8a6501eccd00b6d3b44ddaedb] 194s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-byte_order-big-endian] 194s ERROR tests/extensions/test_file.py::test_set_field_on_link[about-local_path-a/path] 194s ERROR tests/extensions/test_file.py::test_migrate_from_v2_0_0 - File "/usr/... 194s ERROR tests/extensions/test_file.py::test_migrate_from_v1_0_0 - File "/usr/... 194s ERROR tests/extensions/test_grid.py::test_attributes - File "/usr/lib/pytho... 194s ERROR tests/extensions/test_grid.py::test_modify - File "/usr/lib/python3/d... 194s ERROR tests/extensions/test_mgrs.py::test_validate - File "/usr/lib/python3... 194s ERROR tests/extensions/test_mgrs.py::test_set_field[latitude_band-C] - File... 194s ERROR tests/extensions/test_mgrs.py::test_set_field[grid_square-ZA] - File ... 194s ERROR tests/extensions/test_mgrs.py::test_set_field[utm_zone-59] - File "/u... 194s ERROR tests/extensions/test_mlm.py::test_apply - File "/usr/lib/python3/dis... 194s ERROR tests/extensions/test_mlm.py::test_validate_mlm - File "/usr/lib/pyth... 194s ERROR tests/extensions/test_pointcloud.py::test_validate_pointcloud - File ... 194s ERROR tests/extensions/test_pointcloud.py::test_count - File "/usr/lib/pyth... 194s ERROR tests/extensions/test_pointcloud.py::test_type - File "/usr/lib/pytho... 194s ERROR tests/extensions/test_pointcloud.py::test_encoding - File "/usr/lib/p... 194s ERROR tests/extensions/test_pointcloud.py::test_schemas - File "/usr/lib/py... 194s ERROR tests/extensions/test_pointcloud.py::test_statistics - File "/usr/lib... 194s ERROR tests/extensions/test_pointcloud.py::test_density - File "/usr/lib/py... 194s ERROR tests/extensions/test_projection.py::test_partial_apply - File "/usr/... 194s ERROR tests/extensions/test_projection.py::test_validate_proj - File "/usr/... 194s ERROR tests/extensions/test_projection.py::test_epsg - File "/usr/lib/pytho... 194s ERROR tests/extensions/test_projection.py::test_wkt2 - File "/usr/lib/pytho... 194s ERROR tests/extensions/test_projection.py::test_projjson - File "/usr/lib/p... 194s ERROR tests/extensions/test_projection.py::test_geometry - File "/usr/lib/p... 194s ERROR tests/extensions/test_projection.py::test_bbox - File "/usr/lib/pytho... 194s ERROR tests/extensions/test_projection.py::test_centroid - File "/usr/lib/p... 194s ERROR tests/extensions/test_projection.py::test_shape - File "/usr/lib/pyth... 194s ERROR tests/extensions/test_projection.py::test_transform - File "/usr/lib/... 194s ERROR tests/extensions/test_projection.py::test_get_set_code - File "/usr/l... 194s ERROR tests/extensions/test_raster.py::test_validate_raster - File "/usr/li... 194s ERROR tests/extensions/test_raster.py::test_asset_bands - File "/usr/lib/py... 194s ERROR tests/extensions/test_render.py::test_item_validate - File "/usr/lib/... 194s ERROR tests/extensions/test_render.py::test_collection_validate - File "/us... 194s ERROR tests/extensions/test_sar.py::test_required - File "/usr/lib/python3/... 194s ERROR tests/extensions/test_sar.py::test_all - File "/usr/lib/python3/dist-... 194s ERROR tests/extensions/test_sat.py::test_no_args_fails - File "/usr/lib/pyt... 194s ERROR tests/extensions/test_sat.py::test_orbit_state - File "/usr/lib/pytho... 194s ERROR tests/extensions/test_sat.py::test_relative_orbit - File "/usr/lib/py... 194s ERROR tests/extensions/test_sat.py::test_absolute_orbit - File "/usr/lib/py... 194s ERROR tests/extensions/test_sat.py::test_anx_datetime - File "/usr/lib/pyth... 194s ERROR tests/extensions/test_sat.py::test_platform_international_designator - ... 194s ERROR tests/extensions/test_sat.py::test_relative_orbit_no_negative - File ... 194s ERROR tests/extensions/test_sat.py::test_both - File "/usr/lib/python3/dist... 194s ERROR tests/extensions/test_sat.py::test_modify - File "/usr/lib/python3/di... 194s ERROR tests/extensions/test_sat.py::test_clear_orbit_state - File "/usr/lib... 194s ERROR tests/extensions/test_sat.py::test_clear_relative_orbit - File "/usr/... 194s ERROR tests/extensions/test_scientific.py::test_doi - File "/usr/lib/python... 194s ERROR tests/extensions/test_scientific.py::test_citation - File "/usr/lib/p... 194s ERROR tests/extensions/test_scientific.py::test_publications_one - File "/u... 194s ERROR tests/extensions/test_scientific.py::test_publications - File "/usr/l... 194s ERROR tests/extensions/test_scientific.py::test_remove_publication_one - Fi... 194s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_one 194s ERROR tests/extensions/test_scientific.py::test_remove_publication_forward - ... 194s ERROR tests/extensions/test_scientific.py::test_remove_publication_reverse - ... 194s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_with_some 194s ERROR tests/extensions/test_scientific.py::test_remove_all_publications_with_none 194s ERROR tests/extensions/test_scientific.py::test_collection_doi - File "/usr... 194s ERROR tests/extensions/test_scientific.py::test_collection_citation - File ... 194s ERROR tests/extensions/test_scientific.py::test_collection_publications_one 194s ERROR tests/extensions/test_scientific.py::test_collection_publications - F... 194s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_one 194s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_one 194s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_forward 194s ERROR tests/extensions/test_scientific.py::test_collection_remove_publication_reverse 194s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_with_some 194s ERROR tests/extensions/test_scientific.py::test_collection_remove_all_publications_with_none 194s ERROR tests/extensions/test_storage.py::test_validate_storage - File "/usr/... 194s ERROR tests/extensions/test_storage.py::test_asset_platform - File "/usr/li... 194s ERROR tests/extensions/test_storage.py::test_asset_region - File "/usr/lib/... 194s ERROR tests/extensions/test_storage.py::test_asset_requester_pays - File "/... 194s ERROR tests/extensions/test_storage.py::test_asset_tier - File "/usr/lib/py... 194s ERROR tests/extensions/test_table.py::test_validate - File "/usr/lib/python... 194s ERROR tests/extensions/test_timestamps.py::test_validate_timestamps - File ... 194s ERROR tests/extensions/test_timestamps.py::test_expires - File "/usr/lib/py... 194s ERROR tests/extensions/test_timestamps.py::test_published - File "/usr/lib/... 194s ERROR tests/extensions/test_timestamps.py::test_unpublished - File "/usr/li... 194s ERROR tests/extensions/test_version.py::test_add_version - File "/usr/lib/p... 194s ERROR tests/extensions/test_version.py::test_version_in_properties - File "... 194s ERROR tests/extensions/test_version.py::test_add_not_deprecated_version - F... 194s ERROR tests/extensions/test_version.py::test_add_deprecated_version - File ... 194s ERROR tests/extensions/test_version.py::test_latest - File "/usr/lib/python... 194s ERROR tests/extensions/test_version.py::test_predecessor - File "/usr/lib/p... 194s ERROR tests/extensions/test_version.py::test_successor - File "/usr/lib/pyt... 194s ERROR tests/extensions/test_version.py::test_all_links - File "/usr/lib/pyt... 194s ERROR tests/extensions/test_version.py::test_collection_add_version - File ... 194s ERROR tests/extensions/test_version.py::test_collection_validate_all - File... 194s ERROR tests/extensions/test_version.py::test_catalog_add_version - File "/u... 194s ERROR tests/extensions/test_version.py::test_catalog_validate_all - File "/... 194s ERROR tests/extensions/test_version.py::test_optional_version - File "/usr/... 194s ERROR tests/extensions/test_version.py::test_assets - File "/usr/lib/python... 194s ERROR tests/extensions/test_view.py::test_validate_view - File "/usr/lib/py... 194s ERROR tests/extensions/test_view.py::test_off_nadir - File "/usr/lib/python... 194s ERROR tests/extensions/test_view.py::test_incidence_angle - File "/usr/lib/... 194s ERROR tests/extensions/test_view.py::test_azimuth - File "/usr/lib/python3/... 194s ERROR tests/extensions/test_view.py::test_sun_azimuth - File "/usr/lib/pyth... 194s ERROR tests/extensions/test_view.py::test_sun_elevation - File "/usr/lib/py... 194s ERROR tests/extensions/test_xarray_assets.py::test_item_validate - File "/u... 194s ERROR tests/extensions/test_xarray_assets.py::test_collection_validate - Fi... 194s ERROR tests/extensions/test_xarray_assets.py::test_set_field[storage_options-value0] 194s ERROR tests/extensions/test_xarray_assets.py::test_set_field[open_kwargs-value1] 194s ERROR tests/test_catalog.py::TestCatalog::test_read_remote - File "/usr/lib... 194s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat0] - File "/... 194s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat1] - File "/... 194s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat2] - File "/... 194s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat3] - File "/... 194s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat4] - File "/... 194s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat5] - File "/... 194s ERROR tests/test_catalog.py::TestCatalog::test_validate_all[cat6] - File "/... 194s ERROR tests/test_catalog.py::TestCatalog::test_validate_all_invalid - File ... 194s ERROR tests/test_catalog.py::test_validate_all_with_max_n - File "/usr/lib/... 194s ERROR tests/test_catalog.py::test_validate_all_with_recusive_off - File "/u... 194s ERROR tests/test_item.py::test_null_datetime - File "/usr/lib/python3/dist-... 194s ERROR tests/test_item.py::test_null_datetime_constructor - File "/usr/lib/p... 194s ERROR tests/test_item.py::test_null_geometry - File "/usr/lib/python3/dist-... 194s ERROR tests/test_item.py::test_relative_extension_path - File "/usr/lib/pyt... 194s ERROR tests/test_item.py::test_non_hierarchical_relative_link - File "/usr/... 194s ERROR tests/test_stac_io.py::test_retry_stac_io - File "/usr/lib/python3/di... 194s ERROR tests/test_stac_io.py::test_retry_stac_io_404 - File "/usr/lib/python... 194s ERROR tests/test_stac_io.py::test_urls_with_non_ascii_characters - File "/u... 194s ERROR tests/test_stac_io.py::test_proj_json_schema_is_readable - File "/usr... 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog0] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog1] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog2] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog3] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog4] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog5] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[ABSOLUTE_PUBLISHED-catalog6] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog0] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog1] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog2] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog3] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog4] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog5] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[RELATIVE_PUBLISHED-catalog6] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog0] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog1] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog2] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog3] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog4] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog5] 194s ERROR tests/test_writing.py::TestSTACWriting::test_testcases[SELF_CONTAINED-catalog6] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_current_version 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example0] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example1] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example2] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example3] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example4] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example5] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example6] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example7] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example8] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example9] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example10] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example11] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example12] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example13] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example14] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example15] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example16] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example17] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example18] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example19] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example20] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example21] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example22] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example23] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example24] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example25] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example26] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example27] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example28] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example29] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example30] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example31] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example32] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example33] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example34] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example35] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example36] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example37] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example38] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example39] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example40] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example41] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example42] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example43] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example44] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example45] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example46] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example47] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example48] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example49] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example50] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example51] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example52] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example53] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example54] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example55] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example56] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example57] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example58] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example59] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example60] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example61] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example62] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example63] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example64] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example65] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example66] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example67] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example68] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example69] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example70] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example71] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example72] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example73] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example74] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example75] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example76] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example77] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example78] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example79] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example80] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example81] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example82] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example83] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example84] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example85] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example86] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example87] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example88] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example89] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example90] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example91] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example92] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example93] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example94] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example95] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example96] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example97] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example98] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example99] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example100] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example101] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example102] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example103] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example104] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example105] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example106] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example107] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example108] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example109] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example110] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example111] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example112] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example113] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example114] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example115] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example116] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example117] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example118] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example119] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example120] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example121] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example122] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example123] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_examples[example124] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_error_contains_href 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_deprecated_dict_arg 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_deprecated_dict_arg_missing_href 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_unexpected_href 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all - ... 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case0] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case1] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case2] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case3] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case4] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case5] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_all_dict[test_case6] 194s ERROR tests/validation/test_validate.py::TestValidate::test_validates_geojson_with_tuple_coordinates 194s ERROR tests/validation/test_validate.py::TestValidate::test_validate_custom_validator 194s ================ 1234 passed, 18 skipped, 305 errors in 23.25s ================= 194s E: pybuild pybuild:483: test: plugin pyproject failed with: exit code=1: cd /tmp/autopkgtest.YoLpTI/autopkgtest_tmp/build; python3.14 -m pytest tests 194s pybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p "3.13 3.14" returned exit code 13 194s make: *** [/tmp/aSh008LHbh/run:4: pybuild-autopkgtest] Error 25 194s pybuild-autopkgtest: error: /tmp/aSh008LHbh/run pybuild-autopkgtest returned exit code 2 194s autopkgtest [09:51:19]: test pybuild-autopkgtest: -----------------------] 195s autopkgtest [09:51:20]: test pybuild-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 195s pybuild-autopkgtest FAIL non-zero exit status 25 195s autopkgtest [09:51:20]: @@@@@@@@@@@@@@@@@@@@ summary 195s pybuild-autopkgtest FAIL non-zero exit status 25